query
stringlengths
7
33.1k
document
stringlengths
7
335k
metadata
dict
negatives
listlengths
3
101
negative_scores
listlengths
3
101
document_score
stringlengths
3
10
document_rank
stringclasses
102 values
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.order_id
public Long getOrderId() { return orderId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Integer getOrderItemId() {\n return orderItemId;\n }", "public int getId() {\n return orderID;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "OrderItemDto getOrderItem(long id) throws SQLException;", "public int getOrderID() {\n return orderID;\n }", "public String getOrderid() {\n return orderid;\n }", "public Integer\t\tgetOrderID();", "public String getOrderId(JsonObject order) {\r\n\t\tint orderID = 0;\r\n\t\tString customerId = order.get(\"customerId\").getAsString();\r\n\t\tString query = \"\";\r\n\t\tStatement stmt = null;\r\n\t\ttry {\r\n\t\t\tif (DBConnector.conn != null) {\r\n\t\t\t\tquery = \"SELECT * FROM home_heating_fuel_orders\" + \" WHERE customerID = '\" + customerId + \"';\";\r\n\t\t\t\tstmt = DBConnector.conn.createStatement();\r\n\t\t\t\tResultSet rs = stmt.executeQuery(query);\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\torderID = Math.max(rs.getInt(\"orderID\"), orderID);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Conn is null\");\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\r\n\t\t}\r\n\t\treturn orderID + \"\";\r\n\t}", "public Integer getOrderId() {\n return orderId;\n }", "public String getOrderID() {\n return this.orderID;\n }", "public int getOrderID() {\r\n return emporderID;\r\n }", "public String getOrderID() {return orderID;}", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public int getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public int getOrderID()\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(ORDERID$0, 0);\n if (target == null)\n {\n return 0;\n }\n return target.getIntValue();\n }\n }", "public String getOrdersId() {\n return ordersId;\n }", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "private int getOrderId() {\n int orderId;\n try {\n if (orderIdField.getText().isEmpty()) {\n orderId = -1;\n }\n else {\n orderId = Integer.parseInt(orderIdField.getText());\n }\n } catch (NumberFormatException exc) {\n orderId = -1;\n }\n return orderId;\n }", "public String getOrderId() {\n\t\treturn orderId;\n\t}", "public String getOrderID() {\n\t\treturn this.token.get(\"orderID\").toString();\n\t}", "@Override\r\n\tpublic OrderVO getOrderByID(Integer ono) throws Exception {\n\t\treturn sqlSession.selectOne(namespaceOrder+\".getOneOrderByOrderID\",ono);\r\n\t}", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public java.lang.String getOrderID(){\n return localOrderID;\n }", "public int getOrder_code_id() {\n return order_code_id;\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public static int insert(OrderItems order) {\r\n\t\tConnection dbConnection = ConnectionFactory.getConnection();\r\n\r\n\t\tPreparedStatement insertStatement = null;\r\n\t\tint insertedId = -1;\r\n\t\ttry {\r\n\t\t\tinsertStatement = dbConnection.prepareStatement(insertStatementString, Statement.RETURN_GENERATED_KEYS);\r\n\t\t\tinsertStatement.setInt(1, order.getIdOrder());\r\n\t\t\tinsertStatement.setString(2, order.getNumeClient());\r\n\t\t\tinsertStatement.setString(3, order.getDenumireProdus());\r\n\t\t\tinsertStatement.setInt(4, order.getCantitate());\r\n\t\t\tinsertStatement.executeUpdate();\r\n\r\n\t\t\tResultSet rs = insertStatement.getGeneratedKeys();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tinsertedId = rs.getInt(1);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println( \"OrderItemsDAO:insert \" + e.getMessage());\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.close(insertStatement);\r\n\t\t\tConnectionFactory.close(dbConnection);\r\n\t\t}\r\n\t\treturn insertedId;\r\n\t}", "@Override\r\n\tpublic OrderItem getOrderItem(int id) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tOrderItem order = (OrderItem) session.get(OrderItem.class,id);\r\n\t\treturn order;\r\n\r\n\t}", "ClOrderInfo selectByPrimaryKey(String orderId);", "public io.dstore.values.IntegerValue getOrderPersonId() {\n if (orderPersonIdBuilder_ == null) {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n } else {\n return orderPersonIdBuilder_.getMessage();\n }\n }", "@JsonProperty(\"OrderId\")\n public String getOrderId() {\n return orderId;\n }", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "io.dstore.values.IntegerValue getOrderPersonId();", "public java.lang.Integer getOrder_code_id() {\n return order_code_id;\n }", "public org.apache.xmlbeans.XmlInt xgetOrderID()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n return target;\n }\n }", "public int getMPC_Order_ID() {\n\t\tInteger ii = (Integer) get_Value(\"MPC_Order_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public int getXX_MaterialTransferOrder_ID() \r\n {\r\n return get_ValueAsInt(\"XX_MaterialTransferOrder_ID\");\r\n \r\n }", "public String getOrderidentifier() {\n\t\treturn orderidentifier;\n\t}", "public Input getOrderID() throws RemoteException\n\t{\n\t\t if (orderID != null)\n\t\t \treturn orderID;\n\t\t orderID = new LabelInput(getTransfer().getOrderID());\n\t\t return orderID;\n\t}", "public io.dstore.values.IntegerValue getOrderPersonId() {\n return orderPersonId_ == null ? io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public String getBusinessOrderId() {\n return businessOrderId;\n }", "public Integer getOrderbyid() {\r\n return orderbyid;\r\n }", "public void readOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n Object orderIdParam = session.getAttribute(\"orderId\");\n orderId = null;\n if(orderIdParam != null) {\n orderId = Integer.parseInt(orderIdParam.toString().trim());\n }\n }", "public Order getOrderById(long orderId);", "@JsonGetter(\"orderId\")\r\n public int getOrderId ( ) { \r\n return this.orderId;\r\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public long getOrderNumber()\n {\n return _orderNumber;\n }", "public Long getOrderNo () {\r\n\t\treturn orderNo;\r\n\t}", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "public String orderNumberById(String orderId) {\n return orderById(orderId, orderNumber);\n }", "public int geti_ordertrx_temp_ID();", "public Integer getOrderDetailId() {\r\n return this.orderDetailId;\r\n }", "public int getC_OrderLine_ID();", "@ApiModelProperty(example = \"123456\", value = \"Client order ID if supplied by client.\")\n public String getOrderId() {\n return orderId;\n }", "public String getOrderDocId() {\r\n return this.orderDocId;\r\n }", "@Select({\n \"select\",\n \"id, orderid, name, price, userid\",\n \"from order\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n @ResultMap(\"BaseResultMap\")\n Order selectByPrimaryKey(Long id);", "public int getOrderNumber() {\n return orderNumber;\n }", "public io.dstore.values.IntegerValueOrBuilder getOrderPersonIdOrBuilder() {\n if (orderPersonIdBuilder_ != null) {\n return orderPersonIdBuilder_.getMessageOrBuilder();\n } else {\n return orderPersonId_ == null ?\n io.dstore.values.IntegerValue.getDefaultInstance() : orderPersonId_;\n }\n }", "public static String getOrderIDvalue(int IDIndx) {\r\n\t\tLog.info(\"Getting Order ID Value\");\r\n\t\tList<WebElement> orderIds=driver.findElements(By.className(\"field-order_number\"));\r\n\t\tLog.info(\"Order IDs size:\"+orderIds.size());\r\n\t\tLog.info(\"Using Order ID at index:\"+IDIndx);\r\n\t\treturn orderIds.get(IDIndx).getText();\r\n\t}", "@Select({\n \"select\",\n \"order_id, num, com, status, message, ischeck, traceJson, create_time, last_udpate_time\",\n \"from tb_express_trace\",\n \"where order_id = #{orderId,jdbcType=VARCHAR}\"\n })\n @ResultMap(\"BaseResultMap\")\n TbExpressTrace selectByPrimaryKey(String orderId);", "String getOrderId();", "public Integer getOrderNumber()\n {\n return orderNum;\n }", "@Override\n\tpublic long getColumnId() {\n\t\treturn _expandoColumn.getColumnId();\n\t}", "public String getOrderId() {\n Object ref = orderId_;\n if (!(ref instanceof String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n orderId_ = s;\n }\n return s;\n } else {\n return (String) ref;\n }\n }", "public String getOrderId() {\n Object ref = orderId_;\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 orderId_ = s;\n }\n return s;\n }\n }", "@Override\n\tpublic Orderi get(Integer id) {\n\t\t\n\t\treturn (Orderi)getHibernateTemplate().get(Orderi.class, id);\n\t}", "OrderDetailBean getSearchOrderById(long orderIdi,String userLogin,int paymenttype) throws SQLException, Exception, RemoteException;", "public int getC_OrderLine_ID() {\n\t\tInteger ii = (Integer) get_Value(\"C_OrderLine_ID\");\n\t\tif (ii == null)\n\t\t\treturn 0;\n\t\treturn ii.intValue();\n\t}", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(Long orderId) {\n this.orderId = orderId;\n }", "public String getOrderNo() {\n return orderNo;\n }", "public static int delete(Orders order) {\n Connection dbConnection = ConnectionFactory.getConnection();\n PreparedStatement deletedStatement = null;\n\n ResultSet rs = null;\n int deletedId = -1;\n try {\n deletedStatement = dbConnection.prepareStatement(deleteStatementString, Statement.RETURN_GENERATED_KEYS);\n deletedStatement.setInt(1, order.getProduct_ID());\n deletedStatement.setInt(2, order.getClient_ID());\n deletedStatement.setDouble(3, order.getTotal_Price());\n deletedStatement.setInt(4, order.getAmount());\n\n deletedStatement.executeUpdate();\n rs = deletedStatement.getGeneratedKeys();\n if (rs.next()) {\n deletedId = rs.getInt(1);\n }\n } catch (SQLException e) {\n LOGGER.log(Level.WARNING,\"OrderDAO:findByName \" + e.getMessage());\n } finally {\n ConnectionFactory.close(rs);\n ConnectionFactory.close(deletedStatement);\n ConnectionFactory.close(dbConnection);\n }\n return deletedId;\n }", "String getOrderTypeId();", "public Integer getOrderItemAmount() {\n return orderItemAmount;\n }", "public List<OrderItem> searchOrderItem(int idOrderItem) throws SQLException, Exception {\n\n List<OrderItem> lista = new ArrayList<OrderItem>();\n String query = \"SELECT * FROM order_Item WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n st.setInt(1, idOrderItem);\n\n ResultSet rs = st.executeQuery(); //Execute the select\n\n while(rs.next()) {\n OrderItem oi = new OrderItem();\n\n oi.setIdOrderItem(rs.getInt(\"id_Order_Item\"));\n oi.setAmount(rs.getInt(\"amount\"));\n oi.setProductIdProduct(rs.getInt(\"product_id_Product\"));\n oi.setOrderIdItem(rs.getInt(\"order_id_Order\"));\n\n lista.add(oi);\n \n }\n\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n return lista;\n }", "NjOrderWork2 selectByPrimaryKey(String id);", "io.dstore.values.IntegerValueOrBuilder getOrderPersonIdOrBuilder();", "public int getC_OrderLine_ID () \n\t{\n\t\tInteger ii = (Integer)get_Value(COLUMNNAME_C_OrderLine_ID);\n\t\tif (ii == null)\n\t\t\t return 0;\n\t\treturn ii.intValue();\n\t}", "public void setOrderID(String orderID) {\n\t\tORDER_ID = orderID;\n\t}", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "public Integer getId()\r\n\t\t{ return mapping.getId(); }", "public Order getOrderByID(String order_id) throws Exception {\n\n\t\tConnection con = null;\n\t\tPreparedStatement stmt = null;\n\t\tResultSet rs = null;\n\t\tString sql = \"select * from ocgr_orders left join ocgr_clients on ocgr_orders.client_id = ocgr_clients.client_id left join ocgr_vendors on ocgr_orders.vendor_id = ocgr_vendors.vendor_id where order_id=? ;\";\n\n\t\tDB db = new DB();\n\n\t\ttry {\n\t\t\tdb.open();\n\t\t\tcon = db.getConnection();\n\n\t\t\tstmt = con.prepareStatement(sql);\n\t\t\tstmt.setString(1,order_id);\n\t\t\trs = stmt.executeQuery();\n\n\t\t\tif (!rs.next()) {\n\t\t\t\trs.close();\n\t\t\t\tstmt.close();\n\t\t\t\tdb.close();\n\n\t\t\t\tthrow new Exception(\"Not valid Order_id\");\n\t\t\t}\n\t\t\tClient client = new Client( rs.getString(\"client_id\"), rs.getString(\"client_password\"), rs.getString(\"client_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_fullname\"), rs.getString(\"client_compName\"), rs.getString(\"client_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"client_itin\"), rs.getString(\"client_doy\"), rs.getString(\"client_phone\") );\n\n\t\t\tVendor vendor = new Vendor( rs.getString(\"vendor_id\"), rs.getString(\"vendor_password\"), rs.getString(\"vendor_email\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_fullname\"), rs.getString(\"vendor_compName\"), rs.getString(\"vendor_address\"),\n\t\t\t\t\t\t\t\t\t\trs.getString(\"vendor_itin\"), rs.getString(\"vendor_doy\"), rs.getString(\"vendor_phone\") );\n\n\t\t\tOrder order = new Order(rs.getString(\"order_id\"), rs.getTimestamp(\"order_date\"), rs.getBigDecimal(\"order_total\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_address\"), rs.getString(\"order_address\"),\n\t\t\t\t\t\t\t\t\trs.getString(\"order_paymentmethod\"), client, vendor );\n\t\t\trs.close();\n\t\t\tstmt.close();\n\t\t\tdb.close();\n\n\t\t\treturn order;\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new Exception(e.getMessage());\n\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tdb.close();\n\t\t\t} catch (Exception e) {}\n\t\t}\n\t}", "public void setOrder_code_id(java.lang.Integer order_code_id) {\n this.order_code_id = order_code_id;\n }", "public Integer getId() {\n return aao.getId();\n }", "String getOrderStatusId();", "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public com.google.protobuf.ByteString\n getOrderIdBytes() {\n Object ref = orderId_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b =\n com.google.protobuf.ByteString.copyFromUtf8(\n (String) ref);\n orderId_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "@Field(4) \n\tpublic int ConditionalOrderID() {\n\t\treturn this.io.getIntField(this, 4);\n\t}", "public Integer getId() {\n\t\treturn orderPickListId;\n\t}", "public String getSOrderID() {\n return sOrderID;\n }", "public long getItemShopBasketId();", "public int getLastOrderId() {\r\n ArrayList<OrderRecord> result = new ArrayList<>();\r\n String sqlQuery = \"SELECT * FROM `orders`\";\r\n try {\r\n PreparedStatement p = myConn.prepareStatement(sqlQuery);\r\n ResultSet rs = p.executeQuery(sqlQuery);\r\n rs.last();\r\n return rs.getInt(\"id\");\r\n } catch (Exception e) {\r\n System.out.println(\"Could not get orders \" + e.toString());\r\n System.out.println(myStmt);\r\n }\r\n return 0;\r\n }", "public int toInt(){\n\t\treturn CustomerId;\n\t}", "Order getByID(String id);" ]
[ "0.72733915", "0.70917106", "0.6923813", "0.6869014", "0.6730515", "0.6687014", "0.66591597", "0.65860707", "0.6585665", "0.6577356", "0.6558786", "0.6492542", "0.64748496", "0.64487666", "0.6434854", "0.64284223", "0.62918967", "0.62918967", "0.62918967", "0.6280727", "0.6123209", "0.61230344", "0.60905266", "0.6075099", "0.6072451", "0.60570854", "0.60465324", "0.60465324", "0.603344", "0.6033287", "0.5960857", "0.59227276", "0.59090686", "0.5898713", "0.587521", "0.58586615", "0.58488715", "0.5831724", "0.58244365", "0.58206964", "0.58156765", "0.5796437", "0.57928616", "0.57850325", "0.578202", "0.57772964", "0.57405514", "0.5738136", "0.5717099", "0.56946445", "0.56706023", "0.5668031", "0.5659474", "0.5651969", "0.5619393", "0.56193066", "0.5609179", "0.56004614", "0.5598973", "0.5586152", "0.55839616", "0.5581723", "0.55695283", "0.55627537", "0.55600685", "0.55352813", "0.5525045", "0.5518803", "0.55041605", "0.5489168", "0.54733336", "0.54728806", "0.54675484", "0.54625297", "0.54625297", "0.5426333", "0.54015934", "0.53974676", "0.53941333", "0.5380489", "0.53758985", "0.5375467", "0.5373738", "0.5353399", "0.53515506", "0.53478307", "0.53472984", "0.5339999", "0.53349334", "0.5331758", "0.53301066", "0.5317559", "0.531196", "0.5305329", "0.52952075", "0.5290993", "0.52871674", "0.52852255", "0.5284126" ]
0.64665335
14
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.order_id
public void setOrderId(Long orderId) { this.orderId = orderId; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setIdOrder(Long idOrder) {\n this.idOrder = idOrder;\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setOrderid(Long orderid) {\r\n this.orderid = orderid;\r\n }", "public void setOrderId(Integer orderId) {\n this.orderId = orderId;\n }", "public void setOrderID(int orderID)\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(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_element_user(ORDERID$0);\n }\n target.setIntValue(orderID);\n }\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void xsetOrderID(org.apache.xmlbeans.XmlInt orderID)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.XmlInt target = null;\n target = (org.apache.xmlbeans.XmlInt)get_store().find_element_user(ORDERID$0, 0);\n if (target == null)\n {\n target = (org.apache.xmlbeans.XmlInt)get_store().add_element_user(ORDERID$0);\n }\n target.set(orderID);\n }\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId;\n }", "public void setOrderId(int value) {\n this.orderId = value;\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId == null ? null : orderId.trim();\n }", "public void setOrderId(String orderId) {\n this.orderId = orderId == null ? null : orderId.trim();\n }", "public void setOrderId(String orderId) {\n\t\tthis.orderId = orderId;\n\t}", "public int getId() {\n return orderID;\n }", "public Long getOrderid() {\r\n return orderid;\r\n }", "public void setOrderID(String orderID) {\n\t\tORDER_ID = orderID;\n\t}", "public void setOrderid(String orderid) {\n this.orderid = orderid == null ? null : orderid.trim();\n }", "@Column(name = \"order_id\", precision = 10)\n @GeneratedValue\n @Id\n public Integer getOrderId() {\n return orderId;\n }", "public String getOrderID() {return orderID;}", "public void setOrder_code_id(int order_code_id) {\n this.order_code_id = order_code_id;\n }", "public void writeOrderId() {\n FacesContext fc = FacesContext.getCurrentInstance();\n HttpSession session = (HttpSession) fc.getExternalContext().getSession(false);\n session.setAttribute(\"orderId\", \"\" + orderId);\n }", "@JsonSetter(\"orderId\")\r\n public void setOrderId (int value) { \r\n this.orderId = value;\r\n }", "public String getOrderid() {\n return orderid;\n }", "public int getOrderID() \r\n\t{\r\n\t\treturn orderID;\r\n\t}", "public int getOrderID() {\n return orderID;\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public void setOrder(String id,String email);", "public String getOrdersId() {\n return ordersId;\n }", "public void setOrder_code_id(java.lang.Integer order_code_id) {\n this.order_code_id = order_code_id;\n }", "public final void setOrderNumber(com.mendix.systemwideinterfaces.core.IContext context, Long ordernumber)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.OrderNumber.toString(), ordernumber);\r\n\t}", "public Integer getOrderId() {\n return orderId;\n }", "public int getOrderId() {\n return orderId;\n }", "public void setOrder(int value) {\n this.order = value;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Long getOrderId() {\n return orderId;\n }", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "public void seti_ordertrx_temp_ID (int i_ordertrx_temp_ID);", "public void setOrderbyid(Integer orderbyid) {\r\n this.orderbyid = orderbyid;\r\n }", "public String getOrderID() {\n return this.orderID;\n }", "void prepareOrder(int orderId);", "public void setOrderNumber(int value) {\n this.orderNumber = value;\n }", "public final void setOrder(com.mendix.systemwideinterfaces.core.IContext context, java.lang.Integer order)\r\n\t{\r\n\t\tgetMendixObject().setValue(context, MemberNames.Order.toString(), order);\r\n\t}", "public void setOrder(Order order){\n this.order = order;\n }", "public void setC_OrderLine_ID (int C_OrderLine_ID);", "public int getOrderID() {\r\n return emporderID;\r\n }", "void setOrder(Order order);", "public Orders(int ordersId) {\r\n this.ordersId = ordersId;\r\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "public String getOrderId() {\n return orderId;\n }", "void setOrder(int order){\r\n\t\t\tthis.order = order;\r\n\t\t}", "@Test\n public void testSetOrderId() throws Exception {\n Order newOrder = new Order();\n newOrder.setOrderNumber(609);\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Wood\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n service.addOrder(newOrder);\n // addOrder(newOrder.getOrderNumber(), newOrder);\n\n Order otherOrder = new Order();\n otherOrder.setCustomerName(\"Mickey\");\n otherOrder.setState(\"PA\");\n otherOrder.setProductType(\"Wood\");\n otherOrder.setArea(new BigDecimal(\"560\"));\n\n service.setOrderId(otherOrder);\n\n Integer number = 610;\n\n Assert.assertEquals(otherOrder.getOrderNumber(), number);\n\n }", "public void setOrderNo (Long orderNo) {\r\n\t\tthis.orderNo = orderNo;\r\n\t}", "OrderItemDto getOrderItem(long id) throws SQLException;", "public void setOrder(final Integer order) {\n this.order = order;\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public final void setOrder_Customer(com.mendix.systemwideinterfaces.core.IContext context, simpleordermodule.proxies.Customer order_customer)\r\n\t{\r\n\t\tif (order_customer == null)\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.Order_Customer.toString(), null);\r\n\t\telse\r\n\t\t\tgetMendixObject().setValue(context, MemberNames.Order_Customer.toString(), order_customer.getMendixObject().getId());\r\n\t}", "public void setOrder(Integer order) {\n\t\tthis.order = order;\n\t}", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrdersId(String ordersId) {\n this.ordersId = ordersId == null ? null : ordersId.trim();\n }", "@Override\r\n\tpublic Order update(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"UPDATE orders \"\r\n\t\t\t\t\t+ \"SET customer_id = %d WHERE order_id = %d \", order.getCustomer().getId(), order.getId()));\t\r\n\t\t\treturn readOrder(order.getId());\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void setOrder(final Order value)\n\t{\n\t\tsetOrder( getSession().getSessionContext(), value );\n\t}", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethod(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryNoClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "@Override\n\tpublic void updateOrder(Orders order) throws SQLException {\n\t\tConnection conn = null;\n PreparedStatement stmt = null;\n String sql=\"UPDATE orders SET orderName=?,orderAddress=?,orderPhone=?,orderNumber=?,bookName=?,orderMemo=? WHERE orderId=?\";\n try {\n conn = DBCPUtils.getConnection();\n stmt = conn.prepareStatement(sql);\n stmt.setString(1,order.getOrderName());\n stmt.setString(2,order.getOrderAddress());\n stmt.setString(3,order.getOrderPhone());\n stmt.setInt(4,order.getOrderNumber());\n stmt.setString(5,order.getBookName());\n stmt.setString(6,order.getOrderMemo());\n stmt.setInt(7,order.getOrderId());\n stmt.executeUpdate();\n \n } catch (SQLException e) {\n e.printStackTrace();\n }finally{\n DBCPUtils.releaseConnection(conn, stmt, null); \n }\n\t\t\n\t}", "public void setCurrentOrderId(String currentOrderId) {\n this.currentOrderId = currentOrderId;\n }", "public Builder setOrderId(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00002000;\n orderId_ = value;\n onChanged();\n return this;\n }", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "@Override\r\n @Transactional(value = \"jpaTransactionManager\")\r\n public JPAOrderItem updateUsingQueryMethodAndClear(Integer orderId) {\n Integer itemNum = 1;\r\n JPAOrderItem jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n\r\n jpaOrderItemRepository.updateByQueryWithClear(orderId);\r\n\r\n // Once again getting the same item#1 from the given orderId to check\r\n // the state\r\n jpaOrderItem = jpaOrderItemRepository.findOne(itemNum);\r\n return jpaOrderItem;\r\n }", "public void setMPC_Order_ID(int MPC_Order_ID) {\n\t\tif (MPC_Order_ID < 1)\n\t\t\tthrow new IllegalArgumentException(\"MPC_Order_ID is mandatory.\");\n\t\tset_Value(\"MPC_Order_ID\", new Integer(MPC_Order_ID));\n\t}", "public void setOrder(int order) {\n this.order = order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "public String getOrderId() {\n\t\treturn orderId;\n\t}", "@JsonProperty(\"OrderId\")\n public String getOrderId() {\n return orderId;\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public void setOrder(int order) {\n mOrder = order;\n }", "public void setOrderDocId(String orderDocId) {\r\n this.orderDocId = orderDocId;\r\n }", "public void setOrder(Order order) {\n this.order = order;\n notifyChanged();\n }", "public void setSalesorderId(Number value) {\n setAttributeInternal(SALESORDERID, value);\n }", "public void setOrder(int order) {\n\t\tthis.order = order;\n\t}", "private void recordOrderID(OrderID inOrderID)\n {\n String currentOrderIDList = getProperty(\"orderIDs\");\n currentOrderIDList += \",\" + inOrderID.getValue();\n setProperty(\"orderIDs\",\n currentOrderIDList);\n }", "public void setOrderidentifier(String orderidentifier) {\n\t\tthis.orderidentifier = orderidentifier == null ? null : orderidentifier\n\t\t\t\t.trim();\n\t}", "@Update({\n \"update order\",\n \"set orderid = #{orderid,jdbcType=VARCHAR},\",\n \"name = #{name,jdbcType=VARCHAR},\",\n \"price = #{price,jdbcType=BIGINT},\",\n \"userid = #{userid,jdbcType=VARCHAR}\",\n \"where id = #{id,jdbcType=BIGINT}\"\n })\n int updateByPrimaryKey(Order record);", "public final void setOrderNumber(Long ordernumber)\r\n\t{\r\n\t\tsetOrderNumber(getContext(), ordernumber);\r\n\t}", "public void setOrderIndex(Integer orderIndex) {\n this.orderIndex = orderIndex;\n }", "@Override\r\n\tpublic void saveJoOrder(JoOrder joOrder){\n\t\tString headerId = Tools.getUUID();\r\n\t\tjoOrder.getJoHeader().setHeaderId(headerId);\r\n\t\tbaseDao.save(joOrder.getJoHeader());\r\n\t\tfor(JoLine joLine : joOrder.getJoLineList()){\r\n\t\t\tjoLine.setLineId(Tools.getUUID());\r\n\t\t\tjoLine.setHeaderId(headerId);\r\n\t\t\tjoLineDao.save(joLine);\r\n\t\t}\r\n\t}", "@ApiModelProperty(example = \"123456\", value = \"Client order ID if supplied by client.\")\n public String getOrderId() {\n return orderId;\n }", "public synchronized void setNumOrdered(String itemID, int numOrdered) {\n\t\tItemOrder order;\n\t\tboolean found = false;\n\t\tint i = 0;\n\n\t\twhile (!found && i < itemsOrdered.size()) {\n\t\t\torder = itemsOrdered.get(i);\n\t\t\tif (order.getItem().getItemID().equals(itemID)) {\n\t\t\t\tfound = true;\n\t\t\t\tif (numOrdered <= 0)\n\t\t\t\t\titemsOrdered.remove(i);\n\t\t\t\telse\n\t\t\t\t\torder.setNumItems(numOrdered);\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\tif (!found) {\n\t\t\tItemOrder newOrder = new ItemOrder(Catalogue.instance.getModel().get(itemID));\n\t\t\titemsOrdered.add(newOrder);\n\t\t}\n\t\treturn;\n\t}", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "private void setBId(int value) {\n \n bId_ = value;\n }", "public void update(Order order) {\n order_dao.update(order);\n }", "private void setOtherId(int value) {\n \n otherId_ = value;\n }", "public void setSalesOrderId(Number value) {\n setAttributeInternal(SALESORDERID, value);\n }", "public void setC_OrderLine_ID (int C_OrderLine_ID)\n\t{\n\t\tif (C_OrderLine_ID < 1) \n\t\t\tset_Value (COLUMNNAME_C_OrderLine_ID, null);\n\t\telse \n\t\t\tset_Value (COLUMNNAME_C_OrderLine_ID, Integer.valueOf(C_OrderLine_ID));\n\t}", "public void updateOrders(Integer oid) {\n\t\tOrders orders=ordersMapper.selectByPrimaryKey(oid);\n\t\torders.setState(1);\n\t\tordersMapper.updateByPrimaryKeySelective(orders);\n\t}" ]
[ "0.6962086", "0.68938243", "0.68081945", "0.67917454", "0.67822", "0.65710634", "0.65710634", "0.65230906", "0.6491982", "0.6482762", "0.64389366", "0.633625", "0.62807244", "0.62807244", "0.627333", "0.6238027", "0.62283075", "0.6180883", "0.6147801", "0.61087483", "0.6055503", "0.6052884", "0.6014275", "0.60053563", "0.597499", "0.59749496", "0.59657365", "0.59459203", "0.5890812", "0.5865122", "0.5864134", "0.5829214", "0.58270395", "0.5801017", "0.58006203", "0.5785823", "0.5785823", "0.5782787", "0.57734835", "0.5754306", "0.5743662", "0.5737277", "0.5732409", "0.5730862", "0.56931424", "0.56925565", "0.5686971", "0.5666446", "0.56605875", "0.56605136", "0.56605136", "0.56605136", "0.565873", "0.5656717", "0.56525683", "0.56440043", "0.5628041", "0.5625861", "0.5624799", "0.5624799", "0.5611045", "0.55887955", "0.5580846", "0.5569201", "0.55637676", "0.5539545", "0.55076873", "0.5490159", "0.5486482", "0.5483441", "0.54740024", "0.54732907", "0.5465941", "0.5445489", "0.5445489", "0.5431771", "0.5430569", "0.54164106", "0.5413649", "0.5411425", "0.54085374", "0.5406752", "0.54037136", "0.53999716", "0.5396807", "0.53906125", "0.5380809", "0.5359566", "0.53349507", "0.5331466", "0.53310883", "0.53291386", "0.5321797", "0.5303197", "0.5302749", "0.5297072", "0.52901596", "0.5267428", "0.52632904" ]
0.66015255
6
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.item_key
public String getItemKey() { return itemKey; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public long getBomItemKey() {\n\t\treturn bomItemKey;\n\t}", "public String getFirstKeyColumnName() {\n\t\treturn \"wishlistItemId\";\n\t}", "public String getItemKey() {\n return (String)getAttributeInternal(ITEMKEY);\n }", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryKeyProto getDeletedItemKey() {\n if (inventoryItemCase_ == 2) {\n return (POGOProtos.Rpc.HoloInventoryKeyProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryKeyProto.getDefaultInstance();\n }", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryKeyProto getDeletedItemKey() {\n if (deletedItemKeyBuilder_ == null) {\n if (inventoryItemCase_ == 2) {\n return (POGOProtos.Rpc.HoloInventoryKeyProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryKeyProto.getDefaultInstance();\n } else {\n if (inventoryItemCase_ == 2) {\n return deletedItemKeyBuilder_.getMessage();\n }\n return POGOProtos.Rpc.HoloInventoryKeyProto.getDefaultInstance();\n }\n }", "public int getKeyBuyItem() {\r\n return getKeyShoot();\r\n }", "BListKey getKey();", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapItemToKey(String item) {\n return item;\n }", "public long getProcessOrderItemKey() {\n\t\treturn processOrderItemKey;\n\t}", "protected static Object getColumnKey(XmlElement xmlColumn)\n {\n XmlValue xmlTemp = xmlColumn.getAttribute(\"id\");\n if (xmlTemp == null)\n {\n return xmlColumn;\n }\n return xmlTemp.getString();\n }", "public int getKeySellItem() {\r\n return getKeyShoot();\r\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapItemToKey(String item) {\n return this.mPrefix + item;\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public String getKey() {\r\n\t\tStringBuilder builder = new StringBuilder();\r\n\t\tif (getLineNo() != null) {\r\n\t\t\tbuilder.append(getLineNo());\r\n\t\t} else if (this.getEntityId() != null) {\r\n\t\t\tbuilder.append(getEntityId());\r\n\t\t}\r\n\t\treturn builder.toString();\r\n\t}", "public String getKeyBuyItemName() {\r\n return getKeyShootName();\r\n }", "org.apache.calcite.avatica.proto.Common.DatabaseProperty getKey();", "protected XmlElement getSelectKey(IntrospectedColumn introspectedColumn,\n GeneratedKey generatedKey) {\n String identityColumnType = introspectedColumn.getFullyQualifiedJavaType().getFullyQualifiedName();\n\n XmlElement answer = new XmlElement(\"selectKey\"); //$NON-NLS-1$\n answer.addAttribute(new Attribute(\"resultType\", identityColumnType)); //$NON-NLS-1$\n answer.addAttribute(new Attribute(\n \"keyProperty\", introspectedColumn.getJavaProperty())); //$NON-NLS-1$\n answer.addAttribute(new Attribute(\"order\", generatedKey.getMyBatis3Order())); //$NON-NLS-1$\n\n answer.addElement(new TextElement(generatedKey.getRuntimeSqlStatement()));\n\n return answer;\n }", "@Override\n public int getKey() {\n return this.key;\n }", "public String getKey() { \n\t\treturn getKeyElement().getValue();\n\t}", "public Integer getKey()\r\n {\r\n return key;\r\n }", "public String getKey() {\n return element == null ? null : element.getKey();\n }", "public void setItemKey(String itemKey) {\n this.itemKey = itemKey == null ? null : itemKey.trim();\n }", "NestedListKey getKey();", "private Object _getRowKey()\n {\n Object data = getRowData();\n \n assert (_rowKeyProperty != null);\n return __resolveProperty(data, _rowKeyProperty);\n }", "public int getKey() {\n return this.key;\n }", "@Override\n public int getKey() {\n return key_;\n }", "public int getItemID()\n {\n return itemID;\n }", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryKeyProtoOrBuilder getDeletedItemKeyOrBuilder() {\n if (inventoryItemCase_ == 2) {\n return (POGOProtos.Rpc.HoloInventoryKeyProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryKeyProto.getDefaultInstance();\n }", "public Integer getItemid() {\n return itemid;\n }", "public Integer getItemid() {\n return itemid;\n }", "@Override\n public int getKey() {\n return key_;\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "@java.lang.Override\n public POGOProtos.Rpc.HoloInventoryKeyProtoOrBuilder getDeletedItemKeyOrBuilder() {\n if ((inventoryItemCase_ == 2) && (deletedItemKeyBuilder_ != null)) {\n return deletedItemKeyBuilder_.getMessageOrBuilder();\n } else {\n if (inventoryItemCase_ == 2) {\n return (POGOProtos.Rpc.HoloInventoryKeyProto) inventoryItem_;\n }\n return POGOProtos.Rpc.HoloInventoryKeyProto.getDefaultInstance();\n }\n }", "public String getItemID() {\n\t return this.itemID;\n\t}", "public String[] findByID(String itemKey){\n String query = \"Select * FROM \" + GroceryDBContract.GroceryList.TABLE_NAME + \" WHERE \" + GroceryDBContract.GroceryList.COLUMN_NAME_ENTRY_KEY + \" = \\\"\" + itemKey + \"\\\"\";\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(query, null);\n String[] item = new String[2];\n if (c.moveToFirst()) {\n c.moveToFirst();\n item[0]= c.getString(0);\n item[1]= c.getString(1);\n c.close();\n } else {\n item = null;\n }\n db.close();\n return item;\n }", "public KeyField getKey() {\n\treturn keyField;\n }", "public KeyField getKeyField() {\n\treturn keyField;\n }", "public int getKey(){\n return key;\n }", "public String getKey() {\n if (model == null)\n return strKey;\n return model.getKey();\n }", "public String getItemId() {\r\n return itemId;\r\n }", "public String getKey() {\n\t\treturn this.isbn13;\n\t}", "public String getKey() {\r\n return getAttribute(\"id\");\r\n }", "public org.apache.calcite.avatica.proto.Common.DatabaseProperty getKey() {\n if (keyBuilder_ == null) {\n return key_ == null ? org.apache.calcite.avatica.proto.Common.DatabaseProperty.getDefaultInstance() : key_;\n } else {\n return keyBuilder_.getMessage();\n }\n }", "public Object getKey() {\r\n return key;\r\n }", "public Object getKey()\n {\n return key;\n }", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public String getKey() {\n\t\treturn id + \"\";\n\t}", "public int getKey() {\r\n return key;\r\n }", "public String getItemId(){\r\n\t\treturn \"\";\r\n\t}", "public int getKey() {\n\t\treturn 0;\n\t}", "public int getMapItem() {\n\t\treturn mapItem;\n\t}", "@Override\n\t\tpublic K getKey(){\n\t\t\treturn key;\n\t\t}", "public String getItemId() {\n return itemId;\n }", "public Long getItemId() {\r\n return itemId;\r\n }", "public int getKey() {\n return key;\n }", "Key getPrimaryKey();", "public String getKey() {\n\t\tString t = doc.get(\"key\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public org.apache.calcite.avatica.proto.Common.DatabaseProperty getKey() {\n return key_ == null ? org.apache.calcite.avatica.proto.Common.DatabaseProperty.getDefaultInstance() : key_;\n }", "public int getItemId()\r\n {\r\n return _itemId;\r\n }", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public String getOrderItemName() {\n return orderItemName;\n }", "public Object getKey() {\n return key;\n }", "public int getID(OrderItem oi){\n int id;\n id=findID(oi);\n return id;\n }", "public String getKeyName(){\n\n //returns the value of the keyName field\n return this.keyName;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public int getKey()\n {\n return key;\n }", "public int getKey()\n {\n return key;\n }", "public int getKey()\n {\n return key;\n }", "public int getKey()\n {\n return key;\n }", "public int getItemId() {\n return itemId;\n }", "public Key getKey() {\n\t\tString fieldvalue = getValue(\"sys_id\");\n\t\tassert fieldvalue != null;\n\t\treturn new Key(fieldvalue);\n\t}", "public Integer key() {\n return this.key;\n }", "@Override\n\tpublic long getPrimaryKey() {\n\t\treturn _buySellProducts.getPrimaryKey();\n\t}", "public String getKey()\r\n {\r\n return getValue().toString();\r\n }", "public IdDt getKeyElement() { \n\t\tif (myKey == null) {\n\t\t\tmyKey = new IdDt();\n\t\t}\n\t\treturn myKey;\n\t}", "public TableKey getKey() {\n \treturn key;\n }", "int getKey() {\n return this.key;\n }", "protected int getItemIndex(String key){\n for (int i = 0; i < itemsInTable.size(); i++){\n if (itemsInTable.get(i).equals(key)) return i;\n }\n return -1;\n }", "@Override\n\tpublic String getKey() {\n\t\treturn id+\"\";\n\t}", "public Key getkey(String appid) {\n log.debug(getSessionFactory() == null ? \"Session Factory is null\" : \"Session Factory is Not null\");\n log.debug(\"Application id :\" + appid);\n\n try {\n SimpleJdbcTemplate jdbcTemplate =\n new SimpleJdbcTemplate(SessionFactoryUtils.getDataSource(getSessionFactory()));\n Map args = new HashMap();\n args.put(\"in1\", new String(appid));\n\n return jdbcTemplate.queryForObject(\"select a.APP_ID,a.name,a.CERTIFICATEID,a.soa_group_id,c.soa_group_name from \" + APP_KEY_TABLE + \" a , SOA_GROUP c where a.status='Active' and a.soa_group_id=c.soa_group_id and a.APP_ID=?\"\n , new ParameterizedRowMapper<Key>() {\n public Key mapRow(ResultSet rs, int rowNum) throws SQLException {\n return new Key(rs.getString(\"APP_ID\"), rs.getString(\"name\"), rs.getString(\"soa_group_id\"), rs.getString(\"soa_group_name\"), rs.getString(\"CERTIFICATEID\"));\n }\n }, appid);\n } catch (DataAccessException e) {\n e.printStackTrace();\n return null;//To change body of catch statement use File | Settings | File Templates.\n }\n }", "public BigInteger getKeyBI() {\n return new BigInteger(this.getEncoded());\n }", "public String getQueryKey()\n {\n if (getPrimaryKey() == null)\n {\n return \"\";\n }\n else\n {\n return getPrimaryKey().toString();\n }\n }", "public String getKey(){\n\t\treturn key;\n\t}", "public Long getRowKey() {\n return (Long) getAttributeInternal(ROWKEY);\n }", "public String getKey()\n\t{\n\t\treturn this.key;\n\t}", "public int getKeyBuyMenu() {\r\n return Input.Keys.valueOf(getKeyBuyMenuName());\r\n }", "public String getKey() {\n return this.key;\n }", "public CatalogItem applyKeyToItem(CatalogItem item, Object[] key) {\n return item;\n }", "public Object getRowKey()\n {\n if (isRowAvailable())\n {\n Object rowKey = _getRowKey();\n return rowKey;\n }\n else\n {\n return null;\n }\n }", "public static String getKey(){\n\t\treturn key;\n\t}", "@Column(name = \"BUSINESS_KEY_\", length = 250)\n public String getBusinessKey() {\n return businessKey;\n }", "@Override\n\tpublic String getKey() {\n\t\treturn key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public String getKey() {\n\t\treturn this.key;\n\t}", "public Integer key() {\n return key;\n }", "public String getKey() {\n return this.key;\n }" ]
[ "0.6552266", "0.6453454", "0.64528584", "0.6278432", "0.6250361", "0.6225628", "0.6186453", "0.6047967", "0.6040616", "0.5986531", "0.58836204", "0.58316386", "0.5764285", "0.5754921", "0.5748344", "0.5722341", "0.5716764", "0.56606364", "0.5636625", "0.5633861", "0.5629719", "0.5589449", "0.5586405", "0.5578311", "0.55776495", "0.55590487", "0.55545086", "0.5533392", "0.55268824", "0.5522332", "0.55217206", "0.55215293", "0.55215293", "0.5515394", "0.5504522", "0.5501111", "0.54977936", "0.5497015", "0.5496756", "0.54956955", "0.54922926", "0.5488541", "0.5483148", "0.5470071", "0.5468249", "0.5465107", "0.54635423", "0.54559547", "0.5453388", "0.5451331", "0.545087", "0.5445738", "0.5432876", "0.54245555", "0.54241955", "0.5423641", "0.54207766", "0.54098713", "0.5406481", "0.5406169", "0.5404881", "0.54031986", "0.54014695", "0.53989846", "0.539597", "0.53882194", "0.53757", "0.53711414", "0.53704274", "0.53704274", "0.53704274", "0.53704274", "0.5369802", "0.53625417", "0.53621984", "0.5359398", "0.5358243", "0.5353637", "0.5353264", "0.5352048", "0.5348947", "0.5347237", "0.53418624", "0.5339354", "0.5334948", "0.53314304", "0.5329726", "0.5321763", "0.5313198", "0.5305621", "0.5305572", "0.5300438", "0.5297993", "0.5291244", "0.5289253", "0.5282457", "0.5282457", "0.5282457", "0.5274919", "0.52740955" ]
0.635592
3
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.item_key
public void setItemKey(String itemKey) { this.itemKey = itemKey == null ? null : itemKey.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setItemKey(String value) {\n setAttributeInternal(ITEMKEY, value);\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setBomItemKey(long value) {\n\t\tthis.bomItemKey = value;\n\t}", "public CatalogItem applyKeyToItem(CatalogItem item, Object[] key) {\n return item;\n }", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void setProcessOrderItemKey(long value) {\n\t\tthis.processOrderItemKey = value;\n\t}", "void setItemId(String itemId);", "public Integer getOrderItemId() {\n return orderItemId;\n }", "public long getBomItemKey() {\n\t\treturn bomItemKey;\n\t}", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapItemToKey(String item) {\n return item;\n }", "@Override // android.media.MediaFormat.FilteredMappedKeySet\n public String mapItemToKey(String item) {\n return this.mPrefix + item;\n }", "@Override\r\n public void setItemId(int itemId) {\n this.itemId = itemId;\r\n }", "public void editItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tString queryString = \"Update team1.GABES_ITEM Set ITEM_CATEGORY=?, DESCRIPTION=?, ITEM_NAME=?\";\n\t\tqueryString += \"Where ITEM_ID='\" + this.item_id + \"'\";\n\t\t/** Clears parameters and then sets new values */\n\t\tPreparedStatement p_stmt = con.prepareCall(queryString);\n\t\t/** Set new attribute values */\n\t\tp_stmt.clearParameters();\n\t\tp_stmt.setString(1, this.item_category);\n\t\tp_stmt.setString(2, this.description);\n\t\tp_stmt.setString(3, this.item_name);\n\t\t/* Executes the Prepared Statement query */\n\t\tp_stmt.executeQuery();\n\t\tp_stmt.close();\n\t}", "public String getFirstKeyColumnName() {\n\t\treturn \"wishlistItemId\";\n\t}", "public void setItemId(Long itemId) {\r\n this.itemId = itemId;\r\n }", "public void setItemID(String itemID) {\n\t this.itemID = itemID;\n\t}", "private void loadItem(Item item, ResultSet resultSet, int index) throws SQLException {\n\t\t\titem.setName(resultSet.getString(index++));\n\t\t\titem.setLocationID(resultSet.getInt(index++));\n\t\t\titem.setItemID(resultSet.getInt(index++));\n\t\t}", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public KeyedItem(int key,\n T item)\n {\n this(new Integer(key), item);\n }", "public void setCOD_ITEM(String COD_ITEM) {\n this.COD_ITEM = COD_ITEM;\n }", "@Override\n public void setPrimaryKey(java.lang.Object key) {\n\n mnDbmsType = ((int[]) key)[0];\n mnPkYearId = ((int[]) key)[1];\n mnPkTypeCostObjectId = ((int[]) key)[2];\n mnPkRefCompanyBranchId = ((int[]) key)[3];\n mnPkRefReferenceId = ((int[]) key)[4];\n mnPkRefEntityId = ((int[]) key)[5];\n mnPkBizPartnerId = ((int[]) key)[6];\n mtDbmsDateStart = ((java.util.Date[]) key)[7];\n mtDbmsDateEnd = ((java.util.Date[]) key)[8];\n }", "public void setItem(Item item) {\n this.item = item;\n }", "public void setITEM(int value) {\r\n this.item = value;\r\n }", "public void setKey( Long key ) {\n this.key = key ;\n }", "public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setProductRelatedByProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setProductId(((NumberKey) key).intValue());\n }", "public void setItemId(String itemId) {\n this.itemId = itemId;\n }", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "public Object putItem (String key, Object item);", "public void setIdkey(String pIdkey){\n this.idkey = pIdkey;\n }", "public String getItemKey() {\n return itemKey;\n }", "public void setItemId(int itemId) {\n\t\tthis.itemId = itemId;\n\t}", "public void setItemShopBasketId(long itemShopBasketId);", "public void setKey(int position,int key) {\r\n\t\tthis.treeKey[position]=key;\r\n\t}", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public void setKey(int key){\r\n this.key = key; \r\n }", "public void setKey(TableKey key) {\n\tthis.key = key;\n }", "public void setKey(String key) {\n if (element != null) {\n element.setKey(key);\n }\n }", "@Override\n\tpublic ManagedFunctionObjectTypeBuilder<M> setKey(M key) {\n\t\tthis.key = key;\n\t\tthis.index = key.ordinal();\n\t\treturn this;\n\t}", "public int registerOrderItem(OrderItem i) {\n int ok = 0;\n try {\n String query = \"INSERT INTO order_Item (id_Order_Item, amount, product_id_Product, order_id_Order) VALUES (?, ?, ?, ?) ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n\n st.setInt(1, 0);\n st.setInt(2, i.getAmount());\n st.setInt(3, i.getProductIdProduct());\n st.setInt(4, i.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the insert\n st.close(); //Close the Statment\n con.close(); //Close the connection\n \n } catch (SQLException e) {\n e.printStackTrace();\n }\n \n return ok;\n }", "public void setPO_ITEM(java.lang.String PO_ITEM) {\r\n this.PO_ITEM = PO_ITEM;\r\n }", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public Object getKey(Movie item) {\n\t return (item == null) ? null : item.getId();\r\n\t }", "public void setKey(String isbn13) {\n\t\tthis.isbn13 = isbn13;\n\t}", "public long getProcessOrderItemKey() {\n\t\treturn processOrderItemKey;\n\t}", "public void setPrimaryKey(ObjectKey key) throws TorqueException\n {\n SimpleKey[] keys = (SimpleKey[]) key.getValue();\n SimpleKey tmpKey = null;\n setMailId(((NumberKey)keys[0]).intValue());\n setReceiverId(((NumberKey)keys[1]).intValue());\n }", "public void setItemCode(String itemCode) {\n this.itemCode = itemCode;\n }", "private void updateItem(Item item) throws SQLException\n {\n int itemId = item.getId();\n logger.debug(\"Updating Item with id \" + itemId + \"...\");\n try(Statement statement = connection.createStatement())\n {\n String sql = MessageFormat.format(\"UPDATE Items SET (title, description, price) = ({0}, {1}, {2}) WHERE id = {3}\",\n escapeStringValue(item.getTitle()), escapeStringValue(item.getDescription()), item.getPrice(), itemId);\n statement.addBatch(sql);\n statement.addBatch(\"DELETE FROM Items_Locations WHERE item_id = \" + itemId);\n statement.executeBatch();\n addItemQuantitiesPerLocation(item);\n }\n logger.debug(\"Updated Item successfully.\");\n }", "public void setCountryKey(ObjectKey key) throws TorqueException\n {\n \n setCustCountryId(((NumberKey) key).intValue());\n }", "public int getItem_order_code_id() {\n return item_order_code_id;\n }", "public void setItemNo(Integer itemNo) {\n\t\tif (itemNo == 0) {\n\t\t\tthis.itemNo = null;\n\t\t} else {\n\t\t\tthis.itemNo = itemNo;\n\t\t}\n\t}", "public void setOrderItemName(String orderItemName) {\n this.orderItemName = orderItemName == null ? null : orderItemName.trim();\n }", "public void setItem (jkt.hms.masters.business.MasStoreItem item) {\n\t\tthis.item = item;\n\t}", "void SetItemNumber(int ItemNumber);", "public void setItemLocationId(Long itemLocationId) {\r\n this.itemLocationId = itemLocationId;\r\n }", "@Override\n\tpublic void setPrimaryKey(long primaryKey) {\n\t\t_buySellProducts.setPrimaryKey(primaryKey);\n\t}", "private void setKey(String key){\n\t\tthis.key=key;\n\t}", "public void setRowKey(Object key)\n {\n if (key == null)\n {\n setRowIndex(-1);\n return;\n }\n\n if (getRowKey() != null && getRowKey().equals(key))\n return;\n \n for (int i = 0; i < getRowCount(); i++)\n {\n setRowIndex(i);\n Object prop = getRowKey();\n if (key.equals(prop))\n {\n return;\n }\n }\n\n // if we didn't find an element with a matching key,\n // then don't make any rows current\n setRowIndex(-1);\n }", "public void setItemOnCursor ( ItemStack item ) {\n\t\texecute ( handle -> handle.setItemOnCursor ( item ) );\n\t}", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void setOrderID(java.lang.String param){\n \n this.localOrderID=param;\n \n\n }", "public void addItem(Item item) {\n\t\thashOperations.put(KEY, item.getId(), item);\n\t\t//valueOperations.set(KEY + item.getId(), item);\n\t}", "public void setPrimaryKey(ObjectKey key)\n \n {\n setNewsletterId(((NumberKey) key).intValue());\n }", "public void setDynamoDbSecretKey(String key) {this.databaseConfig.setProperty(\"dynamoDbSecretKey\", key);}", "public void setItemSeq(Integer itemSeq) {\n this.itemSeq = itemSeq;\n }", "public void setItemCode(String itemCode) {\n\t\tthis.itemCode = itemCode == null ? null : itemCode.trim();\n\t}", "public void setProductRelatedByRelProductIdKey(ObjectKey key) throws TorqueException\n {\n \n setRelProductId(((NumberKey) key).intValue());\n }", "public void setKey(int key);", "public void setKey(int key);", "@Override\r\n\tpublic void updateItem(Items updateItem, String itemNameToUpdate) throws ToDoListDAOException{\r\n\t\t// TODO Auto-generated method stub\r\n\t\t Session session = factory.openSession();\r\n\t\t try\r\n\t\t {\r\n\t\t session.beginTransaction();\r\n\t\t Query query = session.createQuery(\"from Items where userName = :user AND ItemName = :item\");\r\n\t\t query.setParameter(\"user\", updateItem.getUserName());\r\n\t\t Items ifItemExist =(Items) query.setParameter(\"item\", itemNameToUpdate).uniqueResult();\r\n\t\t \r\n\t\t long id=0;\r\n\t\t if(ifItemExist != null){\r\n\t\t \tid = ifItemExist.getId();\r\n\t\t }\r\n\t\t System.out.println(id + \" \" + ifItemExist );\r\n\t\t Query query2 = session.createQuery(\"UPDATE Items SET status = :stat , itemName = :item , userName= :user , priority= :prio , dueDate= :date , note= :note\" +\r\n\t\t \" where id = :d\");\r\n\t\t query2.setParameter(\"stat\", updateItem.getStatus());\r\n\t\t query2.setParameter(\"item\", updateItem.getItemName());\r\n\t\t query2.setParameter(\"user\", updateItem.getUserName());\r\n\t\t query2.setParameter(\"prio\", updateItem.getPriority());\r\n\t\t query2.setParameter(\"date\", updateItem.getDueDate());\r\n\t\t query2.setParameter(\"note\", updateItem.getNote());\r\n\t\t query2.setParameter(\"d\", id);\r\n\t\t query2.executeUpdate();\r\n\t\t session.getTransaction().commit();\r\n\t\t \r\n\t\t }\r\n\t\t catch (HibernateException e)\r\n\t\t {\r\n\t\t e.printStackTrace();\r\n\t\t if(session.getTransaction()!=null) session.getTransaction().rollback();\r\n\t\t }\r\n\t\t finally\r\n\t\t {\r\n\t\t\t if(session != null) \r\n\t\t\t\t{ \r\n\t\t\t\t\tsession.close(); \r\n\t\t\t\t}\r\n\t\t } \r\n\r\n\t}", "public void setUserItem(UserItem userItem) {\n attributes.put(KEY_USER_ITEM, userItem);\n this.getHttpRequest().setAttribute(KEY_USER_ITEM, userItem);\n }", "public void setKey(com.coda.www.efinance.schemas.elementmaster.ElmFullKey key) {\r\n this.key = key;\r\n }", "@BindAttribute(name = \"itemModel\")\n\tpublic void setItemModelName(String itemModelName) {\n\t\tthis.itemModelName = itemModelName;\n\t}", "@Override\r\n\tpublic void applyItem(long item_code) {\n\t\tint i = sqlSession.update(ns+\".applyItem\", item_code);\r\n\t\tif(i>0) System.out.println(\"applyItem\");\r\n\t}", "public OrderItem insertOrderItem(OrderItem orderItem)\n\t{\n\t\tOrderItem orderIt=orderItemDAO.insert(orderItem);\n\t\tif(findOrderItemById(orderIt.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat nu a putut fi inserat\");\n\t\t\treturn null;\n\t\t}\n\t\treturn orderIt;\n\t}", "@Override\n\t\tpublic void updateRawitem(Rawitem Rawitem) {\n\t\t\tString sql=\"UPDATE Rawitem \"\n\t\t\t\t\t+ \"set suppliedby= :suppliedby,rquantity=:rquantity,riprice=:riprice,rstock=:rstock\"\n\t\t\t\t\t+ \" where rid=:rid\";\n\t\t\tnamedParameterJdbcTemplate.update(sql,getSqlParameterByModel(Rawitem));\n\t\t\t \n\t\t}", "public void setRowKeyProperty(String rowKeyProperty)\n {\n _rowKeyProperty = rowKeyProperty;\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public void setKey(String aKey) {\n\t\tthis.key = aKey;\n\t}", "protected void updateItemTx(HomeItemImpl item)\n\t{\n\t\tString sql = \"UPDATE HOME_ITEM SET SITE=?, PUBLISHED=?, RELEASE_DATE=?, SOURCE=?, TITLE=?, CONTENT=?, URL=?, DIMENSIONS=?, ALT=?, CREATED_BY=?, CREATED_ON=?, MODIFIED_BY=?, MODIFIED_ON=? WHERE ID=?\";\n\n\t\tObject[] fields = new Object[14];\n\t\tint i = 0;\n\t\tfields[i++] = item.getSite().getId();\n\t\tfields[i++] = item.getPublished();\n\t\tfields[i++] = item.getReleaseDate();\n\t\tfields[i++] = item.getSource().getCode();\n\t\tfields[i++] = item.getTitle();\n\t\tfields[i++] = item.getContentReferenceId();\n\t\tfields[i++] = item.getUrl();\n\t\tfields[i++] = item.getDimensions();\n\t\tfields[i++] = item.getAlt();\n\t\tfields[i++] = item.getCreatedBy().getId();\n\t\tfields[i++] = item.getCreatedOn();\n\t\tfields[i++] = item.getModifiedBy().getId();\n\t\tfields[i++] = item.getModifiedOn();\n\n\t\tfields[i++] = item.getId();\n\n\t\tsqlService().update(sql, fields);\n\t}", "private void setKey(String key) {\n this.key = key;\n }", "public void setKey(String key) {\r\n this.key = key;\r\n }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "public void update(ItemsPk pk, Items dto) throws ItemsDaoException;", "public KeyedItem(Comparable key,\n T item)\n {\n this.key = key;\n this.item = item;\n this.valid = true;\n }", "public void setKey(Key key) {\n this.key = key;\n }", "public void setPrimaryKey(String key) \n {\n setNewsletterId(Integer.parseInt(key));\n }", "public void setQuantityToNull(DrinkItem drinkItem) throws SQLException{\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity = null where drink_code =?\");\n\t\t\tmyStmt.setInt(1, drinkItem.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t}", "public void setKey(String key) {\n\t\tthis.key = key;\n\t}", "public static synchronized int setKey(int userID, String key){\n\t\t\tint status=0;\t\n\t\t\tConnection connection; \n\t\t\tString preparedSQL = \"Update credential Set RegKey = ? Where User_ID = ?\";\n\t\t\tPreparedStatement statement=null;\t\n\t\t\ttry{\n\t\t\t\tconnection=DBConnector.getConnection();\n\t\t\t\tstatement = connection.prepareStatement(preparedSQL);\n\t\t\t\tstatement.setString(1, key);\n\t\t\t\tstatement.setInt(2, userID);\n\t\t\t\tstatus = statement.executeUpdate();\n\t\t\t\tstatement.close();\n\t\t\t\tconnection.close();\n\t\t\t}catch (SQLException ex){\n\t\t\t\tSystem.out.println(\"Error: \" + ex);\n\t\t\t\tSystem.out.println(\"Query: \" + statement.toString());\n\t\t\t}\n\t\t\treturn status;\n\t}", "public void setAmazonCustomerId(final Customer item, final String value)\n\t{\n\t\tsetAmazonCustomerId( getSession().getSessionContext(), item, value );\n\t}", "public void setItemId(String itemId) {\r\n this.itemId = itemId == null ? null : itemId.trim();\r\n }", "public Builder setDeletedItemKey(POGOProtos.Rpc.HoloInventoryKeyProto value) {\n if (deletedItemKeyBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n inventoryItem_ = value;\n onChanged();\n } else {\n deletedItemKeyBuilder_.setMessage(value);\n }\n inventoryItemCase_ = 2;\n return this;\n }", "public void setKeyField(KeyField k) {\n\tkeyField = k;\n }", "@Test\n\tpublic void testMapBookOrderItemToBookOrderItemEntity() {\n\t\t// Given\n\t\tBookOrderItem bookOrderItem = new BookOrderItem();\n\t\tbookOrderItem.setQuantity(mockValues.nextInteger());\n\t\tbookOrderItem.setPrice(mockValues.nextBigDecimal());\n\n\t\tBookOrderItemEntity bookOrderItemEntity = new BookOrderItemEntity();\n\t\t\n\t\t// When\n\t\tbookOrderItemServiceMapper.mapBookOrderItemToBookOrderItemEntity(bookOrderItem, bookOrderItemEntity);\n\t\t\n\t\t// Then\n\t\tassertEquals(bookOrderItem.getQuantity(), bookOrderItemEntity.getQuantity());\n\t\tassertEquals(bookOrderItem.getPrice(), bookOrderItemEntity.getPrice());\n\t}" ]
[ "0.6272827", "0.6242695", "0.61998576", "0.6068377", "0.5998021", "0.59171", "0.5870938", "0.57484317", "0.5680693", "0.55508506", "0.5506281", "0.5479654", "0.5425592", "0.53778577", "0.53736055", "0.53456175", "0.5338748", "0.53293985", "0.5281649", "0.5277032", "0.52685535", "0.5253269", "0.5242425", "0.5234326", "0.52325106", "0.5212481", "0.5205096", "0.51885474", "0.51885474", "0.5179002", "0.5177552", "0.517721", "0.51767033", "0.5172625", "0.51423955", "0.5134011", "0.5131268", "0.51278967", "0.5110088", "0.51022667", "0.5090425", "0.5085613", "0.50802726", "0.5079107", "0.5060662", "0.5057773", "0.5047363", "0.50373596", "0.50219697", "0.5021076", "0.5016645", "0.5015926", "0.5015301", "0.50067", "0.50050575", "0.49999294", "0.49944025", "0.4978047", "0.49762714", "0.49725693", "0.49705788", "0.49697843", "0.4964764", "0.49629718", "0.49537316", "0.49537316", "0.4952543", "0.49501964", "0.49460742", "0.49435213", "0.49293932", "0.49248487", "0.49083218", "0.49083218", "0.48990414", "0.4898417", "0.48970318", "0.48922855", "0.48895052", "0.4882698", "0.48797667", "0.48682296", "0.48672342", "0.48657724", "0.48614287", "0.4859559", "0.48587444", "0.4856095", "0.48483166", "0.4847016", "0.484681", "0.48458734", "0.4842474", "0.48417032", "0.48383474", "0.48364264", "0.48360592", "0.48338866", "0.4832165", "0.48317862" ]
0.6574336
0
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.item_value
public String getItemValue() { return itemValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Nullable\n Object getValueOfColumn(ModelColumnInfo<Item> column);", "public static int getValueForItem(int item) {\n\t\t\tfor (Tiara tiara : values()) {\n\t\t\t\tif (tiara.getItem() == item)\n\t\t\t\t\treturn tiara.getValue();\n\t\t\t}\n\t\t\treturn -1;\n\t\t}", "public Integer getOrderItemAmount() {\n return orderItemAmount;\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "Money getItemValue();", "public java.math.BigDecimal getITEM_AMOUNT() {\r\n return ITEM_AMOUNT;\r\n }", "@Override\n\t\t\tpublic String getValue(BmObject bmObject) {\n\t\t\t\treturn ((BmoOrderPropertyTax)bmObject).getQuantity().toString();\n//\t\t\t\treturn String.valueOf(months);\n\t\t\t}", "private String getPropertyValue() {\n return EmfPropertyHelper.getValue(itemPropertyDescriptor, eObject);\n }", "OrderItemDto getOrderItem(long id) throws SQLException;", "public Integer getOrderItemId() {\n return orderItemId;\n }", "@Override\n\t\tpublic int getValueColumn() {\n\t\t\treturn valueColumn;\n\t\t}", "public int getValue()\n {\n return mi_value;\n }", "public int getValue()\n {\n return mi_value;\n }", "public static String getValue(Item item, QName qname) {\n StringAttribute ta = (StringAttribute) item.getAttribute(qname);\n if (ta == null) {\n return null;\n }\n else {\n return ta.getValue();\n }\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public String getValue() {\n return this.column;\n }", "public Integer getValueId() {\n return this.valueId;\n }", "@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}", "@Override\n\tpublic Integer getValue() {\n\t\treturn value;\n\t}", "public BigDecimal getConvertedProductQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedProductQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "public String getValue() {\n\t\tString value;\n\t\ttry {\n\t\t\tvalue = this.getString(\"value\");\n\t\t} catch (Exception e) {\n\t\t\tvalue = null;\n\t\t}\n\t\treturn value;\n\t}", "@Override\n public Object getCellEditorValue() {\n if (item_.allowed.length == 1) {\n if (item_.singleProp && item_.hasLimits) {\n return slider_.getText();\n } else if (item_.singlePropAllowed != null && item_.singlePropAllowed.length == 0) {\n return text_.getText();\n } else {\n return combo_.getSelectedItem();\n }\n } else {\n return combo_.getSelectedItem();\n }\n }", "public void setItemValue(String itemValue) {\n this.itemValue = itemValue == null ? null : itemValue.trim();\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public String value() {\n return this.column;\n }", "public int getITEM() {\r\n return item;\r\n }", "io.opencannabis.schema.commerce.OrderItem.Item getItem(int index);", "protected Object getCellObjectValue() {\n\t\treturn value;\n\t}", "public java.lang.String getValue_id() {\n return value_id;\n }", "public String getValueColumn() {\n if (!isDate()) {\n return \"sort_text_value\";\n } else {\n return \"text_value\";\n }\n }", "public String getValue() {\n\t\treturn (String) get_Value(\"Value\");\n\t}", "public Integer getValueId() {\n return valueId;\n }", "protected E value(Position<Item<E>> p) {\n return p.getElement().getValue();\n }", "public BigDecimal getProductQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ProductQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "public abstract Object getValue(Object itemInstance) throws\n InvocationTargetException, IllegalAccessException;", "public java.lang.String getPO_ITEM() {\r\n return PO_ITEM;\r\n }", "public String getCOD_ITEM() {\n return COD_ITEM;\n }", "public BigDecimal getOrderItemProice() {\n return orderItemProice;\n }", "public Integer getValue() {\n return _value ;\n }", "BigDecimal getValue();", "public AmountType getItemPrice() {\n\t return this.itemPrice;\n\t}", "public int getM_Inventory_ID() \n{\nInteger ii = (Integer)get_Value(\"M_Inventory_ID\");\nif (ii == null) return 0;\nreturn ii.intValue();\n}", "public String getAccountValue(String elementId) {\n String sqlQuery = \"\", elementValue = \"\";\n PreparedStatement st = null;\n ResultSet rs = null;\n try {\n sqlQuery = \" SELECT C_ELEMENTVALUE.VALUE as value FROM C_ELEMENTVALUE WHERE C_ELEMENTVALUE_ID = ? AND C_ELEMENTVALUE.ISACTIVE = 'Y'\";\n st = conn.prepareStatement(sqlQuery);\n st.setString(1, elementId);\n rs = st.executeQuery();\n if (rs.next()) {\n elementValue = rs.getString(\"value\");\n\n }\n } catch (Exception e) {\n log4j.error(\"Exception in getOrgs()\", e);\n }\n return elementValue;\n }", "Integer getBusinessValue();", "@Override\n public V getValue() {\n return m_value;\n }", "@Override\n\tpublic BigDecimal clickValueFrom(Item i) {\n\t\treturn il.clickValueFrom(\n\t\t\ti.baseIncome().val(),\n\t\t\tstate.resetCurrencyMultiplier(),\n\t\t\ti.upgrades().click().amount(),\n\t\t\tstate.globalUpgrades().clickUpgrade().amount(),\n\t\t\ti.amount(),\n\t\t\ti.upgrades().income().amount(),\n\t\t\ti.upgrades().unlocked().amount()\n\t\t);\n\t\t\t\t\n//\t\treturn BDCalc.multiply(\n//\t\t\t\ti.income().val(),\n//\t\t\t\tBDCalc.multiply(\n//\t\t\t\t\tBDConstants.ItemClickUpgradeMultiplier,\n//\t\t\t\t\tBigDecimal.valueOf( i.upgrades().click().amount() ) \n//\t\t\t\t)\n//\t\t\t);\n\t}", "private String getCriterionValueValue()\n {\n return getConvertedValue(myCriterionValue.get());\n }", "public final Object getCellEditorValue() {\n int retQty;\n try {\n retQty = Integer.parseInt(((JTextField) component).getText());\n // if max\n if (retQty > maxQuantity) {\n JOptionPane.showMessageDialog(null, \"The maximum qty remaining to return is \" + maxQuantity, \"Max Qty Exceed\",\n JOptionPane.INFORMATION_MESSAGE);\n retQty = 0;\n }\n\n } catch (Exception e) {\n retQty = 0;\n }\n return retQty <= 0 ? \"0\" : retQty;\n }", "public int get(String item) {\n\t\treturn couponManager.get(item);\n\t}", "public long getMappedValue() {\n\t\treturn this.value;\n\t}", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public List<Item> readLatestOrderItem() {\n\t\tString query = \"SELECT oi.id, i.name, i.value \"\n\t\t\t\t+ \"FROM order_items oi \"\n\t\t\t\t+ \"JOIN items i on oi.item_id = i.id \"\n\t\t\t\t+ \"ORDER BY id DESC LIMIT 1;\";\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();\n\t\t\t\tResultSet resultSet = statement.executeQuery(query); ) {\n\t\t\tList<Item> orderItemList = new ArrayList<>();\n\t\t\tresultSet.next();\n\t\t\titem = itemDAO.modelFromResultSet(resultSet);\n\t\t\torderItemList.add(item);\n\t\t\treturn orderItemList;\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn new ArrayList<>();\n\t}", "public Object getValue()\r\n\t{\r\n\t\treturn m_value;\r\n\t}", "public float valorTotalItem()\r\n {\r\n float total = (produto.getValor() - (produto.getValor() * desconto)) * quantidade;\r\n return total;\r\n }", "java.util.List<io.opencannabis.schema.commerce.OrderItem.Item> \n getItemList();", "@Property(name = \"value\", propertyType = PropertyType.STRUCTURAL, conformance = ConformanceType.MANDATORY)\n\tpublic BigDecimal getValue() { return this.m_value; }", "@Override\n\t\t\tpublic String getValue() {\n\t\t\t\treturn value;\n\t\t\t}", "public BigDecimal getConvertedShrinkQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedShrinkQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "public BigDecimal getConvertedSplitQty() \n{\nBigDecimal bd = (BigDecimal)get_Value(\"ConvertedSplitQty\");\nif (bd == null) return Env.ZERO;\nreturn bd;\n}", "@Override\n\t\tpublic V getValue(){\n\t\t\treturn value;\n\t\t}", "public Oferta ValorMaximoXItem1(Integer item_id) throws Exception {\r\n\t\tOferta o = null;\r\n\t\tSystem.out.println(item_id);\r\n\t\tResultSet consulta = conDao\r\n\t\t\t\t.consultaSQL(\"select o.ofer_id as id, o.pos_id as post, o.item_id as item, o.ofer_valor_oferta as valormaximo, \"\r\n\t\t\t\t\t\t+ \"o.ofer_fecha_oferta as fechaofer FROM sub_ofertas o WHERE o.ofer_fecha_oferta=(SELECT MIN(p.ofer_fecha_oferta) \"\r\n\t\t\t\t\t\t+ \"FROM sub_ofertas p where p.item_id = \"\r\n\t\t\t\t\t\t+ item_id\r\n\t\t\t\t\t\t+ \" \"\r\n\t\t\t\t\t\t+ \"and p.ofer_valor_oferta= (SELECT MAX(q.ofer_valor_oferta) FROM sub_ofertas q))\");\r\n\t\tif (consulta != null) {\r\n\t\t\tconsulta.next();\r\n\t\t\to = new Oferta();\r\n\t\t\tSystem.out.println(\"entra a la consulta\");\r\n\t\t\to.setOferId(Integer.parseInt(consulta.getString(\"id\")));\r\n\t\t\to.setSubPostulante(consulta.getString(\"post\"));\r\n\t\t\to.setSubItem(Integer.parseInt(consulta.getString(\"item\")));\r\n\t\t\to.setOferValorOferta(new BigDecimal(consulta\r\n\t\t\t\t\t.getString(\"valormaximo\")));\r\n\t\t\to.setOferFechaOferta(new Timestamp(Funciones.stringToDate(\r\n\t\t\t\t\tconsulta.getString(\"fechaofer\")).getTime()));\r\n\t\t}\r\n\t\treturn o;\r\n\t}", "public int getValue()\n { \n return table.get(getSelectedItem());\n }", "public int totalValue() {\r\n\t\tint total = 0;\r\n\t\tfor(Item item: items) {\r\n\t\t\ttotal = total + item.getValue();\r\n\t\t}\r\n\t\treturn total;\r\n\t}", "@Override\n public T getItemVO() {\n return this.itemVO;\n }", "public Row getValue()\n\t{\n\t\treturn valueList;\n\t}", "private static ContentValues getAEventContentvalues(Items item) {\r\n\r\n ContentValues values = new ContentValues();\r\n values.put(DBSchema.ItemTable.Cols.DATE, item.getDatePurchased());\r\n values.put(DBSchema.ItemTable.Cols.FOODITEMS, item.getFoodItems());\r\n values.put(DBSchema.ItemTable.Cols.RECIPE, item.getReceipeSuggestion());\r\n values.put(DBSchema.ItemTable.Cols.RECIPENAME, item.getRecipeName());\r\n values.put(DBSchema.ItemTable.Cols.DIRECTIONS, item.getDirections());\r\n return values;\r\n }", "protected Object getTableValue()\n\t\t{\n\t\t\treturn Value ;\n\t\t}", "public Object getValue() {\n return element == null ? null : element.getValue();\n }", "public java.util.List<? extends io.opencannabis.schema.commerce.OrderItem.ItemOrBuilder> \n getItemOrBuilderList() {\n return item_;\n }", "public int getValue() {\n\t\treturn this.getValue();\n\t}", "public int getValue() {\n return m_value;\n }", "@Override\r\n\tpublic Object getColumnValue(int column) {\n\t\tswitch (column) {\r\n\t\tcase ID_COLUMN_ORDER:\r\n\t\t\treturn id;\r\n\t\tcase NOMBRE_COLUMN_ORDER:\r\n\t\t\treturn nombre;\r\n\t\tcase DESCRIPCION_COLUMN_ORDER:\r\n\t\t\treturn descripcion;\r\n\t\tcase POLIGONO_COLUMN_ORDER:\r\n\t\t\treturn poligono;\r\n\t\tcase ESTADO_COLUMN_ORDER:\r\n\t\t\treturn estado;\r\n\t\tcase URBANA_COLUMN_ORDER:\r\n\t\t\treturn urbana;\t\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public float getItemPriceIBAN()\n\t{\n\t\treturn itemPriceIBAN;\n\t}", "@Override\n\tpublic Object getCellEditorValue() {\n\t\tlog.info(\"|------表格单元格编辑模型------|\\t\"+\"getCellEditorValue\\t\"+\n\t\t\t\ttable.getEditingRow()+\",\"+table.getEditingColumn());\n\t\treturn comboBox.getSelectedItem().toString();\n\t}", "public String getValue()\n {\n String v = (String)this.getFieldValue(FLD_value);\n return StringTools.trim(v);\n }", "public BigDecimal getItemPrice(Item item) {\n\t\tif (item instanceof BarcodedItem) {\n\t\t\tBarcodedItem barcodedItem = (BarcodedItem) item;\n\t\t\tBarcode code = barcodedItem.getBarcode();\n\n\t\t\tBarcodedProduct product;\n\t\t\t// look up the price in the database\n\t\t\ttry {\n\t\t\t\tproduct = productDatabase.getProductByBarcode(code);\n\t\t\t} catch (NonexistentBarcodeException e) {\n\t\t\t\tthrow new ControlSoftwareException(\"a purchased BarcodedItem does not exist\");\n\t\t\t}\n\t\t\treturn product.getPrice().setScale(2, BigDecimal.ROUND_HALF_DOWN);\n\t\t} else if (item instanceof PLUCodedItem) {\n\t\t\tPLUCodedItem pluItem = (PLUCodedItem) item;\n\t\t\tPriceLookupCode code = pluItem.getPLUCode();\n\t\t\tPLUCodedProduct pluProduct;\n\t\t\tBigDecimal itemWeight;\n\t\t\ttry {\n\t\t\t\tpluProduct = productDatabase.getProductByPLUCode(code);\n\t\t\t} catch (NonexistentPLUCodeException e) {\n\t\t\t\tthrow new ControlSoftwareException(\"a purchased PLUCodedItem does not exist\");\n\t\t\t}\n\t\t\titemWeight = BigDecimal.valueOf(pluItem.getWeight());\n\t\t\treturn pluProduct.getPrice().multiply(itemWeight).setScale(2, BigDecimal.ROUND_HALF_DOWN);\n\t\t} else if (!(item instanceof BagItem)) {\n\t\t\t// if the item is a bag, it is the customer's bag and doesn't\n\t\t\t// cost anything\n\t\t\tthrow new ControlSoftwareException(\"Couldn't find price of item.\");\n\t\t}\n\t\treturn new BigDecimal(\"0.00\");\n\t}", "public String getValue(){\n\t\treturn _value;\n\t}", "public Value getValue(){\n return this.value;\n }" ]
[ "0.62853134", "0.6006843", "0.5905305", "0.5898561", "0.5796574", "0.5715043", "0.5576952", "0.54860854", "0.54333216", "0.54085386", "0.53846276", "0.53805435", "0.53805435", "0.5329693", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5308529", "0.5275169", "0.52662313", "0.52662313", "0.5264542", "0.52471614", "0.52402335", "0.52388024", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.52309227", "0.5230743", "0.5220653", "0.5201549", "0.52009135", "0.51926595", "0.5191653", "0.51901644", "0.518618", "0.5185258", "0.51710534", "0.5164731", "0.5157184", "0.51362956", "0.5132799", "0.51027846", "0.5084906", "0.50726956", "0.507197", "0.50546205", "0.505016", "0.50427234", "0.5039065", "0.5037665", "0.50370127", "0.5023372", "0.5022247", "0.5019443", "0.50163186", "0.5001698", "0.49992287", "0.49980548", "0.4990226", "0.49880132", "0.4974941", "0.49742293", "0.49633187", "0.4961415", "0.49603954", "0.49557406", "0.49540985", "0.49532023", "0.49525905", "0.49520946", "0.49421704", "0.49379987", "0.49369603", "0.49360844", "0.49318865", "0.49165007", "0.49114868", "0.49086487", "0.49067137", "0.49049893" ]
0.6216293
1
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.item_value
public void setItemValue(String itemValue) { this.itemValue = itemValue == null ? null : itemValue.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setItem(\r\n @NonNull\r\n final List<SalesOrderItem> value) {\r\n if (toItem == null) {\r\n toItem = Lists.newArrayList();\r\n }\r\n toItem.clear();\r\n toItem.addAll(value);\r\n }", "public void setITEM(int value) {\r\n this.item = value;\r\n }", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "void setValueOfColumn(ModelColumnInfo<Item> column, @Nullable Object value);", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setOrderItemAmount(Integer orderItemAmount) {\n this.orderItemAmount = orderItemAmount;\n }", "public void setConvertedProductQty (BigDecimal ConvertedProductQty)\n{\nset_Value (\"ConvertedProductQty\", ConvertedProductQty);\n}", "public void SetDefautValueCombo(Item item) \n {\n this.defautValueCombo=item;\n ;\n }", "public void setConvertedSplitQty (BigDecimal ConvertedSplitQty)\n{\nset_Value (\"ConvertedSplitQty\", ConvertedSplitQty);\n}", "public void setConvertedShrinkQty (BigDecimal ConvertedShrinkQty)\n{\nset_Value (\"ConvertedShrinkQty\", ConvertedShrinkQty);\n}", "public void setItemNo(int value) {\n this.itemNo = value;\n }", "public void setValue(BigDecimal value) { this.m_value = value; }", "public void setItem(Item item) {\n this.item = item;\n }", "public void setItem (Item item)\n\t{\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\t}", "public void setOrderItemId(Integer orderItemId) {\n this.orderItemId = orderItemId;\n }", "public void setShrinkQty (BigDecimal ShrinkQty)\n{\nset_Value (\"ShrinkQty\", ShrinkQty);\n}", "public void setCar(final SessionContext ctx, final Employee item, final Car value)\n\t{\n\t\titem.setProperty(ctx, CarConstants.Attributes.Employee.CAR,value);\n\t}", "public void setOrderItemProice(BigDecimal orderItemProice) {\n this.orderItemProice = orderItemProice;\n }", "public abstract BaseQuantityDt setValue(BigDecimal theValue);", "public void setITEM_AMOUNT(java.math.BigDecimal ITEM_AMOUNT) {\r\n this.ITEM_AMOUNT = ITEM_AMOUNT;\r\n }", "public void setItemNo(Integer itemNo) {\n\t\tif (itemNo == 0) {\n\t\t\tthis.itemNo = null;\n\t\t} else {\n\t\t\tthis.itemNo = itemNo;\n\t\t}\n\t}", "public void setCar(final Employee item, final Car value)\n\t{\n\t\tsetCar( getSession().getSessionContext(), item, value );\n\t}", "public Builder setItem(\n int index, io.opencannabis.schema.commerce.OrderItem.Item value) {\n if (itemBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureItemIsMutable();\n item_.set(index, value);\n onChanged();\n } else {\n itemBuilder_.setMessage(index, value);\n }\n return this;\n }", "protected void setItemPrice(Double itemPrice) {\n this.itemPrice = itemPrice;\n }", "public OrderItem updateOrderItem(OrderItem orderItem)\n\t{\n\t\tif(findOrderItemById(orderItem.getId())==null)\n\t\t{\n\t\t\tSystem.out.println(\"Produsul comandat care se incearca updatat nu exista\");\n\t\t\treturn null;\n\t\t}\n\t\tOrderItem orderIt=orderItemDAO.update(orderItem);\n\t\treturn orderIt;\n\t}", "public void setItem(T item) {\n this.item = item;\n }", "public void setM_Product_ID (int M_Product_ID)\n{\nset_Value (\"M_Product_ID\", new Integer(M_Product_ID));\n}", "public void setItem (jkt.hms.masters.business.MasStoreItem item) {\n\t\tthis.item = item;\n\t}", "public void setItem_id(int item_id) {\r\n\t\tthis.item_id = item_id;\r\n\t}", "public void setM_Warehouse_ID (int M_Warehouse_ID)\n{\nset_Value (\"M_Warehouse_ID\", new Integer(M_Warehouse_ID));\n}", "public void setItem(Item item) {\n\t\tthis.item = item;\n\n\t\tif (item.getDate() == null)\n\t\t\tdateField.setText(DateUtil.format(LocalDate.now()));\n\t\telse\n\t\t\tdateField.setText(DateUtil.format(item.getDate()));\n\n\t\tdateField.setPromptText(\"dd.mm.yyyy\");\n\t\tif (item.getCategory() == null)\n\t\t\tcategoryField.getSelectionModel().select(\"Lebensmittel\");\n\t\telse \n\t\t\tcategoryField.getSelectionModel().select(item.getCategory());\n\t\tuseField.setText(item.getUse());\n\t\tamountField.setText(Double.toString(item.getAmount()).replace(\".\", \",\"));\n\t\tif (item.getDistributionKind() == null)\n\t\t\tdistributionKindField.setText(\"Giro\");\n\t\telse\n\t\t\tdistributionKindField.setText(item.getDistributionKind());\n\n\t\tif (useField.getText() == null) {\n\t\t\tPlatform.runLater(new Runnable() {\n\t\t\t\t@Override\n\t\t\t\tpublic void run() {\n\t\t\t\t\tuseField.requestFocus();\n\t\t\t\t}\n\t\t\t});\n\t\t}\n\t}", "public void setM_Inventory_ID (int M_Inventory_ID)\n{\nif (M_Inventory_ID <= 0) set_Value (\"M_Inventory_ID\", null);\n else \nset_Value (\"M_Inventory_ID\", new Integer(M_Inventory_ID));\n}", "public int updateOrderItem(OrderItem u) {\n int ok = 0;\n try {\n String query = \"UPDATE order_Item SET amount = ?, product_id_Product = ?, order_id_Order = ? WHERE id_Order_Item = ? ;\";\n\n PreparedStatement st = con.prepareStatement(query); //Prepared the query\n //Select id informated \n List<OrderItem> l = new OrderItemDao().searchOrderItem(u.getIdOrderItem());\n \n for (OrderItem lc : l) {\n st.setInt(4, lc.getIdOrderItem());\n }\n st.setInt(1, u.getAmount());\n st.setInt(2, u.getProductIdProduct());\n st.setInt(3, u.getOrderIdItem());\n\n ok = st.executeUpdate(); //Execute the update\n st.close(); //Close the Statment\n con.close(); //Close the connection\n\n } catch (SQLException e) {\n e.printStackTrace();\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n return ok;\n }", "public Builder addItem(io.opencannabis.schema.commerce.OrderItem.Item value) {\n if (itemBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n ensureItemIsMutable();\n item_.add(value);\n onChanged();\n } else {\n itemBuilder_.addMessage(value);\n }\n return this;\n }", "public void setUserItem(UserItem userItem) {\n attributes.put(KEY_USER_ITEM, userItem);\n this.getHttpRequest().setAttribute(KEY_USER_ITEM, userItem);\n }", "private void updateItem(Item item) throws SQLException\n {\n int itemId = item.getId();\n logger.debug(\"Updating Item with id \" + itemId + \"...\");\n try(Statement statement = connection.createStatement())\n {\n String sql = MessageFormat.format(\"UPDATE Items SET (title, description, price) = ({0}, {1}, {2}) WHERE id = {3}\",\n escapeStringValue(item.getTitle()), escapeStringValue(item.getDescription()), item.getPrice(), itemId);\n statement.addBatch(sql);\n statement.addBatch(\"DELETE FROM Items_Locations WHERE item_id = \" + itemId);\n statement.executeBatch();\n addItemQuantitiesPerLocation(item);\n }\n logger.debug(\"Updated Item successfully.\");\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public void setInventoryItemId(Number value) {\n setAttributeInternal(INVENTORYITEMID, value);\n }", "public void setValue(Entity value) {\r\n\t\t\tthis.value = value;\r\n\t\t}", "void setValue(BigDecimal value);", "@Override\n public void setValue(BigDecimal value) throws ValueFormatException,\n VersionException, LockException, ConstraintViolationException,\n RepositoryException {\n \n }", "public void setOrderItemUrl(String orderItemUrl) {\n this.orderItemUrl = orderItemUrl == null ? null : orderItemUrl.trim();\n }", "public void updateSalesOrder(SalesOrderItem salesOrderItem){\n\t\tSalesOrderItemSalesOrder salesOrder = salesOrderItem.getSalesOrder();\n\t\tPropertyReader.copy(salesOrder, displayedEntity);\n\t}", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public void set(Item item) {\r\n if (lastAccessed == null) throw new IllegalStateException();\r\n lastAccessed.item = item;\r\n }", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public void setItem(ItemType item) {\n\t this.item = item;\n\t}", "public SalesOrder.SalesOrderBuilder item(SalesOrderItem... value) {\r\n return toItem(Lists.newArrayList(value));\r\n }", "@Override\n @Transactional\n public void update(Item item) {\n Produto produto = item.getProduto();\n produtoDao.updateEstoqueProduto(produto.getQuantidade() - item.getQuantidade(), produto.getId());\n }", "public void setQuantityToNull(DrinkItem drinkItem) throws SQLException{\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity = null where drink_code =?\");\n\t\t\tmyStmt.setInt(1, drinkItem.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t}", "public void setItem(BudgetItemModel item) { model= item;}", "public static void setValue(Item item, QName qname, String value) {\n StringAttribute attr = (StringAttribute) item.getAttribute(qname);\n if(attr==null && value!=null) {\n attr = new MockStringAttribute(qname,value);\n item.addAttribute(attr);\n return;\n }\n if (value == null) {\n item.removeAttribute(qname);\n }\n else {\n attr.setValue(value);\n }\n }", "public void setM_Locator_ID (int M_Locator_ID)\n{\nset_Value (\"M_Locator_ID\", new Integer(M_Locator_ID));\n}", "public void setPO_ITEM(java.lang.String PO_ITEM) {\r\n this.PO_ITEM = PO_ITEM;\r\n }", "public void editItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tString queryString = \"Update team1.GABES_ITEM Set ITEM_CATEGORY=?, DESCRIPTION=?, ITEM_NAME=?\";\n\t\tqueryString += \"Where ITEM_ID='\" + this.item_id + \"'\";\n\t\t/** Clears parameters and then sets new values */\n\t\tPreparedStatement p_stmt = con.prepareCall(queryString);\n\t\t/** Set new attribute values */\n\t\tp_stmt.clearParameters();\n\t\tp_stmt.setString(1, this.item_category);\n\t\tp_stmt.setString(2, this.description);\n\t\tp_stmt.setString(3, this.item_name);\n\t\t/* Executes the Prepared Statement query */\n\t\tp_stmt.executeQuery();\n\t\tp_stmt.close();\n\t}", "public void setProductQty (BigDecimal ProductQty)\n{\nif (ProductQty == null) throw new IllegalArgumentException (\"ProductQty is mandatory\");\nset_Value (\"ProductQty\", ProductQty);\n}", "public Integer getOrderItemAmount() {\n return orderItemAmount;\n }", "void setValueQuantity(org.hl7.fhir.Quantity valueQuantity);", "public Builder setInventoryItemData(POGOProtos.Rpc.HoloInventoryItemProto value) {\n if (inventoryItemDataBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n inventoryItem_ = value;\n onChanged();\n } else {\n inventoryItemDataBuilder_.setMessage(value);\n }\n inventoryItemCase_ = 3;\n return this;\n }", "public abstract void setValue(ELContext context, Object value);", "public void setC_UOM_ID (int C_UOM_ID)\n{\nset_Value (\"C_UOM_ID\", new Integer(C_UOM_ID));\n}", "public void setBomItemKey(long value) {\n\t\tthis.bomItemKey = value;\n\t}", "public void setAmazonCustomerId(final Customer item, final String value)\n\t{\n\t\tsetAmazonCustomerId( getSession().getSessionContext(), item, value );\n\t}", "public void setCOD_ITEM(String COD_ITEM) {\n this.COD_ITEM = COD_ITEM;\n }", "public void setItemPrice(AmountType itemPrice) {\n\t this.itemPrice = itemPrice;\n\t}", "@Override\n\tpublic void setValue(Object value) {\n\t\tint id = ((VObject) value).getId();\n\t\tItemData item = initItemData(id);\n\t\t((Combobox) component).setText(item.getLabel());\n\t\tsuper.setValue(value);\n\t}", "public void update(Item item) {\r\n Transaction trans = null;\r\n Session session = HibernateUtil.getSessionFactory().openSession();\r\n\r\n try {\r\n trans = session.beginTransaction();\r\n\r\n session.update(item);\r\n\r\n trans.commit();\r\n } catch (HibernateException e) {\r\n if (trans != null) {\r\n trans.rollback();\r\n }\r\n e.printStackTrace();\r\n } finally {\r\n session.close();\r\n }\r\n }", "void assignItem(int bid, int item) {\n assignment[item] = 1;\n value = Math.min(maxValue, value + bid);\n assignRange();\n }", "public void setProfit(Item item, int value) {\n\t\tprofit.put(item, value);\n\t}", "@Override\n\tpublic int update(OrderItem objectToUpdate) throws SQLException {\n\t\treturn 0;\n\t}", "public void selectDropdownvalueOnCheckoutOrderPage(String key, String value){\n\t\tselectDropdownvalue(key, value);\n\t}", "@Override\n\t\tpublic void setValueColumn(int columnIndex) {\n\t\t\tthis.valueColumn = columnIndex;\n\t\t}", "public void setOrderItemName(String orderItemName) {\n this.orderItemName = orderItemName == null ? null : orderItemName.trim();\n }", "public void setItem(SpItem spItem) {\n Assert.notFalse(_spItem == null);\n\n _spItem = spItem;\n _spItem.getAvEditFSM().addObserver(this);\n update(_spItem.getAvEditFSM(), null);\n }", "public void setSplitQty (BigDecimal SplitQty)\n{\nif (SplitQty == null) throw new IllegalArgumentException (\"SplitQty is mandatory\");\nset_Value (\"SplitQty\", SplitQty);\n}", "public void setValue(Object value)\r\n\t{\r\n\t\tm_value = value;\r\n\t}", "@Override\n\t\tpublic void updateRawitem(Rawitem Rawitem) {\n\t\t\tString sql=\"UPDATE Rawitem \"\n\t\t\t\t\t+ \"set suppliedby= :suppliedby,rquantity=:rquantity,riprice=:riprice,rstock=:rstock\"\n\t\t\t\t\t+ \" where rid=:rid\";\n\t\t\tnamedParameterJdbcTemplate.update(sql,getSqlParameterByModel(Rawitem));\n\t\t\t \n\t\t}", "public void setValue(Object value)\r\n {\r\n m_value = value;\r\n }", "private static void setValues( String name, Integer number, Item item ) {\n\t\titem.getItemProperty( \"name\" ).setValue( name );\n\t\titem.getItemProperty( \"number\" ).setValue( number );\n\t\titem.getItemProperty( \"id\" ).setValue( itemId );\n\t\titem.getItemProperty( \"id\" ).setReadOnly( true );\n\t\titemId++;\n\t}", "public String getItemValue() {\n return itemValue;\n }", "public void setProcessOrderItemKey(long value) {\n\t\tthis.processOrderItemKey = value;\n\t}", "public void setEditedItem(Object item) {editedItem = item;}", "public void setPrice(float itemPrice) \n {\n price = itemPrice;\n }", "public void set(int position, Item item) {\n if (mUseIdDistributor) {\n IdDistributor.checkId(item);\n }\n mItems.set(position - getFastAdapter().getItemCount(getOrder()), item);\n mapPossibleType(item);\n getFastAdapter().notifyAdapterItemChanged(position);\n }", "Form setElementValue(String elementId, String value);", "public void setItem2(Object item) throws InvalidNodeException {\n\t\tif (!isValidNode()) {\n\t\t\tthrow new InvalidNodeException();\n\t\t}\n\t\tthis.item2 = item;\n\t}", "void updateItem(IDAOSession session, Item item);", "@Override\n public void update(Context context, Item item) throws SQLException, AuthorizeException\n {\n // Check authorisation\n // only do write authorization if user is not an editor\n if (!canEdit(context, item))\n {\n authorizeService.authorizeAction(context, item, Constants.WRITE);\n }\n\n log.info(LogManager.getHeader(context, \"update_item\", \"item_id=\"\n + item.getID()));\n\n // Set sequence IDs for bitstreams in item\n int sequence = 0;\n List<Bundle> bunds = item.getBundles();\n\n // find the highest current sequence number\n for (Bundle bund : bunds) {\n List<BundleBitstream> streams = bund.getBitstreams();\n\n for (BundleBitstream bundleBitstream : streams) {\n Bitstream bitstream = bundleBitstream.getBitstream();\n if (bitstream.getSequenceID() > sequence) {\n sequence = bitstream.getSequenceID();\n }\n }\n }\n\n // start sequencing bitstreams without sequence IDs\n sequence++;\n\n for (Bundle bund : bunds) {\n List<BundleBitstream> streams = bund.getBitstreams();\n\n for (BundleBitstream bundleBitstream : streams) {\n Bitstream stream = bundleBitstream.getBitstream();\n if (stream.getSequenceID() < 0) {\n stream.setSequenceID(sequence);\n sequence++;\n bitstreamService.update(context, stream);\n// modified = true;\n }\n }\n }\n\n // Map counting number of values for each element/qualifier.\n // Keys are Strings: \"element\" or \"element.qualifier\"\n // Values are Integers indicating number of values written for a\n // element/qualifier\n\n if (item.isMetadataModified() || item.isModified())\n {\n // Set the last modified date\n item.setLastModified(new Date());\n\n\n itemDAO.save(context, item);\n\n if (item.isMetadataModified())\n {\n context.addEvent(new Event(Event.MODIFY_METADATA, Constants.ITEM, item.getID(), item.getDetails()));\n item.clearDetails();\n item.setMetadataModified(false);\n }\n\n context.addEvent(new Event(Event.MODIFY, Constants.ITEM, item.getID(), null));\n item.setModified(false);\n }\n }", "public void setOrder(final Order value)\n\t{\n\t\tsetOrder( getSession().getSessionContext(), value );\n\t}", "public void setValue(Value value) {\n this.value = value;\n }", "protected void update(T item) {\n\t\tSession session = null;\n\t\ttry {\n\t\t\tsession = mDbHelper.beginTransaction();\n\t\t\tsession.update(item);\n\t\t\tmDbHelper.endTransaction(session);\n\t\t} catch (Exception e) {\n\t\t\tmDbHelper.cancelTransaction(session);\n\t\t\tAppLogger.error(e, \"Failed to execute update\");\n\t\t}\n\t}", "private void setBid(int value) {\n \n bid_ = value;\n }", "public void setJP_SalesRep_Value (String JP_SalesRep_Value);", "public void setValue_id(java.lang.String value_id) {\n this.value_id = value_id;\n }", "public void setItemCode(String itemCode) {\n\t\tthis.itemCode = itemCode == null ? null : itemCode.trim();\n\t}", "public Integer getOrderItemId() {\n return orderItemId;\n }", "@SuppressWarnings(\"unchecked\")\r\n public static synchronized void updateVoteItem(Item item, Vote vot) {\r\n\r\n// item.getItemProperty(\"id\").setValue(vot.getId()); //it is read only.\r\n item.getItemProperty(\"vote_date\").setValue(vot.getVote_date());\r\n item.getItemProperty(\"subject_id\").setValue(vot.getSubject_id());\r\n item.getItemProperty(\"internal_nr\").setValue(vot.getInternal_nr());\r\n item.getItemProperty(\"result_vote\").setValue(vot.getResult_vote().ordinal());\r\n// item.getItemProperty(\"for_vote\").setValue(vot.getFor_vote());\r\n// item.getItemProperty(\"against_vote\").setValue(vot.getAgainst_vote());\r\n// item.getItemProperty(\"refrain_vote\").setValue(vot.getRefrain_vote());\r\n// item.getItemProperty(\"absent\").setValue(vot.getAbsent());\r\n item.getItemProperty(\"visible\").setValue(vot.getVisible());\r\n }", "public void updateQuantity(DrinkItem temp, int val) throws SQLException{\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\ttry{\n\t\t\tmyStmt = myConn.prepareStatement(\"update drink set quantity=? where drink_code=?\");\n\t\t\tmyStmt.setInt(1, val);\n\t\t\tmyStmt.setInt(2, temp.getDrinkCode());\n\t\t\tmyStmt.executeUpdate();\n\t\t}\n\t\tfinally{\n\t\t\tif(myStmt != null)\n\t\t\t\tmyStmt.close();\n\t\t}\n\t\t\n\t}" ]
[ "0.5917768", "0.59024197", "0.589434", "0.5867856", "0.57762796", "0.57440656", "0.5718922", "0.56484777", "0.55779", "0.5575807", "0.55315495", "0.55188936", "0.55145764", "0.5500594", "0.54806143", "0.54806143", "0.54564244", "0.5422804", "0.54012257", "0.53813165", "0.5325939", "0.5303822", "0.53016657", "0.5297124", "0.52801853", "0.5271742", "0.5253765", "0.52361214", "0.5200298", "0.5193998", "0.51611096", "0.51600575", "0.5151448", "0.514501", "0.51363456", "0.5133782", "0.51160365", "0.51074165", "0.5106409", "0.5106409", "0.510619", "0.50988173", "0.5091267", "0.5088971", "0.50836146", "0.507458", "0.5073524", "0.50557184", "0.50557184", "0.50408816", "0.50144833", "0.5012991", "0.5001156", "0.50002265", "0.4992914", "0.49822485", "0.49818936", "0.49736673", "0.49717858", "0.49609333", "0.4952322", "0.49461934", "0.49410433", "0.49343607", "0.49336648", "0.49304378", "0.49293673", "0.49225515", "0.49154624", "0.4907855", "0.49041766", "0.48994344", "0.48954144", "0.48935738", "0.48934665", "0.48916313", "0.4889648", "0.48884472", "0.4887188", "0.48842984", "0.48749688", "0.48741513", "0.48709372", "0.48659754", "0.48558432", "0.4855366", "0.4850046", "0.48338813", "0.48244762", "0.48224077", "0.48207712", "0.48139897", "0.4799513", "0.47943106", "0.47884017", "0.47876757", "0.47785813", "0.47720256", "0.4765747", "0.47614715" ]
0.6351971
0
This method was generated by MyBatis Generator. This method returns the value of the database column bo_order_item.item_desc
public String getItemDesc() { return itemDesc; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\t@RequestMapping(value=\"/rest/item/query/item/desc/{itemId}\")\n\tpublic ZuelResult getTbitemDescByKey(@PathVariable(\"itemId\") Long itemKey) throws ServiceException {\n\t\treturn deseService.getTbitemDescByKey(itemKey);\n\t}", "@Override\n\tpublic TbItemDesc getItemDescByItemId(long itemId) {\n\t\tString httpClientResult = HttpClientUtil.doGet(HTTPCLIENTURL + HTTPCLIENTITEMDESC + itemId);\n\t\tTbItemDesc formatToPojo = JsonUtils.jsonToPojo(httpClientResult, TbItemDesc.class);\n\t\treturn formatToPojo;\n\t}", "@Override\n\tpublic LegouResult getDesc(long id) {\n\t\tTbItemDesc tbItemDesc = tbItemDescMapper.selectByPrimaryKey(id);\n\t\t\n\t\treturn LegouResult.ok(tbItemDesc);\n\t}", "XBCXDesc getItemDesc(XBCItem item, XBCXLanguage language);", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.column + \" DESC\";\n }", "public String desc() {\n return this.column + \" DESC\";\n }", "@Nonnull\n List<XBCXDesc> getItemDescs(XBCItem item);", "private String getAgendaItemDescription(AgendaItem item) {\n StringBuilder description = new StringBuilder();\n description.append(Parser.parseToHTML(item.getDescription(), true));\n description.append(\"<br/>\");\n description.append(\"<br/><b>Wie</b>: \" + item.getWho());\n description.append(\"<br/><b>Wat</b>: \" + item.getWhat());\n description.append(\"<br/><b>Waar</b>: \" + item.getLocation());\n description.append(\"<br/><b>Wanneer</b>: \" + item.getWhen());\n description.append(\"<br/><b>Kosten</b>: \" + item.getCosts());\n\n return description.toString();\n }", "public void setItemDesc(String itemDesc) {\n this.itemDesc = itemDesc == null ? null : itemDesc.trim();\n }", "public String getItemDescription() {\r\n\t\treturn itemDescription;\r\n\t}", "public String getItemDescription() {\n return itemDescription;\n }", "@Override\n\tpublic ItemDescription getItemDescription() {\n\t\tItemDescription item = new ItemDescription();\n\t\titem.title = \"电池充电测试\";\n\t\titem.board = \"通用\";\n\t\titem.desc = \"电池充电\";\n\t\treturn item;\n\t}", "public java.lang.CharSequence getORDERDESCRIPTION() {\n return ORDER_DESCRIPTION;\n }", "public java.lang.CharSequence getORDERDESCRIPTION() {\n return ORDER_DESCRIPTION;\n }", "public String getDesc(){\r\n\t\treturn this.desc;\r\n\t}", "public java.lang.String getDesc()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESC$10);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public synchronized String getDescription(){\n \treturn item_description;\n }", "public vrealm_350275.Buyer.Ariba.ERPOrder_PurchOrdSplitDetailsLineItemsItemDescription getDescription() {\n return description;\n }", "@Override\r\n\tpublic String getdesc() {\n\t\treturn b1.getdesc() + \", Milk\";\r\n\t}", "public String getUnlocalizedDescription() {\n return \"qa.journal.item.\" + key + \".desc\";\n }", "XBCXDesc getDefaultItemDesc(XBCItem item);", "@Override\n\tpublic java.lang.String getDescription() {\n\t\treturn _buySellProducts.getDescription();\n\t}", "@Column(name = \"DESCRIPTION\", length = 200 )\n public String getDescription() {\n return description;\n }", "java.lang.String getDesc();", "@Override\n\tpublic String getDesc() {\n\t\treturn auto.getDesc() + AC_DESCRIPTION;\n\t}", "public String getItemDescription(String itemName) {\n return driver.findElement(By.xpath(\"//div[text()='\" + itemName + \"']/../../div\")).getText();\n }", "public String getDesc() {\r\n\t\treturn desc;\r\n\t}", "public String getDesc() {\r\n\t\treturn desc;\r\n\t}", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc() {\n return desc;\n }", "public String getDesc()\r\n {\r\n return description;\r\n }", "public String getDescription() {\n return getGenericFieldValue(\"Description\");\n }", "public String getDesc() {\n\t return desc;\n\t }", "public void setItemDescription(String description){\r\n\t\tthis.itemDescription = description;\r\n\t}", "public String getDesc() {\n ListIterator<Item> roomContents = contents.listIterator();\n String contentString = \"\";\n while (roomContents.hasNext()) {\n contentString\n = contentString + (roomContents.next()).getDesc() + \" \";\n }\n\n return description + '\\n' + '\\n'\n + \"Room Contents: \" + contentString + '\\n';\n }", "public String getDescription() {\n\t\treturn (String) get_Value(\"Description\");\n\t}", "public String getDescription() {\n\t\treturn (String) get_Value(\"Description\");\n\t}", "public String getDescription() {\n\t\treturn (String) get_Value(\"Description\");\n\t}", "public String getDescription() {\n\t\treturn (String) get_Value(\"Description\");\n\t}", "public java.lang.String getDesc() {\n\t\treturn desc;\n\t}", "@Column(name = \"description\", nullable = false)\n public String getDescription() {\n\treturn this.description;\n }", "public String getOrderitem() {\n\t\treturn orderitem;\n\t}", "public synchronized String getItemDetails(){\n \tString s = \"\\n========================================\";\n \ts += \"\\nID: \"+ ID;\n \ts += \"\\nName: \"+ item_name;\n \ts += \"\\nStarting Price: \"+ start_price;\n \ts += \"\\nNumber Of bidders: \" + bids.size();\n \ts += \"\\n status: \" + status;\n\n \tif(status == \"open\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: No bids yet\";\n \t\t}else{\n \t\t\ts += \"\\n last_bidder: \"+ last_bidderName;\n \t\t}\n \t}else if(status == \"closed\"){\n \t\tif(last_bidder == null){\n \t\t\t\ts += \"\\nLast Bidder: Closed with No bids\";\n \t\t}else{\n \t\t\ts += \"\\n Won by: \"+ last_bidderName +\" at price of \"+ start_price;\n \t\t}\n \t}\n \ts += \"\\n========================================\";\n return s;\n }", "public java.lang.String getDesc() {\r\n return desc;\r\n }", "public java.lang.String getDescription()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESCRIPTION$8);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public java.lang.String getDescription()\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESCRIPTION$14);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Updatable\n public String getDescription() {\n return description;\n }", "public String getDescription(){\n\n //returns the value of the description field\n return this.description;\n }", "protected void setDescriptionColumn(SQLUpdatableStatementIfc sql,\n OrderTransactionIfc orderTransaction)\n { // begin setDescriptionColumn()\n String description = null;\n AbstractTransactionLineItemIfc[] lineItems =\n orderTransaction.getLineItems();\n if (lineItems.length > 0)\n {\n description = lineItems[0].getItemDescription(LocaleMap.getLocale(LocaleMap.DEFAULT));\n }\n\n if (!Util.isEmpty(description))\n {\n sql.addColumn(ARTSDatabaseIfc.FIELD_ORDER_DESCRIPTION,\n makeSafeString(description));\n }\n\n }", "public String getDescription(){\n\t\treturn getiIngredient().getDescription() + \", \" + super.getDescription();\n\t}", "public String getDescription(){\n return getString(KEY_DESCRIPTION);\n }", "public String getFirstItemDescription() {\r\n return firstItemDescription;\r\n }", "public String getDescription()\r\n\t{\r\n\t\tStringBuilder msgreturn = new StringBuilder().append(m_name).append(\" \").append(m_taxBaseAmt.toString());\r\n\t\treturn msgreturn.toString();\r\n\t}", "public String getCOD_ITEM() {\n return COD_ITEM;\n }", "public String getItemInformation()\n {\n return this.aDescription + \" qui a un poids de \" + this.aWeight;\n\n }", "@Override\n\tpublic String getdescription() {\n\t\treturn this.description.getDesc();\n\t}", "public java.lang.String getDescription()\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(DESCRIPTION$2, 0);\n if (target == null)\n {\n return null;\n }\n return target.getStringValue();\n }\n }", "@Override\n\tpublic String getDescripcion() {\n\t\treturn model.getDescripcion();\n\t}", "private String getDescrizione(StrutturaDati _cell) {\n\t\tfor (StrutturaDati cell : _cell.getAttributi()) {\n\t\t\tif (cell.getNome().equals(TAG_MAP_CELL_DESCRIPTION)) {\n\t\t\t\tfor (StrutturaDati text : cell.getAttributi()) {\n\t\t\t\t\tif (text.isText()) {\n\t\t\t\t\t\treturn text.getNome().trim();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public String getADD_DATE2_DESC() {\r\n return ADD_DATE2_DESC;\r\n }", "public String getADD_DATE2_DESC() {\r\n return ADD_DATE2_DESC;\r\n }", "public String getDescription() {\n return (String)getAttributeInternal(DESCRIPTION);\n }", "public String getDescription() {\n return (String)getAttributeInternal(DESCRIPTION);\n }", "public String getDescription(Context context)\n\t\t{\n\t\t\tif (descriptionId == 0)\n\t\t\t\treturn null;\n\n\t\t\treturn context.getString(descriptionId);\n\t\t}", "public String getDescription() {\n if ((desc == null) && (forVar != null)) {\n Attribute att = forVar.findAttributeIgnoreCase(CDM.LONG_NAME);\n if ((att != null) && att.isString())\n desc = att.getStringValue();\n\n if (desc == null) {\n att = forVar.findAttributeIgnoreCase(\"description\");\n if ((att != null) && att.isString())\n desc = att.getStringValue();\n }\n\n if (desc == null) {\n att = forVar.findAttributeIgnoreCase(CDM.TITLE);\n if ((att != null) && att.isString())\n desc = att.getStringValue();\n }\n\n if (desc == null) {\n att = forVar.findAttributeIgnoreCase(CF.STANDARD_NAME);\n if ((att != null) && att.isString())\n desc = att.getStringValue();\n }\n }\n return (desc == null) ? null : desc.trim();\n }", "String getDesc();", "public String getDescription(){\r\n \tString retVal = this.description;\r\n return retVal;\r\n }", "@Override\r\n\tpublic String getDesc() {\n\t\treturn pizza.getDesc()+\" , RomaTomatoes(12.88)\";\r\n\t}", "public String getDESCRIPTION() {\r\n return DESCRIPTION;\r\n }", "public Criteria andDescriptionGreaterThanColumn(LitemallOrder.Column column) {\n addCriterion(new StringBuilder(\"description > \").append(column.getEscapedColumnName()).toString());\n return (Criteria) this;\n }", "public String getADD_STRING2_DESC() {\r\n return ADD_STRING2_DESC;\r\n }", "public String getADD_STRING2_DESC() {\r\n return ADD_STRING2_DESC;\r\n }", "public StrColumn getRevisionDescription() {\n return delegate.getColumn(\"revision_description\", DelegatingStrColumn::new);\n }", "public String getDescription() {\n return (String) getAttributeInternal(DESCRIPTION);\n }", "public String getDescription() {\n\t\tString t = doc.get(\"description\");\n\n\t\tif (t == null) {\n\t\t\treturn \"\";\n\t\t} else {\n\t\t\treturn t;\n\t\t}\n\t}", "public String getProductExtDesc() {\n return (String)getAttributeInternal(PRODUCTEXTDESC);\n }", "public String getDescription() {\n return (desc);\n }", "public String getDescription() {\n\t\tif (iDescription == null) {\n\n\t\t\tif (iExtendedReason != null) {\n\t\t\t\tStringBuffer sb = new StringBuffer();\n\t\t\t\tint i = 0;\n\n\t\t\t\tsb.append('(');\n\t\t\t\tsb.append(iReason);\n\t\t\t\tsb.append(\": \");\n\t\t\t\tfor (; i < iExtendedReason.length - 1; i++) {\n\t\t\t\t\tif (iExtendedReason[i] != null) {\n\t\t\t\t\t\tsb.append(iExtendedReason[i].toString());\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsb.append(\"null\");\n\t\t\t\t\t}\n\t\t\t\t\tsb.append(',');\n\t\t\t\t}\n\t\t\t\tsb.append(iExtendedReason[i]);\n\t\t\t\tsb.append(')');\n\t\t\t\tsb.insert(0, iReason);\n\t\t\t\treturn sb.toString();\n\t\t\t}\n\t\t\treturn iReason;\n\t\t}\n\t\treturn iDescription;\n\t}", "@Override\n public String getDescription() {\n return this.description + \"/by\" + this.dueDate;\n }", "public String getDescription()\r\n {\r\n return this.aDescription ;\r\n }", "FieldDesc getColumnDesc(int i);", "@Test\n\tvoid descriptionTest() {\n\t\tfor(MedicalItem item: itemList) {\n\t\t\tString expected = \"Name: \" + item.toString() + \"\\nHeal Amount: \" + item.getHealAmount() +\n\t\t\t\t\t\"\\nCures Plague: \" + item.getCure() +\"\\nOutpost Cost: $\" + item.getPrice();\n\t\t\tassertEquals(item.itemDescription(), expected);\n\t\t}\n\t}", "java.lang.String getProductDescription();", "public Optional<String> desc() {\n\t\t\treturn Optional.ofNullable(_description);\n\t\t}", "public String getProductClassDesc() {\n return (String)getAttributeInternal(PRODUCTCLASSDESC);\n }", "public String getItem()\n {\n // put your code here\n return \"This item weighs: \" + weight + \"\\n\" + description + \"\\n\";\n }" ]
[ "0.69031906", "0.6900325", "0.6612787", "0.65810615", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.6531771", "0.63833535", "0.63833535", "0.6359342", "0.632763", "0.62910974", "0.62192476", "0.603416", "0.6014918", "0.5959387", "0.5944828", "0.59077436", "0.5865436", "0.5863032", "0.5830165", "0.58264035", "0.57716155", "0.5762732", "0.5748291", "0.5745459", "0.5728444", "0.57209504", "0.5700501", "0.56962824", "0.56962824", "0.5693507", "0.5693507", "0.5693507", "0.5693507", "0.5693507", "0.5663091", "0.5658132", "0.56451523", "0.5631056", "0.5626559", "0.55895877", "0.55895877", "0.55895877", "0.55895877", "0.55724865", "0.55690837", "0.5567395", "0.55644315", "0.5563805", "0.55577105", "0.5551501", "0.5537325", "0.5532448", "0.55158544", "0.55054975", "0.54852986", "0.54799", "0.5470349", "0.5457624", "0.54560643", "0.54438347", "0.54403037", "0.5433693", "0.5427918", "0.5424047", "0.5424047", "0.5407177", "0.5407177", "0.54057574", "0.539012", "0.5387735", "0.5379478", "0.53723264", "0.53576034", "0.534569", "0.5341489", "0.5341489", "0.5338471", "0.5323503", "0.53234094", "0.5312755", "0.5311862", "0.5307564", "0.53022397", "0.52995235", "0.5276971", "0.52769065", "0.5272428", "0.5268303", "0.52681124", "0.5261813" ]
0.69510907
0
This method was generated by MyBatis Generator. This method sets the value of the database column bo_order_item.item_desc
public void setItemDesc(String itemDesc) { this.itemDesc = itemDesc == null ? null : itemDesc.trim(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setItemDescription(String description){\r\n\t\tthis.itemDescription = description;\r\n\t}", "protected void setDescriptionColumn(SQLUpdatableStatementIfc sql,\n OrderTransactionIfc orderTransaction)\n { // begin setDescriptionColumn()\n String description = null;\n AbstractTransactionLineItemIfc[] lineItems =\n orderTransaction.getLineItems();\n if (lineItems.length > 0)\n {\n description = lineItems[0].getItemDescription(LocaleMap.getLocale(LocaleMap.DEFAULT));\n }\n\n if (!Util.isEmpty(description))\n {\n sql.addColumn(ARTSDatabaseIfc.FIELD_ORDER_DESCRIPTION,\n makeSafeString(description));\n }\n\n }", "public void editItemInfo() throws SQLException {\n\t\tConnection con = openDBConnection();\n\t\tString queryString = \"Update team1.GABES_ITEM Set ITEM_CATEGORY=?, DESCRIPTION=?, ITEM_NAME=?\";\n\t\tqueryString += \"Where ITEM_ID='\" + this.item_id + \"'\";\n\t\t/** Clears parameters and then sets new values */\n\t\tPreparedStatement p_stmt = con.prepareCall(queryString);\n\t\t/** Set new attribute values */\n\t\tp_stmt.clearParameters();\n\t\tp_stmt.setString(1, this.item_category);\n\t\tp_stmt.setString(2, this.description);\n\t\tp_stmt.setString(3, this.item_name);\n\t\t/* Executes the Prepared Statement query */\n\t\tp_stmt.executeQuery();\n\t\tp_stmt.close();\n\t}", "public String getItemDesc() {\n return itemDesc;\n }", "@Override\n\tpublic TbItemDesc getItemDescByItemId(long itemId) {\n\t\tString httpClientResult = HttpClientUtil.doGet(HTTPCLIENTURL + HTTPCLIENTITEMDESC + itemId);\n\t\tTbItemDesc formatToPojo = JsonUtils.jsonToPojo(httpClientResult, TbItemDesc.class);\n\t\treturn formatToPojo;\n\t}", "@Override\n\t@RequestMapping(value=\"/rest/item/query/item/desc/{itemId}\")\n\tpublic ZuelResult getTbitemDescByKey(@PathVariable(\"itemId\") Long itemKey) throws ServiceException {\n\t\treturn deseService.getTbitemDescByKey(itemKey);\n\t}", "public void setDesc(java.lang.String desc)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESC$10);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DESC$10);\r\n }\r\n target.setStringValue(desc);\r\n }\r\n }", "public void setORDERDESCRIPTION(java.lang.CharSequence value) {\n this.ORDER_DESCRIPTION = value;\n }", "public void setDescription(String newDesc){\n\n //assigns the value of newDesc to the description field\n this.description = newDesc;\n }", "XBCXDesc getItemDesc(XBCItem item, XBCXLanguage language);", "public void setDescription(vrealm_350275.Buyer.Ariba.ERPOrder_PurchOrdSplitDetailsLineItemsItemDescription description) {\n this.description = description;\n }", "public void setDesc(String desc) {\n this.desc = desc;\n }", "public void setDesc(String desc) {\n this.desc = desc;\n }", "@Override\n\tpublic void setDescription(java.lang.String description) {\n\t\t_buySellProducts.setDescription(description);\n\t}", "public void setDesc(String desc) {\r\n\t\tthis.desc = desc;\r\n\t}", "public void setDesc(String desc) {\r\n\t\tthis.desc = desc;\r\n\t}", "public void setDesc(String desc) {\n\t this.desc = desc;\n\t }", "XBCXDesc getDefaultItemDesc(XBCItem item);", "void setDesc(java.lang.String desc);", "@Nonnull\n List<XBCXDesc> getItemDescs(XBCItem item);", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public String desc() {\n return this.getEscapedColumnName() + \" DESC\";\n }", "public void setDescription(ArrayList descriptionColumn) {\n ArrayList<String> descriptionArray = new ArrayList<String>();\n this.descriptionArray = descriptionColumn;\n }", "public void setDescription(String desc)\r\n {\r\n\tthis.desc = desc;\r\n }", "public void setDescription(String desc) {\n description = desc;\n }", "public void setDescription(String desc) {\n this.desc = desc;\n }", "public Item(String description) {\n this.description = description;\n }", "public void setDescription(String desc) {\n sdesc = desc;\n }", "public void xsetDesc(org.apache.xmlbeans.XmlString desc)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.XmlString target = null;\r\n target = (org.apache.xmlbeans.XmlString)get_store().find_attribute_user(DESC$10);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.XmlString)get_store().add_attribute_user(DESC$10);\r\n }\r\n target.set(desc);\r\n }\r\n }", "public void setDesc(java.lang.String desc) {\r\n this.desc = desc;\r\n }", "public void setDescription(String description) {\n this.description = description;\n this.updated = new Date();\n }", "@Override\n\tpublic LegouResult getDesc(long id) {\n\t\tTbItemDesc tbItemDesc = tbItemDescMapper.selectByPrimaryKey(id);\n\t\t\n\t\treturn LegouResult.ok(tbItemDesc);\n\t}", "public int updateItem(Connection conn, Item item, int item_no) {\r\n\t\ttry {\r\n\t\t\tPreparedStatement pstmt = conn.prepareStatement(\"update item_XXXX set description =? where item_no=?\");\r\n\t\t\tpstmt.setString(1, item.getDescription());\r\n\t\t\tpstmt.setInt(2, item_no);\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t\tPreparedStatement pstmt1 = conn.prepareStatement(\"update item_XXXX set price =? where item_no=?\");\r\n\t\t\tpstmt1.setDouble(1, item.getPrice());\r\n\t\t\tpstmt1.setInt(2, item_no);\r\n\t\t\tint count = pstmt1.executeUpdate();\r\n\t\t\treturn count;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn 0;\r\n\t}", "public void setOrderitem(String orderitem) {\n\t\tthis.orderitem = orderitem == null ? null : orderitem.trim();\n\t}", "public void setDesc(java.lang.String desc) {\n\t\tthis.desc = desc;\n\t}", "@Override\n\tpublic ItemDescription getItemDescription() {\n\t\tItemDescription item = new ItemDescription();\n\t\titem.title = \"电池充电测试\";\n\t\titem.board = \"通用\";\n\t\titem.desc = \"电池充电\";\n\t\treturn item;\n\t}", "public void setDescription(String des){\n description = des;\n }", "public final void setDescription(final String desc) {\n mDescription = desc;\n }", "public void setPaymentDesc(String value) {\n setAttributeInternal(PAYMENTDESC, value);\n }", "public void setDescription(String newdescription) {\n description=newdescription;\n }", "public void setDescription(String tmp) {\n this.description = tmp;\n }", "public void setDescription(String tmp) {\n this.description = tmp;\n }", "public void setDescription(String value) {\r\n this.description = value;\r\n }", "public org.LNDCDC_NCS_TCS.ORDER_TYPES.apache.nifi.LNDCDC_NCS_TCS_ORDER_TYPES.Builder setORDERDESCRIPTION(java.lang.CharSequence value) {\n validate(fields()[1], value);\n this.ORDER_DESCRIPTION = value;\n fieldSetFlags()[1] = true;\n return this;\n }", "protected abstract void onBindDescription(ViewHolder vh, Object item);", "private String getAgendaItemDescription(AgendaItem item) {\n StringBuilder description = new StringBuilder();\n description.append(Parser.parseToHTML(item.getDescription(), true));\n description.append(\"<br/>\");\n description.append(\"<br/><b>Wie</b>: \" + item.getWho());\n description.append(\"<br/><b>Wat</b>: \" + item.getWhat());\n description.append(\"<br/><b>Waar</b>: \" + item.getLocation());\n description.append(\"<br/><b>Wanneer</b>: \" + item.getWhen());\n description.append(\"<br/><b>Kosten</b>: \" + item.getCosts());\n\n return description.toString();\n }", "public TipoOperacaoParcialUpdate descricao(String descricao) {\n this.descricao = descricao;\n return this;\n }", "public void setDescription(String des) {\r\n\t\tthis.description = des;\r\n\t}", "public void SetDefautValueCombo(Item item) \n {\n this.defautValueCombo=item;\n ;\n }", "public void setBookDesc(java.lang.String value);", "public void setDescription(String pDescription) {\n\t\tthis.iDescription = pDescription;\n\t}", "public String desc() {\n return this.column + \" DESC\";\n }", "public String desc() {\n return this.column + \" DESC\";\n }", "public void edit_item_info(Item i,String pic) {\n i.setItemPicPath(\"images/\"+pic);\n// i.setItemTag(itemTag);\n// i.setItemSaleNum(itemSaleNum); \n em.merge(i);\n em.flush();\n\n }", "public void setDesc(String desc) {\n this.desc = desc == null ? null : desc.trim();\n }", "public void setDescription(String value) {\n this.description = value;\n }", "public static void showDescription(String itemName, String itemDescription)\r\n\t{\r\n\t\tdescription.setText(\"\");\r\n\t\tdescription.setText(itemName+manualTab(itemName)+itemDescription);\r\n\t}", "public void changeDescription(Product p, String description){\r\n\t\tp.description = description;\r\n\t}", "public void setItemNo(Integer itemNo) {\n\t\tif (itemNo == 0) {\n\t\t\tthis.itemNo = null;\n\t\t} else {\n\t\t\tthis.itemNo = itemNo;\n\t\t}\n\t}", "public void setDescription(String paramDesc) {\n\tstrDesc = paramDesc;\n }", "public ItemDescription(String itemName, int price, double tax) {\n this.itemName = itemName;\n this.price = price;\n this.tax = tax;\n }", "public void setRecapitoDesc(String recapitoDesc) {\n\t\tthis.recapitoDesc = recapitoDesc;\n\t}", "public void setDescription(String Description) {\n this.Description = Description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n this.description = description;\n }", "public void setDescription(String description) {\n mDescription = description;\n }", "public void setDescription(String value) {\n setAttributeInternal(DESCRIPTION, value);\n }", "public void setDescription(String value) {\n setAttributeInternal(DESCRIPTION, value);\n }", "public void setDescription(String value) {\n setAttributeInternal(DESCRIPTION, value);\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(java.lang.String description)\n {\n synchronized (monitor())\n {\n check_orphaned();\n org.apache.xmlbeans.SimpleValue target = null;\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESCRIPTION$14);\n if (target == null)\n {\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DESCRIPTION$14);\n }\n target.setStringValue(description);\n }\n }", "public void setDescription(String description) {\r\n \t\tthis.description = description;\r\n \t}", "public String getItemDescription() {\r\n\t\treturn itemDescription;\r\n\t}", "public void setDescription(java.lang.String description)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_attribute_user(DESCRIPTION$8);\r\n if (target == null)\r\n {\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().add_attribute_user(DESCRIPTION$8);\r\n }\r\n target.setStringValue(description);\r\n }\r\n }", "public maestro.payloads.FlyerFeaturedItem.Builder setDescription(CharSequence value) {\n validate(fields()[4], value);\n this.description = value;\n fieldSetFlags()[4] = true;\n return this;\n }", "public void setItem_order_code_id(int item_order_code_id) {\n this.item_order_code_id = item_order_code_id;\n }", "public void setProductExtDesc(String value) {\n setAttributeInternal(PRODUCTEXTDESC, value);\n }", "public void setDescription(String desc) throws SystemException {\n group.setDescription(desc);\n ModelInputGroupLocalServiceUtil.updateModelInputGroup(group);\n }", "public void setDescription(String _description) {\n this._description = _description;\n }", "public void setDescription(String desc);", "public String getDesc(){\r\n\t\treturn this.desc;\r\n\t}", "public void setDescription(String newVal) {\n if ((newVal != null && this.description != null && (newVal.compareTo(this.description) == 0)) || \n (newVal == null && this.description == null && description_is_initialized)) {\n return; \n } \n this.description = newVal; \n\n description_is_modified = true; \n description_is_initialized = true; \n }", "public void setDescription(String description) {\n this.description = description;\n UnitOfWork.getCurrent().registerDirty(this);\n }", "public void setDescription(String description) {\n \tthis.description = description;\n }", "public void setDescription(java.lang.String value) {\n this.description = value;\n }", "public void setDescription2(String description2) {\r\n this.description2 = description2;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }", "public void setDescription(String description) {\r\n this.description = description;\r\n }" ]
[ "0.64622635", "0.6180178", "0.60657376", "0.5978794", "0.59664315", "0.57963127", "0.573168", "0.5728354", "0.5726509", "0.5709982", "0.56479836", "0.5646856", "0.5646856", "0.564189", "0.5609854", "0.5609854", "0.5593656", "0.5593508", "0.5590544", "0.5557121", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.5530504", "0.55266994", "0.5514126", "0.5508868", "0.5507812", "0.549771", "0.5482146", "0.5450502", "0.5440809", "0.54076767", "0.54063714", "0.5395942", "0.5392834", "0.537648", "0.533619", "0.5332129", "0.5325146", "0.5310447", "0.53079677", "0.5307747", "0.5307747", "0.5292777", "0.5292532", "0.52886564", "0.5286735", "0.52822256", "0.5279988", "0.5263988", "0.52551615", "0.52546996", "0.52525425", "0.52525425", "0.52401805", "0.5235387", "0.5229391", "0.52144563", "0.5202502", "0.5196963", "0.51850605", "0.51834047", "0.51826376", "0.5182387", "0.51815397", "0.5180701", "0.5180701", "0.5175044", "0.51690865", "0.51690865", "0.51690865", "0.51687235", "0.51682293", "0.5167808", "0.5166466", "0.5164767", "0.5163043", "0.5161295", "0.5157219", "0.5152213", "0.5148146", "0.51472634", "0.5142464", "0.5139817", "0.51387894", "0.5136424", "0.51351905", "0.51326036", "0.5130196", "0.5130196", "0.5130196", "0.5130196" ]
0.72069746
0
Any file based config will need to implement this interface, so that the mustacheHelper could render it.
public interface FileConfig { /** * get the mustache file path. * @return file path */ String getPath(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface IFileConfigurationLoader {\r\n\t\r\n\t/**\r\n\t * <p> Loads a FileConfiguration from the given file. </p>\r\n\t * \r\n\t * @param file File to load from\r\n\t * @return the FileConfiguration\r\n\t */\r\n\tpublic FileConfiguration loadConfiguration(File file);\r\n\t\r\n}", "public interface Config {\n\t/**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tstring value.\n */\n String getString(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tString value.\n */\n String getString(String key, String defaultValue);\n\n /**\n * Get value to corresponding to the key.\n *\n * @param key\n * @return\n * \tint value.\n */\n int getInt(String key);\n\n /**\n * Get value to corresponding to the key.\n * Specified value is returned if not contains key to config file.\n *\n * @param key\n * @param defaultValue\n * @return\n * \tint value.\n */\n int getInt(String key, int defaultValue);\n\n /**\n * Return with string in contents of config file.\n *\n * @return\n * \tContents of config file.\n */\n String getContents();\n\n /**\n * Return with Configuration object in contents of config file.\n *\n * @return\n * \tContents of Configuration object.\n */\n Configuration getConfiguration();\n\n List<Object> getList(String key);\n}", "public interface FileSystemConfig {\n\n}", "public interface IConfigurationProvider {\r\n String get(String path);\r\n}", "public File getConfigurationFile();", "public interface ResourceConfig {\n\n public ResourceBundle config = ResourceBundle.getBundle(\"resource-config\");\n\n public String DEFAULT_LOCALE = config.getString(\"defaultLocale\");\n\n public String EXCEPTION_MESSAGE_PREFIX = config.getString(\"exception_message_prefix\");\n\n public boolean VALUE_NEED_ENCODE = new Boolean(config.getString(\"stringEncode\")).booleanValue();\n\n public String SOURCE_ENCODE = config.getString(\"sourceEncode\");\n\n public String TARGET_ENCODE = config.getString(\"targetEncode\");\n\n public String LOCALE_LIST = config.getString(\"localeList\");\n\n public String RESOURCEBOX_FILES = config.getString(\"resourcebox_files\");\n\n public String CONSTANTS_FILES = config.getString(\"constants_files\");\n\n}", "public interface IConfigManager {\n\n\tpublic void loadConfig();\n\n\tpublic List<CalcTemplate> getTemplates();\n\t\n\tpublic CalcTemplate getTemplateByName(String templateName);\n\n\t\n\n}", "public abstract String getConfig();", "public interface Configuration {\n\n}", "public interface ConfigurationReader {\n\n /**\n * Read a configuration file. If there are *any* errors reading the file, the method should return an empty string \"\".\n */\n public String readConfiguration(String path);\n}", "public interface ConfigFileLoader {\n\n /**\n * Save the map of the node instance,\n * to the file instance.\n *\n * @throws IOException When it fails to save {@see IOException}.\n */\n void save() throws IOException;\n\n /**\n * Load the map of the file instance,\n * in the node instance.\n *\n * @throws IOException When it fails to load {@see IOException}.\n */\n void load() throws IOException;\n\n /**\n * Change the file instance to new file instance.\n *\n * @param file new file instance.\n */\n void setNewFile(File file);\n\n}", "public interface ConfigLoader<T> {\n\t/**\n\t * Load configurations from a file. the file name supplied should contain\n\t * absolute path . As the file name is supplied, the method throws\n\t * {@link FileNotFoundException} if file is not found on the classpath.\n\t * \n\t * @param file file name\n\t * @return configurations\n\t */\n\tpublic T loadConfig(String file) throws IOException;\n\n\t/**\n\t * Load configurations from a file.\n\t * \n\t * @param file configuration file\n\t * @return configurations\n\t */\n\tpublic T loadConfig(File file) throws IOException;\n}", "public interface ExternalDirectoryConfig\n{\n}", "public FileBasedConfigSource() {\n // Intentionally empty.\n }", "public interface IViewConfiguration {\r\n\r\n\t/** Get the filter defining how to handle conditional directives */\r\n\tIViewFilter getViewFilter();\r\n\t\r\n\t/** Get the fixed macros (macro name or name=value).\r\n\t * This array should not change after creation since this\r\n\t * configuration is stored in a view.\r\n\t */\r\n\tCollection<IDefine> getMacros();\r\n\r\n\t/**\r\n\t * Get the configuration for the parser. This may differ based\r\n\t * on SDK (i.e. different include paths or different keywords, etc.)\r\n\t */\r\n\tIViewParserConfiguration getViewParserConfiguration();\r\n}", "public interface ConfigService {\n\n\n /**\n * eureka配置\n *\n * @param sb\n * @param addr\n */\n void eureka(StringBuilder sb, String addr);\n\n /**\n * redis配置\n *\n * @param sb\n * @param addr\n */\n void redis(StringBuilder sb, String addr);\n\n\n /**\n * 数据源配置\n *\n * @param sb\n */\n void thymeleafAndDatasource(StringBuilder sb);\n\n\n /**\n * 关于mybatis的配置\n *\n * @param sb\n * @param packages\n */\n void mybatis(StringBuilder sb, String packages);\n\n\n /**\n * 分页插件配置\n *\n * @param sb\n */\n void pagehelper(StringBuilder sb);\n\n /**\n * 生成application.yml\n *\n * @param name\n */\n void application(String name);\n\n\n /**\n * 生成application-xxx.yml\n *\n * @param branch\n * @param packages\n */\n void applicationBranch(String branch, String packages);\n\n\n /**\n * log文件\n *\n */\n void logBack();\n}", "private AppConfigContent() {}", "public class_config(){\n\t\t\n\t\tformat_date=\"dd/MM/yyyy\";\n\t\tcurrency='€';\n\t\tdecimals=2;\n\t\tlanguage=\"eng\";\n\t\ttheme=\"Metal\";\n\t\tfile_format=\"json\";\n\t\t\n\t}", "String getConfigFileName();", "public LocalFileConfig(ServicesContainer services) {\n this.services = services;\n String localfilePropertyValue = System.getProperty(\"cashmanager.config.localfile\");\n if (localfilePropertyValue != null) {\n this.filePathAString = localfilePropertyValue;\n }\n }", "public T loadConfig(File file) throws IOException;", "public interface Configurable\t{\n\t/**\n\t *\tConfiguration files have changed.\n\t */\n\tpublic void reConfigure();\n}", "public interface ConfigureConfiguration {\n\n\t// A list of names of configuration files\n\t@Option(shortName=\"c\", description = \"Name of one or many configuration \"\n\t\t+ \"files. Parameters in configuration files override each other. If a\"\n\t\t+ \" parameter is provided in more than one file, the first occurrence \"\n\t\t+ \" is used.\"\n\t) \n\tList<File> getConf();\n\tboolean isConf();\n\t\n}", "private void config() {\n\t}", "private FileObject makeConfigFile(TemplatePair p, NrfConfig configObj){\n ST tmpl_sd = getConfigGroup().getInstanceOf(\"sdk_config\");\n tmpl_sd.add(\"config\", configObj);\n FileObject sdk_config_file = new FileObject();\n sdk_config_file.setSubPath(\"config/\");\n sdk_config_file.setFileName( p.getValue()+\".h\");\n sdk_config_file.setContent(tmpl_sd.render());\n return sdk_config_file;\n }", "public interface IFileAdapter {\n /**\n * The method is uses to read file\n *\n * @return List lines\n */\n List readFile(String pathToFile);\n\n /**\n * The method is uses to write file\n *\n * @param values List contains a lines for writing\n */\n void write(List<StringBuilder> values);\n\n /**\n * This method is used to move files from one directory to another\n *\n * @param pathToFile contains the path to the file that you want to move\n * @param pathDirectory contains the path to the directory where you want to put the file\n */\n void moveFile(String pathToFile, String pathDirectory);\n\n /**\n * The method is used to get the file paths from the directory\n * along the path specified in app.properties\n */\n List<String> getListPaths();\n\n /**\n * This method is used to move a file to a directory with non-valid files\n */\n void moveFileToDirectoryNotValidFiles(String pathToFile);\n\n /**\n * This method is used to move a file to a directory with converted files\n */\n void moveFileToDirectoryWithConvertedFiles(String pathToFile);\n}", "public interface IVersionMakerConfig {\n String getPathToHandle();\n}", "private File getConfigurationFile() {\n return new File(BungeeBan.getInstance().getDataFolder(), this.filename);\n }", "public Config(String filename) {\n this.filename = filename;\n }", "public FileConfiguration loadConfiguration(File file);", "private void GetConfig()\n {\n boolean useClassPath = false;\n if(configFile_ == null)\n {\n useClassPath = true;\n configFile_ = \"data.config.lvg\";\n }\n // read in configuration file\n if(conf_ == null)\n {\n conf_ = new Configuration(configFile_, useClassPath);\n }\n }", "public void loadConfig() {\n\t}", "public interface Config {\n\n /**\n * Converts the config into a Map\n *\n * @param deep If true, instead of putting Maps for subconfigs,\n * use the full path using the separator character to split\n * @return This config as a Map\n */\n Map<String, Object> getValues(boolean deep);\n\n /**\n * @param path The path to check\n * @return If the config contains an item at path\n */\n boolean contains(String path);\n\n /**\n * Load the values from the map into this config.\n *\n * @param values The map to load in.\n */\n default void setAll(Map<String, Object> values) {\n for (String path : values.keySet()) {\n set(path, values.get(path));\n }\n }\n\n /**\n * Sets the value at path to value\n *\n * @param path The path to put the value\n * @param value The value\n * @return The modified config object, to allow for chain calls\n */\n Config set(String path, Object value);\n\n default void setAll(Config values) {\n for (String path : values.getKeys(true)) {\n set(path, values.get(path));\n }\n }\n\n /**\n * @param deep Should full paths be returned for keys in subconfigs, separated by the separator character?\n * @return The keys that have values in this config\n */\n Set<String> getKeys(boolean deep);\n\n /**\n * Finds and retrieves the object at the given path. If the path is empty, returns this object.\n *\n * @param path The path of the object\n * @return The object at the given path, or null if not found\n */\n default Object get(String path) {\n return get(path, null);\n }\n\n /**\n * Gets the raw value this config contains at path, returning the placeholder def is nothing is found.\n *\n * @param path The path to get the value at\n * @param def The placeholder if no value is found at path, e.g. {@code null}\n * @return The raw object contained at path, or def if nothing is there.\n */\n Object get(String path, Object def);\n\n /**\n * @return The separator character.\n */\n char getSeparator();\n\n /**\n *\n * @return toString() of the object at the path, or null if there is none\n */\n default String getString(String path) {\n return getString(path, null);\n }\n\n /**\n *\n * @return toString() of the object at the path, or def if there is none\n */\n default String getString(String path, String def) {\n Object obj = get(path);\n\n if (obj != null) return obj.toString();\n else return def;\n }\n\n /**\n *\n * @return If there is a String stored at the given path\n */\n default boolean isString(String path) {\n return get(path) instanceof String;\n }\n\n /**\n *\n * @return The int value of the number stored at the path, or 0 if there is none\n */\n default int getInt(String path) {\n return getInt(path, 0);\n }\n\n /**\n * @return The int value of the number stored at the path, or def if there is none\n */\n default int getInt(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).intValue();\n else return def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Integer\n */\n default boolean isInt(String path) {\n return get(path) instanceof Integer;\n }\n\n /**\n *\n * @return The short value of the number stored at the path, or 0 if there is none\n */\n default short getShort(String path) {\n return getShort(path, 0);\n }\n\n /**\n * @return The short value of the number stored at the path, or def if there is none\n */\n default short getShort(String path, int def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).shortValue();\n else return (short) def;\n }\n\n /**\n *\n * @return If the object at the path is an instance of Short\n */\n default boolean isShort(String path) {\n return get(path) instanceof Short;\n }\n\n /**\n *\n * @return True if the boolean true is stored at path, otherwise false\n */\n default boolean getBoolean(String path) {\n return getBoolean(path, false);\n }\n\n /**\n * @return The boolean value stored at path, or def is there is none\n */\n default boolean getBoolean(String path, boolean def) {\n Object obj = get(path);\n\n if (obj instanceof Boolean) return (Boolean) obj;\n else return def;\n }\n\n /**\n * @return If there is a boolean stored at path\n */\n default boolean isBoolean(String path) {\n return get(path) instanceof Boolean;\n }\n\n default boolean isNumber(String path) {\n return get(path) instanceof Number;\n }\n\n default double getDouble(String path) {\n return getDouble(path, 0.0d);\n }\n\n default double getDouble(String path, double def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).doubleValue();\n else return def;\n }\n\n default boolean isDouble(String path) {\n return get(path) instanceof Double;\n }\n\n default BigDecimal getBigDecimal(String path) {\n return getBigDecimal(path, BigDecimal.ZERO);\n }\n\n default BigDecimal getBigDecimal(String path, BigDecimal def) {\n Object obj = get(path);\n\n if (obj instanceof Number) {\n if (obj instanceof BigDecimal) {\n return (BigDecimal) obj;\n } else if (obj instanceof BigInteger) {\n return new BigDecimal((BigInteger) obj);\n } else {\n return BigDecimal.valueOf(((Number) obj).doubleValue());\n }\n } else return def;\n }\n\n default boolean isBigDecimal(String path) {\n return get(path) instanceof BigDecimal;\n }\n\n default long getLong(String path) {\n return getLong(path, 0L);\n }\n\n default long getLong(String path, long def) {\n Object obj = get(path);\n\n if (obj instanceof Number) return ((Number) obj).longValue();\n else return def;\n }\n\n default boolean isLong(String path) {\n return get(path) instanceof Long;\n }\n\n default byte[] getByteArray(String path) {\n return getByteArray(path, new byte[0]);\n }\n\n default byte[] getByteArray(String path, byte[] def) {\n Object obj = get(path);\n\n if (obj instanceof byte[]) return (byte[]) obj;\n else return def;\n }\n\n default boolean isByteArray(String path) {\n return get(path) instanceof byte[];\n }\n\n default List<String> getStringList(String path) {\n return getList(path, String.class);\n }\n\n default <T> List<T> getList(String path, Class<T> clazz) {\n return getList(path, new ArrayList<>(), clazz);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> List<T> getList(String path, List<T> def, Class<T> clazz) {\n Object obj = get(path);\n\n if (!(obj instanceof Collection<?>)) return def;\n\n Collection<?> input = (Collection<?>) obj;\n List<T> result = new ArrayList<>();\n\n for (Object o : input) {\n if (!clazz.isInstance(o)) continue;\n\n result.add((T) o);\n }\n\n return result;\n }\n\n default List<Config> getConfigList(String path) {\n return getList(path, Config.class);\n }\n\n default boolean isList(String path) {\n return get(path) instanceof List<?>;\n }\n\n /**\n * @param path The path to check for a list\n * @param type The type that the list should contain\n * @return If there is a list at this path and it contains an object with the type {@code type}\n */\n default boolean isList(String path, Class<?> type) {\n if (!isList(path)) return false;\n\n List<?> list = getList(path, null, type);\n\n return list != null && !list.isEmpty();\n }\n\n default Config getConfigOrNull(String path) {\n Object obj = get(path);\n\n if (!(obj instanceof Config)) return null;\n else return (Config) obj;\n }\n\n Config getConfigOrEmpty(String path);\n\n default boolean isConfig(String path) {\n return get(path) instanceof Config;\n }\n\n /**\n * Modifies the fields of the object passed in to the values specified in this config.\n *\n * @param object The object to modify the fields of.\n * @param <T> The type of the object\n * @return The (now modified) object\n */\n default <T> T getAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers())) continue;\n if (Modifier.isTransient(field.getModifiers())) continue;\n\n if (!contains(field.getName())) continue;\n\n try {\n if (field.getType().equals(double.class)) {\n if (!isNumber(field.getName())) continue;\n field.setDouble(object, getDouble(field.getName()));\n } else if (field.getType().equals(float.class)) {\n if (!isNumber(field.getName())) continue;\n field.setFloat(object, (float) getDouble(field.getName()));\n } else if (field.getType().equals(int.class)) {\n if (!isNumber(field.getName())) continue;\n field.setInt(object, getInt(field.getName()));\n } else if (field.getType().equals(boolean.class)) {\n if (!isBoolean(field.getName())) continue;\n field.setBoolean(object, getBoolean(field.getName()));\n } else if (field.getType().equals(long.class)) {\n if (!isNumber(field.getName())) continue;\n field.setLong(object, getLong(field.getName()));\n } else if (field.getType().equals(short.class)) {\n if (!isNumber(field.getName())) continue;\n field.setShort(object, (short) getInt(field.getName()));\n } else if (field.getType().equals(byte.class)) {\n if (!isNumber(field.getName())) continue;\n field.setByte(object, (byte) getInt(field.getName()));\n } else {\n Object newValue = getType(field.getName(), field.getType());\n if (newValue == null) continue;\n\n field.set(object, newValue);\n }\n\n } catch (IllegalAccessException e) {\n //This should not happen hopefully.\n e.printStackTrace();\n }\n }\n\n return object;\n }\n\n /**\n * Loads the fields of the object into this config.\n *\n * @param object The object itself\n * @param <T> The type of object\n * @return The object, again\n */\n default <T> T setAllFields(T object) {\n Field[] fields = object.getClass().getDeclaredFields();\n\n for (Field field : fields) {\n field.setAccessible(true);\n\n if (Modifier.isStatic(field.getModifiers()) || Modifier.isTransient(field.getModifiers())) continue;\n\n try {\n set(field.getName(), field.get(object));\n } catch (IllegalAccessException e) {\n //hopefully we will be fine\n e.printStackTrace();\n }\n }\n\n return object;\n }\n\n default <T> T getType(String path, Class<T> type) {\n return getType(path, null, type);\n }\n\n @SuppressWarnings(\"unchecked\")\n default <T> T getType(String path, T def, Class<T> type) {\n Object obj = get(path);\n\n if (!type.isInstance(obj)) return def;\n return (T) obj;\n }\n}", "public abstract String getPropertyFile();", "public interface ConfigurationManager {\n\n String loadRunAsUser();\n\n void storeRunAsUser(String username);\n\n List<String> loadEnabledProjects();\n\n void storeEnabledProjects(List<String> projectKeys);\n\n Map<String, String> loadBranchFilters();\n \n void storeBranchFilters(Map<String, String> branchFilters);\n \n /**\n * @since v1.2\n */\n Collection<String> loadCrucibleUserNames();\n\n /**\n * @since v1.2\n */\n void storeCrucibleUserNames(Collection<String> usernames);\n\n /**\n * @since v1.3\n */\n Collection<String> loadCrucibleGroups();\n\n /**\n * @since v1.3\n */\n void storeCrucibleGroups(Collection<String> groupnames);\n\n CreateMode loadCreateMode();\n\n void storeCreateMode(CreateMode mode);\n\n /**\n * @since v1.4.1\n */\n boolean loadIterative();\n\n /**\n * @since v1.4.1\n */\n void storeIterative(boolean iterative);\n}", "public interface ConfigParser {\n\n // TODO rbala Missing Javadoc\n IElementDef parse(ConfigSource configSource);\n\n}", "public void init() {\n\t\tcfg = new Configuration(Configuration.VERSION_2_3_25);\r\n\r\n\t\t// Specify the source where the template files come from.\r\n\t\tcfg.setServletContextForTemplateLoading(getServletContext(), templateDir);\r\n\r\n\t\t// Sets how errors will appear.\r\n\t\t// During web page *development* TemplateExceptionHandler.HTML_DEBUG_HANDLER is better.\r\n\t\t// This handler outputs the stack trace information to the client, formatting it so \r\n\t\t// that it will be usually well readable in the browser, and then re-throws the exception.\r\n\t\t//\t\tcfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\r\n\t\tcfg.setTemplateExceptionHandler(TemplateExceptionHandler.HTML_DEBUG_HANDLER);\r\n\r\n\t\t// Don't log exceptions inside FreeMarker that it will thrown at you anyway:\r\n\t\t// Specifies if TemplateException-s thrown by template processing are logged by FreeMarker or not. \r\n\t\t//\t\tcfg.setLogTemplateExceptions(false);\r\n\t}", "public interface IDownloadConfig {\n}", "public abstract Configuration configuration();", "public interface ConfigReader {\n\n /**\n * Checks if the config contains the given Path\n *\n * @return boolean\n */\n boolean contains();\n\n /**\n * Returns the requested value as int\n *\n * @return int\n */\n int getInt();\n\n /**\n * Returns the requested value as boolean\n *\n * @return boolean\n */\n boolean getBoolean();\n\n /**\n * Returns the requested value as String\n *\n * @return String\n */\n String getString();\n\n /**\n * Returns a list as string\n *\n * @return String\n */\n String getStringList();\n\n /**\n * Returns the requested value as List\n *\n * @return List\n */\n List<?> getList();\n\n /**\n * Returns the requested value as Object\n *\n * @return Object\n */\n Object getObject();\n\n}", "public interface Config {\n public final String contentOfDocument=\"contentOfDoc\";\n public final String docId=\"docId\";\n public final String baseIp=\"http://irlab.daiict.ac.in/Annotation_Interface\";\n public final String sentenceFolder=\"sentences\";\n public final String savedSentenceEnd=\"savedSentenceEnd\";\n public final String savedSentenceStart=\"savedSentenceStart\";\n public final String docName=\"doc_name\";\n public final String relationFolder=\"relationsFolder\";\n public final String savedRelation=\"savedRelation\";\n public final String loginPrefs=\"loginFolder\";\n public final String isLoggedIn=\"isLoggedIn\";\n public final String userName=\"userName\";\n public final String password=\"password\";\n public final String relation=\"relation\";\n public final String checkedRelation=\"checkedRelation\";\n}", "@Override\n\tpublic Map<String, String> getConfig() {\n\t\treturn null;\n\t}", "public abstract IOpipeConfiguration config();", "private static ConfigSource config()\n {\n return CONFIG_MAPPER_FACTORY.newConfigSource()\n .set(\"type\", \"mailchimp\")\n .set(\"auth_method\", \"api_key\")\n .set(\"apikey\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"access_token\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"list_id\", \"xxxxxxxxxxxxxxxxxxx\")\n .set(\"email_column\", \"email\")\n .set(\"fname_column\", \"fname\")\n .set(\"lname_column\", \"lname\");\n }", "public File getTemplateFile();", "public ConfigData(FileConfiguration CoreConfig, FileConfiguration outConfig) {\n\t\t// core configuration is configuration that is Global.\n\t\t// we try to avoid these now. Normally the primary interest is the\n\t\t// GriefPrevention.WorldConfigFolder setting.\n\t\tString DefaultConfigFolder = DataStore.dataLayerFolderPath + File.separator + \"WorldConfigs\" + File.separator;\n\t\tString DefaultTemplateFile = DefaultConfigFolder + \"_template.cfg\";\n\t\t// Configurable template file.\n\t\tTemplateFile = CoreConfig.getString(\"GriefPrevention.WorldConfig.TemplateFile\", DefaultTemplateFile);\n\t\tif (!(new File(TemplateFile).exists())) {\n\t\t\tTemplateFile = DefaultTemplateFile;\n\n\t\t}\n this.GlobalClaims = CoreConfig.getBoolean(\"GriefPrevention.GlobalClaimsEnabled\",true);\n this.GlobalPVP = CoreConfig.getBoolean(\"GriefPrevention.GlobalPVPEnabled\",true);\n this.GlobalSiege = CoreConfig.getBoolean(\"GriefPrevention.GlobalSiegeEnabled\",true);\n this.GlobalSpam = CoreConfig.getBoolean(\"GriefPrevention.GlobalSpamEnabled\",true);\n this.AllowAutomaticMigration = CoreConfig.getBoolean(\"GriefPrevention.AllowAutomaticMigration\",true);\n outConfig.set(\"GriefPrevention.GlobalClaimsEnabled\",GlobalClaims);\n outConfig.set(\"GriefPrevention.GlobalPVPEnabled\",GlobalPVP);\n outConfig.set(\"GriefPrevention.GlobalSiegeEnabled\",GlobalSiege);\n outConfig.set(\"GriefPrevention.GlobalSpamEnabled\",GlobalSpam);\n outConfig.set(\"GriefPrevention.AllowAutomaticMigration\",AllowAutomaticMigration);\n this.DisabledGPCommands = CoreConfig.getStringList(\"GriefPrevention.DisabledCommands\");\n outConfig.set(\"GriefPrevention.DisabledCommands\",DisabledGPCommands);\n\n\n\t\tString SingleConfig = CoreConfig.getString(\"GriefPrevention.WorldConfig.SingleWorld\", NoneSpecifier);\n\t\tSingleWorldConfigLocation = SingleConfig;\n\t\tif (!SingleConfig.equals(NoneSpecifier) && new File(SingleConfig).exists()) {\n\t\t\tGriefPrevention.AddLogEntry(\"SingleWorld Configuration Mode Enabled. File \\\"\" + SingleConfig + \"\\\" will be used for all worlds.\");\n\t\t\tYamlConfiguration SingleReadConfig = YamlConfiguration.loadConfiguration(new File(SingleConfig));\n\t\t\tYamlConfiguration SingleTargetConfig = new YamlConfiguration();\n\t\t\tthis.SingleWorldConfig = new WorldConfig(\"Single World\", SingleReadConfig, SingleTargetConfig);\n\t\t\ttry {\n\t\t\t\tSingleTargetConfig.save(SingleConfig);\n\t\t\t} catch (IOException exx) {\n\t\t\t}\n\t\t}\n\t\tthis.SiegeCooldownSeconds = CoreConfig.getInt(\"GriefPrevention.Siege.CooldownTime\",1000 * 60 * 60);\n outConfig.set(\"GriefPrevention.Siege.CooldownTime\",SiegeCooldownSeconds);\n\t\toutConfig.set(\"GriefPrevention.WorldConfig.SingleWorld\", SingleConfig);\n\t\toutConfig.set(\"GriefPrevention.WorldConfig.TemplateFile\", TemplateFile);\n\t\t// check for appropriate configuration in given FileConfiguration. Note\n\t\t// we also save out this configuration information.\n\t\t// configurable World Configuration folder.\n\t\t// save the configuration.\n\n\t\tWorldConfigLocation = CoreConfig.getString(\"GriefPrevention.WorldConfigFolder\");\n\t\tif (WorldConfigLocation == null || WorldConfigLocation.length() == 0) {\n\t\t\tWorldConfigLocation = DefaultConfigFolder;\n\t\t}\n\t\tFile ConfigLocation = new File(WorldConfigLocation);\n\t\tif (!ConfigLocation.exists()) {\n\t\t\t// if not found, create the directory.\n\t\t\tGriefPrevention.instance.getLogger().log(Level.INFO, \"mkdirs() on \" + ConfigLocation.getAbsolutePath());\n\t\t\tConfigLocation.mkdirs();\n\n\t\t}\n\n\t\t/*\n\t\t * GriefPrevention.instance.getLogger().log(Level.INFO,\n\t\t * \"Reading WorldConfigurations from \" +\n\t\t * ConfigLocation.getAbsolutePath()); if(ConfigLocation.exists() &&\n\t\t * ConfigLocation.isDirectory()){ for(File lookfile:\n\t\t * ConfigLocation.listFiles()){ //System.out.println(lookfile);\n\t\t * if(lookfile.isFile()){ String Extension =\n\t\t * lookfile.getName().substring(lookfile.getName().indexOf('.')+1);\n\t\t * String baseName = Extension.length()==0? lookfile.getName():\n\t\t * lookfile.\n\t\t * getName().substring(0,lookfile.getName().length()-Extension.length\n\t\t * ()-1); if(baseName.startsWith(\"_\")) continue; //configs starting with\n\t\t * underscore are templates. Normally just _template.cfg. //if baseName\n\t\t * is an existing world... if(Bukkit.getWorld(baseName)!=null){\n\t\t * GriefPrevention.instance.getLogger().log(Level.INFO, \"World \" +\n\t\t * baseName + \" Configuration found.\"); } //read it in...\n\t\t * GriefPrevention.AddLogEntry(lookfile.getAbsolutePath());\n\t\t * FileConfiguration Source = YamlConfiguration.loadConfiguration(new\n\t\t * File(lookfile.getAbsolutePath())); FileConfiguration Target = new\n\t\t * YamlConfiguration(); //load in the WorldConfig... WorldConfig wc =\n\t\t * new WorldConfig(baseName,Source,Target); try { Target.save(lookfile);\n\t\t * \n\t\t * }catch(IOException iex){\n\t\t * GriefPrevention.instance.getLogger().log(Level.SEVERE,\n\t\t * \"Failed to save to \" + lookfile.getAbsolutePath()); }\n\t\t * \n\t\t * \n\t\t * } }\n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * \n\t\t * } else if(ConfigLocation.exists() && ConfigLocation.isFile()){\n\t\t * GriefPrevention.instance.getLogger().log(Level.SEVERE,\n\t\t * \"World Configuration Folder found, but it's a File. Double-check your GriefPrevention configuration files, and try again.\"\n\t\t * );\n\t\t * \n\t\t * }\n\t\t */\n\n\t}", "private void ReadConfig()\n {\n try\n {\n Yaml yaml = new Yaml();\n\n BufferedReader reader = new BufferedReader(new FileReader(confFileName));\n\n yamlConfig = yaml.loadAll(reader);\n\n for (Object confEntry : yamlConfig)\n {\n //System.out.println(\"Configuration object type: \" + confEntry.getClass());\n\n Map<String, Object> confMap = (Map<String, Object>) confEntry;\n //System.out.println(\"conf contents: \" + confMap);\n\n\n for (String keyName : confMap.keySet())\n {\n //System.out.println(keyName + \" = \" + confMap.get(keyName).toString());\n\n switch (keyName)\n {\n case \"lineInclude\":\n\n for ( String key : ((Map<String, String>) confMap.get(keyName)).keySet())\n {\n lineFindReplace.put(key, ((Map<String, String>) confMap.get(keyName)).get(key).toString());\n }\n\n lineIncludePattern = ConvertToPattern(lineFindReplace.keySet().toString());\n\n break;\n case \"lineExclude\":\n lineExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileExclude\":\n fileExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"fileInclude\":\n fileIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirExclude\":\n dirExcludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"dirInclude\":\n dirIncludePattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n case \"urlPattern\":\n urlPattern = ConvertToPattern(confMap.get(keyName).toString());\n break;\n }\n }\n }\n\n } catch (Exception e)\n {\n System.err.format(\"Exception occurred trying to read '%s'.\", confFileName);\n e.printStackTrace();\n }\n }", "public FtlConfig() {\n cfg = new Configuration(Configuration.VERSION_2_3_30);\n cfg.setClassLoaderForTemplateLoading(this.getClass().getClassLoader(), \"ftl\");\n cfg.setDefaultEncoding(\"UTF-8\");\n cfg.setTemplateExceptionHandler(TemplateExceptionHandler.RETHROW_HANDLER);\n cfg.setSharedVariable(\"random\",\n new BeansWrapperBuilder(Configuration.VERSION_2_3_30).build().getStaticModels());\n cfg.setLogTemplateExceptions(false);\n cfg.setWrapUncheckedExceptions(true);\n cfg.setFallbackOnNullLoopVariable(false);\n }", "public interface ArchivaConfiguration\n{\n\n\n String USER_CONFIG_PROPERTY = \"archiva.user.configFileName\";\n String USER_CONFIG_ENVVAR = \"ARCHIVA_USER_CONFIG_FILE\";\n\n /**\n * Get the configuration.\n *\n * @return the configuration\n */\n Configuration getConfiguration();\n\n /**\n * Save any updated configuration.\n *\n * @param configuration the configuration to save\n * @throws org.apache.archiva.components.registry.RegistryException\n * if there is a problem saving the registry data\n * @throws IndeterminateConfigurationException\n * if the configuration cannot be saved because it was read from two sources\n */\n void save( Configuration configuration )\n throws RegistryException, IndeterminateConfigurationException;\n\n /**\n * Save any updated configuration. This method allows to add a tag to the thrown event.\n * This allows to verify the origin if the caller is the same as the listener.\n *\n * @param configuration the configuration to save\n * @param eventTag the tag to add to the thrown event\n * @throws org.apache.archiva.components.registry.RegistryException\n * if there is a problem saving the registry data\n * @throws IndeterminateConfigurationException\n * if the configuration cannot be saved because it was read from two sources\n */\n void save( Configuration configuration, String eventTag )\n throws RegistryException, IndeterminateConfigurationException;\n\n /**\n * Determines if the configuration in use was as a result of a defaulted configuration.\n *\n * @return true if the configuration was created from the default-archiva.xml as opposed\n * to being loaded from the usual locations of ${user.home}/.m2/archiva.xml or\n * ${appserver.base}/conf/archiva.xml\n */\n boolean isDefaulted();\n\n /**\n * Add a configuration listener to notify of changes to the configuration.\n *\n * @param listener the listener\n */\n void addListener( ConfigurationListener listener );\n\n /**\n * Remove a configuration listener to stop notifications of changes to the configuration.\n *\n * @param listener the listener\n */\n void removeListener( ConfigurationListener listener );\n\n /**\n * Add a registry listener to notify of events in spring-registry.\n *\n * @param listener the listener\n * TODO: Remove in future.\n */\n void addChangeListener( RegistryListener listener );\n\n void removeChangeListener( RegistryListener listener );\n\n /**\n * reload configuration from file included registry\n *\n * @since 1.4-M1\n */\n void reload();\n\n public Locale getDefaultLocale();\n\n public List<Locale.LanguageRange> getLanguagePriorities();\n\n public Path getAppServerBaseDir();\n\n /**\n * Returns the base directory for repositories that have a relative location path set.\n * @return\n */\n public Path getRepositoryBaseDir();\n\n /**\n * Returns the base directory for remote repositories\n * @return\n */\n public Path getRemoteRepositoryBaseDir();\n\n /**\n * Returns the base directory for repository group files.\n * @return\n */\n public Path getRepositoryGroupBaseDir();\n\n /**\n * Returns the data directory where repositories and metadata reside\n * @return\n */\n public Path getDataDirectory();\n\n /**\n * Return the used configuration registry\n * @return\n */\n Registry getRegistry( );\n}", "public static void acceptConfig() {\r\n\t\t//Here, it tries to read over the config file using try-catch in case of Exception\r\n\t\ttry {\r\n\t\t\tProperties properties = new Properties();\r\n\t\t\tFileInputStream fis = new FileInputStream(new File(\"config.properties\"));\r\n\t\t\tproperties.load(fis);\r\n\t\t\tString storage = properties.getProperty(\"storage\");\r\n\t\t\tif(storage == null) \r\n\t\t\t\tthrow new IllegalArgumentException(\"Property 'storage' not found\");\r\n\t\t\tif(storage.equals(\"tree\"))\r\n\t\t\t\tdata = new BinarySearchTree();\r\n\t\t\tif(storage.equals(\"trie\"))\r\n\t\t\t\tdata = new Trie();\r\n\t\t\tif(data == null) \r\n\t\t\t\tthrow new IllegalArgumentException(\"Not valid storage configuration.\");\r\n\t\t}\r\n\t\t//If an Exception occurs, it just prints a message\r\n\t\tcatch (FileNotFoundException e) {\r\n\t\t\tSystem.out.println(\"Configuration file not found.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (IllegalArgumentException e) {\r\n\t\t\tSystem.out.println(e.getMessage());\r\n\t\t\tSystem.exit(1);\r\n\t\t} catch (IOException e) {\r\n\t\t\tSystem.out.println(\"Error reading the configuration file.\");\r\n\t\t\tSystem.exit(1);\r\n\t\t}\r\n\t}", "static Buffer getASPConfigBuffer()\n {\n return ASPConfigFile.cfg;\n }", "@Override\n void loadData() {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n // Attempt to read the config in the config file.\n langConfig = YamlConfiguration.loadConfiguration(langConfigFile);\n // If the config file is null (due to the config file being invalid or not there) create a new one.\n // If the file doesnt exist, populate it from the template.\n if (!langConfigFile.exists()) {\n langConfigFile = new File(plugin.getDataFolder() + \"/messages.yml\");\n langConfig = YamlConfiguration.loadConfiguration(new InputStreamReader(plugin.getResource(\"messages.yml\")));\n saveData();\n }\n }", "public String getConfig();", "private Config()\n {\n // Load from properties file:\n loadLocalConfig();\n // load the system property overrides:\n getExternalConfig();\n }", "public String getConfigurationFileString() {\r\n\t\treturn configurationFileString;\r\n\t}", "ASPConfigFile getConfigFile()\n {\n return configfile;\n }", "public interface AdminToolConfig \n{\n\tpublic static final String WEBJARS_CDN_PREFIX = \"https://cdn.jsdelivr.net/webjars/\";\n\t\n\tpublic static final String WEBJARS_CDN_PREFIX_BOWER = WEBJARS_CDN_PREFIX + \"org.webjars.bower/\";\n\t\n\tpublic static final String WEBJARS_LOCAL_PREFIX = \"/webjars/\";\n\t\n\t/**\n\t * should print the configuration to log\n\t */\n\tpublic void printConfig();\n\t\n\t/**\n\t * should return if component is active or deactivated\n\t * @return\n\t */\n\tpublic boolean isEnabled();\n}", "@Override\n public boolean hasAdditionalConfig() { return true; }", "Config(InfoHandler info){\n \n this.info = info;\n \n config_list = new ArrayList<>();\n \n File test = new File(config_path);\n \n if(test.exists()){ //plik istnieje\n \n info.mode=1; //wlaczenie trybu dla obslugi pliku konfiguracyjnego\n \n \n //tutaj pobieranie informacji z pliku konfiguracyjnego\n //do ciała funkcji\n \n config_file = new DictReader(config_path,info);\n \n //tutaj dodajemy funkcjonalnosci\n \n config_list.add(config_file.szukaj(\"%imie\"));\n config_list.add(config_file.szukaj(\"%dict_path\"));\n \n config = get_config();\n \n info.mode=0;\n \n is_alive = true;\n }\n else{\n config = new ArrayList<>();\n config_file = new DictReader(config_path,info);\n first_start = 1;\n }\n }", "private Config()\n {\n try\n {\n // Load settings from file\n load();\n }\n catch(IOException e)\n {\n e.printStackTrace();\n }\n }", "public interface Setting {\n /**\n * application.ymlの情報を取得する\n * ApplicationSettingsクラスにapplication.ymlの情報を定義する\n * @return ApplicationSettings\n */\n ApplicationSettings getSetting();\n\n}", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"system:properties\",\n \"classpath:application.properties\"\n})\npublic interface ProjectConfig extends Config {\n\n @Key(\"app.hostname\")\n String hostname();\n\n @Key(\"browser.name\")\n @DefaultValue(\"chrome\")\n String browser();\n\n}", "public final File getReportingConfig() {\n\t\treturn configFile;\n\t}", "@Config.LoadPolicy(Config.LoadType.MERGE)\n@Config.Sources({\n \"classpath:test.properties\",\n \"system:properties\",\n \"system:env\"})\npublic interface UserConfiguration extends Config {\n\n @DefaultValue(\"default_Name\")\n @Key(\"user.name\")\n String name();\n @Key(\"user.email\")\n String email();\n @Key(\"user.password\")\n String password();\n}", "public interface IConfigPersister {\n\n /**\n * Persist the configuration. \n * @throws IOException on error\n */\n void persist() throws IOException;\n}", "public String readConfiguration(String path);", "void config(Config config);", "public interface FreeMakerConfigurator {\r\n\r\n\t/**\r\n\t * @param servletContext the SERVLET context\r\n\t * @param configuration the FreeMaker defined configuration\r\n\t */\r\n\tvoid configure(ServletContext servletContext, Configuration configuration);\r\n}", "public String configurationInfo();", "public interface SiteConfigRepositry {\n\n void update(Map<String, String> config);\n\n Map<String,Object> getConfig();\n}", "public String getConfigFile()\n {\n return __m_ConfigFile;\n }", "protected void additionalConfig(ConfigType config){}", "void setConfigFileName( String s );", "public interface Configuration {\n// /**\n// * 获取主分词器词库\n// * @return\n// */\n// public String getMainDic();\n// /**\n// * 获取城市词路径\n// * @return String 城市词路径\n// */\n// public String getCityDicionary();\n\n /**\n * 获取城区词路径\n *\n * @return String 获取城区词路径\n */\n public String getRegionDicionary();\n\n /**\n * 获取\"工程师\"类词库路径\n *\n * @return String \"工程师\"类词库路径\n */\n public String getTheoremDicionary();\n\n /**\n * 获取\"总工程师\"类词库路径\n *\n * @return String \"总工程师\"类词库路径\n */\n public String getEngineerDicionary();\n\n /**\n * 获取垃圾类词库路径\n *\n * @return String 垃圾类词库路径\n */\n public String getConjunctionDicionary();\n\n /**\n * 获取多义类词库路径\n *\n * @return String 多义词库路径\n */\n public String getPolysemyDicionary();\n\n /**\n * 获取多职位前词库路径\n *\n * @return String 多职位前词库路径\n */\n public String getManagerDicionary();\n\n /**\n * 获取多职位后词库路径\n *\n * @return String 多职位后词库路径\n */\n public String getAssistantDicionary();\n\n /**\n * 获取数字词库路径\n *\n * @return String 数字词库路径\n */\n public String getNumberDicionary();\n\n /**\n * 获取无用词词库路径\n *\n * @return String 无用词词库路径\n */\n public String getWorthlessDicionary();\n\n /**\n * 获取标签词词库路径\n *\n * @return String 标签词词库路径\n */\n public String getTagDicionary();\n\n /**\n * 获取公司性质词词库路径\n *\n * @return String 公司性质词词库路径\n */\n public String getCorporationDicionary();\n// /**\n// * 获取ik分词器的主路径\n// * @return\n// */\n// public String getIkMainFilePath();\n\n}", "abstract public Config createConfig(String path);", "List<String> getConfigFilePaths();", "public Config getConfig();", "Factory getFactory()\n {\n return configfile.factory;\n }", "@Override\n protected Path getConfigurationPath() {\n return null;\n }", "public String toString() {\r\n\t\treturn configurationFileString;\r\n\t}", "private static void processIncludedConfig() {\n String configName = \"config.\" + getRunMode() + \".properties\";\n\n //relative path cannot be recognized and not figure out the reason, so here use absolute path instead\n InputStream configStream = Configuration.class.getResourceAsStream(\"/\" + configName);\n if (configStream == null) {\n log.log(Level.WARNING, \"configuration resource {0} is missing\", configName);\n return;\n }\n\n try (InputStreamReader reader = new InputStreamReader(configStream, StandardCharsets.UTF_8)) {\n Properties props = new Properties();\n props.load(reader);\n CONFIG_VALUES.putAll(props);\n } catch (IOException e) {\n log.log(Level.WARNING, \"Unable to process configuration {0}\", configName);\n }\n\n }", "@Override\n\t\t\tprotected void configure() {\n\t\t\t}", "public URI getConfigurationFile() {\n return configurationFile;\n }", "public abstract Optional<FileConfiguration> getConfiguration(String name);", "public interface ConfigFileOverrideSubsystemsResource extends Resource<Map<String, SubsystemConfig>> {\n\n void addSubsystemConfig(SubsystemConfig subsystemConfig);\n\n boolean removeSubsystemConfig(SubsystemConfig subsystemConfig);\n\n List<SubsystemConfig> getSubsystemConfigs();\n\n Set<String> getSubsystemsNotAdded();\n\n ConfigFileOverrideResource getParent();\n\n String getProfileName();\n}", "public interface ConfigProcessor {\n\n\tvoid inject2Instance(Object obj,String keyName);\n\n\tvoid storeOneFile(ConfigBaseModel configBaseModel);\n\n\tvoid inject2Conf();\n\n}", "public Config() {\n\t\t// TODO Auto-generated constructor stub\n\t\t\n\t}", "@Override\n public Map<String, ConfiguredVariableItem> getConfiguration() {\n return config;\n }", "interface ConfigWatcher {\n\n /**\n * Called when receiving an update on virtual host configurations.\n */\n void onConfigChanged(ConfigUpdate update);\n\n void onError(Status error);\n }", "public String getConfigFile() {\n return configFile;\n }", "Map<String, Object> exportDefaultConfiguration();", "public Config createConfig(String filename);", "private void generateConfigurationFile() throws IOException {\n // Use a template file to generate the configuration to be used in the sever side\n String srcFileName = \"resources/servlet.config.prop\";\n String destFileName = FIConfiguration.getConfiguration().get(\"SERVLET_CONFIG_FILE\");\n FileUtility fu = new FileUtility();\n fu.setInput(srcFileName);\n fu.setOutput(destFileName);\n String line = null;\n Map<String, String> keyToFileName = getKeyToFileNameMap();\n while ((line = fu.readLine()) != null) {\n for (String key : keyToFileName.keySet()) {\n if (line.startsWith(key)) {\n String value = FIConfiguration.getConfiguration().get(keyToFileName.get(key));\n logger.info(key + \": \" + value);\n // Just need the file only\n File file = new File(value);\n if (!file.exists()) {\n// throw new IllegalStateException(\"Cannot find file for \" + key + \": \" + value);\n logger.error(\"Cannot find file for \" + key + \": \" + value);\n }\n line = assignValue(line, file.getName());\n break;\n }\n }\n // Two special cases\n if (line.startsWith(\"Reactome.src.dbName\") || line.startsWith(\"elv.dbName\")) {\n String value = FIConfiguration.getConfiguration().get(\"REACTOME_SOURCE_DB_NAME\");\n int index = line.indexOf(\"=\");\n line = line.substring(0, index + 1) + \"test_\" + value; // This name pattern should be followed always\n }\n String year = FIConfiguration.getConfiguration().get(\"YEAR\");\n line = line.replaceAll(\"caBigR3WebApp\", \"caBigR3WebApp\" + year);\n fu.printLine(line);\n }\n fu.close();\n }", "private Config() {\n }", "@Override\r\n public void accept(IConfigurationVisitor visitor) {\n }", "protected abstract String getXmppConfigResources();", "@Override\n\tpublic Map<String, String> getConf() {\n\t\treturn null;\n\t}", "public void setConfigfile (File file)\n {\n _configfile = file;\n }", "public abstract void Configure( DataMap<String, Serializable> configuration);", "private <T> T readConfig(final ConfigurationFactory<T> factory, final String filePath) {\n try (final BufferedReader reader = Files.newBufferedReader(getDataFolder().toPath().resolve(filePath))) {\n return factory.create(YamlConfiguration.loadConfiguration(reader));\n } catch (final IOException e) {\n throw new RuntimeException(String.format(\"Could not read configuration file %s in plugin data-folder\",\n filePath), e);\n }\n }" ]
[ "0.63338614", "0.63059634", "0.62439966", "0.612647", "0.61168724", "0.59596425", "0.58061117", "0.5722665", "0.5702986", "0.5668534", "0.5598061", "0.5581895", "0.5556042", "0.55414796", "0.55295813", "0.5528818", "0.5517143", "0.5489396", "0.5471374", "0.5468613", "0.5432266", "0.5419825", "0.54155046", "0.5410938", "0.5406698", "0.54053324", "0.53790486", "0.535902", "0.5348654", "0.53460795", "0.5332029", "0.53308105", "0.53293693", "0.53264326", "0.5306162", "0.5283016", "0.5278836", "0.52752286", "0.52726895", "0.5264295", "0.52618587", "0.5255265", "0.52531296", "0.5222886", "0.5216713", "0.52124655", "0.5202909", "0.5195218", "0.5193938", "0.51770836", "0.51765054", "0.51763415", "0.51752084", "0.5169499", "0.5167512", "0.51672167", "0.5165088", "0.5153833", "0.5140172", "0.513992", "0.51384306", "0.5138191", "0.5118983", "0.51173156", "0.51162213", "0.51135886", "0.51123154", "0.51069736", "0.5099573", "0.50926495", "0.50798905", "0.5078281", "0.50782627", "0.50772303", "0.5075957", "0.5073617", "0.50721496", "0.50692415", "0.5068489", "0.5066294", "0.5061895", "0.506059", "0.5060553", "0.50602615", "0.5059618", "0.505929", "0.50550514", "0.50525737", "0.50497276", "0.5044423", "0.5032187", "0.50275296", "0.5011183", "0.50104344", "0.50098145", "0.50059116", "0.50032544", "0.5001692", "0.4991345", "0.49795055" ]
0.82005125
0
get the mustache file path.
String getPath();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface FileConfig {\n /**\n * get the mustache file path.\n * @return file path\n */\n String getPath();\n}", "public File getTemplateFile();", "java.lang.String getFilePath();", "java.lang.String getSrcPath();", "protected abstract String getTemplateFilename();", "private static String getHtmlFilePath(RenderRequest request, String htmlFile) {\r\n\t\tString markup = request.getProperty(\"wps.markup\");\r\n\t\tif( markup == null )\r\n\t\t\tmarkup = getMarkup(request.getResponseContentType());\r\n\t\treturn HTML_FOLDER + markup + \"/\" + htmlFile + \".\" + getHtmlExtension(markup);\r\n\t}", "public final String path() {\n return string(preparePath(concat(path, SLASH, name)));\n }", "private String getResourcePath() {\n\t\tString reqResource = getRequest().getResourceRef().getPath();\n\t\treqResource = actualPath(reqResource, 1);\n\t\tLOGGERS.info(\"reqResourcePath---->\" + reqResource);\n\t\treturn reqResource;\n\t}", "String getFilePath();", "public String path() {\n return filesystem().pathString(path);\n }", "String getFilepath();", "Path getFilePath();", "protected String path() {\n return path(getName());\n }", "public String getTemplatePath() {\n this.defaultPath = defaultPath.endsWith(File.separator) ? defaultPath : defaultPath + File.separator;\n\n if (Paths.get(defaultPath).toFile().mkdirs()) {\n //Throw exception, couldn't create directories\n }\n\n return defaultPath + (defaultName != null ? defaultName + \".\" + extensionPattern : \"\");\n }", "@Override\n public String getAbsolutePathImpl() {\n return file.getAbsolutePath();\n }", "public String getPath();", "public String getPath();", "public String getPath();", "public String getResourcePath();", "public String getPath() {\n\t\treturn file.getPath();\n\t}", "public String getFullPath()\n {\n return( fullPath );\n }", "public String resolvePath();", "public String getFilePath() {\n return getSourceLocation().getFilePath();\n }", "public String getKeyFilePath();", "File getTilePathBase();", "String getTemplate();", "public java.lang.String getSrcPath() {\n java.lang.Object ref = srcPath_;\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 srcPath_ = s;\n }\n return s;\n }\n }", "private File getIOFile() {\n \t\tIPath location = resource.getLocation();\n \t\tif(location!=null) {\n \t\t\treturn location.toFile();\n \t\t}\n \t\treturn null;\n \t}", "public String getPath() {\n\t\treturn getString(\"path\");\n\t}", "public abstract String getFullPath();", "public final String getFilePath() {\n\t\treturn m_info.getPath();\n\t}", "SourceFilePath getFilePath();", "public java.lang.String getSrcPath() {\n java.lang.Object ref = srcPath_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n srcPath_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public final String getPath() {\n\t\treturn this.path.toString();\n\t}", "protected String getMapFile() {\n return mapFile;\n }", "java.lang.String getFileLoc();", "public String getPath() {\n\t\treturn mFileToPlay;\n\t}", "protected abstract String getResourcePath();", "@java.lang.Override\n public java.lang.String getFilePath() {\n return instance.getFilePath();\n }", "final public String getTemplateSource()\n {\n return ComponentUtils.resolveString(getProperty(TEMPLATE_SOURCE_KEY));\n }", "String getResource();", "public Pattern getCompiledPath();", "public String download(){\r\n\t\treturn \"template\";\r\n\t}", "public String getAbsPath();", "private static String getSourceFile() {\n\t\tFileChooser fileChooser = new FileChooser(System.getProperty(\"user.home\"),\n\t\t\t\t\"Chose json file containing satellite data!\", \"json\");\n\t\tFile file = fileChooser.getFile();\n\t\tif (file == null) {\n\t\t\tSystem.exit(-42);\n\t\t}\n\t\treturn file.getAbsolutePath();\n\t}", "public final String getPath()\n {\n return path;\n }", "public String getLocationPath();", "public String getProjectFilePath() {\n\t\tif (projectFileIO != null) {\n\t\t\treturn projectFileIO.getFilePath();\n\t\t}\n\t\telse {\n\t\t\treturn null;\n\t\t}\n\t}", "public static String getFilePath(Resource resource) {\n\t\treturn getFilePath(resource.getResourceSet(), resource.getURI());\n\t}", "public String fileNameTemplate() {\n return this.fileNameTemplate;\n }", "String path(Configuration configuration);", "public String toPathString() {\n return path();\n }", "public String path() {\n\treturn path;\n }", "String getDockerFilelocation();", "@Cacheable(CacheConfig.CACHE_TWO)\n public File getFile() {\n ClassLoader classLoader = Utility.class.getClassLoader();\n File file = new File(classLoader.getResource(path1).getFile());\n logger.info(\"Cache is not used .... \");\n return file;\n }", "private String getFullPath()\n\t{\n\t\tif (libraryName.equals(\"\"))\n\t\t{\n\t\t\treturn fileName;\n\t\t}\n\t\telse\n\t\t{\n\t\t\treturn libraryName + \"/\" + fileName;\n\t\t}\n\t}", "public String path() {\n return this.path;\n }", "public String path() {\n return this.path;\n }", "@Nullable String getPath();", "public String getFilepath() {\n\t\treturn this.filepath;\n\t}", "public String getPath()\n {\n return path;\n }", "public String getPath()\n {\n return path;\n }", "public String getResourcePath () {\n return resourcePath;\n }", "public String getTemplateFilename() {\n\t\treturn templateFilename;\n\t}", "public String getPath(){\r\n\t\treturn path;\r\n\t}", "public String getPath()\n\t{\n\t\treturn letter + \":/\";\n\t}", "public String getMappingFilePath();", "public String formatFilePath(){\n StringBuilder returnResult = new StringBuilder();\n String temp;\n temp = StringUtil.removeHttpPrefix(uri);\n returnResult.append(DEFAULT_DIRECTORY).append(\"\\\\\").append(temp);\n return returnResult.toString();\n }", "public String getResourceLocation() {\n return resourceLocation;\n }", "private static String p_readFromResource(String path) {\n StringBuffer content = new StringBuffer();\n\n InputStream istream = NamedTemplate.class.getResourceAsStream(path);\n\n if (istream != null) {\n BufferedReader reader = new BufferedReader(new InputStreamReader(istream));\n\n try {\n String line = reader.readLine();\n while (line != null) {\n content.append(line).append(\"\\n\");\n\n line = reader.readLine();\n }\n } catch (IOException e) {\n logger.error(\"NamedTemplate: unable to read template from \" + path, e);\n }\n } else {\n return null;\n }\n\n return content.toString();\n }", "public File getRessourceFile() {\r\n\t\treturn local;\r\n\t}", "protected String getPath ()\n\t{\n\t\treturn path;\n\t}", "Path getManageMeFilePath();", "public String getMainFilePath() {\n return primaryFile.getAbsolutePath();\n //return code[0].file.getAbsolutePath();\n }", "String getNoticeFileUrl();", "public String getResPath()\n/* */ {\n/* 138 */ return this.resPath;\n/* */ }", "String getRealPath(String path);", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public static String getBasepath() {\n\t\treturn basepath;\n\t}", "public abstract String getFullPath(final String resourcePath);", "public final String getPath() {\n\t return m_path;\n\t}", "public abstract String getPath();", "public abstract String getPath();", "private String getFontFile(){\n\t\tif (fontFile == null){\n\t\t\tfontFile = escapeForVideoFilter(ResourcesManager.getResourcesManager().getOpenSansResource().location);\n\t\t}\n\t\treturn fontFile;\n\t}", "public java.lang.String getAssetPath() {\n return instance.getAssetPath();\n }", "public String getResourcePath () {\n return resourcePath;\n }", "public String getPath()\n {\n\n return _path;\n }", "Path getPath();", "protected String getFileTemplate(String sTemplate, String sPath)\n {\n String sFileName = sTemplate;\n\n if (sFileName.length() == 0)\n {\n log(\"Report writer:No output file specified. Report terminated\");\n return null;\n }\n\n try\n {\n sFileName = new File(sPath).getCanonicalPath() + File.separatorChar + sFileName;\n }\n catch (IOException e)\n {\n // leave the problem for caller\n sFileName = sPath + sFileName;\n }\n\n return sFileName;\n }", "public String getLocalFilePath() {\n return loadConn.getProperty(\"filePath\");\n }", "public String getPath() {\n if (fileType == HTTP) {\n return fileName.substring(0, fileName.lastIndexOf(\"/\"));\n } else {\n return fileName.substring(0, fileName.lastIndexOf(File.separator));\n }\n }", "String getPath() {\r\n\t\treturn path;\r\n\t}", "public abstract String getFileLocation();", "@Override\n\tpublic String toString() {\n\t\treturn getFullPath();\n\t}", "public String getStringFile(){\n return fileView(file);\n }", "public String getLocationOfFiles() {\n\t\ttry {\n\t\t\tFile f = new File(\n\t\t\t\t\tgetRepositoryManager().getMetadataRecordsLocation() + \"/\" + getFormatOfRecords() + \"/\" + getKey());\n\t\t\treturn f.getAbsolutePath();\n\t\t} catch (Throwable e) {\n\t\t\tprtlnErr(\"Unable to get location of files: \" + e);\n\t\t\treturn \"\";\n\t\t}\n\t}" ]
[ "0.6845213", "0.6348031", "0.59551656", "0.5949887", "0.5865559", "0.58588684", "0.5858479", "0.58341724", "0.58017033", "0.57983756", "0.57697034", "0.5768551", "0.5756867", "0.5748413", "0.5743969", "0.57431334", "0.57431334", "0.57431334", "0.5705968", "0.5682716", "0.5614498", "0.5585308", "0.55778843", "0.55724037", "0.55585206", "0.5549082", "0.55312055", "0.55231965", "0.55214334", "0.5495049", "0.5485202", "0.54834634", "0.5468073", "0.5464322", "0.5459065", "0.54506516", "0.5438292", "0.54358053", "0.54207146", "0.5411785", "0.5392238", "0.5390873", "0.53866786", "0.5381648", "0.53790575", "0.5375775", "0.53757346", "0.5373084", "0.5371168", "0.5366072", "0.5363723", "0.5355053", "0.5352243", "0.5330082", "0.53288114", "0.5325483", "0.53248566", "0.53248566", "0.5323215", "0.53218853", "0.53112745", "0.53112745", "0.5307739", "0.5306696", "0.530458", "0.53010327", "0.5295717", "0.52926886", "0.52852714", "0.52777046", "0.5277168", "0.52755535", "0.5271122", "0.52710015", "0.5269923", "0.5266451", "0.5262278", "0.5260217", "0.5260217", "0.5258968", "0.5256737", "0.5252827", "0.5252827", "0.5246736", "0.52408093", "0.5239827", "0.52377814", "0.52375865", "0.5237143", "0.5236764", "0.5234233", "0.5229945", "0.52296054", "0.5229354", "0.5226403", "0.52261496" ]
0.56974554
22
Theme needs to be selected before super.onCreate.
public void onCreate(Bundle savedInstanceState) { if (App.getThemePreference().equals(getString(R.string.pref_value_theme_dark))) { setTheme(R.style.AppTheme_Dark); } super.onCreate(savedInstanceState); getSupportActionBar().setDisplayHomeAsUpEnabled(true); if(Build.VERSION.SDK_INT > Build.VERSION_CODES.HONEYCOMB) { setFragment(); } else { setSupportFragment(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tprotected void onCreate(Bundle savedInstanceState)\n\t{\n\t\tThemeUtils.applyTheme(this);\n\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n //changing the theme\n if (AppCompatDelegate.getDefaultNightMode() == AppCompatDelegate.MODE_NIGHT_YES) {\n setTheme(R.style.DarkTheme);\n } else {\n setTheme(R.style.AppTheme);\n }\n //code for changing theme ends\n\n //Layout set here from the xml files\n setContentView(R.layout.activity_admin_change);\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState)\n\t{\n\t\tinitTheme();\n\t\tsuper.onCreate(savedInstanceState);\n\t\t//ActivityTool.setWindowStatusBarColor(this,R.color.colorPrimaryDark);\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tmApplication = (PropEditorApplication) getApplication();\r\n\t\tapplyApplicationTheme();\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\n public void setTheme(int resid) {\n super.setTheme(android.R.style.Theme_Translucent_NoTitleBar);\n /*String packageName = getIntent().getStringExtra(Intent.EXTRA_PACKAGE_NAME);\n if(packageName.contains(\"kaer\") || packageName.contains(\"com.android\")){\n Log.e(\"ReviewPermissionsActivity\", \"setTheme Theme_Translucent_NoTitleBar\");\n super.setTheme(android.R.style.Theme_Translucent_NoTitleBar);\n }else{\n Log.e(\"ReviewPermissionsActivity\", \"setTheme ActivityNormal\");\n super.setTheme(R.style.ActivityNormal);\n }*/\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\tif (AppContext.THEME) {\n\t\t\tsetTheme(R.style.SwitchTheme_1);\n\t\t} else {\n\t\t\tsetTheme(R.style.SwitchTheme_2);\n\t\t}\n\t\t\n\t\tsetContentView(R.layout.zhou_bian_yao_dian_activity);\n\t\t\n\t\tiniView();\n\t\tiniData();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n \n ThemeApplication.activities.add(this);\n \n addPreferencesFromResource(R.xml.customize);\n\n }", "private void setTheme() {\n\t\tLog.i(LOG_TAG, \"setTheme\");\n\n\t\tSharedPreferences preferences = PreferenceManager\n\t\t\t\t.getDefaultSharedPreferences(this);\n\t\tthis.themeString = preferences.getString(\"theme_scheme\",\n\t\t\t\tMainMenuActivityThemeChanger.DARK_THEME);\n\n\t\tif (themeString\n\t\t\t\t.equalsIgnoreCase(MainMenuActivityThemeChanger.PINK_THEME)) {\n\n\t\t\tthis.setTheme(R.style.pinkTheme);\n\t\t\tsetContentView(R.layout.activity_time_trial);\n\n\t\t} else if (themeString\n\t\t\t\t.equalsIgnoreCase(MainMenuActivityThemeChanger.LIGHT_THEME)) {\n\n\t\t\tthis.setTheme(R.style.lightTheme);\n\t\t\tsetContentView(R.layout.activity_time_trial);\n\n\t\t} else {\n\n\t\t\tthis.setTheme(R.style.darkTheme);\n\t\t\tsetContentView(R.layout.activity_time_trial);\n\n\t\t}\n\t}", "public void loadTheme() {\n runOnUiThread(new Runnable() {\n public void run() {\n try {\n //inspired by:https://stackoverflow.com/questions/15025369/changing-the-theme-of-an-android-app-using-preferences\n SharedPreferences data = getSharedPreferences(\"Themes\", 0);\n dataReturned = data.getString(\"LightDark\", \"ThemeDark\");\n if (dataReturned.equals(\"ThemeDark\"))\n setTheme(R.style.ThemeDark);\n else\n setTheme(R.style.ThemeLight);\n } catch (final Exception ex) {\n // Log.i(\"sortViewEntries\", \"Exception in thread\");\n }\n }\n });\n }", "public void onThemeChanged()\n\t{\n\t}", "@NonNull\n @Override\n protected View getThemeView() {\n return mThemeView;\n }", "private void toggleTheme() {\n\n // Following options to change the Theme must precede setContentView().\n\n SharedPreferences sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n String lister = sharedPref.getString(\"list_preference\", \"1\");\n\n currentTheme = Integer.parseInt(lister);\n if (currentTheme == 2) {\n isLight = false;\n } else {\n isLight = true;\n }\n\n if (isLight) {\n setTheme(R.style.LightCustom);\n } else {\n setTheme(R.style.DarkCustom);\n }\n }", "public void onCreate() {\n super.onCreate();\n Application.context = getApplicationContext();\n\n AppCompatDelegate.setDefaultNightMode(AppSettingsStorage.getInstance().get(AppSettingsStorage.Setting.DARK_MODE, false) ? AppCompatDelegate.MODE_NIGHT_YES : AppCompatDelegate.MODE_NIGHT_NO);\n }", "public static void onActivityCreateSetTheme(Activity activity)\n\t{\n\t\tswitch (mCurrentTheme)\n\t\t{\n\t\t\tcase THEME_MEDIUM:\n\t\t\t\tactivity.setTheme(R.style.MediumTheme);\n\t\t\t\tbreak;\n\t\t\tcase THEME_LIGHT:\n\t\t\t\tactivity.setTheme(R.style.LightTheme);\n\t\t\t\tbreak;\n\t\t\tcase THEME_DARK:\n\t\t\tdefault:\n\t\t\t\tactivity.setTheme(R.style.DarkTheme);\n\t\t\t\tbreak;\n\t\t}\n\t}", "private static void setActivityTheme(Context context) {\n //access the dark mode theme\n SharedPreferences sharedPrefs = PreferenceManager.getDefaultSharedPreferences(context);\n String themePref = sharedPrefs.getString(\"theme_preference\", \"Light\");\n //set the calling object's theme to match with what's listed in shared preferences\n switch (themePref) {\n case \"Light\":\n context.setTheme(R.style.AppTheme);\n AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_NO);\n break;\n case \"Dark\":\n context.setTheme(R.style.AppThemeDark);\n //turn off AppThemeDayNight\n AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_YES);\n break;\n //\"Auto\" is commented out due to time restraints. I hope to revisit this later. -Littlesnowman88\n /*case \"Auto\":\n context.setTheme(R.style.AppThemeDayNight);\n AppCompatDelegate.setDefaultNightMode(AppCompatDelegate.MODE_NIGHT_AUTO);\n break;*/\n //a Runtime Exception is thrown to ensure that new themes are fully implemented into this case statement. Developers must not be sloppy with their theme changes.\n default:\n throw new RuntimeException(\"ERROR: mismatch between selected app theme and implemented app themes.\");\n }\n }", "@Override\n public void onCreate(Bundle savedInstanceState, PersistableBundle persistentState)\n {\n super.onCreate(savedInstanceState, persistentState);\n// setupColorful();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tinflater = LayoutInflater.from(getApplicationContext());\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t super.onCreate(savedInstanceState);\r\n\t\trequestWindowFeature(Window.FEATURE_NO_TITLE);\r\n\t\tsetContentView(R.layout.activity_setting);\t\r\n\t\tinitView();\r\n\t\tregistEvent();\r\n\t}", "@SuppressWarnings(\"unused\")\n\tprotected void initializeTheme() {\n\t\tthis.httpContext.setDefaultTheme(ConfigurationManager.getValue(\"Theme\"));\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n // read the settings from SharedPreferences\n sharedPref = PreferenceManager.getDefaultSharedPreferences(this);\n Boolean Theme = sharedPref.getBoolean(SettingsActivity.KEY_DARK_THEME, false);\n // set theme according the setting\n Log.i(\"Theme changed to \", Theme ? \"Dark\" : \"Light\");\n if(Theme){\n setTheme(R.style.Theme_Dark);\n }\n\n setContentView(R.layout.activity_main);\n\n Toolbar toolbar = (Toolbar) findViewById(R.id.toolbar);\n setSupportActionBar(toolbar);\n getSupportActionBar().setDisplayShowTitleEnabled(false);\n // Create the adapter that will return a fragment for each of the three\n // primary sections of the activity.\n mSectionsPagerAdapter = new SectionsPagerAdapter(getSupportFragmentManager());\n\n // Set up the ViewPager with the sections adapter.\n mViewPager = (ViewPager) findViewById(R.id.container);\n mViewPager.setAdapter(mSectionsPagerAdapter);\n\n\n FloatingActionButton fab = (FloatingActionButton) findViewById(R.id.fab);\n fab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Snackbar.make(view, \"Under Developement!!\", Snackbar.LENGTH_LONG)\n .setAction(\"Action\", null).show();\n }\n });\n\n\n }", "@Override\n public void onCreate() {\n L.d(\"onCreate is called\");\n super.onCreate();\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t}", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n public void onCreate() {\n super.onCreate();\n }", "@Override\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\t\n\t\tthemeHandler = new HandlerCallback(this);\n\t}", "@Override\r\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\r\n\t}", "@Override\n protected void onCreate(@Nullable Bundle savedInstanceState) {\n\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate()\n {\n\n super.onCreate();\n }", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t\tinit();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\tcontext = getApplicationContext();\n\t\t\n\t\tApplicationContextUtils.init(context);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.activity_setting);\n\t\tinitWidget();\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n init();\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\tsetContentView(R.layout.layout_settings);\n\t\tinit();\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t}", "@Override\n\t\tpublic void onCreate(Bundle savedInstanceState)\n\t\t\t{\n\t\t\t\tsuper.onCreate(savedInstanceState);\n\t\t\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n\tpublic void onActivityCreated(Bundle savedInstanceState) {\n\t\tsuper.onActivityCreated(savedInstanceState);\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \tsuper.onCreate(savedInstanceState);\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "private void createThemeDialog() {\n\n\t\tAlertDialog.Builder alb = new AlertDialog.Builder(this);\n\t\talb.setTitle(getString(R.string.choose_theme));\n\t\talb.setCancelable(true);\n\n\t\tString[] items;\n\t\tif (Build.VERSION.SDK_INT >= Build.VERSION_CODES.Q) {\n\t\t\titems = new String[]{getString(R.string.light), getString(R.string.dark),\n\t\t\t\t\tgetString(R.string.time), getString(R.string.system)};\n\t\t} else {\n\t\t\titems = new String[]{getString(R.string.light), getString(R.string.dark),\n\t\t\t\t\tgetString(R.string.time)};\n\t\t}\n\n\t\tAtomicInteger newTheme = new AtomicInteger(currentTheme);\n\n\t\talb.setSingleChoiceItems(items, currentTheme, (dialog, which) -> newTheme.set(which));\n\n\t\talb.setPositiveButton(getString(R.string.set_theme), (dialog, which) -> {\n\t\t\tcurrentTheme = newTheme.get();\n\t\t\tchangeTheme();\n\t\t});\n\n\t\talb.show();\n\t}", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n \t// Apply user's desired theme\n String userTheme = Settings.getUserTheme(this);\n if (userTheme.equals(getString(R.string.light_theme))) {\n \tsetTheme(R.style.Theme_Hydrate);\n } else {\n \tsetTheme(R.style.Theme_Hydrate_Dark);\n }\n \n \tsuper.onCreate(savedInstanceState);\n \n // Inflate the layout\n setContentView(R.layout.activity_custom_entry);\n \n getSupportActionBar().setHomeButtonEnabled(true);\n\t\tgetSupportActionBar().setDisplayHomeAsUpEnabled(true);\n \n // Enable default metric or non-metric via Settings\n final RadioButton metricRadioButton = (RadioButton)findViewById(R.id.radio_metric);\n final RadioButton imperialRadioButton = (RadioButton)findViewById(R.id.radio_non_metric);\n int unitsPref = Settings.getUnitSystem(getApplicationContext());\n \n mTimePicker = (TimePicker)findViewById(R.id.add_time_picker);\n mDatePicker = (DatePicker)findViewById(R.id.add_date_picker);\n \n mHistoricalCheck = (CheckBox)findViewById(R.id.add_historical_check);\n mHistoricalCheck.setOnCheckedChangeListener(new OnCheckedChangeListener() {\n\t\t\t@Override\n\t\t\tpublic void onCheckedChanged(CompoundButton buttonView,\n\t\t\t\t\tboolean isChecked) {\n\t\t\t\tif (isChecked == true) {\n\t\t\t\t\tmTimePicker.setVisibility(View.VISIBLE);\n\t\t\t\t\tmDatePicker.setVisibility(View.VISIBLE);\n\t\t\t\t\tmIsHistorical = true;\n\t\t\t\t} else {\n\t\t\t\t\tmTimePicker.setVisibility(View.GONE);\n\t\t\t\t\tmDatePicker.setVisibility(View.GONE);\n\t\t\t\t\tmIsHistorical = false;\n\t\t\t\t}\n\t\t\t}\n });\n \n // Check if passed date from History activity\n String histDate = getIntent().getStringExtra(\"historical_date\");\n if (histDate != null) {\n \tmHistoricalCheck.setChecked(true);\n \tint spacePos = histDate.indexOf(\" \");\n \tString[] dateArr = histDate.substring(0, spacePos).split(\"-\");\n \tLog.d(\"CUSTOM\", dateArr[0] + \" \" + dateArr[1] + \" \" + dateArr[2] + \" \");\n \tmDatePicker.init(Integer.parseInt(dateArr[0]), Integer.parseInt(dateArr[1])-1, Integer.parseInt(dateArr[2]), null);\n }\n \n // Toggle the correct radio button according to user's prefs\n if (unitsPref == Settings.UNITS_METRIC) {\n \tmetricRadioButton.setChecked(true);\n \timperialRadioButton.setChecked(false);\n } else {\n \tmetricRadioButton.setChecked(false);\n \timperialRadioButton.setChecked(true);\n }\n\n \n // Set up TextWatcher for the amount EditText\n mAmountEditText = (EditText)findViewById(R.id.amount_edittext);\n \n mAmountEditText.addTextChangedListener(new TextWatcher() {\n \t@Override\n \tpublic void onTextChanged(CharSequence s, int start, int before,\n \t\t\tint count) {\n \t}\n\n\t\t\t@Override\n\t\t\tpublic void afterTextChanged(Editable s) {\n\t\t\t\tupdateConversionTextView();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void beforeTextChanged(CharSequence s, int start, int count,\n\t\t\t\t\tint after) {\n\t\t\t}\n });\n \n mGestureScanner = new GestureDetector(this);\n }", "private void applyCurrentTheme() {\n TempestatibusApplicationSettings tempestatibusApplicationSettings = getTempestatibusApplicationSettings();\n tempestatibusApplicationSettings.createSharedPreferenceContext(this);\n String theme = tempestatibusApplicationSettings.getAppThemePreference();\n mRefreshImageView.setBackgroundResource(TempestatibusApplicationSettings.getRefreshId());\n mDegreeImageView.setBackgroundResource(TempestatibusApplicationSettings.getLargeDegreeId(theme));\n mDewValueSmallDegree.setBackgroundResource(TempestatibusApplicationSettings.getSmallDegreeId(theme));\n mApparentTemperatureValueSmallDegree.setBackgroundResource(TempestatibusApplicationSettings.getSmallDegreeId(theme));\n mSettingsImageView.setBackgroundResource(TempestatibusApplicationSettings.getSettingsIconId());\n mHourglassIconImageView.setBackgroundResource(TempestatibusApplicationSettings.getHourglassId());\n mSaveIconImageView.setBackgroundResource(TempestatibusApplicationSettings.getSaveIconId());\n mSearchIconImageView.setBackgroundResource(TempestatibusApplicationSettings.getSearchIconId());\n }", "@Override\r\n\tprotected void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\tinit();\r\n\t}", "private VP_Theme() {\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n requestWindowFeature(Window.FEATURE_NO_TITLE);\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\tsetupLayout();\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t}", "static void getTheme(Activity activity){\n\n if(PREF_THEME != DARK_THEME){\n activity.setTheme(R.style.AppTheme);\n }\n else{\n activity.setTheme(R.style.Theme_AppCompat);\n }\n }", "public void checkTheme()\n {\n ImageView miniLogo = (ImageView) findViewById(R.id.mini_logo);\n LinearLayout colorBar = (LinearLayout) findViewById(R.id.color_bar);\n\n if(!ApplicationData.theme.equals(\"default\"))\n {\n switch(ApplicationData.theme)\n {\n case \"Banana\":\n colorBar.setBackgroundResource(R.color.color_banana);\n miniLogo.setImageResource(R.drawable.banner_logo_banana);\n //bigImg.setImageResource(R.drawable.banner_logo_banana);\n ApplicationData.theme = \"Banana\";\n //setTheme(R.style.AppThemeBanana);\n break;\n case \"Peach\":\n colorBar.setBackgroundResource(R.color.color_peach);\n miniLogo.setImageResource(R.drawable.banner_logo_peach);\n //bigImg.setImageResource(R.drawable.banner_logo_peach);\n ApplicationData.theme = \"Peach\";\n break;\n case \"Strawberry\":\n colorBar.setBackgroundResource(R.color.color_strawberry);\n miniLogo.setImageResource(R.drawable.banner_logo_strawberry);\n //bigImg.setImageResource(R.drawable.banner_logo_strawberry);\n ApplicationData.theme = \"Strawberry\";\n break;\n case \"Mellon\":\n colorBar.setBackgroundResource(R.color.color_mellon);\n miniLogo.setImageResource(R.drawable.banner_logo_mellon);\n //bigImg.setImageResource(R.drawable.banner_logo_mellon);\n ApplicationData.theme = \"Mellon\";\n break;\n default:\n colorBar.setBackgroundResource(R.color.color_default);\n miniLogo.setImageResource(R.drawable.banner_logo);\n //bigImg.setImageResource(R.drawable.banner_logo);\n ApplicationData.theme = \"Default\";\n break;\n }\n }\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n protected void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "public void onThemeChanged()\n\t{\n\t\tthemeChanged = true;\n\t}", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(@Nullable Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "protected void onCreate() {\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\r\n\t\t\r\n\t}", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "@Override\n public void onActivityCreated(Bundle savedInstanceState) {\n super.onActivityCreated(savedInstanceState);\n\n }", "public static void onActivityCreateSetTheme(Activity activity, int theme) {\n\n\n switch (theme) {\n default:\n case THEME_DEFAULT:\n activity.setTheme(R.style.AppTheme);\n\n break;\n case THEME_ONE:\n activity.setTheme(R.style.MySecondTheme);\n break;\n case THEME_TWO:\n activity.setTheme(R.style.MyThirdTheme);\n break;\n case THEME_THREE:\n activity.setTheme(R.style.MyFourthTheme);\n break;\n case THEME_FOUR:\n activity.setTheme(R.style.MyFifthTheme);\n break;\n case THEME_FIVE:\n activity.setTheme(R.style.MySixthTheme);\n break;\n case THEME_SIX:\n activity.setTheme(R.style.MySeventhTheme);\n break;\n case THEME_SEVEN:\n activity.setTheme(R.style.MyEigthTheme);\n break;\n case THEME_EIGHT:\n activity.setTheme(R.style.MyNinthTheme);\n break;\n }\n }", "@Override\n protected void onCreate(Bundle arg0) {\n super.onCreate(arg0);\n addPreferencesFromResource(R.xml.settings_prefs);\n\n initActionBar();\n initViews();\n }", "@Override\r\n\tpublic void onCreate(Bundle savedInstanceState) {\r\n\t\tsuper.onCreate(savedInstanceState);\r\n\r\n\t}", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n }", "@Override\r\n protected void onCreate(Bundle savedInstanceState) {\r\n super.onCreate(savedInstanceState);\r\n setContentView(R.layout.activity_slower_than_light_main_menu);\r\n }", "@Override\n\tprotected void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t\t\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t\t\n\t}", "@Override\n\tprotected void onCreate(Bundle savedInstanceState)\n\t{\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n public boolean onCreate() {\n return false;\n }", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}", "@Override\n\tpublic void onCreate(Bundle savedInstanceState) {\n\t\tsuper.onCreate(savedInstanceState);\n\t}" ]
[ "0.7790638", "0.7317932", "0.7254067", "0.7226899", "0.70481265", "0.6996481", "0.69899774", "0.6984905", "0.6754906", "0.6754249", "0.66156787", "0.6556724", "0.65524656", "0.6523042", "0.6483704", "0.6480704", "0.64740455", "0.64469296", "0.6443652", "0.6435368", "0.6419832", "0.64164287", "0.64164287", "0.64104253", "0.64104253", "0.63963974", "0.63963974", "0.6393738", "0.6392216", "0.6384098", "0.6377317", "0.63754994", "0.6374079", "0.6371094", "0.63701683", "0.6368731", "0.6366675", "0.6362557", "0.6362557", "0.6358168", "0.6356345", "0.6356345", "0.6356345", "0.6356345", "0.6356345", "0.6356345", "0.6354776", "0.63542706", "0.63542706", "0.63474905", "0.6336062", "0.6332824", "0.6327924", "0.63251716", "0.63224393", "0.63210595", "0.63185436", "0.63185436", "0.63185436", "0.63185436", "0.63185436", "0.6316983", "0.6315604", "0.6315271", "0.6315271", "0.6315271", "0.6315271", "0.63133705", "0.6307558", "0.63047236", "0.63032746", "0.63032746", "0.6298418", "0.6290304", "0.62872314", "0.62872314", "0.6281771", "0.6280711", "0.62649536", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.6261944", "0.62595147", "0.6258437", "0.6255872", "0.6255872", "0.62514126", "0.62489355", "0.62488717", "0.62488717" ]
0.692147
8
This construction is deprecated. QualityValue(String value, EvaluationRequest obtainedFrom, QualityMeasure forMeasure)
@Deprecated public QualityValue(){ super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setQuality(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "public Builder setQualityBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00004000;\n quality_ = value;\n onChanged();\n return this;\n }", "public void setQuality(int value) {\n this.quality = value;\n }", "public Builder setQualityMax(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00008000;\n qualityMax_ = value;\n onChanged();\n return this;\n }", "java.lang.String getQuality();", "public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "Quality getQ();", "public com.google.protobuf.ByteString\n getQualityBytes() {\n java.lang.Object ref = quality_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n quality_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\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 quality_ = s;\n }\n return s;\n }\n }", "public java.lang.String getQuality() {\n java.lang.Object ref = quality_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n quality_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public float getQuality();", "public void setQuality(float quality);", "public void setSrcQualityRating(String value) {\r\n setAttributeInternal(SRCQUALITYRATING, value);\r\n }", "QualityScenario createQualityScenario();", "public double getQuality() {\n return quality;\n }", "public void setQual(String value) {\r\n setAttributeInternal(QUAL, value);\r\n }", "@Override\n public void eCGSignalQuality(int value, int timestamp) {\n }", "java.lang.String getQualityMax();", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(int quality) {\n this.quality = quality;\n }", "public void setQuality(Integer quality) {\n this.quality = quality;\n }", "public Builder setQ(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n q_ = value;\n onChanged();\n return this;\n }", "public void set_quality(int value) {\n setUIntBEElement(offsetBits_quality(), 16, value);\n }", "void setValueQuantity(org.hl7.fhir.Quantity valueQuantity);", "public Builder setQualityMaxBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00008000;\n qualityMax_ = value;\n onChanged();\n return this;\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public int getQuality() {\n return quality;\n }", "public void setQuality(int value)\n\t{\n\t\tconfigManager.setQuality(value);\n\t\tupdatePreviewSize();\n\t}", "public String getMeasurementValue() {\n\t\t\t\t\t\treturn measurementValue;\n\t\t\t\t\t}", "com.google.protobuf.ByteString\n getQualityBytes();", "protected final void setMeasureValue(String inMeasureId, String inValue) {\r\n\t\tcache.setValue(inMeasureId, inValue);\r\n\t}", "public java.lang.String getQualityMax() {\n java.lang.Object ref = qualityMax_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n qualityMax_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getQuality()\n\t{\n\t\treturn quality.getText();\n\t}", "public java.lang.String getQualityMax() {\n java.lang.Object ref = qualityMax_;\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 qualityMax_ = s;\n }\n return s;\n }\n }", "public Builder clearQuality() {\n bitField0_ = (bitField0_ & ~0x00004000);\n quality_ = getDefaultInstance().getQuality();\n onChanged();\n return this;\n }", "public com.google.protobuf.ByteString\n getQualityMaxBytes() {\n java.lang.Object ref = qualityMax_;\n if (ref instanceof String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n qualityMax_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public final void setServiceRating(ServiceQuality q) {\n serviceQuality = q;\n }", "public com.google.protobuf.ByteString\n getQualityMaxBytes() {\n java.lang.Object ref = qualityMax_;\n if (ref instanceof java.lang.String) {\n com.google.protobuf.ByteString b = \n com.google.protobuf.ByteString.copyFromUtf8(\n (java.lang.String) ref);\n qualityMax_ = b;\n return b;\n } else {\n return (com.google.protobuf.ByteString) ref;\n }\n }", "public Builder setUsage(DGUsage value) {\n if (usageBuilder_ == null) {\n if (value == null) {\n throw new NullPointerException();\n }\n usage_ = value;\n onChanged();\n } else {\n usageBuilder_.setMessage(value);\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "public Value(String inputValue) {\n this.inputValue = inputValue;\n }", "void setQuantizerScale(int value)\n {\n quantizerScale = value;\n }", "public FormValidation doCheckPerformanceScore(@QueryParameter String value)\n throws IOException, ServletException {\n try {\n BuilderSettings.ParsePerformanceScore(value);\n return FormValidation.ok();\n } catch (Exception e) {\n return FormValidation.error(e.getMessage());\n }\n }", "public void writeValue(OutputStream out) throws IOException {\n if (m_strCoding != null) {\n m_strCoding.write(out);\n if (qvalue >= 0.0 && qvalue <= 1.0) {\n BS_QVALUE.write(out);\n out.write(DsByteString.getBytes(Float.toString(qvalue)));\n }\n }\n }", "public String computeQualityChangeExpression() {\n\t\tif (getQualityChangeExpression() != null)\n\t\t\treturn getQualityChangeExpression();\n\n\t\tif (category.getQualityChangeExpression() != null)\n\t\t\treturn category.getQualityChangeExpression();\n\n\t\treturn null;\n\t}", "public Description(String aValue) {\n super(aValue);\n }", "public void addMetrics(String value) {\n value.getClass();\n ensureMetricsIsMutable();\n this.metrics_.add(value);\n }", "void setValueRatio(org.hl7.fhir.Ratio valueRatio);", "public void setMeasureDescription(final InternationalString newValue) {\n checkWritePermission(measureDescription);\n measureDescription = newValue;\n }", "public Builder setQuality(int percent) {\n if (percent > 0 || percent < 100) {\n this.quality = percent;\n }\n return this;\n }", "public interface CurveMeasure extends Measure{\n\t\n\t/**\n\t * Returns a MeasureSet object that contains the measure result to all topic and atValues specified on the run selected. \n\t * @param run - name of run\n\t * @param xValues - atValues array. \n\t * @return MeasureSet - The object that encapsulates the measure result. \n\t * @throws IOException -If happened a problem when open the result file\n\t * @throws InterruptedException - \n\t * @throws InvalidItemNameException - If the data is not a number.\n\t * @throws ItemNotFoundException - If a topic does not exist. \n\t * @throws InvalidItemNameException - If a topics with the same name exists. \n\t */\n\tpublic MeasureSet getValue(String run, String [] xValues)\n\t\t\tthrows IOException, InterruptedException, NumberFormatException, ItemNotFoundException, \n\t\t\tInvalidItemNameException, QrelItemNotFoundException, TopicNotFoundException,\n\t\t\tInvalidQrelFormatException;\n\n\t/**\n\t * Returns a MeasureSet object that contains the measure result to selected topics and atValues specified on the run selected. \n\t * @param run - name of run\n\t * @param xValues - atValues array. \n\t * @param topicNumbers - selected topic name array \n\t * @return MeasureSet - The object that encapsulates the measure result. \n\t * @throws IOException -If happened a problem when open the result file\n\t * @throws InterruptedException - \n\t * @throws InvalidItemNameException - If the data is not a number.\n\t * @throws ItemNotFoundException - If a topic does not exist. \n\t * @throws InvalidItemNameException - If a topics with the same name exists. \n\t */\n\tpublic MeasureSet getValue(String run, String [] xValues, String[] topicNumbers) throws IOException,\n\t\t\tInterruptedException, NumberFormatException, ItemNotFoundException, InvalidItemNameException, \n\t\t\tQrelItemNotFoundException, TopicNotFoundException,\n\t\t\tInvalidQrelFormatException;\n}", "public SwatchDataInterfaceQuery value() {\n startField(\"value\");\n\n return this;\n }", "public PQR(BigDecimal value, String code, String codeSystem) {\n\t\tsuper(code, codeSystem);\n\t\tthis.m_value = value;\n\t}", "public baconhep.TTau.Builder setQ(int value) {\n validate(fields()[5], value);\n this.q = value;\n fieldSetFlags()[5] = true;\n return this; \n }", "public DynamicPart value(float value) {\n this.value = value;\n return this;\n }", "public com.example.DNSLog.Builder setQclass(float value) {\n validate(fields()[9], value);\n this.qclass = value;\n fieldSetFlags()[9] = true;\n return this;\n }", "public void setModelQuality(DriftCheckModelQuality modelQuality) {\n this.modelQuality = modelQuality;\n }", "@Deprecated\n @Override\n public void putValue(final String arg0, final Object arg1) {\n // Do Nothing\n }", "public static Score record(final UUID id, final Metric metric, final Version version, final Value value)\n {\n return new Score(id, metric, version, value, LocalDateTime.now(), null);\n }", "public SeleniumQueryObject val(String value) {\n\t\tLOGGER.debug(\"Setting value of \"+this+\" to: \\\"\"+value+\"\\\".\");\n\t\treturn ValFunction.val(this, this.elements, value);\n\t}", "public Builder setUsage(\n DGUsage.Builder builderForValue) {\n if (usageBuilder_ == null) {\n usage_ = builderForValue.build();\n onChanged();\n } else {\n usageBuilder_.setMessage(builderForValue.build());\n }\n bitField0_ |= 0x00000001;\n return this;\n }", "QualityControl getQualityControl(CallPeer peer);", "public org.LNDCDC_NCS_NCSAR.NCSAR_BUSINESS_UNITS.apache.nifi.LNDCDC_NCS_NCSAR_NCSAR_BUSINESS_UNITS.Builder setSRCKEYVAL(java.lang.CharSequence value) {\n validate(fields()[15], value);\n this.SRC_KEY_VAL = value;\n fieldSetFlags()[15] = true;\n return this;\n }", "public V1Toleration withValue(String value) {\n this.value = value;\n return this;\n }", "public Builder clearQualityMax() {\n bitField0_ = (bitField0_ & ~0x00008000);\n qualityMax_ = getDefaultInstance().getQualityMax();\n onChanged();\n return this;\n }", "@Override\n public Double value(TypeOfValue value);", "@Test\n public void testCreateScalableQuantizedRecorderSource() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorderSource\");\n Object forWhat = \"bla\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n int lowerMagnitude = 0;\n int higherMagnitude = 3;\n int quantasPerMagnitude = 10;\n MeasurementRecorderSource result = RecorderFactory.createScalableQuantizedRecorderSource(\n forWhat, unitOfMeasurement, sampleTime, factor, lowerMagnitude, higherMagnitude, quantasPerMagnitude);\n for (int i=0; i<5000; i++) {\n result.getRecorder(\"X\"+ i%2).record(i);\n Thread.sleep(1);\n }\n long endTime = System.currentTimeMillis();\n System.out.println(RecorderFactory.RRD_DATABASE.generateCharts(startTime, endTime, 1200, 600));\n System.out.println(RecorderFactory.RRD_DATABASE.getMeasurements());\n ((Closeable)result).close();\n }", "public QualityAttributeModel(FirstClassModel parent) {\n\t\tsuper(ElementType.QUALITY_ATTRIBUTE, parent);\n\t}", "@JsonCreator\n public OwaspDependencyCheckUsageValue(\n @JsonProperty(\"feature\") Feature<OwaspDependencyCheckUsage> feature,\n @JsonProperty(\"value\") OwaspDependencyCheckUsage value) {\n\n super(feature);\n Objects.requireNonNull(value, \"Oh no! Value is null!\");\n this.value = value;\n }", "public String setValue(String eleValue) {\r\n setRate(eleValue);\r\n return null;\r\n }", "QualityRisk createQualityRisk();", "public static String initialVideoQuality(Context context, int currentCameraId) {\n int backCameraId = CameraHolder.instance().getBackCameraId();\n String defaultStr = null;\n if (currentCameraId == backCameraId) {\n// defaultStr = context.getString(R.string.pref_back_video_quality_default);\n defaultStr = SystemProperties.get(BACK_CAMERA_DEFAULT_VIDEO_QUALITY_VALUE,\"\");\n } else {\n// defaultStr = context.getString(R.string.pref_front_video_quality_default);\n defaultStr = SystemProperties.get(FRONT_CAMERA_DEFAULT_VIDEO_QUALITY_VALUE,\"\");\n }\n int quality = 0;\n if(defaultStr == null || defaultStr.length() < 1) {\n ArrayList<String> supprotedQuality = getSupportedVideoQuality();\n String[] candidateArray = (currentCameraId == backCameraId) ? \n context.getResources().getStringArray(R.array.pref_video_quality_entryvalues):\n context.getResources().getStringArray(R.array.pref_front_video_quality_entryvalues);\n for(String candidate:candidateArray) {\n if(supprotedQuality.indexOf(candidate) >= 0) {\n defaultStr = candidate;\n break;\n }\n }\n }\n\n if(defaultStr != null) {\n quality = Integer.valueOf(defaultStr);\n if (CamcorderProfile.hasProfile(currentCameraId, quality)) {\n SharedPreferences.Editor editor = ComboPreferences\n .get(context).edit();\n editor.putString(KEY_VIDEO_QUALITY, defaultStr);\n editor.apply();\n return defaultStr;\n }\n }\n return Integer.toString(CamcorderProfile.QUALITY_HIGH);\n }", "private String getQuality()\n {\n \n if(high.isSelected())\n {\n return \"High\";\n }\n else if(medium.isSelected())\n {\n return \"Medium\";\n }\n else if(mild.isSelected())\n {\n return \"Mild\";\n }\n else\n {\n \n return null;\n }\n }", "com.google.protobuf.ByteString\n getQualityMaxBytes();", "public static MediaRange create(MediaType mediaType, float qValue) {\n return akka.http.scaladsl.model.MediaRange.apply((akka.http.scaladsl.model.MediaType) mediaType, qValue);\n }", "public void setQuantity(float value) {\n this.quantity = value;\n }", "public Builder setHowToUse(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n howToUse_ = value;\n onChanged();\n return this;\n }", "public Builder setHowToUse(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n howToUse_ = value;\n onChanged();\n return this;\n }", "@Test\n public void testCreateScalableQuantizedRecorder() throws IOException, InterruptedException {\n System.out.println(\"createScalableQuantizedRecorder\");\n Object forWhat = \"test1\";\n String unitOfMeasurement = \"ms\";\n int sampleTime = 1000;\n int factor = 10;\n int lowerMagnitude = 0;\n int higherMagnitude = 3;\n int quantasPerMagnitude = 10;\n MeasurementRecorder result = RecorderFactory.createScalableQuantizedRecorder(\n forWhat, unitOfMeasurement, sampleTime, factor, lowerMagnitude, higherMagnitude, quantasPerMagnitude);\n for (int i=0; i<500; i++) {\n result.record(i);\n Thread.sleep(20);\n }\n long endTime = System.currentTimeMillis();\n System.out.println(RecorderFactory.RRD_DATABASE.generateCharts(startTime, endTime, 1200, 600));\n System.out.println(RecorderFactory.RRD_DATABASE.getMeasurements());\n ((Closeable)result).close();\n \n }", "public void setQtype(float value) {\n this.qtype = value;\n }", "public Builder setValue(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n value_ = value;\n onChanged();\n return this;\n }", "public void setMeasureResult(String measureResult) {\r\n this.measureResult = measureResult;\r\n }", "public Collection getQualityResults()\r\n {\r\n return mQualityResults;\r\n }", "public void setQualFlag(String value) {\r\n setAttributeInternal(QUALFLAG, value);\r\n }", "public Builder setValue(String value) {\n _value = value;\n return this;\n }", "public void setQclass(float value) {\n this.qclass = value;\n }", "public Builder setFrequency(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000400;\n frequency_ = value;\n onChanged();\n return this;\n }", "@Test\r\n\tpublic void calculQualityAxisWithLostPointsTest() {\r\n\t\tAssert.assertEquals(UtilCalculGrade.calculTestOfStudentQualityAxis(new ModelValue(4f, 2f), 3f), new Float(2));\r\n\t}", "public Builder setValue(java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n value_ = value;\n onChanged();\n return this;\n }", "public void setHistologicalQuality(String histologicalQuality)\r\n \t{\r\n \t\tthis.histologicalQuality = histologicalQuality;\r\n \t}", "@Deprecated\n/* */ public byte getValue() {\n/* 58 */ return this.value;\n/* */ }", "@Test\n\tpublic void testQualityWithSellInUnder0QualityUnder50Brie() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Aged Brie\", -1, 40));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by 2\n\t\tassertEquals(\"Quality with sellIn under 0 brie\", 42, quality);\n\t}", "public Builder setValue(\n java.lang.String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n \n value_ = value;\n onChanged();\n return this;\n }", "public String getSrcQualityRating() {\r\n return (String) getAttributeInternal(SRCQUALITYRATING);\r\n }", "public abstract Quantity<Q> create(Number value, Unit<Q> unit);", "public Builder setValue(\n String value) {\n if (value == null) {\n throw new NullPointerException();\n }\n\n value_ = value;\n onChanged();\n return this;\n }", "public EstimateParameter( String name, String units, Estimate value ) throws ConstraintException {\n\t\tsuper( name, null, units, value );\n\t}", "public Builder setQBytes(\n com.google.protobuf.ByteString value) {\n if (value == null) {\n throw new NullPointerException();\n }\n checkByteStringIsUtf8(value);\n \n q_ = value;\n onChanged();\n return this;\n }", "@Test\n\tpublic void testQualityOf50() {\n\t\tGildedRose inn = new GildedRose();\n\t\tinn.setItem(new Item(\"Backstage passes to a TAFKAL80ETC concert\", 1, 49));\n\t\tinn.oneDay();\n\t\t\n\t\t//access a list of items, get the quality of the one set\n\t\tList<Item> items = inn.getItems();\n\t\tint quality = items.get(0).getQuality();\n\t\t\n\t\t//assert quality has increased by one\n\t\tassertEquals(\"Quality with quality under 0 Concert passes\", 50, quality);\n\t}", "private CvParam getSpectrumType(String value) {\n CvParam cvParam = null;\n CvTermReference cvTerm = null;\n if (\"discrete\".equals(value)) {\n cvTerm = CvTermReference.CENTROID_SPECTRUM;\n } else if (\"continuous\".equals(value)) {\n cvTerm = CvTermReference.PROFILE_SPECTRUM;\n }\n\n if (cvTerm != null) {\n cvParam = new CvParam(cvTerm.getAccession(), cvTerm.getName(), cvTerm.getCvLabel(),\n value, null, null, null);\n }\n return cvParam;\n }" ]
[ "0.66484994", "0.611826", "0.5983794", "0.58475494", "0.57509935", "0.57508147", "0.5732791", "0.5714806", "0.55769527", "0.55571645", "0.553483", "0.5462848", "0.5414618", "0.5383338", "0.5355112", "0.53180975", "0.5307269", "0.529145", "0.5274299", "0.5274299", "0.5268537", "0.52551466", "0.52485543", "0.51489073", "0.5109257", "0.508689", "0.508689", "0.508689", "0.5052205", "0.5051367", "0.50351936", "0.49948028", "0.497783", "0.49659255", "0.4959586", "0.48807698", "0.48642254", "0.48562542", "0.48479775", "0.48365688", "0.48076427", "0.4784954", "0.47697592", "0.47535315", "0.47507375", "0.47498047", "0.47349554", "0.47316507", "0.47094285", "0.4705832", "0.46898675", "0.46835333", "0.46815303", "0.4680842", "0.46635324", "0.4653577", "0.46051666", "0.45816925", "0.45747384", "0.45714635", "0.45677188", "0.456158", "0.45584267", "0.45465276", "0.45410538", "0.45169294", "0.45139477", "0.45126984", "0.45098794", "0.45086464", "0.450691", "0.4501982", "0.44929948", "0.448417", "0.44796434", "0.44719845", "0.44713187", "0.44713187", "0.4466179", "0.44613716", "0.44488937", "0.44454244", "0.44355762", "0.44325784", "0.44281504", "0.4423815", "0.44236737", "0.4421413", "0.44175124", "0.44167194", "0.44057745", "0.4404937", "0.4400728", "0.43962154", "0.4394792", "0.4392574", "0.43864265", "0.43859473", "0.4385277", "0.43819043" ]
0.7467586
0
opcoes da primeira caixa de dialogo
public static void main(String[] args) throws Exception { Object [] tipos = {"Gerente", "Funcionario"}; //inputs String resposta1, resposta2; double salario_bruto, salario_corrigido; //primeiro dialogo resposta1 = (String) JOptionPane.showInputDialog(null, "Selecione o tipo de funcionario:", "Por favor", JOptionPane.WARNING_MESSAGE, null, tipos, "Gerente" ); resposta2 = (String) JOptionPane.showInputDialog(null, "Digite o salario do funcionario (com ponto):", "Por favor", JOptionPane.QUESTION_MESSAGE //icon ); salario_bruto = Double.parseDouble(resposta2); switch(resposta1) { case "Gerente": salario_corrigido = salario_bruto * 1.15; break; case "Funcionario": salario_corrigido = salario_bruto * 1.075; break; default: salario_corrigido = 0.0; } JOptionPane.showMessageDialog(null, "O salario corrigo é de R$ " + salario_corrigido ); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void generar_dialog_preguntas();", "public static void mensagemRealizarCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Favor clique em atualizar para re-listar e selecionar o novo item recem cadastrado.\", \"Informação\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(Toolkit.getDefaultToolkit().getImage(CadastroQuartos.class.getResource(\"/Imagens/Informacao32.png\"))));\n\t}", "@Override\n public void onClick(DialogInterface dialog, int which) {\n getCariSemua();\n//\n }", "public void verificaJogo(){\n\t\t\t\tif(jogo.verificaPerdeu()) {\n\t \t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce Perdeu!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t\tif(jogo.verificaGanhou()) {\n\t\t\t\t\tJOptionPane dialogo = new JOptionPane();\n\t \t\t\n\t \t\tint opcao = dialogo.showConfirmDialog(this, \"Voce GANHOOOOO!!\\nDeseja jogar novamente?\", \"mensagem\", JOptionPane.YES_NO_OPTION);\n\t \t\t\n\t \t\tif(opcao == JOptionPane.YES_OPTION) {\n\t \t\t\tMatriz novamente = new Matriz();\n\t \t\t}\n\t \t\tsetVisible(false);\n\t \t\tdispose();\n\t \t}\n\t\t\t\t\n\t\t\t}", "public static void mostrarAfirmacionDeCreacion(JDialog dialogo) {\n JOptionPane.showMessageDialog(dialogo, afirmacionDeCreacion, \"BancoSoft: Mensaje\", JOptionPane.INFORMATION_MESSAGE);\n }", "public void crearDialogo() {\r\n final PantallaCompletaDialog a2 = PantallaCompletaDialog.a(getString(R.string.hubo_error), getString(R.string.no_hay_internet), getString(R.string.cerrar).toUpperCase(), R.drawable.ic_error);\r\n a2.f4589b = new a() {\r\n public void onClick(View view) {\r\n a2.dismiss();\r\n }\r\n };\r\n a2.show(getParentFragmentManager(), \"TAG\");\r\n }", "@Override\n\tpublic void pegaInstanciaDialogo(AposentadoriaCompulsoria obj) {\n\t\t\n\t}", "public void abrirDialogoCustodio(){\n\t\tif(aut_empleado.getValor()!=null){\n\t\t\ttab_tarspaso_Custodio.limpiar();\n\t\t\ttab_tarspaso_Custodio.insertar();\n\t\t\t//tab_direccion.limpiar();\n\t\t//\ttab_direccion.insertar();\n\t\t\tdia_traspaso_custodio.dibujar();\n\t\t}\n\t\telse{\n\t\t\tutilitario.agregarMensaje(\"Inserte un Custodio\", \"\");\n\t\t}\n\n\t}", "public void alertDialogBasico() {\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\r\n\r\n // 2. Encadenar varios métodos setter para ajustar las características del diálogo\r\n builder.setMessage(R.string.dialog_message);\r\n\r\n\r\n builder.setPositiveButton(R.string.ok, new DialogInterface.OnClickListener() {\r\n public void onClick(DialogInterface dialog, int id) {\r\n\r\n }\r\n });\r\n\r\n\r\n builder.show();\r\n\r\n }", "public static void mensegemSucessoCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Sucesso ao cadastrar.\", \"Sucesso\", JOptionPane.INFORMATION_MESSAGE, new ImageIcon(Toolkit.getDefaultToolkit().getImage(CadastroQuartos.class.getResource(\"/Imagens/Sucesso32.png\"))));\n\t}", "private void mostrarDialogoCargar(){\n materialDialog = new MaterialDialog.Builder(this)\n .title(\"Validando datos\")\n .content(\"Por favor espere\")\n .progress(true, 0)\n .contentGravity(GravityEnum.CENTER)\n .widgetColorRes(R.color.colorPrimary)\n .show();\n\n materialDialog.setCancelable(false);\n materialDialog.setCanceledOnTouchOutside(false);\n }", "public void TipoCliente() {\n\tint cambio=1;\n\tString tipoCliente=\"\";\n\tdo {\n\t\ttry {\n\t\t\ttipoCliente = (JOptionPane.showInputDialog(null, \"Selecciona el tipo de cliente\", null, JOptionPane.PLAIN_MESSAGE,null, new Object[]\n\t\t\t\t\t{ \"Selecciona\",\"Docente\", \"Administrativo\"}, \"Selecciona\")).toString() ;\n\t\t\t\n\t\t\tif(tipoCliente.equalsIgnoreCase(\"Docente\")) {\n\t\t\t\tingresaDocente();\n\t\t\t\tsetTipoCliente(\"Docente\");\n\t\t\t\t\n\t\t\t}else if(tipoCliente.equalsIgnoreCase(\"Administrativo\")) {\n\t\t\t\tingresaAdministrativo();\n\t\t\t\tsetTipoCliente(\"Administrativo\");\n\t\t\t}else{\n\t\t\t\t\n\t\t\t\tJOptionPane.showMessageDialog(null,\"Escoge una de las dos opciones\");\n\t\t\t}\n\t} catch (Exception e) {\n\t\tJOptionPane.showMessageDialog(null, \"Debes escoger una opcion\");\n\t\tcambio=0;\n\t}\n\t} while (tipoCliente==\"Selecciona\"||tipoCliente==null||cambio==0);\t\n}", "public CriarPromocaoDialog() {\n\n\t\tsetTitle(\"Nova Promoção\");\n\t\tsetBounds(500, 300, 465, 412);\n\t\tcontentPanel.setLayout(null);\n\t\tgetContentPane().setLayout(new BorderLayout());\n\t\tcontentPanel.setBackground(Color.WHITE);\n\t\tcontentPanel.setBorder(new EmptyBorder(5, 5, 5, 5));\n\t\tgetContentPane().add(contentPanel, BorderLayout.CENTER);\n\t\tsetResizable(false);\n\t\tinicialize();\n\n\t}", "public void mostrarDetallesCompra(View view) {\n AlertDialog alertDialog = new AlertDialog.Builder(context).create();\n LayoutInflater inflater = this.getLayoutInflater();\n View dialogView = inflater.inflate(R.layout.dialog_detalles_compra, null);\n alertDialog.setView(dialogView);\n TextView textViewTotal = (TextView) dialogView.findViewById(R.id.total);\n textViewTotal.append(compraEncontrada.getTotal());\n\n TextView textViewSubtotal = (TextView) dialogView.findViewById(R.id.subtotal);\n textViewSubtotal.append(compraEncontrada.getSubtotal());\n\n\n alertDialog.setButton(AlertDialog.BUTTON_NEUTRAL, \"OK\",\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n alertDialog.show();\n\n }", "public void verificaAlteracao() {\r\n if (produto != null) {\r\n dialog.getTfNome().setText(produto.getNome());\r\n dialog.getTfCodigoBarra().setText(produto.getCodigoBarra());\r\n dialog.getTfPrecoCompra().setText(produto.getPrecoCompra().toString());\r\n dialog.getTfPrecoVenda().setText(produto.getPrecoVenda().toString());\r\n dialog.getCbCategoria().setSelectedItem(produto.getCategoriaId());\r\n dialog.getCbFornecedor().setSelectedItem(produto.getFornecedorId());\r\n }\r\n }", "private void inizia() throws Exception {\n\n try { // prova ad eseguire il codice\n\n /* questo dialogo non e' modale */\n this.getDialogo().setModal(false);\n\n this.setTitolo(TITOLO_DIALOGO);\n this.addBottoneStampa();\n this.addBottoneChiudi();\n\n /* crea il modulo con db in memoria */\n this.creaModuloMem();\n\n /* crea i pannelli del dialogo */\n this.creaPannelli();\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void mostrarDialogoOpciones()\n {\n // Solo se muestran las opciones si la APP ya ha sido inicializada\n if (mEstadoActualAPP != EstadoAPP.CAMERA_RUNNING && mEstadoActualAPP != EstadoAPP.CAMERA_STOPPED)\n {\n return;\n }\n\n final int itemCameraFlash = 0;\n final int itemAutofocusIndex = 1;\n final int itemCameraActive = 2;\n\n AlertDialog dialogoOpciones = null;\n\n CharSequence[] items = {\tgetString(R.string.menu_flash_on),\n \t\t\t\t\tgetString(R.string.menu_contAutofocus_off), \n \t\t\t\t\tgetString(R.string.menu_contCameraBack)};\n\n // Actualizar los títulos de la lista de acuerdo al estado actual\n // de las opciones\n if (mFlash)\n items[itemCameraFlash] = (getString(R.string.menu_flash_off));\n else\n items[itemCameraFlash] = (getString(R.string.menu_flash_on));\n\n if (mContinuoAutoenfoque)\n items[itemAutofocusIndex] = (getString(R.string.menu_contAutofocus_off));\n else\n items[itemAutofocusIndex] = (getString(R.string.menu_contAutofocus_on));\n \n if(mCamaraActiva == 0)\n \titems[itemCameraActive] = (getString(R.string.menu_contCameraFront));\n else\n \titems[itemCameraActive] = (getString(R.string.menu_contCameraBack));\n\n\n AlertDialog.Builder cameraOptionsDialogBuilder = new AlertDialog.Builder(ARXylophoneBase.this);\n \n cameraOptionsDialogBuilder.setTitle(getString(R.string.menu_camera_title));\n \n cameraOptionsDialogBuilder.setItems(items,\n new DialogInterface.OnClickListener()\n {\n public void onClick(DialogInterface dialog, int item)\n {\n \tswitch(item)\n \t{\n \t\tcase(itemCameraFlash):\n \t\t\tif (setFlash(!mFlash))\n {\n mFlash = !mFlash;\n if(mFlash)\n \tUtils.crearToast(getString(R.string.toast_flash_on), ARXylophoneBase.this);\n else\n \tUtils.crearToast(getString(R.string.toast_flash_off), ARXylophoneBase.this);\n }\n \t\t\telse\n \t\t\t\tUtils.crearToast(getString(R.string.toast_flash_fallo), ARXylophoneBase.this);\n\n \tdialog.dismiss();\n \t\t\tbreak;\n \t\t\t\n \t\tcase(itemAutofocusIndex):\n \t\t\tif (mContinuoAutoenfoque)\n {\n \t\t\t\tif (setModoEnfoque(ModoEnfoque.NORMAL.ordinal()))\n {\n \t\t\t\t\tmContinuoAutoenfoque = false;\n \t\t\t\tUtils.crearToast(getString(R.string.toast_enfoque_on), ARXylophoneBase.this);\n }\n \t\t\t\telse\n \t\t\t\tUtils.crearToast(getString(R.string.toast_enfoque_fallo), ARXylophoneBase.this);\n }\n \t\t\telse\n {\n \t\t\t\tif (setModoEnfoque(ModoEnfoque.CONTINUO_AUTO.ordinal()))\n \t\t\t\t{\n \t\t\t\t\tmContinuoAutoenfoque = true;\n \t\t\t\tUtils.crearToast(getString(R.string.toast_autoenfoque_on), ARXylophoneBase.this);\n \t\t\t\t}\n \t\t\t\telse\n \t\t\t\t\tUtils.crearToast(getString(R.string.toast_autoenfoque_fallo), ARXylophoneBase.this);\n }\n \t\t\n \tdialog.dismiss();\n \t\t\tbreak;\n \t\t\t\n \t\tcase(itemCameraActive):\n \tif(hasFrontCamera)\n \t{\n \t \tmCamaraActiva = mCamaraActiva == 0 ? 1 : 0;\n \t \tiniciarCamara(mCamaraActiva);\n \t}\n \telse\n \t\t\t\tUtils.crearToast(getString(R.string.toast_camara_fallo), ARXylophoneBase.this);\n \t\t\n\t dialog.dismiss();\n\t \t\tbreak;\n \t}\n }\n });\n\n dialogoOpciones = cameraOptionsDialogBuilder.create();\n dialogoOpciones.show();\n }", "public String verMenu(){\r\n try {\r\n Object opcion=JOptionPane.showInputDialog(\r\n null,\r\n \"Seleccione Opcion\",\"Agenda de Anexos\",\r\n JOptionPane.QUESTION_MESSAGE,\r\n null,\r\n new String[]{\"1.- Registrar Empleado\",\r\n \"2.- Asignar Anexo a Empleado\",\r\n \"3.- Obtener ubicacion de un Anexo\",\r\n \"4.- Modificar Anexo a Empleado\",\r\n \"5.- Desasignar Anexo a Empleado\",\r\n \"6.- Listado de Asignaciones\",\r\n \"7.- Salir del Programa\"},\r\n \"1.- Registrar Empleado\");\r\n return(String.valueOf(opcion).substring(0, 1)); // RETORNA A FUNCION VOID MAIN\r\n } catch (Exception ex) {\r\n System.out.println(\"Hubo un error al ingresar una opcion \"+ex.toString());\r\n }\r\n return \"0\";\r\n }", "public void confirmacionVolverMenu(){\n AlertDialog.Builder builder = new AlertDialog.Builder(Postre.this);\n builder.setCancelable(false);\n builder.setMessage(\"¿Desea salir?\")\n .setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tIntent intent = new Intent(Postre.this, HomeAdmin.class);\n\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_FORWARD_RESULT);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\toverridePendingTransition(R.anim.left_in, R.anim.left_out);\t\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n \n builder.show();\n }", "@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}", "private void dialog() {\n\t\tGenericDialog gd = new GenericDialog(\"Bildart\");\n\t\t\n\t\tgd.addChoice(\"Bildtyp\", choices, choices[0]);\n\t\t\n\t\t\n\t\tgd.showDialog();\t// generiere Eingabefenster\n\t\t\n\t\tchoice = gd.getNextChoice(); // Auswahl uebernehmen\n\t\t\n\t\tif (gd.wasCanceled())\n\t\t\tSystem.exit(0);\n\t}", "private void esegui() {\n /* variabili e costanti locali di lavoro */\n OperazioneMonitorabile operazione;\n\n try { // prova ad eseguire il codice\n\n /**\n * Lancia l'operazione di analisi dei dati in un thread asincrono\n * al termine il thread aggiorna i dati del dialogo\n */\n operazione = new OpAnalisi(this.getProgressBar());\n operazione.avvia();\n\n\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n } // fine del blocco try-catch\n }", "@Override\n\t\t\t\t\t\tpublic void onClick(DialogInterface dialog, int which) {\n\t\t\t\t\t\t\tAceptarCofre(objeto.get(which));\n\t\t\t\t\t\t}", "private void showConfirmClearDialog() {\n AlertDialog.Builder dialog = new AlertDialog.Builder(getActivity());\n dialog.setTitle(res.getString(R.string.dialog_clear_sale));\n dialog.setPositiveButton(res.getString(R.string.no), new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n\n }\n });\n\n dialog.setNegativeButton(res.getString(R.string.clear), new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n register.cancleSale();\n update();\n }\n });\n\n dialog.show();\n }", "public void botonOpciones(View view)\n {\n \tmostrarDialogoOpciones();\n }", "private void Screentocharge() {\r\n\r\n\t\t\t\t\r\n\t\tJTextField nombre = new JTextField();\r\n\t\tJTextField edad = new JTextField();\r\n\t\tJTextField raza = new JTextField();\r\n\t\tJTextField cuento = new JTextField();\r\n\t\tChoice tipo = new Choice();\r\n\t\t\t\t\t\t\r\n\t\ttipo.add(\"Perro\");\r\n\t\ttipo.add(\"Gato\");\r\n\t\ttipo.add(\"Conejo\");\r\n\t\t\r\n\t\tedad.addKeyListener(new KeyAdapter()\r\n\t\t{\r\n\t\t public void keyTyped(KeyEvent e)\r\n\t\t {\r\n\t\t char caracter = e.getKeyChar();\r\n\t\t if(((caracter<'0')||(caracter>'9'))&&(caracter!='\\b'))\r\n\t\t {\r\n\t\t e.consume(); \r\n\t\t }\r\n\t\t }\r\n\t\t});\r\n\t\t\r\n\t\tObject[] message = { \"Tipo:\", tipo, \"Nombre:\", nombre, \"Edad\", edad, \"Raza\", raza, \"Causa\", cuento };\r\n\r\n\t\tUIManager.put(\"OptionPane.minimumSize\",new Dimension(500,400));\r\n\t\tint option = JOptionPane.showConfirmDialog(null, message, \"Ingreso de Pasiente\", JOptionPane.OK_CANCEL_OPTION);\r\n\t\tif (option == JOptionPane.OK_OPTION) {\t\r\n\t\t\tif (edad.getText().equals(\"\")) {\r\n\t\t\t\tedad.setText(\"0\");\r\n\t\t\t\treturnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t\t}\r\n\t\t\t returnAnimal(tipo.getSelectedItem(), nombre.getText(), raza.getText(), \r\n\t\t\t\t\t\t\tInteger.valueOf(edad.getText()), cuento.getText());\r\n\t\t}\r\n\t\t\r\n\t\tnombre = null;\r\n\t\tedad =null;\r\n\t\traza = null;\r\n\t\tcuento = null;\r\n\t\ttipo =null;\r\n\t\t\r\n\t}", "@FXML\n\tpublic void onAnadirIdioma() {\n\t\tDialog<ButtonType> dialog = new Dialog<>();\n\t\tdialog.setTitle(\"Nuevo Conocimiento\");\n\n\t\t// declaramos los tipo de botones\n\n\t\tButtonType anadirButton = new ButtonType(\"Crear\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().addAll(anadirButton, ButtonType.CANCEL);\n\t\tStage stage = (Stage) dialog.getDialogPane().getScene().getWindow();\n\t\tstage.getIcons().add(new Image(\"dad/javafx/resources/cv64x64.png\"));\n\n\t\t// creamos los campos\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 150, 10, 10));\n\n\t\tButton xButton = new Button(\"X\");\n\n\t\tTextField denominacionTextField = new TextField();\n\t\tTextField certificacionTextField = new TextField();\n\t\tLabel certificacionLabel = new Label(\"Certificacion\");\n\t\tLabel denominacionDialogLabel = new Label(\"Denominacion\");\n\t\tLabel nivelDialogLabel = new Label(\"Nivel\");\n\n\t\tComboBox<Nivel> nivelComboBox = new ComboBox<Nivel>();\n\t\tnivelComboBox.getItems().addAll(Nivel.values());\n\t\tHBox box = new HBox(nivelComboBox, xButton);\n\t\tbox.setSpacing(5);\n\n\t\tgrid.add(denominacionDialogLabel, 0, 0);\n\t\tgrid.add(denominacionTextField, 1, 0);\n\t\tgrid.add(nivelDialogLabel, 0, 1);\n\t\tgrid.add(box, 1, 1);\n\t\tgrid.add(certificacionLabel, 0, 2);\n\t\tgrid.add(certificacionTextField, 1, 2);\n\n\t\txButton.setOnAction(e -> nivelComboBox.getSelectionModel().select(-1));\n\n\t\t// activar o desactivar el boton a�adir dependiendo de si se ha a�adido un\n\t\t// numero de telefono o no\n\n\t\t// metemos el grid pane en nuestro dialog\n\t\tdialog.getDialogPane().setContent(grid);\n\n\t\t// accion al apretar a�adir button\n\n\t\tOptional<ButtonType> result = dialog.showAndWait();\n\t\tif (result.get() == anadirButton) {\n\t\t\tIdioma idioma = new Idioma();\n\t\t\tidioma.setCertificacion(certificacionTextField.getText());\n\t\t\tConocimiento conocimiento = new Conocimiento();\n\t\t\tconocimiento.setDenominacion(denominacionTextField.getText());\n\t\t\tconocimiento.setNivel(nivelComboBox.getValue());\n\t\t\tconocimiento.setIdioma(idioma);\n\t\t\tmodel.conocimientoProperty().add(conocimiento);\n\t\t}\n\t}", "public DialogoAggiungiFissi() {\n /* rimanda al costruttore della superclasse */\n super();\n\n\n try { // prova ad eseguire il codice\n /* regolazioni iniziali di riferimenti e variabili */\n this.inizia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n }", "@FXML\n\tpublic void onAnadirConocimiento() {\n\t\tDialog<ButtonType> dialog = new Dialog<>();\n\t\tdialog.setTitle(\"Nuevo Conocimiento\");\n\n\t\t// declaramos los tipo de botones\n\n\t\tButtonType anadirButton = new ButtonType(\"Crear\", ButtonData.OK_DONE);\n\t\tdialog.getDialogPane().getButtonTypes().addAll(anadirButton, ButtonType.CANCEL);\n\t\tStage stage = (Stage) dialog.getDialogPane().getScene().getWindow();\n\t\tstage.getIcons().add(new Image(\"dad/javafx/resources/cv64x64.png\"));\n\n\t\t// creamos los campos\n\t\tGridPane grid = new GridPane();\n\t\tgrid.setHgap(10);\n\t\tgrid.setVgap(10);\n\t\tgrid.setPadding(new Insets(20, 150, 10, 10));\n\n\t\tButton xButton = new Button(\"X\");\n\n\t\tTextField denominacionTextField = new TextField();\n\t\tLabel denominacionDialogLabel = new Label(\"Denominacion\");\n\t\tLabel nivelDialogLabel = new Label(\"Nivel\");\n\n\t\tComboBox<Nivel> nivelComboBox = new ComboBox<Nivel>();\n\n\t\tnivelComboBox.getItems().addAll(Nivel.values());\n\t\tHBox box = new HBox(nivelComboBox, xButton);\n\t\tbox.setSpacing(5);\n\n\t\tgrid.add(denominacionDialogLabel, 0, 0);\n\t\tgrid.add(denominacionTextField, 1, 0);\n\t\tgrid.add(nivelDialogLabel, 0, 1);\n\t\tgrid.add(box, 1, 1);\n\n\t\txButton.setOnAction(e -> nivelComboBox.getSelectionModel().select(-1));\n\n\t\t// activar o desactivar el boton a�adir dependiendo de si se ha a�adido un\n\t\t// numero de telefono o no\n\n\t\t// metemos el grid pane en nuestro dialog\n\t\tdialog.getDialogPane().setContent(grid);\n\n\t\txButton.setOnAction(e -> nivelComboBox.getSelectionModel().select(-1));\n\t\t\n\t\tOptional<ButtonType> result = dialog.showAndWait();\n\t\tif (result.get() == anadirButton) {\n\t\t\tConocimiento conocimiento = new Conocimiento();\n\t\t\tconocimiento.setDenominacion(denominacionTextField.getText());\n\t\t\tconocimiento.setNivel(nivelComboBox.getSelectionModel().getSelectedItem());\n\t\t\tmodel.getConocimiento().add(conocimiento);\n\t\t}\n\t}", "public static void mostrarAdvertenciaDeCreacion(JDialog dialogo) {\n JOptionPane.showMessageDialog(dialogo, advertenciaDeCreacion, \"BancoSoft: Advertencia\", JOptionPane.WARNING_MESSAGE);\n }", "@Override\n public void onClick(DialogInterface dialog, int which){\n guardarEmpleado();\n }", "public FiltroGirosDialog() {\n \n }", "@Override\n public void onCancel(AmbilWarnaDialog dialog){\n }", "public static void mostrarAfirmacionDeEliminacion(JDialog dialogo) {\n JOptionPane.showMessageDialog(dialogo, afirmacionDeEliminacion, \"BancoSoft: Mensaje\", JOptionPane.INFORMATION_MESSAGE);\n }", "public CustomDialog(Activity context, String monto, String mensaje1, String mensaje2, String mensaje3, String mensaje4, String aprobacion, String typeMoney, Runnable aceptar){\n dialog = new Dialog(context, android.R.style.Theme_Black_NoTitleBar_Fullscreen);\n dialog.setCanceledOnTouchOutside(false);\n dialog.setContentView(R.layout.dialog_pago_realizado);\n dialog.getWindow().setBackgroundDrawable(new ColorDrawable(android.graphics.Color.TRANSPARENT));\n AutoResizeTextView tvMonto = dialog.findViewById(R.id.importeEntero);\n\n tvMonto.setText(\"$ \"+monto+\" \"+ typeMoney);\n\n TextView tvAprobacion = dialog.findViewById(R.id.tvAprob);\n tvAprobacion.setText(\"No. de Aprobación: \"+aprobacion);\n\n TextView tvMensaje = dialog.findViewById(R.id.tvMensaje);\n\n //tvMensaje.setText(Html.fromHtml(mensaje1 + \"<br><font color='#0abaee'>\" + mensaje2 + \"</font><br>\" + mensaje3 + \"<font color='#0abaee'>\" + mensaje4 + \"</font>\"));\n Button tvAceptar = dialog.findViewById(R.id.tvAceptar2);\n tvAceptar.setOnClickListener(v -> {\n context.runOnUiThread(aceptar);\n dialog.dismiss();\n });\n }", "public interface DialogKonstanten {\n\n String HANDBOOK_TITLE = \"Bedienungsanleitung\";\n String HANDBOOK_HEADER = \"Tastenbelegung und Menüpunkte\";\n String HANDBOOK_TEXT = \"Ein Objekt kann über den Menüpunkt \\\"File -> Load File\\\" geladen werden.\\nZu Bewegung des Objektes wird die Maus verwendet.\\nRMB + Maus: Bewegen\\nLMB + Maus: Rotieren\\nEine Verbindung zu einem anderen Programm wir über den Menüpunkt Network aufgebaut. Der Server wird gestartet indem keine IP eingegeben wird und eine Verbindung zu einem Server wird erreicht indem die jeweilige IP-Adresse in das erste Textfeld eigegeben wird.\";\n\n}", "@Override\n public void onShow(DialogInterface arg0) {\n\n }", "public static void main(String[] args) {\n String matriz = \"ABCDEFGHIJLMNOPQRSTUVWXYZ\";\n Ejercicio1 c = new Ejercicio1();\n String retorno;\n String mensaje = JOptionPane.showInputDialog(\"Digite el mensaje\");\n// Convierte el mensaje a mayusculas\n mensaje = mensaje.toUpperCase();\n c.llenaMatriz(matriz);\n retorno = c.aTap(mensaje);\n JOptionPane.showMessageDialog(null, retorno);\n\n //Fin de la Primera parte del examen\n /*\n Inicio de la Segunda parte del examen\n */\n /*\n String[] lista = {\" auto \", \" pato \", \" palo \", \" poto \", \" amar \", \" amor \",\n \" loca \", \" loco \", \" polo \", \" poco \", \" poca \", \" rota \", \" roto \"};\n AdminPalabras admin = new AdminPalabras( lista );\n String[] letras = {\" escalopa \", \" automotor\", \" percatado\"};\n for(int i = 0; i < letras . length ; i ++) {\n int cont = admin .ContarPalabrasPosibles(letras [i ]);\n JOptionPane.showMessageDialog(null,letras [i] + \": \" + cont );\n }*/\n //Fin de la Segunda parte del Examen\n }", "@Override \n\t\t\t public void onClick(DialogInterface dialog, int which) {\n\t\t\t \t\n\t\t\t }", "@Override\n public Dialog onCreateDialog(Bundle bundle) {\n AlertDialog.Builder builder =\n new AlertDialog.Builder(getActivity());\n builder.setMessage(\n getString(R.string.results,\n totalSuposicoes,\n (1000 / (double) totalSuposicoes)));\n\n // \"Resetar Questão\" Button\n builder.setPositiveButton(R.string.reset_quiz,\n new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog,\n int id) {\n resetQuiz();\n }\n }\n );\n\n return builder.create(); // retorna o AlertDialog\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n actualizar_administrador();\n aceptoCambios.aceptar(administrador, especialidades);\n dismiss();\n }", "public void dialogoAgregarUsuario() {\n vAgregarUsuario = new V_AgregarUsuario(new JFrame(), true);\n vAgregarUsuario.setVisible(true);\n }", "public void contarEfectosPorGrupo()\n\t{\n\t\ttry\n\t\t{\n\t\t\tString strEstado = JOptionPane.showInputDialog( this, \"Introduzca el grupo\" );\n\t\t\tJOptionPane.showMessageDialog(this,\t\"La cantidad de efectos encontrados del grupo \"+strEstado+\" es \"+mundo.contarEfectosPorGrupo(strEstado), \"Contar efectos por grupo\",JOptionPane.INFORMATION_MESSAGE);\n\t\t} \n\t\tcatch (Exception e) \n\t\t{\n\t\t\t// TODO Auto-generated catch block\n\t\t\tJOptionPane.showMessageDialog(this, e.getMessage(), \"Contar efectos por grupo\", JOptionPane.ERROR_MESSAGE);\n\t\t}\n\t\n\t}", "@Override\n\t\t\t\t\tpublic void onCancel(DialogInterface dialog) {\n\t\t\t\t\t}", "public VistaArticulosBajas() {\r\n\t\tsetTitle(\"Baja_Art\\u00EDculos\");\r\n\t\tsetDefaultCloseOperation(JFrame.DISPOSE_ON_CLOSE);\r\n\t\tsetBounds(100, 100, 367, 208);\r\n\t\tcontentPane = new JPanel();\r\n\t\tcontentPane.setBorder(new EmptyBorder(5, 5, 5, 5));\r\n\t\tsetContentPane(contentPane);\r\n\t\tcontentPane.setLayout(null);\r\n\r\n\t\t// Definir el Diálogo Confirmar Baja Artículo\r\n\t\tdlgConfBaja.setLayout(new FlowLayout());\r\n\t\tdlgConfBaja.add(lblConfBaja);\r\n\t\tdlgConfBaja.add(btnConfBajaSi);\r\n\t\tdlgConfBaja.add(btnConfBajaNo);\r\n\t\tdlgConfBaja.setSize(200, 150);\r\n\t\tdlgConfBaja.setLocationRelativeTo(null);\r\n\t\tdlgConfBaja.addWindowListener(this);\r\n\t\tbtnConfBajaSi.addActionListener(this);\r\n\t\tbtnConfBajaNo.addActionListener(this);\r\n\r\n\t\tJLabel lblNewLabel = new JLabel(\"Escoge un Art\\u00EDculo\");\r\n\t\tlblNewLabel.setFont(new Font(\"Tahoma\", Font.PLAIN, 16));\r\n\t\tlblNewLabel.setBounds(10, 23, 147, 23);\r\n\t\tcontentPane.add(lblNewLabel);\r\n\r\n\t\tchcArticuloBajas = new Choice();\r\n\t\tchcArticuloBajas.setBounds(10, 46, 169, 20);\r\n\t\tcontentPane.add(chcArticuloBajas);\r\n\t\t// Mostrar los artículos en el choice chcArticuloBajas conectando con la BD\r\n\t\tResultSet articulos = null;\r\n\t\tConnection conArticulo = null;\r\n\t\tconArticulo = modelo.conectar();\r\n\t\tarticulos = modelo.consultaArticulos(conArticulo);\r\n\t\ttry {\r\n\t\t\tString id;\r\n\t\t\tString descripcion;\r\n\t\t\twhile(articulos.next()) {\r\n\t\t\t\tid = articulos.getInt(\"idArticulos\")+\"\";\r\n\t\t\t\tdescripcion = articulos.getString(\"descripcionArticulo\");\r\n\t\t\t\tchcArticuloBajas.add(id+\" - \"+descripcion);\r\n\t\t\t}\r\n\t\t\tmodelo.desconectar(conArticulo);\r\n\t\t}catch(SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t\r\n\t\t// Botón Volver. Acción --> vuelve al Menú Principal\r\n\t\tJButton btnVolverBajas = new JButton(\"VOLVER\");\r\n\t\tbtnVolverBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdispose();\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnVolverBajas.setBounds(252, 46, 89, 23);\r\n\t\tcontentPane.add(btnVolverBajas);\r\n\r\n\t\t// Botón Eliminar. Acción --> abre el Diálogo Confirmar_Baja \r\n\t\tJButton btnEliminarBajas = new JButton(\"ELIMINAR\");\r\n\t\tbtnEliminarBajas.addActionListener(new ActionListener() {\r\n\t\t\tpublic void actionPerformed(ActionEvent e) {\r\n\t\t\t\tdlgConfBaja.setVisible(true);\r\n\t\t\t}\r\n\t\t});\r\n\t\tbtnEliminarBajas.setBounds(252, 126, 89, 23);\r\n\t\tcontentPane.add(btnEliminarBajas);\r\n\r\n\t}", "@Override\n public void onCancel(DialogInterface dialog) {\n }", "@Override\r\n\tpublic void dialogControyCancel() {\n\r\n\t}", "@Override protected void cadastroAction() {\n try {\n // JOptionPane.showMessageDialog(this, codigoTxtField.getText() +\n // descricaoTextArea.getText() + capacidadeTxtField.getText(),\n // \"teste\", JOptionPane.INFORMATION_MESSAGE, null);\n MaintainRoom.getInstance().insertRooms(codigoTxtField.getText(), descricaoTextArea.getText(), capacidadeTxtField.getText());\n\n JOptionPane.showMessageDialog(this, \"Sala Cadastrada com sucesso\", \"Sucesso\", JOptionPane.INFORMATION_MESSAGE, null);\n this.setVisible(false);\n\n } catch (PatrimonyException ex) {\n JOptionPane.showMessageDialog(this, ex.getMessage(), \"Erro\", JOptionPane.ERROR_MESSAGE, null);\n } catch (SQLException ex) {\n JOptionPane.showMessageDialog(this, ex.getSQLState() + \"\\n\" + ex.getMessage(), \"Erro\", JOptionPane.ERROR_MESSAGE, null);\n }\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n \n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "public PapegaaiDialoog(JFrame frame, boolean isModal) {\n super(frame, true);\n this.setLayout(new GridLayout(4, 2));\n setTitle(\"Voeg papegaai toe\");\n setSize(400, 120);\n //standaard invulling velden\n naamVogel = \"\";\n ringnummer = 0;\n kooinummer = 0;\n //buttons and fields\n Naam = new JLabel(\"Naam: \");\n this.add(Naam);\n RingNummer = new JLabel(\"Ringnummer: \");\n nV = new JTextField();\n this.add(nV);\n this.add(RingNummer);\n rnV = new JTextField();\n this.add(rnV);\n KooiNummer = new JLabel(\"Kooinummer (1 tot 10): \");\n this.add(KooiNummer);\n knV = new JTextField();\n this.add(knV);\n cancel = new JButton(\"Cancel\");\n this.add(cancel);\n cancel.addActionListener(this);\n ok = new JButton(\"OK\");\n this.add(ok);\n ok.addActionListener(this);\n\n }", "private void initDialog() {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "public void abrirDialogoEspecie() {\n ModalDialogoEspecie modalDialogoEspecie = new ModalDialogoEspecie();\n modalDialogoEspecie.show(getSupportFragmentManager(), \"especie dialog\");\n }", "@Override\n public void onClick(DialogInterface dialog,\n int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "public static void mostrarAfirmacionDeActualizacion(JDialog dialogo) {\n JOptionPane.showMessageDialog(dialogo, afirmacionDeActualizacion, \"BancoSoft: Mensaje\", JOptionPane.INFORMATION_MESSAGE);\n }", "private void mostrarDatosInterfaz() {\n\t\tif (this.opcion == CREAR) {\n\t\t\tthis.campoTextoNombreUsuario.setUserData(\"\");\n\t\t\tthis.campoTextoNombreUsuario.setDisable(false);\n\t\t\tthis.campoContrasena.setUserData(\"\");\n\t\t\tthis.campoContrasena.setDisable(false);\n\t\t\tthis.campoCorreo.setUserData(\"\");\n\t\t\tthis.campoCorreo.setDisable(false);\n\t\t\tthis.comboGrupoUsuario.getSelectionModel().select(\"\");\n\t\t\tthis.comboGrupoUsuario.setDisable(false);\n\t\t\tthis.comboStatus.getSelectionModel().select(\"\");\n\t\t\tthis.comboStatus.setDisable(false);\n\t\t\tthis.comboEmpleados.setDisable(false);\n\t\t} else if (this.opcion == EDITAR) {\n\t\t\tthis.campoTextoNombreUsuario.setText(this.usuario.getUsuario());\n\t\t\tthis.campoTextoNombreUsuario.setDisable(true);\n\t\t\tthis.campoContrasena.setText(this.usuario.getContrasena());\n\t\t\tthis.campoContrasena.setDisable(false);\n\t\t\tthis.campoCorreo.setText(this.usuario.getCorreoElectronico());\n\t\t\tthis.campoCorreo.setDisable(false);\n\t\t\tthis.comboGrupoUsuario.setValue(this.usuario.getNombreGrupoUsuario());\n\t\t\tthis.comboGrupoUsuario.setDisable(false);\n\t\t\tthis.comboStatus.setValue(this.usuario.getDescripcionStatus());\n\t\t\tthis.comboStatus.setDisable(false);\n\t\t\tthis.comboEmpleados.setValue(this.usuario.getNombreEmpleado());\n\t\t\tthis.comboEmpleados.setDisable(false);\n\t\t} else if (this.opcion == VER) {\n\t\t\tthis.campoTextoNombreUsuario.setText(this.usuario.getUsuario());\n\t\t\tthis.campoTextoNombreUsuario.setDisable(true);\n\t\t\tthis.campoContrasena.setText(this.usuario.getContrasena());\n\t\t\tthis.campoContrasena.setDisable(true);\n\t\t\tthis.campoCorreo.setText(this.usuario.getCorreoElectronico());\n\t\t\tthis.campoCorreo.setDisable(true);\n\t\t\tthis.comboGrupoUsuario.setValue(this.usuario.getNombreGrupoUsuario());\n\t\t\tthis.comboGrupoUsuario.setDisable(true);\n\t\t\tthis.comboStatus.setValue(this.usuario.getDescripcionStatus());\n\t\t\tthis.comboStatus.setDisable(true);\n\t\t\tthis.comboEmpleados.setValue(this.usuario.getNombreEmpleado());\n\t\t\tthis.comboEmpleados.setDisable(true);\n\t\t}//FIN IF ELSE\n\t}", "private Dialogs () {\r\n\t}", "@Override \n public void onClick(DialogInterface dialog, int which) {\n \n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n dialogComissaoMensal = new javax.swing.JDialog();\n jPanel2 = new javax.swing.JPanel();\n jLabel6 = new javax.swing.JLabel();\n comboFuncionario = new javax.swing.JComboBox<>();\n jLabel7 = new javax.swing.JLabel();\n btnImprimir = new javax.swing.JButton();\n comboMes = new javax.swing.JComboBox<>();\n comboAno = new javax.swing.JComboBox<>();\n jPanel1 = new javax.swing.JPanel();\n jButton2 = new javax.swing.JButton();\n\n dialogComissaoMensal.setTitle(\"Relatório de Comissão Mensal\");\n dialogComissaoMensal.setBackground(new java.awt.Color(255, 204, 255));\n dialogComissaoMensal.setModalityType(java.awt.Dialog.ModalityType.APPLICATION_MODAL);\n\n jPanel2.setBackground(new java.awt.Color(255, 204, 255));\n\n jLabel6.setBackground(new java.awt.Color(231, 32, 83));\n jLabel6.setFont(new java.awt.Font(\"Microsoft JhengHei UI\", 1, 18)); // NOI18N\n jLabel6.setForeground(new java.awt.Color(255, 255, 255));\n jLabel6.setText(\" Funcionário\");\n jLabel6.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n jLabel6.setOpaque(true);\n\n jLabel7.setBackground(new java.awt.Color(231, 32, 83));\n jLabel7.setFont(new java.awt.Font(\"Microsoft JhengHei UI\", 1, 18)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\" Mês/Ano\");\n jLabel7.setBorder(new javax.swing.border.LineBorder(new java.awt.Color(0, 0, 0), 1, true));\n jLabel7.setOpaque(true);\n\n btnImprimir.setFont(new java.awt.Font(\"Microsoft JhengHei UI\", 0, 18)); // NOI18N\n btnImprimir.setText(\"Gerar\");\n btnImprimir.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n btnImprimirActionPerformed(evt);\n }\n });\n\n comboMes.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"SELECIONE\", \"JANEIRO\", \"FEVEREIRO\", \"MARÇO\", \"ABRIL\", \"MAIO\", \"JUNHO\", \"JULHO\", \"AGOSTO\", \"SETEMBRO\", \"OUTUBRO\", \"NOVEMBRO\", \"DEZEMBRO\" }));\n\n comboAno.setModel(new javax.swing.DefaultComboBoxModel<>(new String[] { \"SELECIONE\", \"2018\", \"2019\", \"2020\" }));\n comboAno.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n comboAnoActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);\n jPanel2.setLayout(jPanel2Layout);\n jPanel2Layout.setHorizontalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel7, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, 185, Short.MAX_VALUE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(comboFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 500, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addComponent(comboMes, javax.swing.GroupLayout.PREFERRED_SIZE, 228, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(comboAno, javax.swing.GroupLayout.PREFERRED_SIZE, 144, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel2Layout.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(btnImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 158, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n jPanel2Layout.setVerticalGroup(\n jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel2Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(jLabel6, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(comboFuncionario, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(comboMes, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(comboAno, javax.swing.GroupLayout.PREFERRED_SIZE, 50, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 38, Short.MAX_VALUE)\n .addComponent(btnImprimir, javax.swing.GroupLayout.PREFERRED_SIZE, 62, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(52, 52, 52))\n );\n\n javax.swing.GroupLayout dialogComissaoMensalLayout = new javax.swing.GroupLayout(dialogComissaoMensal.getContentPane());\n dialogComissaoMensal.getContentPane().setLayout(dialogComissaoMensalLayout);\n dialogComissaoMensalLayout.setHorizontalGroup(\n dialogComissaoMensalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n dialogComissaoMensalLayout.setVerticalGroup(\n dialogComissaoMensalLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel2, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setDefaultCloseOperation(javax.swing.WindowConstants.DISPOSE_ON_CLOSE);\n setTitle(\"Relatórios\");\n setResizable(false);\n\n jPanel1.setBackground(new java.awt.Color(255, 204, 255));\n\n jButton2.setBackground(new java.awt.Color(231, 32, 83));\n jButton2.setFont(new java.awt.Font(\"Calibri\", 1, 20)); // NOI18N\n jButton2.setForeground(new java.awt.Color(255, 255, 255));\n jButton2.setText(\"<html><center>Relatório de<br>Comissão Mensal</center></html>\");\n jButton2.setHorizontalTextPosition(javax.swing.SwingConstants.CENTER);\n jButton2.setVerticalTextPosition(javax.swing.SwingConstants.BOTTOM);\n jButton2.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n jButton2ActionPerformed(evt);\n }\n });\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(563, Short.MAX_VALUE))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jButton2, javax.swing.GroupLayout.PREFERRED_SIZE, 150, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(333, Short.MAX_VALUE))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n setSize(new java.awt.Dimension(750, 555));\n setLocationRelativeTo(null);\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n\t\t\t public void onClick(DialogInterface arg0, int arg1) {\n\t\t\t \n\n\t\t\t\t\t\t\t\n\n\n\t\t\t \n\t\t\t }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n\n }", "public void estableceEquipoComputo() {\n\tsetDispositivo(JOptionPane.showInputDialog(\"Ingrese el nombre del dispositivo a adquirir\"));\n\tsetComercio(JOptionPane.showInputDialog(\"Ingrese el nombre del comercio donde lo comprara\"));\n}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n\n }", "public void sucessoCadastro(){\n JOptionPane.showMessageDialog(null, \"Cadastro realizado com sucesso!\", null, \n\t\t\t\tJOptionPane.INFORMATION_MESSAGE);\n\t\tjanela.dispose();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n }", "@Override\n public void onClick(DialogInterface dialog, int which)\n {\n\n }", "public void mensagemErroCadastro() {\n\t\tJOptionPane.showMessageDialog(null, \"Erro!\\nVerifique se todos os campos estão preenchidos.\"\n\t\t\t\t+ \"\\nVerifique se os dados em formato numérico são números.\"\n\t\t\t\t+ \"\\nVerifique se as datas foram inseridas corretamente.\" + \"\\nNão use vírgulas ','. Use pontos!\", null,\n\t\t\t\tJOptionPane.ERROR_MESSAGE);\n\t}", "public ReorganizeDialog() { }", "public void choixDeJeu () {\n\t\t//Affichage d'une fenetre qui permet de choisir entre un labyrinthe genere aleatoirement et un fichier txt\n\t\tString[] choixPossibles = {\"Generer un labyrinthe aleatoirement\", \"Ouvrir un labyrinthe en .txt\"};\n\t\tString choix = (String)JOptionPane.showInputDialog(null, \"Que voulez-vous faire ?\", \"Labyrinthe\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixPossibles, choixPossibles[0]);\n\t\t\n\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\tif (choix != null) {\n\t\t\t//Affichage d'une fenetre qui permet de choisir le theme du jeu\n\t\t\tString[] choixTheme = {\"Theme par defaut\", \"Theme d'ancien labyrinthe en pierre\", \"Theme de The legend of zelda\", \"Theme de Métroid\", \"Theme d'incendie dans un batiment\", \"Theme de Mario\"};\n\t\t\tString theme = (String)JOptionPane.showInputDialog(null, \"Quel theme voulez-vous ?\", \"Choix du theme\", JOptionPane.QUESTION_MESSAGE, new ImageIcon(getClass().getResource(\"/images/icone.gif\")), choixTheme, choixTheme[1]);\n\n\t\t\t//Si le bouton \"Annuler\" n'est pas presse\n\t\t\tif (theme != null) {\n\t\t\t\t\n\t\t\t\t//Enregistrement du theme et changement de la couleur de fond de la fenetre.\t\n\t\t\t\tswitch (theme) {\n\t\t\t\tcase \"Theme par defaut\" : \n\t\t\t\t\tthemeJeu = 0;\n\t\t\t\t\tgrille.setBackground(new Color(91, 60, 17));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de The legend of zelda\" : \n\t\t\t\t\tthemeJeu = 2; \n\t\t\t\t\tgrille.setBackground(Color.BLACK);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Métroid\" : \n\t\t\t\t\tthemeJeu = 3; \n\t\t\t\t\tgrille.setBackground(Color.white);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme d'incendie dans un batiment\" : \n\t\t\t\t\tthemeJeu = 4; \n\t\t\t\t\tgrille.setBackground(new Color(61, 43, 31));\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"Theme de Mario\" : \n\t\t\t\t\tthemeJeu = 5; \n\t\t\t\t\tgrille.setBackground(Color.cyan);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault :\n\t\t\t\t\tthemeJeu = 1;\n\t\t\t\t\tgrille.setBackground(new Color(69, 69, 69));\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\t//Si l'utilisateur a choisi d'ouvrir un fichier texte\n\t\t\t\tif (choix.equals(\"Ouvrir un labyrinthe en .txt\")) {\t\t\t\t\n\t\t\t\t\t//On ouvre un explorateur qui permet de ne selectionner que des fichiers .txt\n\t\t\t\t\tJFileChooser exploreur = new JFileChooser();\n\t\t\t\t\tFileNameExtensionFilter filter = new FileNameExtensionFilter(\".txt\", \"txt\");\n\t\t\t\t\texploreur.setFileFilter(filter);\n\t\t\t\t\texploreur.setAcceptAllFileFilterUsed(false);\n\t\t\t\t\tint valeurRetournee = exploreur.showOpenDialog(null);\n\n\t\t\t\t\t//Si le fichier est correct, on enregistre le nom de ce dernier, et on initie une partie.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.APPROVE_OPTION) {\n\t\t\t\t\t\tpartie.fichier = exploreur.getSelectedFile().getPath();\n\t\t\t\t\t\tpartie.largeur = 0;\n\t\t\t\t\t\tpartie.hauteur = 0;\n\t\t\t\t\t\tpartie.nbFilons = 0;\n\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t}\n\t\t\t\t\t//Sinon, on quitte le programme.\n\t\t\t\t\tif (valeurRetournee == JFileChooser.CANCEL_OPTION) {\n\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t//Si l'utilisateur a choisi de generer un labyrinthe aleatoirement\n\t\t\t\telse {\n\t\t\t\t\t//On cree une nouvelle fenetre\n\t\t\t\t\tJFrame fenetreDimensions = new JFrame();\n\n\t\t\t\t\t//On cree un premier panneau qui contient un texte et un slider afin de regler la hauteur du labyrinthe\n\t\t\t\t\tJPanel panneauHauteur = new JPanel();\n\t\t\t\t\tJLabel labelHauteur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderHauteur = new JSlider();\t\t\t\t\n\t\t\t\t\tsliderHauteur.setMaximum(21);\n\t\t\t\t\tsliderHauteur.setMinimum(6);\n\t\t\t\t\tsliderHauteur.setValue(13);\n\t\t\t\t\tsliderHauteur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\tlabelHauteur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauHauteur.setBorder(BorderFactory.createTitledBorder(\"Hauteur du labyrinthe\"));\n\t\t\t\t\tpanneauHauteur.add(labelHauteur);\n\t\t\t\t\tpanneauHauteur.add(sliderHauteur);\n\n\t\t\t\t\t//On cree un second panneau qui contient un texte et un slider afin de regler la largeur du labyrinthe\n\t\t\t\t\tJPanel panneauLargeur = new JPanel();\n\t\t\t\t\tJLabel labelLargeur = new JLabel(\"25 cases :\");\n\t\t\t\t\tJSlider sliderLargeur = new JSlider();\n\t\t\t\t\tsliderLargeur.setMaximum(38);\n\t\t\t\t\tsliderLargeur.setMinimum(6);\n\t\t\t\t\tsliderLargeur.setValue(13);\n\t\t\t\t\tsliderLargeur.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event){\n\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\tlabelLargeur.setText(2*((JSlider)event.getSource()).getValue()-1 + \" cases :\");\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tpanneauLargeur.setBorder(BorderFactory.createTitledBorder(\"Largeur du labyrinthe\"));\n\t\t\t\t\tpanneauLargeur.add(labelLargeur);\n\t\t\t\t\tpanneauLargeur.add(sliderLargeur);\n\n\t\t\t\t\t//On cree un bouton \"Continuer\"\n\t\t\t\t\tJButton boutonContinuer = new JButton(\"Continuer\");\n\t\t\t\t\tboutonContinuer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"continuer\"\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t//On efface la fenetre precedente et on en recree une\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tJFrame fenetreFilons = new JFrame();\n\n\t\t\t\t\t\t\t//On enregistre les valeurs des sliders precedents\n\t\t\t\t\t\t\tpartie.largeur = 2*sliderLargeur.getValue()-1;\n\t\t\t\t\t\t\tpartie.hauteur = 2*sliderHauteur.getValue()-1;\n\n\t\t\t\t\t\t\t//On cree un nouveau panneau qui contient un texte et un slider afin de regler le nombre de filons\n\t\t\t\t\t\t\tJPanel panneauFilons = new JPanel();\n\t\t\t\t\t\t\tJLabel labelFilons = new JLabel(1 + \" filon(s) :\");\n\t\t\t\t\t\t\tJSlider sliderFilons = new JSlider();\n\t\t\t\t\t\t\tsliderFilons.setMinimum(0);\n\t\t\t\t\t\t\tsliderFilons.setMaximum((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/4);\n\t\t\t\t\t\t\tsliderFilons.setValue(1);\n\t\t\t\t\t\t\tsliderFilons.setMajorTickSpacing((partie.largeur*partie.hauteur-partie.largeur-partie.hauteur+3)/8);\n\t\t\t\t\t\t\tsliderFilons.setPaintTicks(true);\n\t\t\t\t\t\t\tsliderFilons.setPaintLabels(true);\n\t\t\t\t\t\t\tsliderFilons.addChangeListener(new ChangeListener(){\n\t\t\t\t\t\t\t\tpublic void stateChanged(ChangeEvent event) {\n\t\t\t\t\t\t\t\t\t//Action liee au deplacement du slider\n\t\t\t\t\t\t\t\t\tlabelFilons.setText(((JSlider)event.getSource()).getValue() + \" filons :\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\t\t\t\t\t\t\tpanneauFilons.setBorder(BorderFactory.createTitledBorder(\"Nombre de filons\"));\t\n\t\t\t\t\t\t\tpanneauFilons.add(labelFilons);\n\t\t\t\t\t\t\tpanneauFilons.add(sliderFilons);\t\n\n\t\t\t\t\t\t\t//On cree un bouton \"Jouer\"\n\t\t\t\t\t\t\tJButton boutonJouer = new JButton(\"Jouer\");\n\t\t\t\t\t\t\tboutonJouer.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.nbFilons = sliderFilons.getValue();\n\t\t\t\t\t\t\t\t\tinitialisation();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\t\t\tJButton annulerFilons = new JButton(\"Annuler\");\n\t\t\t\t\t\t\tannulerFilons.addActionListener(new ActionListener() {\n\t\t\t\t\t\t\t\t//Action liee a l'appui sur le bouton \"jouer\"\n\t\t\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\t\t\tfenetreFilons.dispose();\n\t\t\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t});\n\n\t\t\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\t\t\tJPanel boutonsFilons = new JPanel();\n\t\t\t\t\t\t\tboutonsFilons.add(boutonJouer);\n\t\t\t\t\t\t\tboutonsFilons.add(annulerFilons);\t\n\n\t\t\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\t\t\tfenetreFilons.setSize(320, 140);\n\t\t\t\t\t\t\tfenetreFilons.setTitle(\"Choix du nombre de filons\");\n\t\t\t\t\t\t\tfenetreFilons.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\t\t\tfenetreFilons.setLocationRelativeTo(null);\n\t\t\t\t\t\t\tfenetreFilons.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(panneauFilons, BorderLayout.CENTER);\n\t\t\t\t\t\t\tfenetreFilons.getContentPane().add(boutonsFilons, BorderLayout.SOUTH);\n\t\t\t\t\t\t\tfenetreFilons.setVisible(true);\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un bouton \"Annuler\"\n\t\t\t\t\tJButton annulerDimension = new JButton(\"Annuler\");\n\t\t\t\t\tannulerDimension.addActionListener(new ActionListener() {\n\t\t\t\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\t\t\t\tpublic void actionPerformed(ActionEvent arg0) {\n\t\t\t\t\t\t\tfenetreDimensions.dispose();\n\t\t\t\t\t\t\tpartie.quitter();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\n\t\t\t\t\t//On cree un panneau recueillant deux bontons\n\t\t\t\t\tJPanel boutonsDimensions = new JPanel();\n\t\t\t\t\tboutonsDimensions.add(boutonContinuer);\n\t\t\t\t\tboutonsDimensions.add(annulerDimension);\t\n\n\t\t\t\t\t//On parametre la fenetre et agence les differents panneaux, puis on l'affiche\n\t\t\t\t\tfenetreDimensions.setSize(575, 120);\n\t\t\t\t\tfenetreDimensions.setTitle(\"Choix des dimensions du labyrinthe\");\n\t\t\t\t\tfenetreDimensions.setIconImage(new ImageIcon(getClass().getResource(\"/images/icone.gif\")).getImage());\n\t\t\t\t\tfenetreDimensions.setLocationRelativeTo(null);\n\t\t\t\t\tfenetreDimensions.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauHauteur, BorderLayout.EAST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(panneauLargeur, BorderLayout.WEST);\n\t\t\t\t\tfenetreDimensions.getContentPane().add(boutonsDimensions, BorderLayout.SOUTH);\n\t\t\t\t\tfenetreDimensions.setVisible(true);\n\t\t\t\t}\n\t\t\t}\n\t\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\t\telse {\n\t\t\t\tpartie.quitter();\n\t\t\t}\n\t\t}\n\t\t//Un appui sur le bouton \"annuler\" quitte le jeu\n\t\telse {\n\t\t\tpartie.quitter();\n\t\t}\n\t}", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n }" ]
[ "0.7328863", "0.684938", "0.67937213", "0.6755469", "0.6753344", "0.67488205", "0.6746999", "0.67104995", "0.67090625", "0.6646902", "0.66297644", "0.6626228", "0.658745", "0.65804946", "0.65513617", "0.6541847", "0.65029895", "0.64946693", "0.6491376", "0.64857537", "0.64332306", "0.6428654", "0.6427371", "0.6388421", "0.6376256", "0.63754314", "0.6373332", "0.6357257", "0.6350272", "0.6335865", "0.63093126", "0.6295384", "0.6276195", "0.62758726", "0.62751645", "0.62741786", "0.62677747", "0.6261441", "0.6257129", "0.62544936", "0.62512016", "0.62484264", "0.62475204", "0.6246879", "0.6245965", "0.62439907", "0.62399215", "0.62312543", "0.6231245", "0.6231245", "0.6230903", "0.6228538", "0.6228538", "0.62267554", "0.62267554", "0.62267554", "0.62204224", "0.6210276", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.6209849", "0.620886", "0.62058777", "0.6195026", "0.6195026", "0.6195026", "0.6195026", "0.6195026", "0.619447", "0.619394", "0.6193637", "0.61934185", "0.6193413", "0.6192108", "0.6187625", "0.6187625", "0.61746377", "0.6169561", "0.6169561", "0.6169085", "0.6167034", "0.6167034", "0.61650294", "0.6163386", "0.6163386", "0.6163386", "0.6158323", "0.6155227", "0.615337", "0.6151076", "0.615025", "0.615025", "0.615025" ]
0.0
-1
You can feel free modify this constructor. It must take at least the name and order but may take other parameters if you would find adding them useful.
public Customer(String name, List<Food> order, int priority) { this.name = name; this.order = order; this.priority = priority; this.orderNum = runningCounter++; // orderReadylatch = new CountDownLatch(order.size() + 1); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private SortOrder(String strName) { m_strName = strName; }", "public Order(Name alias) {\n this(alias, ORDER);\n }", "private SortCaseOrder(String strName) { m_strName = strName; }", "public ApplyOrder() {\n super();\n }", "public Order(String name, double order_discount, String desc, Product... products) {\n\n this.order_no = this.generateOrderNumber();\n this.order_name = name;\n this.order_discount = order_discount;\n this.order_desc = desc;\n this.orderProducts = Stream.of(products).collect(Collectors.toSet());\n // TODO: check lambda\n this.orderProducts.forEach(x -> x.setOrderProduct(this));\n this.totalOrderPrice = countTotalOrderPrice(this);\n this.totalOrderPriceDiscount = countTotalOrderPriceDiscount(this);\n }", "void newOrder();", "public Order() {\n this(DSL.name(\"order\"), null);\n }", "private ARXOrderedString(){\r\n this(\"Default\");\r\n }", "private Order(String value){\r\n\t\t\tthis.value = value;\r\n\t\t}", "public SortObj(String field, int order) {\n super();\n this.field = field;\n this.order = order;\n }", "public Order() {\n\t}", "public FileOrder(String orderString) throws OrderException {\n\n\t\t//check reverse\n\t\tif (orderString.endsWith(DELIMITER + REVERSE_STRING)) {\n\t\t\t_reverse = true;\n\t\t\torderString = orderString.substring(0, orderString.length()\n\t\t\t\t\t- (REVERSE_STRING.length() + 1));\n\t\t}\n\t\tint index = orderString.indexOf(DELIMITER);\n\t\tString orderName = \"\";\n\t\tif (index < 0) {\n\t\t\torderName = orderString;\n\t\t} else {\n\t\t\torderName = orderString.substring(0, index - 1);\n\t\t}\n\t\t_orderName = orderName;\n\n\t\tswitch (orderName) {\n\t\tcase \"abs\":\n\t\t\t_order = new AsbOrder();\n\t\t\tbreak;\n\t\tcase \"type\":\n\t\t\t_order = new TypeOrder();\n\t\t\tbreak;\n\t\tcase \"size\":\n\t\t\t_order = new SizeOrder();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tthrow new UnknownOrderException(BAD_NAME_MESSGE);\n\t\t}\n\t}", "public SortListByNamesTest(ArrayList<String> expectedOrderOfNames, ArrayList<String> inputOrderOfNames) {\n\t\tsuper();\n\t\tthis.expectedOrderOfNames = expectedOrderOfNames;\n\t\tthis.inputOrderOfNames = inputOrderOfNames;\n\n\t}", "public BTree(int order) {\n throw new UnsupportedOperationException(\"implement me!\");\n }", "public OrderType(Integer id, String name) {\n\t\tsuper();\n\t\tthis.id = id;\n\t\tthis.name = name;\n\t}", "public OrderedSet (String setName) {\n initialize();\n name = setName;\n }", "public void setOrder(String Order) {\n this.Order = Order;\n }", "public DownloadSmtOrder() {\n\t\tsuper();\n\t}", "public Order(String orderNumber, String productName, float price, int quantity) {\n\t\tthis.orderNumber = orderNumber;\n\t\tthis.productName = productName;\n\t\tthis.price = price;\n\t\tthis.quantity = quantity;\n\t}", "public Order() {\n\t\tsuper();\n\t\titems = new HashMap<>();\n\t}", "void create(Order order);", "void setOrder(int order){\r\n\t\t\tthis.order = order;\r\n\t\t}", "public Order() {\n }", "public void setOrder(int order) {\n this.order = order;\n }", "public void setOrder(int order) {\n this.order = order;\n }", "protected Order(String custFName, String custLName, String custEmail, int orderID,\n Timestamp creationDate, double totalDue, String status, String salesFName,\n String salesLName,\n String salesEmail) {\n this.custFName = custFName;\n this.custLName = custLName;\n this.custEmail = custEmail;\n this.orderID = orderID;\n this.creationDate = creationDate;\n this.totalDue = totalDue;\n this.status = status;\n this.salesFName = salesFName;\n this.salesLName = salesLName;\n this.salesEmail = salesEmail;\n products = new ArrayList<>();\n }", "public SortOrdering() {\n\t\tthis( new String[0] );\n\t}", "public void setOrder(int order) {\n mOrder = order;\n }", "@Override\n\tpublic void orderCook(String name) {\n\t\t\n\t}", "void setOrder(Order order);", "static void addOrder(orders orders) {\n }", "public UserOrder() {\n }", "public Sort(String name, String ascName, String descName) {\r\n this._name = name;\r\n this._ascName = ascName;\r\n this._descName = descName;\r\n }", "public void setOrder(int order) {\n\t\tthis.order = order;\n\t}", "public OrderExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "public Order(int id, String orderNumber, String productName, float price, int quantity) {\n\t\tthis.id = id;\n\t\tthis.orderNumber = orderNumber;\n\t\tthis.productName = productName;\n\t\tthis.price = price;\n\t\tthis.quantity = quantity;\n\t}", "public ColorClass(String name, boolean ordered) {\n this (name, new Interval(2) , ordered);\n }", "public Order(String alias) {\n this(DSL.name(alias), ORDER);\n }", "public GroceryItemOrder(String name, int quantity, double pricePerUnit) {\n this.name = name;\n this.quantity = quantity;\n this.ppu = pricePerUnit;\n }", "public MarkovWord(int myOrder){\n this.myOrder = myOrder; \n }", "public void setOrder(List<Order> order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public Order(int orderID, int userID, String orderDate, String orderTitle) {\n this.order_id = orderID;\n this.user_id = userID;\n this.order_date = orderDate;\n this.order_title = orderTitle;\n }", "private ARXOrderedString(List<String> format){\r\n if (format.size()==0) {\r\n this.order = null;\r\n } else {\r\n this.order = new HashMap<String, Integer>(); \r\n for (int i=0; i< format.size(); i++){\r\n if (this.order.put(format.get(i), i) != null) {\r\n throw new IllegalArgumentException(\"Duplicate value '\"+format.get(i)+\"'\");\r\n }\r\n }\r\n }\r\n }", "private ARXOrderedString(String[] format){\r\n if (format.length == 0) {\r\n this.order = null;\r\n } else {\r\n this.order = new HashMap<String, Integer>(); \r\n for (int i=0; i< format.length; i++){\r\n if (this.order.put(format[i], i) != null) {\r\n throw new IllegalArgumentException(\"Duplicate value '\"+format[i]+\"'\");\r\n }\r\n }\r\n }\r\n }", "private SortDataType(String strName) { m_strName = strName; }", "public BorderedStrategy() {\n\t\tsuper();\n\t}", "public void setOrder(Order order){\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public void setOrder(Integer order) {\n this.order = order;\n }", "public static void main(String[] str) {\n\t\tList<Order> orderListByName = getOrderList();\n\t\tCollections.sort(orderListByName, (o1, o2)-> o1.getOrderName().compareTo(o2.getOrderName()) );\n\t\n\t\t// sort order by order name\n\t\tList<Order> orderListByOrderBill = getOrderList();\n\t\tCollections.sort(orderListByOrderBill, (o1, o2)-> o1.getOrderBillAmount().compareTo(o2.getOrderBillAmount()));\n\t\t}", "public DoctorsOrders(String prescriptions, String labWork, String followUpInstr, String otherInstr){\r\n\t\tthis.prescriptions = prescriptions;\r\n\t\tthis.labWork = labWork;\r\n\t\tthis.followUpInstr = followUpInstr;\r\n\t\tthis.otherInstr = otherInstr;\r\n\t}", "public OrderHeadExample() {\n oredCriteria = new ArrayList<Criteria>();\n }", "Group(String name) {\n this(name, new ArrayList<>());\n }", "public MyList(String name) {\n nameList = name;\n }", "public void init(String... names) throws IOException;", "public NamedEntity(String name) { this(name, \"\"); }", "public Parser(String filter, String order, int filterLine, int orderLine) {\n this.filter = filter;\n this.order = order;\n this.filterLine = filterLine;\n this.orderLine = orderLine;\n }", "public Chain(String name)\n\t{\n\t\tthis.name = name; \n\t\tcars = new HashSet<RollingStock>(); \n\t}", "public Order(String pRecipientName, int pFinalPrice, Timestamp pPickupTime, Pizza[] PizzaArray) {\n this.recipientName = pRecipientName;\n this.finalPrice = pFinalPrice;\n this.pickupTime = pPickupTime;\n this.pizzaArray = PizzaArray;\n }", "@Override\n\tpublic void placeOrder() {\n\t\t\n\t}", "protected abstract Order createOrder(Cuisine cuisine);", "public Playlist(String playListName){\n\tgenresList = new Genre[6];\n\tsongList = new Song[30];\n\tthis.playListName = playListName;\n\t}", "public OrderItem() {}", "public ServiceOrderRecord() {\n super(ServiceOrder.SERVICE_ORDER);\n }", "public Order(Integer orderNum, String bartenderName, String customerName, Date date, ArrayList<String> drinkList, ArrayList<Integer>quantities, InventoryDB idb)\n {\n df = new DrinkFactory();\n inventoryDB = idb;\n this.orderNum = orderNum;\n this.bartenderName = bartenderName;\n this.customerName = customerName;\n this.date = date;\n drinksAndQuantities = new ArrayList();\n pourDrinks(drinkList, quantities);\n totalPrice = getTotalPrice();\n paid = false;\n }", "public Order(Integer orderNum, String bartenderName, String customerName, Date date, boolean paid, String payType, ArrayList<String> drinkList, ArrayList<Integer>quantities, InventoryDB idb)\n {\n df = new DrinkFactory();\n inventoryDB = idb;\n this.orderNum = orderNum;\n this.bartenderName = bartenderName;\n this.customerName = customerName;\n this.date = date;\n drinksAndQuantities = new ArrayList();\n pourDrinks(drinkList, quantities);\n totalPrice = getTotalPrice();\n this.paid = paid;\n paymentType = payType;\n }", "public OrderList(String fileName, CustomerArrayHolder customerArrayHolder) throws FileNotFoundException\n\t{\n\t\t//decides the arrays to be used for customer data for these orders NOTE: the preferredArray may contain null if it hasn't been created yet\n\t\tthis.customerArrayHolder = customerArrayHolder;\n\t\t\n\t\t//creates a scanner to traverse the file\n\t\tScanner scanner = new Scanner(new File(fileName));\n\t\t\n\t\t//Scans through entire file, appending good orders to the order list.\n\t\tboolean endOfFile = !scanner.hasNextLine();\n\t\t\n\t\twhile(!endOfFile) //scans until the file ends\n\t\t{\n\t\t\t//creates an list of strings to hold each line of the order\n\t\t\tLinkedList<String> orderLines = new LinkedList<String>();\n\t\t\t\n\t\t\t//We are at the start of an order\n\t\t\tboolean endOfOrder = false;\n\t\t\t\n\t\t\twhile(!endOfOrder && !endOfFile) //scans until the order ends or file ends\n\t\t\t{\n\t\t\t\t//file hasn't ended so grab the next line\n\t\t\t\tString currentLine = scanner.nextLine();\n\t\t\t\t\n\t\t\t\t//if the line is blank then the order is over\n\t\t\t\tif(0 == currentLine.length())\n\t\t\t\t{\n\t\t\t\t\tendOfOrder = true; //inner loop will end\n\t\t\t\t}\n\t\t\t\telse \n\t\t\t\t{\n\t\t\t\t\t//order isn't over, so add the current line to orderLines\n\t\t\t\t\torderLines.add(currentLine);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t//checks to see if the file has ended or the order is over, in which case both loops should end\n\t\t\t\tendOfFile = !scanner.hasNextLine();\n\t\t\t}\n\t\t\t\n\t\t\t//validates the current order (orderLines) to see if each line is as expected.\n\t\t\tboolean isValid = validatePotentialOrder(orderLines);\n\t\t\t\n\t\t\tif(isValid) \n\t\t\t{\n\t\t\t\t//converts each of the fields stored as a string into the proper type to pass as parameters\n\t\t\t\tString guestID = orderLines.get(GUEST_ID_LINE_INDEX);\n\t\t\t\tchar size = Character.toUpperCase(orderLines.get(SIZE_LINE_INDEX).charAt(0)); // makes sure the char is passed as the uppercase version, if the program is not supposed to accept lowercase letters for the size, then remove the .toUpperCase conversion and edit isSizeValid()\n\t\t\t\tString drinkType = orderLines.get(DRINK_TYPE_LINE_INDEX);\n//\t\t\t\tfloat squareInchPrice = Float.parseFloat(orderLines.get(SQUARE_INCH_PRICE_LINE_INDEX));\n\t\t\t\tint quantity = Integer.parseInt(orderLines.get(QUANTITY_LINE_INDEX));\n\t\t\t\t\n\t\t\t\t//creates an order and appends it to the order list\n\t\t\t\torderList.add(new Order(guestID, size, drinkType, /*squareInchPrice,*/ quantity));\n\t\t\t}\n\t\t}\n\t\t//file should have been processed\n\t\tscanner.close();\n\t}", "public void setOrder(Integer order) {\n\t\tthis.order = order;\n\t}", "private ARXOrderedString(String format){\r\n if (format==null || format.equals(\"Default\") || format.equals(\"\")) {\r\n this.order = null;\r\n } else {\r\n try {\r\n this.order = new HashMap<String, Integer>(); \r\n BufferedReader reader = new BufferedReader(new StringReader(format));\r\n int index = 0;\r\n String line = reader.readLine();\r\n while (line != null) {\r\n if (this.order.put(line, index) != null) {\r\n throw new IllegalArgumentException(\"Duplicate value '\"+line+\"'\");\r\n }\r\n line = reader.readLine();\r\n index++;\r\n }\r\n reader.close();\r\n } catch (IOException e) {\r\n throw new IllegalArgumentException(\"Error reading input data\");\r\n }\r\n }\r\n }", "public Arrangement() {\n\t}", "public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }", "protected ContainerChunk(String type, String name) {\r\n this(type, name, new ArrayList());\r\n }", "private void constructOrder(CriteriaBuilderImpl cb, CriteriaQueryImpl<?> q, Tree orderBy) {\n \t\tfinal List<Order> orders = Lists.newArrayList();\n \n \t\tfor (int i = 0; i < orderBy.getChildCount(); i++) {\n \t\t\tfinal Tree orderByItem = orderBy.getChild(i);\n \t\t\tfinal Order order = orderByItem.getChildCount() == 2 ? //\n \t\t\t\tcb.desc(this.getExpression(cb, q, orderByItem.getChild(0), null)) : //\n \t\t\t\tcb.asc(this.getExpression(cb, q, orderByItem.getChild(0), null));\n \n \t\t\torders.add(order);\n \t\t}\n \n \t\tq.orderBy(orders);\n \t}", "public Order()\r\n\t{\r\n\t\tnew BigDecimal(\"0.0\");\r\n\t\tsubtotal = new BigDecimal(\"0.0\");\r\n\t\tarraySize = 5;\r\n\t\torderSize = 0;\r\n\t\torder = new Drink[arraySize];\r\n\t\tSystem.out.println(\"New Order started!\");\r\n\t}", "public List(String name)\n\t{\n\t\tthis(name, null);\n\t}", "protected OptionSet(String name) {\n\t\tthis.name = name;\n\t\toptions = new ArrayList<Option>();\n\t}", "public SortOrdering( final String key ) {\n\t\tthis( new String[] {key} );\n\t}", "public Armor(String _name){\n super();\n // sets owner = _owner\n // sets posX = _posX\n // sets posY = _posY\n // sets itemIntValue = _itemIntValue\n name = _name; \n }", "public static Comparator<File> createComparator(String order) {\n switch (order) {\n case SIZE:\n return new SizeOrder();\n case TYPE:\n return new TypeOrder();\n case ABS:\n return new AbsOrder();\n }\n return new AbsOrder();\n }", "protected WoodItem(Block block, WoodBlock log, String[] names) { super(block, log, names); }", "public void setOrder(final Integer order) {\n this.order = order;\n }", "private Order(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "private final void createAndAddNode(String name) {\n\t}", "public Item(String input) {\n name = input;\n }", "public Order(int ordID, int custID)\r\n\t{\r\n\t\tcustomerID = custID;\r\n\t\torderItemList = new ArrayList();\r\n\t\torderID = ordID;\r\n\t\torderTotal = 0;\r\n\t}", "public Soda(String _name, double _price, int _quantity){\n this.name = _name;\n this.price = _price;\n this.quantity = _quantity;\n }", "public NamedEntity() { this(\"\", \"\"); }", "public SortByNameCommand(ItemList itemList){\n this.itemList = itemList;\n }", "public void startOrder() {\r\n this.o= new Order();\r\n }", "public Order() {\n\t\tsuper();\n\t\tcurrentOrder += 1;\n\t\torderNumber = currentOrder;\n\t\tthis.orderPrice.setScale(2, BigDecimal.ROUND_HALF_EVEN);\n\t}", "public Recipe(String name, ArrayList<Product> productList, ArrayList<String> steps, int timeNeeded){\n this.name = name;\n this.productList = productList;\n this.steps = steps;\n this.timeNeeded = timeNeeded;\n }", "public Parrot(String name) {\r\n\t\tsuper(name);\r\n\t}", "public GeneralNames(\n GeneralName name)\n {\n this.names = new GeneralName[] { name };\n }", "public Element(String name) {\n\t\tsetName(name);\n\t}", "public OrderLine() {\n }", "void add(Order o);", "public OrderAdapter() {\n super(new ArrayList<MultiItemEntity>());\n addItemType(TYPE_HEAD, R.layout.item_order_head);\n addItemType(TYPE_CONTENT, R.layout.item_order_content);\n addItemType(TYPE_FOOTER, R.layout.item_order_foot);\n }", "public Tag(String name, List<String> args, int length)\n\t{\n\t\tmName = name;\n\t\tmArgs = (args == null) ? null : Collections.unmodifiableList(args);\n\t\tmLength = length;\n\t}", "public Bond(IAtom[] atoms, Order order) {\n this.atoms = new IAtom[atoms.length];\n System.arraycopy(atoms, 0, this.atoms, 0, atoms.length);\n atomCount = this.atoms.length;\n this.order = order;\n }" ]
[ "0.71388227", "0.6456436", "0.64127827", "0.6410839", "0.6276952", "0.6270043", "0.62630606", "0.6212234", "0.62040174", "0.6183983", "0.6181237", "0.61649674", "0.6162863", "0.6104936", "0.6094419", "0.608701", "0.6083915", "0.6066725", "0.60572463", "0.6036784", "0.60285574", "0.6008333", "0.60033613", "0.59488016", "0.59488016", "0.5891078", "0.5882308", "0.584052", "0.5822797", "0.58140475", "0.57944155", "0.5774865", "0.57693124", "0.5766213", "0.57629377", "0.57315266", "0.57206017", "0.57192206", "0.5716379", "0.567413", "0.56584644", "0.5656214", "0.56526595", "0.5644499", "0.56319475", "0.5599982", "0.5595606", "0.5592718", "0.5591628", "0.5591628", "0.5584749", "0.55822164", "0.55609715", "0.5558029", "0.55438054", "0.5542602", "0.5541486", "0.5535611", "0.5513996", "0.5508776", "0.5507089", "0.550561", "0.54980344", "0.5497322", "0.54857147", "0.5478886", "0.5475099", "0.5471271", "0.5462567", "0.54625255", "0.54588383", "0.5451678", "0.542541", "0.5423828", "0.5417223", "0.54161537", "0.54152185", "0.54137677", "0.5409622", "0.54040134", "0.5402522", "0.53937703", "0.5384592", "0.53819", "0.5374914", "0.53702307", "0.53664404", "0.53648925", "0.53564924", "0.535393", "0.53466594", "0.53445613", "0.5340288", "0.53390056", "0.53374875", "0.5335308", "0.5332674", "0.5329764", "0.5328885", "0.5316797" ]
0.63494116
4
This method defines what an Customer does: The customer attempts to enter the coffee shop (only successful when the coffee shop has a free table), place its order, and then leave the coffee shop when the order is complete.
public void run() { //YOUR CODE GOES HERE... //****Before entering coffeeshoop Simulation.logEvent(SimulationEvent.customerStarting(this)); try { Simulation.customersEntered.put(this); } catch (InterruptedException e) { // TODO Auto-generated catch block System.out.println("Customer thread interrupted while waiting for free table"); } //*****After entering the coffee shop Simulation.logEvent(SimulationEvent.customerEnteredCoffeeShop(this)); //Place the Order Simulation.logEvent(SimulationEvent.customerPlacedOrder(this, this.order, this.orderNum)); try { Simulation.customerOrderQueue.put(this); } catch (InterruptedException e1) { System.out.println("Customer thread interrupted while placing the order"); } //******After placing order //Check whether order is complete. // try{ // this.orderReadylatch.await(); // //****After receiving order // Simulation.logEvent(SimulationEvent.customerReceivedOrder(this, this.order, this.orderNum)); // }catch (InterruptedException e) { // System.out.println("Customer thread interrupted while waiting for order completion"); // } synchronized(Simulation.completedOrder){ Simulation.completedOrder.put(this, false); } synchronized(Simulation.completedOrder){ while(!(Simulation.completedOrder.get(this))){ try { Simulation.completedOrder.wait(); } catch (InterruptedException e) { // TODO Auto-generated catch block e.printStackTrace(); } } Simulation.logEvent(SimulationEvent.customerReceivedOrder(this, this.order, this.orderNum)); Simulation.completedOrder.notifyAll(); } //*****Just before about to leave the coffeshop. Simulation.logEvent(SimulationEvent.customerLeavingCoffeeShop(this)); Simulation.customersEntered.remove(this); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void giveFoodToCustomer(MyCustomer customer) {\n\tDo(\"Giving finished order of \" + customer.choice +\" to \" + customer.cmr);\n\tPosition inFrontOfGrill = new Position(customer.food.getX()-1,customer.food.getY());\n\tguiMoveFromCurrentPostionTo(inFrontOfGrill);//in front of grill\n\twaiter.pickUpFood(customer.food);\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\twaiter.serveFood(tables[customer.tableNum]);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgHereIsYourFood(customer.choice);\n\tstateChanged();\n }", "private void takeOrder(MyCustomer customer) {\n\tDo(\"Taking \" + customer.cmr +\"'s order.\");\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgWhatWouldYouLike();\n\tstateChanged();\n }", "public void run() {\n\n\t\tSimulation.logEvent(SimulationEvent.customerStarting(this));\n\t\ttry {\n\t\t\t/*\n\t\t\t * Customer attempts to enter the coffee shop here The Semaphore\n\t\t\t * blocks them when it reaches 0.\n\t\t\t */\n\t\t\ttableSpace.acquire();\n\t\t\t/*i do not use reentrantlocks between classes anymore because i need \n\t\t\t * some way for unique synchronization. \n\t\t\t * */\n\t\t\t\n\t\t\t\n\t\t\t/* The simulation logs the event once they have entered in */\n\t\t\tSimulation\n\t\t\t\t\t.logEvent(SimulationEvent.customerEnteredCoffeeShop(this));\n\t\t\t\n\t\t\t\n\t\t\tsynchronized (orders) {\n\t\t\t\torders.add(new FoodOrder(this.orderNum, this.order, this));\n\t\t\t\tSimulation.logEvent(SimulationEvent.customerPlacedOrder(this,\n\t\t\t\t\t\tthis.order, this.orderNum));\n\t\t\t\torders.notifyAll();\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t\t/*This customer is notified that cook has completed the \n\t\t\t * order. It breaks out when the cook has finally placed \n\t\t\t * This notification is unique however.\n\t\t\t * */\n\t\t\twhile(Simulation.custMap.get(this) == false){\n\t\t\t\tThread.sleep(15);\n\t\t\t}\n\t\t\t\t\n\t\t\tSimulation.logEvent(SimulationEvent.customerReceivedOrder(this,\n\t\t\t\t\tthis.order, this.orderNum));\n\t\t\t\n\t\t\tSimulation\n\t\t\t\t\t.logEvent(SimulationEvent.customerLeavingCoffeeShop(this));\n\t\t\ttableSpace.release();\n\n\t\t} catch (InterruptedException e) {\n\n\t\t}\n\t}", "private void giveOrderToCook(MyCustomer customer) {\n\tDo(\"Giving \" + customer.cmr + \"'s choice of \" + customer.choice + \" to cook\");\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcook.msgHereIsAnOrder(this, customer.tableNum, customer.choice);\n\tstateChanged();\n }", "static void addCustomerOrder() {\n\n Customer newCustomer = new Customer(); // create new customer\n\n Product orderedProduct; // initialise ordered product variable\n\n int quantity; // set quantity to zero\n\n String name = Validate.readString(ASK_CST_NAME); // Asks for name of the customer\n\n newCustomer.setName(name); // stores name of the customer\n\n String address = Validate.readString(ASK_CST_ADDRESS); // Asks for address of the customer\n\n newCustomer.setAddress(address); // stores address of the customer\n\n customerList.add(newCustomer); // add new customer to the customerList\n\n int orderProductID = -2; // initialize orderProductID\n\n while (orderProductID != -1) { // keep looping until user enters -1\n\n orderProductID = Validate.readInt(ASK_ORDER_PRODUCTID); // ask for product ID of product to be ordered\n\n if(orderProductID != -1) { // keep looping until user enters -1\n\n quantity = Validate.readInt(ASK_ORDER_QUANTITY); // ask for the quantity of the order\n\n orderedProduct = ProductDB.returnProduct(orderProductID); // Search product DB for product by product ID number, return and store as orderedProduct\n\n Order newOrder = new Order(); // create new order for customer\n\n newOrder.addOrder(orderedProduct, quantity); // add the new order details and quantity to the new order\n\n newCustomer.addOrder(newOrder); // add new order to customer\n\n System.out.println(\"You ordered \" + orderedProduct.getName() + \", and the quantity ordered is \" + quantity); // print order\n }\n }\n }", "public void purchase() {\r\n\t\tdo {\r\n\t\t\tString id = getToken(\"Enter customer id: \");\r\n\t\t\tString brand = getToken(\"Enter washer brand: \");\r\n\t\t\tString model = getToken(\"Enter washer model: \");\r\n\t\t\tint quantity = getInteger(\"Enter quantity to purchase: \");\r\n\t\t\tboolean purchased = store.purchaseWasher(id, brand, model, quantity);\r\n\t\t\tif (purchased) {\r\n\t\t\t\tSystem.out.println(\"Purchased \" + quantity + \" of \" + brand + \" \" + model + \" for customer \" + id);\r\n\t\t\t} else {\r\n\t\t\t\tSystem.out.println(\"Purchase unsuccessful.\");\r\n\t\t\t}\r\n\t\t} while (yesOrNo(\"Make another Purchase?\"));\r\n\t}", "public void runThroughCustomers(ArrayList<Customer> customers){\n\t\tint cSize = customers.size();\n\t\tint i;\n\t\tOrder tempOrder;\n\t\tCustomer tempCustomer;\n\t\tfor(i = 0; i < cSize; i++){\n\t\t\tif(checkStock()){\n\t\t\t\ttempCustomer = customers.get(i);\n\t\t\t\t//printInventory();\n\t\t\t\ttempOrder = tempCustomer.placeOrder(inventory);\n\t\t\t\t//System.out.println(\"Day order: \" + i);\n\t\t\t\t//tempOrder.printOrder();\n\t\t\t\thandleOrder(tempOrder);\n\t\t\t\t\n\t\t\t}else{\n\t\t\t\t//System.out.println();\n\t\t\t\tnoInventoryClosure = true;\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t}", "public final void cook(){\n\t\t\n\t\tprepare();\n\t\t\n\t\tif(customerWantsMeat()){\t\t\n\t\t\taddMeat();\t\t\n\t\t}\n\t\t\n\t\tif(customerWantsVegetables()){\t\n\t\t\taddVegetables();\t\t\t\n\t\t}\n\t\n\t\tsaveToPlate();\n\t\t\n\t}", "public static void enterCustomer(Employee employee) {\n\t\tCustomer.setCustomerQuantity();\n\t\tString name;\n\t\tdo {\n\t\t\tname= JOptionPane.showInputDialog(\"Please enter a name of the customer.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setName(name)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setName(name));\n\t\t\n\t\tString phone;\n\t\tdo {\n\t\t\tphone = JOptionPane.showInputDialog(\"Please enter a phone number \"\n\t\t\t\t\t+ \"\\nFormat: 0001112222\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPhone(phone)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPhone(phone));\n\t\tString paymentInfo;\n\t\tdo {\n\t\t\tpaymentInfo = JOptionPane.showInputDialog(\"Please enter a payment information (Credit, Debit, or Cash)\");\n\t\t\tif (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setPaymentInfo(paymentInfo));\n\t\tString address;\n\t\tdo {\n\t\t\taddress = JOptionPane.showInputDialog(\"Please enter a full address.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setAddress(address)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t}while (!employee.getVehicle().getCustomer().setAddress(address));\n\t\tString insuranceNumber;\n\t\tdo {\n\t\t\tinsuranceNumber = JOptionPane.showInputDialog(\"Please enter an insurance number.\");\n\t\t\tif (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber)) {\n\t\t\t\tJOptionPane.showMessageDialog(null, \"Error, Invalid\");\n\t\t\t}\n\t\t} while (!employee.getVehicle().getCustomer().setInsuranceNumber(insuranceNumber));\n\t\tJOptionPane.showMessageDialog(null, employee.getVehicle().getCustomer().toString());\n\t}", "public void addCustomer() {\r\n\t\tdo {\r\n\t\t\tString name = getToken(\"Enter the customer's name: \");\r\n\t\t\tString phoneNumber = getToken(\"Enter the phone number: \");\r\n\t\t\tCustomer customer = store.addCustomer(name, phoneNumber);\r\n\t\t\tif (customer == null) {\r\n\t\t\t\tSystem.out.println(\"Could not add customer.\");\r\n\t\t\t}\r\n\t\t\tSystem.out.println(customer);\r\n\t\t} while (yesOrNo(\"Would you like to add another Customer?\"));\r\n\t}", "public void placeOrder(String custID) {\r\n //creates Order object based on current cart\r\n Order order = new Order(custID, getItems());\r\n //inserts new order into DB\r\n order.insertDB();\r\n }", "public static void CreateCustomer() \r\n\t{\n\t\t\r\n\t}", "public void checkOut(Customer customer) {\n\n customer.greetCustomer();\n System.out.println(\"--------------------------------------\");\n\n // Tussentotaalprijs berekenen en printen\n int firstTotalPrice = calculateTotalPrice(customer.basket);\n\n System.out.println(\"Het tussentotaal is: \" + firstTotalPrice + \" euro\");\n\n // Korting berekenen\n int discount = calculateDiscount(customer.basket);\n\n //int finalTotalPrice = calculateEndPrice(firstTotalPrice, discount);\n }", "public void customerRole() throws Exception {\n\n\t\t// create service class object\n\t\tcarSelerService = new CarSellerServiceImpl();\n\t\t// create BufferReader class object\n\t\tinputs = new BufferedReader(new InputStreamReader(System.in));\n\t\t// create CustomerBean class object.\n\t\tcustomerBean = new CustomerBean();\n\t\t// create service class object\n\t\tcarSellerabstractService = new CarSellerServiceImpl();\n\n\t\tdo {\n\n\t\t\tSystem.out.println(\"Customer Portal\");\n\t\t\tSystem.out.println(\"Chose option you want to insert\");\n\t\t\tSystem.out.println(\"\\t 1.View car details\");\n\t\t\tSystem.out.println(\"\\t 2.Purchase new car\");\n\t\t\tSystem.out.println(\"\\t 3.Genrate bill\");\n\t\t\tSystem.out.println(\"\\t 4.Back to dashboard\");\n\t\t\tSystem.out.println(\"\\t 5.Exit\");\n\n\t\t\tint option = 0;\n\t\t\ttry {\n\t\t\t\toption = Integer.parseInt(inputs.readLine());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\tSystem.out.println(\"You have entered a wrong input.\");\n\t\t\t\tSystem.exit(0);\n\t\t\t}\n\n\t\t\tswitch (option) {\n\t\t\t// View car details start\n\t\t\tcase 1:\n\t\t\t\twhile (true) {\n\t\t\t\t\tSystem.out.println(\"Chose option by viewing car\");\n\t\t\t\t\tSystem.out.println(\"\\t 1.By manufacture company name\");\n\t\t\t\t\tSystem.out.println(\"\\t 2.By model name\");\n\t\t\t\t\tSystem.out.println(\"\\t 3.By price\");\n\t\t\t\t\tSystem.out.println(\"\\t 4.Go to customer portal\");\n\t\t\t\t\tSystem.out.println(\"\\t 5.Exit\");\n\n\t\t\t\t\tint innerOption = 0;\n\t\t\t\t\ttry {\n\t\t\t\t\t\tinnerOption = Integer.parseInt(inputs.readLine());\n\t\t\t\t\t} catch (NumberFormatException e) {\n\t\t\t\t\t\tSystem.out.println(\"You have entered a wrong input.\");\n\t\t\t\t\t\tSystem.exit(0);\n\t\t\t\t\t}\n\n\t\t\t\t\tswitch (innerOption) {\n\t\t\t\t\t// view by manufacture company name start\n\t\t\t\t\tcase 1:\n\n\t\t\t\t\t\tSystem.out.println(\"View car details by company manufacture name \");\n\t\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\n\t\t\t\t\t\tSystem.out.println(\"Enter manufacture company name\");\n\t\t\t\t\t\tcustomerBean.setCarManufacturer(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// get connection\n\t\t\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t\t\t// create preparedStatement\n\t\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.VIEW_CAR_DETAILS_BY_COMPANY_NAME);\n\t\t\t\t\t\t\t// set the values to the preparedStatement\n\t\t\t\t\t\t\tpreparedStatement.setString(1, customerBean.getCarManufacturer());\n\t\t\t\t\t\t\t// execute query\n\t\t\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\n\t\t\t\t\t\t\t// read data from database\n\t\t\t\t\t\t\twhile (resultSet.next()) {\n\n\t\t\t\t\t\t\t\t// display car details\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + resultSet.getString(1));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Manufacture Company Name :\" + resultSet.getString(2));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + resultSet.getString(3));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Variant Type :\" + resultSet.getString(4));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Price :\" + resultSet.getString(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Available Status :\" + resultSet.getString(6));\n\t\t\t\t\t\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t\t\t} // while\n\t\t\t\t\t\t} // try\n\t\t\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} // catch\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\t// close the object\n\t\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// view by manufacture company name end\n\t\t\t\t\tcase 2:\n\t\t\t\t\t\t// case 2 for view car details by model name\n\n\t\t\t\t\t\tSystem.out.println(\"View car details by company model name\");\n\t\t\t\t\t\tcustomerBean.setCarModelName(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// get connection\n\t\t\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t\t\t// create preparedStatement\n\t\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.VIEW_CAR_DETAILS_BY_MODELNAME);\n\t\t\t\t\t\t\t// set the values to the preparedStatement\n\t\t\t\t\t\t\tpreparedStatement.setString(1, customerBean.getCarModelName());\n\t\t\t\t\t\t\t// execute query\n\t\t\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\t\t\t\t\t\t\t// read data from database\n\t\t\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + resultSet.getString(1));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Manufacture Company Name:\" + resultSet.getString(2));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + resultSet.getString(3));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Variant Type :\" + resultSet.getString(4));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Price :\" + resultSet.getString(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Available Status :\" + resultSet.getString(6));\n\t\t\t\t\t\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t} // while\n\t\t\t\t\t\t} // try\n\t\t\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} // catch\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// view by model name end\n\n\t\t\t\t\tcase 3:\n\t\t\t\t\t\t// case 3 for view car details by given price range\n\t\t\t\t\t\tSystem.out.println(\"View car details by given range\");\n\t\t\t\t\t\tSystem.out.println(\"Enter starting range\");\n\t\t\t\t\t\tcustomerBean\n\t\t\t\t\t\t\t\t.setStartRange(carSelerService.validatePrice(Double.parseDouble(inputs.readLine())));\n\n\t\t\t\t\t\tSystem.out.println(\"Enter ending range\");\n\t\t\t\t\t\tcustomerBean.setEndRange(carSelerService.validatePrice(Double.parseDouble(inputs.readLine())));\n\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// get connection\n\t\t\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t\t\t// create PrepareStatement\n\t\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.VIEW_CAR_DETAILS_BY_RANGE);\n\t\t\t\t\t\t\t// set the values to the preparedStatement\n\t\t\t\t\t\t\tpreparedStatement.setDouble(1, customerBean.getStartRange());\n\t\t\t\t\t\t\tpreparedStatement.setDouble(2, customerBean.getEndRange());\n\t\t\t\t\t\t\t// execute query\n\t\t\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\t\t\t\t\t\t\t// read data from database\n\t\t\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + resultSet.getString(1));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Manufacture Company :\" + resultSet.getString(2));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + resultSet.getString(3));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Variant Type :\" + resultSet.getString(4));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Price :\" + resultSet.getString(5));\n\t\t\t\t\t\t\t\tSystem.out.println(\"Car Available Status :\" + resultSet.getString(6));\n\t\t\t\t\t\t\t\tSystem.out.println(\"---------------------------------------\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t\t\t} // while\n\t\t\t\t\t\t\tif (!resultSet.next()) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"No car found by given price \");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} // try\n\t\t\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t} // catch\n\t\t\t\t\t\tfinally {\n\t\t\t\t\t\t\tresultSet.close();\n\t\t\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t\t\t}\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t// view by price end\n\t\t\t\t\tcase 4:\n\t\t\t\t\t\t// case 4 for calls the customer portal\n\t\t\t\t\t\tcustomerRole();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tSystem.out.println(\"Please insert correct option\");\n\t\t\t\t\t}// while end\n\t\t\t\t} // inner switch\n\n\t\t\tcase 2:\n\t\t\t\t// case 2 for purchase new car car\n\n\t\t\t\t//Read values from console, validate and set to the SalesExecutiveBean class\n\t\t\t\tSystem.out.println(\"Enetr customer name\");\n\t\t\t\tcustomerBean.setCustomerName(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\tSystem.out.println(\"Enter mobile number\");\n\t\t\t\tcustomerBean.setMolileNo(carSelerService.validateMobile(Long.parseLong(inputs.readLine())));\n\n\t\t\t\tSystem.out.println(\"Enter PAN (Permanent Account Number) no\");\n\t\t\t\tcustomerBean.setPanNo(carSelerService.validPanNo(inputs.readLine()));\n\n\t\t\t\tSystem.out.println(\"Enter adhar number\");\n\t\t\t\tcustomerBean.setAdharNo(carSelerService.validateAdharNo(Long.parseLong(inputs.readLine())));\n\n\t\t\t\tSystem.out.println(\"Insert VIN (Veichle Identification Number) no\");\n\t\t\t\tcustomerBean.setVinNumber(carSellerabstractService.validateVinNumber(inputs.readLine()));\n\n\t\t\t\tSystem.out.println(\"Enetr car model name\");\n\t\t\t\tcustomerBean.setCarModelName(carSellerabstractService.validateName(inputs.readLine()));\n\n\t\t\t\t// get current system date\n\t\t\t\tString registerationDate = carSelerService.generateDate();\n\t\t\t\tcustomerBean.setRegisterationDate(registerationDate);\n\n\t\t\t\ttry {\n\t\t\t\t\t// create connection\n\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t// create PreparedStatement\n\t\t\t\t\tpreparedStatement = (PreparedStatement) con\n\t\t\t\t\t\t\t.prepareStatement(Constant.GET_CAR_PRICE_AND_AVAILABLE_STATUS);\n\t\t\t\t\t// set the value to preparedStatement\n\t\t\t\t\tpreparedStatement.setString(1, customerBean.getVinNumber());\n\t\t\t\t\t// execute query\n\t\t\t\t\tresultSet = (ResultSet) preparedStatement.executeQuery();\n\n\t\t\t\t\t// for geting price from database\n\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\tcustomerBean.setPrice(resultSet.getDouble(1));\n\t\t\t\t\t\tcustomerBean.setAvailabeStatus(resultSet.getString(2));\n\t\t\t\t\t}\n\t\t\t\t\tif (customerBean.getAvailabeStatus().equalsIgnoreCase(\"available\")) {\n\t\t\t\t\t\t// create preparedStatement\n\t\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.CUSTOMER_PURCHASE_CAR_DETAILS);\n\n\t\t\t\t\t\t// set the values to the preparedStatements\n\t\t\t\t\t\tpreparedStatement.setString(1, customerBean.getCustomerName());\n\t\t\t\t\t\tpreparedStatement.setLong(2, customerBean.getMolileNo());\n\t\t\t\t\t\tpreparedStatement.setLong(3, customerBean.getAdharNo());\n\t\t\t\t\t\tpreparedStatement.setString(4, customerBean.getPanNo());\n\t\t\t\t\t\tpreparedStatement.setString(5, customerBean.getVinNumber());\n\t\t\t\t\t\tpreparedStatement.setString(6, customerBean.getCarModelName());\n\t\t\t\t\t\tpreparedStatement.setString(7, customerBean.getRegisterationDate());\n\t\t\t\t\t\tpreparedStatement.setDouble(8, customerBean.getPrice());\n\n\t\t\t\t\t\t// execute query\n\t\t\t\t\t\tcount = preparedStatement.executeUpdate();\n\t\t\t\t\t\t// check record inserted or not\n\t\t\t\t\t\tif (count != 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"Your information submitted sucessfully!!!\");\n\t\t\t\t\t\t}\n\t\t\t\t\t} // if\n\t\t\t\t\telse {\n\t\t\t\t\t\tthrow new CarNotAvailableException();\n\t\t\t\t\t}\n\t\t\t\t} // try\n\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\t\tSystem.out.println(\"Wrong Input given\");\n\t\t\t\t} // catch\n\t\t\t\tcatch (NullPointerException npe) {\n\t\t\t\t\tSystem.out.println(\"Record Not Found.\");\n\t\t\t\t} finally {\n\t\t\t\t\tresultSet.close();\n\t\t\t\t\tpreparedStatement.close();\n\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t// purchase new Car Ends\n\t\t\tcase 3:\n\t\t\t\t// case 3 for Generate Bill\n\t\t\t\ttry {\n\t\t\t\t\t// get connection\n\t\t\t\t\tcon = DBConnection.getConnection();\n\t\t\t\t\t// create statement obj\n\t\t\t\t\tstatement = (Statement) con.createStatement();\n\t\t\t\t\t// exexute query\n\t\t\t\t\tresultSet = (ResultSet) statement.executeQuery(Constant.GENRATE_BILL);\n\t\t\t\t\tSystem.out.println(\"Bill Generated\");\n\t\t\t\t\twhile (resultSet.next()) {\n\t\t\t\t\t\tcustomerBean.setCustomerName(resultSet.getString(1));\n\t\t\t\t\t\tcustomerBean.setMolileNo(resultSet.getLong(2));\n\t\t\t\t\t\tcustomerBean.setAdharNo(resultSet.getLong(3));\n\t\t\t\t\t\tcustomerBean.setPanNo(resultSet.getString(4));\n\t\t\t\t\t\tcustomerBean.setVinNumber(resultSet.getString(5));\n\t\t\t\t\t\tcustomerBean.setCarModelName(resultSet.getString(6));\n\t\t\t\t\t\tcustomerBean.setRegisterationDate(resultSet.getString(7));\n\t\t\t\t\t\tcustomerBean.setPrice(resultSet.getDouble(8));\n\t\t\t\t\t}\n\t\t\t\t\t// display customer information\n\t\t\t\t\tSystem.out.println(\"Customer Details\");\n\t\t\t\t\tSystem.out.println(\"Cotomer Name: \" + customerBean.getCustomerName());\n\t\t\t\t\tSystem.out.println(\"Contact Number: \" + customerBean.getMolileNo());\n\t\t\t\t\tSystem.out.println(\"Adhar Number: \" + customerBean.getAdharNo());\n\t\t\t\t\tSystem.out.println(\"Personal Identification Number(PAN) No: \" + customerBean.getPanNo());\n\t\t\t\t\tSystem.out.println(\"Veichle Identification No :\" + customerBean.getVinNumber());\n\t\t\t\t\tSystem.out.println(\"Car Model Name :\" + customerBean.getCarModelName());\n\t\t\t\t\tSystem.out.println(\"Registration Date :\" + customerBean.getRegisterationDate());\n\t\t\t\t\tSystem.out.println(\"Price :\" + customerBean.getPrice());\n\t\t\t\t\tSystem.out.println(\"---------------------------------\");\n\t\t\t\t\tSystem.out.println(\"\");\n\n\t\t\t\t\t// create preparedStatement\n\t\t\t\t\tpreparedStatement = con.prepareStatement(Constant.UPDATE_CAR_AVAILABLE_STATUS);\n\t\t\t\t\tString availableStatus = \"SOLD\";\n\t\t\t\t\t// set the values to the preparedStatements\n\t\t\t\t\tpreparedStatement.setString(1, availableStatus);\n\t\t\t\t\tpreparedStatement.setString(2, customerBean.getVinNumber());\n\t\t\t\t\tpreparedStatement.setString(3, customerBean.getCarModelName());\n\t\t\t\t\t// execute query\n\t\t\t\t\tcount = preparedStatement.executeUpdate();\n\t\t\t\t\t// check record inserted or not\n\t\t\t\t\tif (count == 0) {\n\t\t\t\t\t\tSystem.out.println(\"Bill Not Generated\");\n\t\t\t\t\t}\n\t\t\t\t} // try\n\t\t\t\tcatch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t} catch (InputMismatchException ime) {\n\t\t\t\t\tSystem.out.println(\"You have entered a wrong input.\");\n\t\t\t\t} // catch\n\t\t\t\tfinally {\n\t\t\t\t\tresultSet.close();\n\t\t\t\t\tstatement.close();\n\t\t\t\t\tDBConnection.close(con);\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\t// Case 4 for go to main Dashboard\n\t\t\t\tMain.carUsersRole();\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\t// Exit\n\t\t\t\tSystem.out.println(\"Thanks For Visiting Have a Nice Day !!!\");\n\t\t\t\tSystem.exit(0);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"please insert correct option\");\n\t\t\t}// outer switch end\n\t\t} while (true);\n\t\t// close BufferedReader object\n\t}", "private void seatCustomer(MyCustomer customer) {\n\t//Notice how we print \"customer\" directly. It's toString method will do it.\n\tDo(\"Seating \" + customer.cmr + \" at table \" + (customer.tableNum+1));\n\t//move to customer first.\n\tCustomer guiCustomer = customer.cmr.getGuiCustomer();\n\tguiMoveFromCurrentPostionTo(new Position(guiCustomer.getX()+1,guiCustomer.getY()));\n\twaiter.pickUpCustomer(guiCustomer);\n\tPosition tablePos = new Position(tables[customer.tableNum].getX()-1,\n\t\t\t\t\t tables[customer.tableNum].getY()+1);\n\tguiMoveFromCurrentPostionTo(tablePos);\n\twaiter.seatCustomer(tables[customer.tableNum]);\n\tcustomer.state = CustomerState.NO_ACTION;\n\tcustomer.cmr.msgFollowMeToTable(this, new Menu());\n\tstateChanged();\n }", "@Override\n public void run() throws ApplicationException\n {\n super.run();\n\n /* If not exists, create */\n if (!customer.exists)\n {\n generator.generateData();\n byte[] tmpPassword = customer.firstName.getBytes();\n\n try {\n session.createCustomer(tmpPassword);\n } finally {\n Utils.cleanArray(tmpPassword);\n }\n }\n\n do {\n /* Prepare an order */\n session.order();\n\n do {\n Session.ItemDef item;\n\n do {\n /* Add items */\n session.item(item = session.selectRandomProducts(random));\n\n /* This loop is just a hack for the case if select random returns null (it may) */\n } while (item == null);\n } while (random.nextDouble() > newItemThreshold);\n\n /* Submit order, this actually executes SQL */\n session.submit();\n } while (random.nextDouble() > newOrderThreshold);\n }", "void createAndManageCustomer() {\r\n\t\tSystem.out.println(\"\\nCreating and managing a customer:\");\r\n\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c = new Customer2(\"Sami\", \"Cemil\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c);\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\t\r\n\t\ttx = em.getTransaction();\r\n\t\ttx.begin();\r\n\t\tc.setLastName(\"Kamil\");\r\n\t\ttx.commit();\r\n\t\tSystem.out.println(c);\r\n\t\tem.close();\r\n\t}", "@Override\n @Transactional\n public PurchaseResponse placeOrder(Purchase purchase) {\n Order order = purchase.getOrder();\n\n //genrate traking number\n String orderTrakingNumber = genrateOrderTrakingnumber();\n order.setOrderTrackingNumber(orderTrakingNumber);\n\n //populate order with order item\n Set<OrderItem> orderItems = purchase.getOrderItems();\n orderItems.forEach(item-> order.add(item));\n\n //populate order with billingAddress and shipplingAddress\n order.setBillingAddress(purchase.getBillingAddress());\n order.setShippingAddress(purchase.getShippingAddress());\n\n //populate customer with order\n Customer customer = purchase.getCustomer();\n\n // checck if the existing customer\n String theEmail = customer.getEmail();\n Customer customerFromDB = customerRepository.findByEmail(theEmail);\n\n if(customerFromDB != null){\n // we found it let assign them\n customer = customerFromDB;\n }\n\n customer.add(order);\n\n //sqve to the db\n customerRepository.save(customer);\n\n\n\n // return the response\n return new PurchaseResponse(orderTrakingNumber);\n }", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "@Override\n\tpublic void confirmOrders() {\n\t\t\n\t}", "private void addCustomer() {\n try {\n FixCustomerController fixCustomerController = ServerConnector.getServerConnector().getFixCustomerController();\n\n FixCustomer fixCustomer = new FixCustomer(txtCustomerName.getText(), txtCustomerNIC.getText(), String.valueOf(comJobrole.getSelectedItem()), String.valueOf(comSection.getSelectedItem()), txtCustomerTele.getText());\n\n boolean addFixCustomer = fixCustomerController.addFixCustomer(fixCustomer);\n\n if (addFixCustomer) {\n JOptionPane.showMessageDialog(null, \"Customer Added Success !!\");\n } else {\n JOptionPane.showMessageDialog(null, \"Customer Added Fail !!\");\n }\n\n } catch (NotBoundException | MalformedURLException | RemoteException ex) {\n new ServerNull().setVisible(true);\n } catch (ClassNotFoundException | IOException ex) {\n Logger.getLogger(InputCustomers.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void addCustomer() {\n\t\tSystem.out.println(\"Enter your first name.\");\n\t\tString fn = scan.nextLine();\n\t\tSystem.out.println(\"Enter your last name.\");\n\t\tString ln = scan.nextLine();\n\t\tSystem.out.println(\"Enter your username.\");\n\t\tString user = scan.nextLine();\n\t\tSystem.out.println(\"Enter your password.\");\n\t\tString pw = scan.nextLine();\n\t\tSystem.out.println(\"Password once more (to be safe.)\");\n\t\tString pw2 = scan.nextLine();\n\t\t/*if (pw.toString() != pw2.toString()) {\n\t\t\tSystem.out.println(\"Whoops! Let's try that again.\");\n\t\t\taddCustomer();\n\t\t}\n\t\t*/\n\t\t//else {\n String sql = \"INSERT INTO bank.login (first_name, last_name, user_name, password) VALUES (\"+\"\\\"\"+fn+\"\\\"\"+\", \"+\"\\\"\"+ln+\"\\\"\"+\", \"\n\t\t+\"\\\"\"+user+\"\\\"\"+\", \"+\"\\\"\"+pw+\"\\\"\"+\")\";\n\n try{\n \t\n \tconnect.databaseUtil();\n Statement statement = Database.connection.createStatement();\n // ResultSet resultSet =\n \t\tstatement.executeUpdate(sql);\n try {\n \t\t\tconnect.databaseClose();\n \t\t} catch (SQLException e) {\n \t\t\t\n \t\t\te.printStackTrace();\n \t\t}\n\n bank.start();\n }\n \n\n catch(SQLException e){\n \t\te.printStackTrace();\n Menus.custMenu();\n\n }\n\n \n\t\t\n\t}", "@Override\n\tpublic void takeNewOrder() {\n\t\tif(customersInLine.size()>0&&wait==0){\n\t\t\tint customerSelectedIndex = 0;\n\t\t\tfor(int i=0; i<customersInLine.size(); i++){\n\t\t\t\tif(customersInLine.get(i).getTimeToPrepare()<customersInLine.get(customerSelectedIndex).getTimeToPrepare()){\n\t\t\t\t\tcustomerSelectedIndex = i;\n\t\t\t\t}\n\t\t\t}\n\t\t\tsetWait(customersInLine.get(customerSelectedIndex).getTimeToPrepare());\n\t\t\taddToProfit(customersInLine.get(customerSelectedIndex).getCostOfOrder());\n\t\t\tcustomersInLine.remove(customerSelectedIndex);\n\t\t\tcustomersInRestaurant--;\n\t\t}\n\t}", "@Override\n\tpublic void createCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\ttry {\n\t\t\t\n\t\t\tStatement st = con.createStatement();\n\t\t\tString create = String.format(\"insert into customer values('%s', '%s')\", customer.getCustName(),\n\t\t\t\t\tcustomer.getPassword());\n\t\t\tst.executeUpdate(create);\n\t\t\tSystem.out.println(\"Customer added successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to add A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\t}", "public void startSale() {\r\n System.out.println(\"[CashRegister] startSale\");\r\n System.out.println(\"\");\r\n\r\n //receipt = new Receipt(customerId); \r\n receipt = new Receipt(\"100\");\r\n\r\n //addItemToSale(productId, quantity);\r\n addItemToSale(\"A101\", 10);\r\n\r\n addItemToSale(\"B205\", 6);\r\n\r\n addItemToSale(\"C222\", 12);\r\n\r\n }", "private void goShopping(User user, Scanner sc) {\n\t\tboolean run = true;\n\t\tdo {\n\t\t\tlog.info(\"Store Inventory\\n\");\n\t\t\tList<Item> items = cService.seeItemsOnSale();\n\t\t\titems.stream().forEach(item -> log.info(item));\n\n\t\t\tlog.info(\"Welcome to the NYC Grocery Store\\n\");\n\n\t\t\tlog.info(\"Choose an option:\");\n\t\t\tlog.info(\"\t\tPress 1 to Make an Offer on an Item\");\n\t\t\tlog.info(\"\t\tPress anything else to go to the MAIN CUSTOMER DASHBOARD\");\n\t\t\tString choice = sc.nextLine();\n\t\t\tswitch (choice) {\n\t\t\tcase \"1\":\n\t\t\t\tmakeAnOffer(user, sc);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tlog.info(\"\\nGoing back to the CUSTOMER DASHBOARD\\n\");\n\t\t\t\trun = false;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t} while (run);\n\n\t}", "public void addCustomer(){\n Customer customer = new Customer();\n customer.setId(data.numberOfCustomer());\n customer.setFirstName(GetChoiceFromUser.getStringFromUser(\"Enter First Name: \"));\n customer.setLastName(GetChoiceFromUser.getStringFromUser(\"Enter Last Name: \"));\n data.addCustomer(customer,data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has added Successfully!\");\n }", "void createOrder(List<Product> products, Customer customer);", "public void createOrderInDB() {\n if (newCustomer.isSelected()) {\n\n if(customerPhone.getText().isEmpty() ) {\n customerPhone.setStyle(\"-fx-focus-color: RED\");\n customerPhone.requestFocus();\n } else if(customerName.getText().isEmpty()) {\n customerName.setStyle(\"-fx-focus-color: RED\");\n customerName.requestFocus();\n } else {\n ControllerPartner controller = new ControllerPartner();\n controller.createOrderNewCustomer(customerPhone.getText(), customerName.getText(), totalPrice.getText());\n Label successMessage = new Label(\"Order is created, an sms with invoice is sent to the customer\");\n successMessage.setLayoutX(305);\n successMessage.setLayoutY(800);\n successMessage.setTextFill(Color.CORAL);\n root.getChildren().add(successMessage);\n content();\n\n customerName.clear();\n customerPhone.clear();\n\n }\n\n\n\n\n } else if (existingCustomer.isSelected()) {\n }\n }", "public void payForOrder(){\n\t\tcurrentOrder.setDate(new Date()); // setting date to current\n\t\t\n\t\t//Checking if tendered money is enough to pay for the order.\n\t\tfor(;;){\n\t\t\tJOptionPane.showMessageDialog(this.getParent(), new CheckoutPanel(currentOrder), \"\", JOptionPane.PLAIN_MESSAGE);\n\t\t\tif(currentOrder.getTendered().compareTo(currentOrder.getSubtotal())==-1){\n\t\t\t\tJOptionPane.showMessageDialog(this.getParent(), \"Not enough money tendered\", \"Error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\tcontinue;\n\t\t\t}\n\t\t\tbreak;\n\t\t}\n\t\t\n\t\t//Setting order number.\n\t\tSimpleDateFormat df = new SimpleDateFormat(\"yyyyMMdd\");\n\t\tString str = df.format(currentOrder.getDate());\n\t\tString number = Integer.toString(till.getOrders().size()+1) +\"/\"+str;\n\t\tcurrentOrder.setNumber(number);\n\t\t\n\t\t//Setting customer name.\n\t\tcurrentOrder.setCustomerName(custNameField.getText());\n\t\t\n\t\t//Adding current order to orders list.\n\t\ttill.getOrders().add(currentOrder); \n\t\t\n\t\t//Displays the receipt.\n\t\tJOptionPane.showMessageDialog(this.getParent(), new ReceiptPanel(currentOrder), \"Receipt\", \n\t\t\t\tJOptionPane.PLAIN_MESSAGE);\n\t\t\n\t\t//Resets OrderPanel.\n\t\tthis.resetOrder();\n\t}", "public void orderPlace() {\n Log.d(\"Method\", \"orderPlaced()\");\n\n if (coffeeCount < getResources().getInteger(R.integer.min_coffee)) {\n Log.e(\"\", \"coffeeCount < minimum coffee order\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.min_order_message), getResources().getInteger(R.integer.min_coffee)));\n } else if (coffeeCount > getResources().getInteger(R.integer.max_coffee)) {\n Log.e(\"\", \"coffeeCount > maximum coffee order\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.max_order_message), getResources().getInteger(R.integer.max_coffee)));\n } else {\n Log.i(\"\", \"Order placed: \" + coffeeCount + \" coffee.\");\n displayMessage(String.format(Locale.getDefault(), getString(R.string.order_thanks), 176));\n }\n resetQuantity();\n }", "void placeOrder(Cashier cashier){\n }", "private Boolean createOrder(String phoneEmployee, String phoneCustomer, HashMap<String, Integer> barcodes)\n {\n Boolean quit = false;\n\n try{\n Order order = orderController.createOrder(phoneEmployee, phoneCustomer, barcodes);\n System.out.println(\"Salg oprettet.\");\n System.out.println(\"\");\n printOrder(order);\n quit = true;\n } catch(Exception e){\n System.out.println(\"Salg kunne ikke oprettes.\");\n System.out.println(\"\");\n }\n\n return quit;\n }", "@Override\r\n\tpublic int insertCustomer(Customer customer) throws BillingServicesDownException {\n\t\treturn 0;\r\n\t}", "public void buySellFood(boolean buy, Player customer) {\n if (buy && foodQuantity == 0) {\n GameController.errorMessageBox(\"Not enough Food in the store\");\n } else {\n if (buy) {\n if (customer.getMoney() >= foodCost) {\n foodQuantity--;\n customer.addSubMoney(-foodCost);\n customer.addSubFood(1);\n if (foodQuantity == 0) {\n foodCost = 30;\n } else {\n foodCost += 2;\n }\n } else {\n GameController.errorMessageBox(\"You do not have enough money for this item.\");\n }\n } else {\n if (customer.getFood() >= 1) {\n customer.addSubMoney(foodCost - 5);\n if (foodQuantity == 0) {\n foodCost = 30;\n } else {\n foodCost -= 2;\n }\n customer.addSubFood(-1);\n foodQuantity++;\n } else {\n GameController.errorMessageBox(\"You do not have any of this item to sell\");\n }\n }\n }\n }", "protected boolean pickAndExecuteAnAction() {\n\t//print(\"in waiter scheduler\");\n\t//Starts the break cycle if onBreak == true\n\tif(onBreak && working ) {\n\t initiateBreak();\n\t return true;\n\t}\n\n\t//Once all the customers have been served\n\t//then the waiter can actually go on break\n\tif(!working && customers.isEmpty() && !startedBreak) {\n\t goOnBreak();\n\t return true;\n\t}\n\n\tif(!onBreak && !working){\n\t endBreak();\n\t}\n\n\t\n\t//Runs through the customers for each rule, so \n\t//the waiter doesn't serve only one customer at a time\n\tif(!customers.isEmpty()){\n\t //System.out.println(\"in scheduler, customers not empty:\");\n\t //Gives food to customer if the order is ready\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_READY) {\n\t\t giveFoodToCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\t //Clears the table if the customer has left\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.IS_DONE) {\n\t\t clearTable(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Seats the customer if they need it\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.NEED_SEATED){\n\t\t seatCustomer(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Gives all pending orders to the cook\n\t for(MyCustomer c:customers){\n\t\tif(c.state == CustomerState.ORDER_PENDING){\n\t\t giveOrderToCook(c);\n\t\t return true;\n\t\t}\n\t }\n\n\t //Takes new orders for customers that are ready\n\t for(MyCustomer c:customers){\n\t\t//print(\"testing for ready to order\"+c.state);\n\t\tif(c.state == CustomerState.READY_TO_ORDER) {\n\t\t takeOrder(c);\n\t\t return true;\n\t\t}\n\t }\t \n\t}\n\tif (!currentPosition.equals(originalPosition)) {\n\t moveToOriginalPosition();\n\t return true;\n\t}\n\n\t//we have tried all our rules and found nothing to do. \n\t// So return false to main loop of abstract agent and wait.\n\t//print(\"in scheduler, no rules matched:\");\n\treturn false;\n }", "@Override\n\tpublic void placeOrder(Map<String, Integer> orderDetails, Buyer buyer) {\n\t\tif (successor != null) {\n\t\t\tsuccessor.placeOrder(orderDetails, buyer);\n\t\t} else {\n\t\t\tSystem.out.println(\"Did not set successor of SupplierProxy\");\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void showConfirmation(Customer customer, List<Item> items, double totalPrice, int loyaltyPointsEarned) {\n\t}", "public BackOrder(Customer customer, Washer washer, int quantity) {\r\n\t\tthis.customer = customer;\r\n\t\tthis.washer = washer;\r\n\t\tthis.quantity = quantity;\r\n\t}", "@RequestMapping(value=\"/pizza/custCreate.html\", method = RequestMethod.POST)\r\n public ModelAndView custCreate(\r\n @ModelAttribute(\"customer\")Customer customer,\r\n @CookieValue(value = \"v\", defaultValue = \"\") String visitorId,\r\n HttpServletResponse response) throws Exception {\n visitorManager.setCookieValue(visitorId);\r\n \r\n // Get the current order\r\n Order order = shoppingCart.getOrder();\r\n ModelAndView result = new ModelAndView(\"/pizza/cardEntry\");\r\n result.addObject(\"order\", order);\r\n \r\n // TODO: Is the customer valid?\r\n \r\n // Add the customer to the order\r\n order.setCustomer(customer);\r\n shoppingCart.assignCustomer(customer);\r\n\r\n // Remember the visitor\r\n response.addCookie(new Cookie(\"v\", visitorManager.getCookieValue()));\r\n return result;\r\n }", "@Test (priority = 3)\n\t@Then(\"^Create Order$\")\n\tpublic void create_Order() throws Throwable {\n\t\tCommonFunctions.clickButton(\"wlnk_Home\", \"Sheet1\", \"Home\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLNK_OrderNewServices\", \"Sheet1\", \"Oreder New Service\", \"CLICK\");\n\t\t//Thread.sleep(3000);\n\t\tCommonFunctions.clickButton(\"WRD_complete\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Contine\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WCB_Additional\", \"Sheet1\", \"Additional\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_checkout\", \"Sheet1\", \"Checkout\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_completeOrder\", \"Sheet1\", \"complete order\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_PayNow\", \"Sheet1\", \"Pay Now\", \"CLICK\");\n\t\tCommonFunctions.checkObjectExist(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"NO\");\n\t\tCommonFunctions.clickButton(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"CLICK\");\n\t}", "@Test\r\n public void customerService() {\r\n Customer customer;\r\n customerCrudService = (CustomerCrudService)ctx.getBean(\"customerCrudService\");\r\n \r\n Contact contact = ContactFactory.getContact(\"mphokazi@gmail.com\", \"0785566321\", \"0218897190\");\r\n Demography demo = DemographyFactory.getDemography(\"Female\", \"Black\", new Date(10/6/1986));\r\n \r\n BigDecimal sellingPrice = new BigDecimal(\"8.00\");\r\n BigDecimal broughtPrice = new BigDecimal(\"6.00\");\r\n BigDecimal profit = new BigDecimal(\"2.00\");\r\n ArrayList prices = new ArrayList<BigDecimal>();\r\n prices.add(sellingPrice);\r\n prices.add(broughtPrice);\r\n prices.add(profit);\r\n Item item = ItemFactory.getItem(\"PS\", prices);\r\n \r\n List items = new ArrayList<Item>();\r\n items.add(items);\r\n \r\n customer = new CustomerFactory\r\n .Builder(125)\r\n .CustomerName(\"Mphokazi\")\r\n .CustomerSurname(\"Mhlontlo\")\r\n .Contact(contact)\r\n .Demography(demo)\r\n .OrderItem(items)\r\n .build();\r\n \r\n customerCrudService.persist(customer);\r\n customerService = (CustomerServices)ctx.getBean(\"customerService\");\r\n List<OrderItem> orderItems = customerService.customerOrder(customer.getId());\r\n Assert.assertNotNull(orderItems);\r\n for (OrderItem orderItem : orderItems) {\r\n System.out.println(orderItem.getItem());\r\n \r\n \r\n } \r\n }", "public void addShopEndLeasing() {\n log.info(\"OrdersBean : addShopEndLeasing\");\n FacesContext context = FacesContext.getCurrentInstance();\n int idContract = Integer.parseInt(getParam(\"idContract\"));\n init();\n checkIfOrdersEntityIsNullAndCreateOrders();\n\n if (contractsBean.createContractEndLeasing(idContract)) {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_INFO, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopSuccess\"), null));\n } else {\n context.addMessage(null, new FacesMessage(FacesMessage.SEVERITY_ERROR, JsfUtils.returnMessage(getLocale(), \"fxs.addShopButton.addShopError\"), null));\n }\n findOrderAndfindContracts();\n }", "public void run()\n\t{\n\t\t// print which customer was created\n\t\tSystem.out.println(\"Customer \" + customerNumber + \" created\");\n\t\t\n\t\t// try to enter the post office and print when succesful\n\t\ttry {\n\t\t\tProject2.max_capacity.acquire();\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\tSystem.out.println(\"Customer \" + customerNumber + \" enters post office\");\n\t\t\n\t\t// try to be attended by a postal worker\n\t\ttry {\n\t\t\tProject2.worker_ready.acquire();\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t\n\t\t// add customer to the serving customer queue by locking mutex\n\t\ttry {\n\t\t\tProject2.servingCustomerMutex.acquire();\n\t\t} catch (InterruptedException e) {\n\t\t}\n\t\t\n\t\t// adding this customer to the serving customer queue\n\t\tProject2.servingCustomer.add(this);\n\t\t// signal that this customer is ready to be served\n\t\tProject2.cust_ready.release();\n\n\t\t// unlock serving customer mutex\n\t\tProject2.servingCustomerMutex.release();\n\t\t\t\t\n\t\t// keep track of whether the customer is finished to move on\n\t\ttry {\n\t\t\tProject2.customers_finished[customerNumber].acquire();\n\t\t} catch (InterruptedException e)\n\t\t{\t\n\t\t}\n\t\t\n\t\t// print that customer leaves post office\n\t\tSystem.out.println(\"Customer \" + customerNumber + \" leaves post office\");\n\t\t// signify that another customer can enter the post office now\n\t\tProject2.max_capacity.release();\n\t}", "private void checkout() {\n\t\tif (!CartController.getInstance().isCartEmpty()) {\n\t\t\tSystem.out.println(\"Enter your Name :\");\n\t\t\tscan.nextLine();\n\t\t\tCartController.getInstance().generateBill(scan.nextLine());\n\t\t} else {\n\t\t\tSystem.out\n\t\t\t\t\t.println(\"\\n--------------No Product Available in Cart for Checkout-----------------\\n\");\n\t\t}\n\t}", "public void provideOrderAccess() {\n\t\tint choiceOrder = View.NO_CHOICE;\n\t\t// get customer id and date for the order\n\t\tLong customerId = view.readIDWithPrompt(\"Enter Customer ID for Order: \");\n\t\tif (customerId == null) {\n\t\t\tSystem.out.println(\"Error: Customer Not Found.\");\n\t\t}\n\t\tLong orderId = view.readIDWithPrompt(\"Enter new Unique ID for Order: \");\n\t\tDate currDate = new Date();\n\n\t\t// create the order,\n\t\t// add the orderID to Customer\n\t\tatMyService.placeOrder(customerId, orderId, currDate);\n\n\t\t// enter loop to add items to the order\n\t\tArrayList<Long[]> items = new ArrayList<Long[]>();\n\t\twhile (choiceOrder != View.ENDORDER) {\n\t\t\t// display the order menu\n\t\t\tview.menuOrder();\n\t\t\tchoiceOrder = view.readIntWithPrompt(\"Enter choice: \");\n\t\t\tswitch (choiceOrder) {\n\t\t\t\tcase View.ADD_ORDER_ITEM:\n\t\t\t\t\tLong itemID = view.readIDWithPrompt(\"Enter Item ID: \");\n\t\t\t\t\t// note: Needs to be Long for Long[] below. \n\t\t\t\t\t//Also, i DO want to use readID rather than readInt then convert to long,\n\t\t\t\t\t// because I do not want amt to be negative. \n\t\t\t\t\tLong amt = view.readIDWithPrompt(\"Enter Amount: \");\n\t\t\t\t\t// check to see if the item exists and is in stock\n\t\t\t\t\tItem temp = atMyService.findItem(itemID);\n\t\t\t\t\tif (temp == null) {\n\t\t\t\t\t\tSystem.out.println(\"Item '\" + itemID + \"' not found. Item skipped.\");\n\t\t\t\t\t} else {\n\t\t\t\t\t\tif ((temp.getStock() - amt) < 0) {\n\t\t\t\t\t\t\tSystem.out.println(\"There is only '\" + temp.getStock() + \"' of this item left. Please try again.\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// add the items to the arrayList\n\t\t\t\t\t\t\tLong[] toAdd = { itemID, amt };\n\t\t\t\t\t\t\titems.add(toAdd);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase View.ENDORDER:\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t// convert arrayList to array, add to orders.\n\t\tif (!(items.isEmpty())) {\n\t\t\tLong[][] array = new Long[items.size()][2];\n\t\t\tfor (int i = 0; i < items.size(); i++) {\n\t\t\t\tarray[i][0] = items.get(i)[0];\n\t\t\t\tarray[i][1] = items.get(i)[1];\n\t\t\t}\n\t\t\tatMyService.addOrderItems(orderId, array);\n\t\t}\n\t}", "Receipt chargeOrder(PizzaOrder order, CreditCard creditCard);", "@Override\r\n\tpublic void createShopOwner(User customer, ShopOwner shopOwner) {\n\t\tshopOwner.setUser(customer);\r\n\t\tsuper.getSessionFactory().getCurrentSession().save(shopOwner);\r\n\t\tcustomer.setSeller(true);\r\n\t\tsuper.getSessionFactory().getCurrentSession().saveOrUpdate(customer);\r\n\t\tsuper.getSessionFactory().getCurrentSession().flush();\r\n\t}", "public void msgSitCustomerAtTable(CustomerAgent customer, int tableNum){\n\tMyCustomer c = new MyCustomer(customer, tableNum);\n\tc.state = CustomerState.NEED_SEATED;\n\tcustomers.add(c);\n\tstateChanged();\n }", "void order() {\n\n\t\tSystem.out.println(\"In Zomato order method\");\n\t\tclass Hotels {\n\t\t\tString name;\n\t\t\tHotels(String name ) {\n\t\t\t\tthis.name = name;\n\t\t\t}\n\n\t\t\tvoid orderPlaced() {\n\t\t\t\tSystem.out.println(\"Order placd at hotel \"+ name);\n\t\t\t}\n\t\t}\n\t}", "public void msgIWantFood(RestaurantThreeCustomer cust) {\n\t\tfor (Table table : tables) {\n\t\t\tif (!table.isOccupied()) {\n\t\t\t\twaitingCustomers.add(cust);\n\t\t\t\tAlertLog.getInstance().logMessage(AlertTag.valueOf(system.getName()), \"Restaurant 3 Host: \" + person.getName(), \"Assigning customer to waiter.\" + waiterIndex);\n\t\t\t\tstateChanged();\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\t//no free tables\n\t\tAlertLog.getInstance().logMessage(AlertTag.valueOf(system.getName()), \"Restaurant 3 Host: \" + person.getName(), \"Alerting customer that restaurant is full.\");\n\t\tcust.msgRestaurantFull();\n\t}", "@Test\n\tpublic void updateCustomer() {\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tlong id = customer.getId();\n\n\t\t// When\n\t\tICustomer cus = customerController.update(id, name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertEquals(name, cus.getName());\n\t\tAssert.assertEquals(address, cus.getAddress());\n\t\tAssert.assertEquals(telephoneNumber, cus.getTelephoneNumber());\n\t\tAssert.assertEquals(id, cus.getId());\n\t}", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// save/upate the customer ... finally LOL\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t\n\t}", "@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}", "public void newCustomer () {\r\n\t\t//input category id.\r\n\t\t//TODO\r\n boolean ok = false;\r\n do { \r\n my.printCategoies();\r\n try {\r\n System.out.println(\"Category:\");\r\n Scanner scan = new Scanner(System.in);\r\n String cat = scan.next();\r\n \r\n Category c = my.getCategory(cat);\r\n //\r\n if (c!=null ) {\r\n // add the new customer to a category\r\n //input new customer.\r\n Customer theNewCustomer = readCustomer(cat);\r\n if ( theNewCustomer != null ) {\r\n my.add(c, theNewCustomer);\r\n ok = true;\r\n }\r\n \r\n }else{\r\n System.out.println(\"Category not exist\");\r\n }\r\n \r\n } catch (Exception e) {\r\n System.out.println(\"Sorry, try again\");\r\n }\r\n } while (ok == false);\r\n \r\n\t\t\r\n\t}", "private void run() {\r\n\t\t/* build main menu */\t\r\n\t\tmainMenu = new CustomersMainMenu(\"Customers main menu\");\r\n\t\t/* exit flag */\r\n\t\tboolean exit = false;\r\n\t\t/* menu option to execute */\r\n\t\tint option;\r\n\t\t/* instantiate data */\r\n\t\tmy = new CustomerStore();\r\n\t\t/* load data */\r\n\t\tloadData();\r\n\t\t/* user service loop */\r\n\t\tdo {\r\n\t\t\t//show menu\r\n\t\t\tmainMenu.show();\r\n\t\t\t// get option\r\n\t\t\toption = mainMenu.choose();\r\n\t\t\t//control block\r\n\t\t\tswitch (option) {\r\n\t\t\t\tcase 0: //exit\r\n\t\t\t\t\texit = true; //set the exit flag.\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1: //list all customers.\r\n \r\n\t\t\t\t\tlistAllCustomers();\r\n for (Category category : customersList) {\r\n System.out.println(category.toString());\r\n }\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2: //Search a customer by his phone\r\n Customer c = null;\r\n\t\t\t\t\tc = searchCustomerByPhone();\r\n if (c.getPhone() != null) {\r\n System.out.println(c.toString());\r\n }\r\n else System.out.println(\"Customer not found\");\r\n \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3: //add a new customer\r\n\t\t\t\t\tnewCustomer();\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4: //remove Customer\r\n boolean ok = false;\r\n\t\t\t\t\tok = removeCustomer();\r\n if (ok) \r\n alert(\"Customer successfully removed.\\n\");\r\n else {\r\n alert(\"Error removing customer.\\n\");\r\n }\r\n \r\n\t\t\t\t\tbreak;\r\n\t\t\t\tdefault: //default or invalid option\r\n\t\t\t\t\talert(\"Invalid option\\n\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t} while (!exit);\r\n\t\t/* save data to persistent storage */\r\n\t\tsaveData();\r\n\t\talert(\"save data ...\\n\");\r\n }", "public Customer save(final Customer customer) {\n\t\tAssert.notNull(customer);\r\n\t\tBoolean isCreating = null;\r\n\r\n\t\tAssert.isTrue(!(customer.getEmail().endsWith(\"@\") || customer.getEmail().endsWith(\"@>\")));\r\n\r\n\t\tif (customer.getId() == 0) {\r\n\t\t\tisCreating = true;\r\n\t\t\tcustomer.setSuspicious(false);\r\n\r\n\t\t\t//comprobamos que ningún actor resté autenticado (ya que ningun actor puede crear los customers)\r\n\t\t\t//this.serviceUtils.checkNoActor();\r\n\r\n\t\t} else {\r\n\t\t\tisCreating = false;\r\n\t\t\t//comprobamos que su id no sea negativa por motivos de seguridad\r\n\t\t\tthis.serviceUtils.checkIdSave(customer);\r\n\r\n\t\t\t//este customer será el que está en la base de datos para usarlo si estamos ante un customer que ya existe\r\n\t\t\tCustomer customerBD;\r\n\t\t\tAssert.isTrue(customer.getId() > 0);\r\n\r\n\t\t\t//cogemos el customer de la base de datos\r\n\t\t\tcustomerBD = this.customerRepository.findOne(customer.getId());\r\n\r\n\t\t\t//Si el customer que estamos guardando es nuevo (no está en la base de datos) le ponemos todos sus atributos vacíos\r\n\r\n\t\t\t//\t\t\tcustomer.setUserAccount(new UserAccount());\r\n\t\t\t//\t\t\tfinal Authority authority = new Authority();\r\n\t\t\t//\t\t\tauthority.setAuthority(Authority.CUSTOMER);\r\n\t\t\t//\t\t\tcustomer.getUserAccount().addAuthority(authority);\r\n\t\t\t//los atributos que no pueden estar vacíos\r\n\r\n\t\t\tcustomer.setSuspicious(customerBD.getSuspicious());\r\n\t\t\tcustomer.setUserAccount(customerBD.getUserAccount());\r\n\r\n\t\t\t//Comprobamos que el actor sea un Customer\r\n\t\t\tthis.serviceUtils.checkAuthority(\"CUSTOMER\");\r\n\t\t\t//esto es para ver si el actor que está logueado es el mismo que se está editando\r\n\t\t\tthis.serviceUtils.checkActor(customer);\r\n\r\n\t\t}\r\n\t\tif ((!customer.getPhone().startsWith(\"+\")) && StringUtils.isNumeric(customer.getPhone()) && customer.getPhone().length() > 3) {\r\n\t\t\tfinal Settings settings = this.settingsService.findSettings();\r\n\t\t\tcustomer.setPhone(settings.getCountryCode() + customer.getPhone());\r\n\t\t}\r\n\t\tCustomer res;\r\n\t\t//le meto al resultado final el customer que he ido modificando anteriormente\r\n\t\tres = this.customerRepository.save(customer);\r\n\t\tthis.flush();\r\n\t\tif (isCreating)\r\n\t\t\tthis.folderService.createSystemFolders(res);\r\n\t\treturn res;\r\n\t}", "@Override\n\t@Transactional\n\tpublic void addCustomer(Customer customer) {\n\n\t\tSystem.out.println(\"here is our customer\" + customer);\n\n\t\thibernateTemplate.saveOrUpdate(customer);\n\n\t}", "@Override\n\tpublic void putCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().saveOrUpdate(customer);;\n\n\t}", "@Override\n\t@Transactional\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tcustomerDAO.saveCustomer(theCustomer);\n\t\t\n\t}", "@Override\n\tpublic void DoGoToCashier() {\n\t\t\n\t}", "private CustomerOrder addOrder(Customer customer, ShoppingCart cart) {\n CustomerOrder order = new CustomerOrder();\r\n order.setCustomerID(customer);\r\n order.setCustomerOrderAmount(BigDecimal.valueOf(cart.getTotal()));\r\n\r\n // Get current timestamp\r\n Calendar calendar = Calendar.getInstance();\r\n Timestamp currentTimestamp = new java.sql.Timestamp(calendar.getTime().getTime());\r\n order.setCustomerOrderCreated(currentTimestamp);\r\n\r\n // Create confirmation number\r\n Random random = new Random();\r\n int i = random.nextInt(999999999);\r\n order.setCustomerOrderConfirmationNumber(i);\r\n out.print(i);\r\n\r\n // Save order\r\n em.persist(order);\r\n\r\n return order;\r\n }", "void openAccount(String name, String address, String cnic, int contact_no, int age, String email_address,\r\n int noOfAccounts, String incomeSource, String AccountType, String securityquestion) {\n\r\n if (bankPolicy.isEligibilityCriteriaFulfilled(age)) {// is customer eligible\r\n System.out.println(\"Criteria fulfilled\");\r\n\r\n boolean newCustomer = isItANewCustomer(cnic);\r\n\r\n if (newCustomer) {// is customer new\r\n Customer C = new Customer(Integer.toString(customers.size() + 1), cnic, name, address, contact_no,\r\n email_address, incomeSource, securityquestion);\r\n // Print and ASK FOR SECURITY QUESTION\r\n System.out.println(\"Its a new Customer\");\r\n System.out.println(\"Password: \" + C.credentials.password);\r\n // add customer to arraylist\r\n customers.add(C);\r\n // save new customer to database\r\n record.SaveCustomer(C);\r\n // save customer credentials to database\r\n record.SaveCredentials(C.credentials, C.customerID);\r\n\r\n }\r\n int index = -1;\r\n for (int i = 0; i < customers.size(); i++) {\r\n if (customers.get(i).CNIC.equals(cnic))\r\n index = i;\r\n }\r\n\r\n Account A = new Account(String.valueOf(accounts.size() + 1), getDateFormat(), AccountType,\r\n \"Pending\", customers.get(index).customerID);\r\n // add account to customer\r\n accounts.add(A);\r\n customers.get(index).customerAccount.add(A);\r\n // save account to database\r\n record.SaveAccount(A);\r\n }\r\n\r\n }", "@Override\n\tpublic boolean addCustomer(Customer customer) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t try {\n\t\tShippingAddress shippingAddress=customer.getShippingAddress();\n\t session.save(customer);\n\t session.save(shippingAddress);\n\t\n\t\treturn true;\n\t }\n\t catch(HibernateException e)\n\t {\n\t \t\n\t \te.printStackTrace();\n\t \treturn false;\n\t }\n\t}", "public Customer save(final Customer customer) {\n\t\tAssert.notNull(customer);\n\n\t\t//comprobamos que su id no sea negativa por motivos de seguridad\n\t\tthis.serviceUtils.checkIdSave(customer);\n\n\t\t//este customer será el que está en la base de datos para usarlo si estamos ante un customer que ya existe\n\t\tCustomer customerBD;\n\t\tAssert.isTrue(customer.getId() > 0);\n\n\t\t//cogemos el customer de la base de datos\n\t\tcustomerBD = this.customerRepository.findOne(customer.getId());\n\n\t\t//Si el customer que estamos guardando es nuevo (no está en la base de datos) le ponemos todos sus atributos vacíos\n\t\tif (customer.getId() == 0) {\n\t\t\tcustomer.setBanned(false);\n\t\t\tcustomer.setFixupTasks(new ArrayList<FixupTask>());\n\t\t\tcustomer.setFolders(this.folderService.createSystemFolders(customer));\n\t\t\tcustomer.setReceivedMessages(new ArrayList<Message>());\n\t\t\tcustomer.setSendedMessages(new ArrayList<Message>());\n\t\t\tcustomer.setSocialProfiles(new ArrayList<SocialProfile>());\n\t\t\tcustomer.setSuspicious(false);\n\n\t\t\t//comprobamos que ningún actor resté autenticado (ya que ningun actor puede crear los customers)\n\t\t\tthis.serviceUtils.checkNoActor();\n\n\t\t} else {\n\t\t\tcustomer.setBanned(customerBD.getBanned());\n\t\t\tcustomer.setFixupTasks(customerBD.getFixupTasks());\n\t\t\tcustomer.setFolders(customerBD.getFolders());\n\t\t\tcustomer.setReceivedMessages(customerBD.getReceivedMessages());\n\t\t\tcustomer.setSendedMessages(customerBD.getSendedMessages());\n\t\t\tcustomer.setSocialProfiles(customerBD.getSocialProfiles());\n\t\t\tcustomer.setSuspicious(customerBD.getSuspicious());\n\t\t\tcustomer.setUserAccount(customerBD.getUserAccount());\n\n\t\t\t//Comprobamos que el actor sea un Customer\n\t\t\tthis.serviceUtils.checkAuthority(\"CUSTOMER\");\n\t\t\t//esto es para ver si el actor que está logueado es el mismo que se está editando\n\t\t\tthis.serviceUtils.checkActor(customer);\n\n\t\t}\n\t\tCustomer res;\n\t\t//le meto al resultado final el customer que he ido modificando anteriormente\n\t\tres = this.customerRepository.save(customer);\n\t\treturn res;\n\t}", "public void processOrders() \n\t{\n\t\tfor(int index = 0; index < orderList.size(); index++)\n\t\t{\t\n\t\t\t//process the order and possibly promote the customer object\n\t\t\tcustomerArrayHolder.processOrder(orderList.get(index));\n\t\t}\n\t\torderList.clear(); //should prevent memory leaks, not sure if necessary\n\t}", "public void action() {\n store.readNextArrival();\n Employee employee = (Employee)this.getActor();\n checkout = store.firstUnmannedCheckout();\n checkout.setCashier(employee);\n checkout.setOpen(true);\n int quittingTime = employee.getQuittingTime();\n Event event = new ShiftCompletedEvent(quittingTime, employee, checkout);\n store.getEventList().addEvent(event);\n \n System.out.printf(\"Time %d: Cashier %d arrives (Speed %d, quitting time %d, checkout %d)\\n\",\n time,\n employee.getId(),\n employee.getSpeed(),\n employee.getQuittingTime(),\n checkout.getIndex());\n }", "@Override\n\tpublic void addCustomers(Customer customer) {\n\n\t\tsessionFactory.getCurrentSession().save(customer);\n\t}", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// currentSession.save(theCustomer);\n\n\t\t// save/upate the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t}", "@Override\n\tpublic boolean createCustomer(Customer customer) {\n\n\t\tif (customer != null) {\n\t\t\tcustomers.add(customer);\n\t\t\tlogger.info(\"Customer added to the list\");\n\t\t\treturn true;\n\t\t} else {\n\t\t\tlogger.info(\"Failed to add customer to the list: createCustomer()\");\n\t\t\treturn false;\n\t\t}\n\t}", "public void AddCustomer(View v) {\r\n try {\r\n if (edtCustName.getText().toString().equalsIgnoreCase(\"\") || edtCustPhoneNo.getText().toString().equalsIgnoreCase(\"\") || edtCustAddress.getText().toString().equalsIgnoreCase(\"\")) {\r\n MsgBox.Show(\"Warning\", \"Please fill all details before adding customer\");\r\n } else if (edtCustPhoneNo.getText().toString().length()!= 10)\r\n {\r\n MsgBox.Show(\"Warning\", \"Please fill 10 digit customer phone number\");\r\n return;\r\n } else{\r\n Cursor crsrCust = dbBillScreen.getCustomer(edtCustPhoneNo.getText().toString());\r\n if (crsrCust.moveToFirst()) {\r\n MsgBox.Show(\"Note\", \"Customer Already Exists\");\r\n } else {\r\n String gstin = etCustGSTIN.getText().toString().trim().toUpperCase();\r\n if (gstin == null) {\r\n gstin = \"\";\r\n }\r\n boolean mFlag = GSTINValidation.checkGSTINValidation(gstin);\r\n if(mFlag)\r\n {\r\n if( !GSTINValidation.checkValidStateCode(gstin,this))\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please Enter Valid StateCode for GSTIN\");\r\n }\r\n else {\r\n InsertCustomer(edtCustAddress.getText().toString(), edtCustPhoneNo.getText().toString(),\r\n edtCustName.getText().toString(), 0, 0, 0, gstin);\r\n //ResetCustomer();\r\n //MsgBox.Show(\"\", \"Customer Added Successfully\");\r\n Toast.makeText(myContext, \"Customer Added Successfully\", Toast.LENGTH_SHORT).show();\r\n ControlsSetEnabled();\r\n checkForInterStateTax();\r\n }\r\n }else\r\n {\r\n MsgBox.Show(\"Invalid Information\",\"Please enter valid GSTIN for customer\");\r\n }\r\n\r\n }\r\n }\r\n } catch (Exception ex) {\r\n MsgBox.Show(\"Error\", ex.getMessage());\r\n }\r\n }", "public static void createOrder(Staff staff) {\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************Creating a new order************\");\n\t\t// TODO - implement RRPSS.createOrder\n\t\tTableManager tableManager = new TableManager();\n\t\tList listOfTables = tableManager.onStartUp();\n\n\t\tOrderManager orderManager = new OrderManager();\n\t\tTable table = null;\n\t\tOrder order = null;\n\t\tint i = 0;\n\t\tint choice = 0;\n\t\tboolean check = false;\n\t\tScanner sc = new Scanner(System.in);\n\n\t\ttry {\n\t\t\t// print the list of tables for the user to select from.\n\t\t\tfor (i = 0; i < listOfTables.size(); i++) {\n\t\t\t\ttable = (Table) listOfTables.get(i);\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.println((i + 1) + \") Table \" + table.getId()\n\t\t\t\t\t\t+ \" | Size: \" + table.getCapacity());\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.print(\"Select a table to create an order: \");\n\t\t\tchoice = Integer.parseInt(sc.nextLine());\n\n\t\t\ttable = (Table) listOfTables.get(choice - 1);\n\n\t\t\torder = new Order();\n\t\t\torder.setStaff(staff);\n\t\t\torder.setTable(table);\n\t\t\torder.setClosed(false);\n\n\t\t\tcheck = orderManager.createOrder(order);\n\n\t\t\tif (check) {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK UPDATE\");\n\t\t\t\tSystem.out.println(\"Order is created successfully!\");\n\n\t\t\t\tcheck = tableManager.updateTable(table);\n\n\t\t\t\tif (check) {\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\tSystem.out.println(\"Added order to table!\");\n\t\t\t\t}\n\n\t\t\t\telse {\n\t\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\t\tSystem.out.println(\"Failed to add order to table!\");\n\t\t\t\t}\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\t\tSystem.out.println(\"Failed to created order!\");\n\t\t\t}\n\t\t}\n\n\t\tcatch (Exception e) {\n\t\t\tSystem.out.print(\"\\t\\t\");\n\t\t\tSystem.out.format(\"%-25s:\", \"TASK STATUS\");\n\t\t\tSystem.out.println(\"Invalid Input!\");\n\t\t}\n\t\tSystem.out.print(\"\\t\\t\");\n\t\tSystem.out.println(\"************End of creating new order************\");\n\t}", "public static void createAccount(Customer customer) {\n\t\tcustomerList.add(customer);\n\t}", "public static void main(String[] args) {\n System.out.println(\"Welcome to kodluyoruz shop\");\n System.out.println(\"What's your name?\");\n\n Scanner scanner = new Scanner(System.in);\n\n String customer = scanner.nextLine();\n System.out.println(\"Hi \" + customer + \". Please choose one of the following options:\");\n System.out.println(\"\");\n\n Cart cart = new Cart();\n\n while(true) {\n\n System.out.println(\"Enter 1 to buy a product\");\n System.out.println(\"Enter 0 to chechout and proceed with the payment\");\n String input=scanner.nextLine();\n if(input.equals(\"1\")) {\n\n askCustomer(cart);\n }else {\n System.out.println(cart.toString());\n return;\n\n }\n }\n\n //Implement the user interface here\n // Ask the user to choose 0 (buy product) or\n // 1 (checkout), depending on what they want to do.\n // Use the method askCustomer\n }", "public void saveCustomer(Customer c) {\n database.saveCustomer(c.getCustomerID(), c.getName(), c.getAddress(), c.getEmail(), Customer.toBase64(c.getPassword()), c.getBirthday(), c.getPhoneNumber(), Customer.toBase64(c.getSalt()), -1);\n //TODO Implement a getter for getting the orderId so that it can be saved.\n }", "void createACustomer() {\r\n\t\tSystem.out.println(\"\\nCreating a customer:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tlogger.info(\"Welcome to Order Management System...!\");\n\t\t\t\n\t\t\tCustomerService custService = new CustomerService();\n\t\t\tPurchaseOrderService poService = new PurchaseOrderService();\n\t\t\tOrderItemsService ordersService = new OrderItemsService();\n\t\t\tStockItemService siService = new StockItemService();\n\t\t\t\n\t\t\tint ch = 0;\n\t\t\twhile(ch != 15) {\n\t\t\t\tSystem.out.println(\"\\n\\t***Order Management System***\\n\");\n\t\t\t\tSystem.out.println(\"1. Add new Customer\");\n\t\t\t\tSystem.out.println(\"2. Add new Purchase Order\");\n\t\t\t\tSystem.out.println(\"3. Add new Stock Item\");\n\t\t\t\tSystem.out.println(\"4. Fetch Customer based on ID\");\n\t\t\t\tSystem.out.println(\"5. Fetch Orders placed by specific Customers\");\n\t\t\t\tSystem.out.println(\"6. Fetch Orders placed for specific Duration\");\n\t\t\t\tSystem.out.println(\"7. Update Ship Date\");\n\t\t\t\tSystem.out.println(\"8. Fetch delayed Orders\");\n\t\t\t\tSystem.out.println(\"9. Fetch all Stock Items\");\n\t\t\t\tSystem.out.println(\"10. Find month-wise total orders shipped\");\n\t\t\t\tSystem.out.println(\"11. Find total amount collected based on months\");\n\t\t\t\tSystem.out.println(\"12. Find the customer who has made maximum orders\");\n\t\t\t\tSystem.out.println(\"13. Generate bill for customer for specific order\");\n\t\t\t\tSystem.out.println(\"14. Exit\");\n\t\t\t\t\n\t\t\t\tSystem.out.print(\"\\nEnter your choice: \");\n\t\t\t\tch = sc.nextInt();\n\t\t\t\t\n\t\t\t\tswitch(ch) {\n\t\t\t\t\tcase 1: Customer c = new Customer();\n\t\t\t\t\t\n\t\t\t\t\t\t\tsc.nextLine();\n\t\t\t\t\t\t\tSystem.out.print(\"\\nEnter Customer Name: \");\n\t\t\t\t\t\t\tc.setName(sc.nextLine());\n\t\t\t\t\t\t\tSystem.out.print(\"Home Phone: \");\n\t\t\t\t\t\t\tc.setHomePhone(sc.next());\n\t\t\t\t\t\t\tSystem.out.print(\"Cell Phone: \");\n\t\t\t\t\t\t\tc.setCellPhone(sc.next());\n\t\t\t\t\t\t\tSystem.out.print(\"Work Phone: \");\n\t\t\t\t\t\t\tc.setWorkPhone(sc.next());\n\t\t\t\t\t\t\tsc.nextLine();\n\t\t\t\t\t\t\tSystem.out.print(\"Street: \");\n\t\t\t\t\t\t\tc.setStreet(sc.nextLine());\n\t\t\t\t\t\t\tSystem.out.print(\"City: \");\n\t\t\t\t\t\t\tc.setCity(sc.nextLine());\n\t\t\t\t\t\t\tSystem.out.print(\"State: \");\n\t\t\t\t\t\t\tc.setState(sc.nextLine());\n\t\t\t\t\t\t\tSystem.out.print(\"Zip Code: \");\n\t\t\t\t\t\t\tc.setZip(sc.nextInt());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tcustService.addCustomer(c);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\tcase 2: \n\t\t\t\t\t\t\tSystem.out.print(\"\\nEnter Purchase-Order Number: \");\n\t\t\t\t\t\t\tint poNumber = sc.nextInt();\n\t\t\t\t\t\t\tSystem.out.print(\"Enter Customer Id: \");\n\t\t\t\t\t\t\tint customerId = sc.nextInt();\n\t\t\t\t\t\t\tSystem.out.print(\"Order Date: \");\n\t\t\t\t\t\t\tString orderDate = sc.next();\n\t\t\t\t\t\t\tSystem.out.print(\"Ship Date: \");\n\t\t\t\t\t\t\tString shipDate = sc.next();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tPurchaseOrder po = new PurchaseOrder(poNumber,customerId, Date.valueOf(orderDate), Date.valueOf(shipDate), 0);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tpoService.addPurchaseOrder(po);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tint itemCount = 0;\n\t\t\t\t\t\t\twhile(true) {\n\t\t\t\t\t\t\t\tSystem.out.print(\"Order Item Number: \");\n\t\t\t\t\t\t\t\tint itemNumber = sc.nextInt();\n\t\t\t\t\t\t\t\tSystem.out.print(\"Quantity required: \");\n\t\t\t\t\t\t\t\tint noOfItems = sc.nextInt();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(!siService.getStock(itemNumber))\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\nInvalid StockItem Id...!\");\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tStockItem stock = siService.getStockItem(itemNumber);\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\tif(noOfItems <= stock.getQtyInStock()) {\n\t\t\t\t\t\t\t\t\t\tOrderItems o = new OrderItems(poNumber, itemNumber, noOfItems);\n\t\t\t\t\t\t\t\t\t\tordersService.addOrder(o);\n\t\t\t\t\t\t\t\t\t\titemCount++;\n\t\t\t\t\t\t\t\t\t\tsiService.updateQuantityInStock(itemNumber, stock.getQtyInStock()-noOfItems);\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\nSorry, Item out of Stock...!\");\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSystem.out.print(\"\\nWant to add more items? (Press Y/y if yes and n/N if No) : \");\n\t\t\t\t\t\t\t\tchar Char = sc.next().charAt(0);\n\t\t\t\t\t\t\t\tif(Char == 'N' || Char == 'n')\n\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(itemCount == 0) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"\\nPurchase Order \"+poNumber+\" doesn't contain any item, Cancelling it...!\");\n\t\t\t\t\t\t\t\tpoService.deletePurchaseOrder(poNumber);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\tcase 3: StockItem si = new StockItem();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsc.nextLine();\n\t\t\t\t\t\t\tSystem.out.print(\"\\nStockItem Name: \");\n\t\t\t\t\t\t\tsi.setItemName(sc.nextLine());\n\t\t\t\t\t\t\tSystem.out.print(\"Item Price: \");\n\t\t\t\t\t\t\tsi.setItemPrice(sc.nextDouble());\n\t\t\t\t\t\t\tSystem.out.print(\"Stock Quantity: \");\n\t\t\t\t\t\t\tsi.setQtyInStock(sc.nextInt());\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tsiService.addStockItem(si);\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\tcase 4: System.out.print(\"\\nEnter Customer Id: \");\n\t\t\t\t\t\t\tint custId = sc.nextInt();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!custService.getCust(custId)) {\n\t\t\t\t\t\t\t\t//System.out.println(\"\\nInvalid Customer Id...!\");\n\t\t\t\t\t\t\t\tlogger.info(\"\\nException Occured : Invalid Customer ID \"+custId+\" ...!\");\n\t\t\t\t\t\t\t\tthrow new Exception(\"\\nException: Invalid Customer Id...!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse\n\t\t\t\t\t\t\t\tcustService.displayCustomer(custService.getCustomer(custId));\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\n\t\t\t\t\tcase 5: System.out.print(\"\\nEnter Customer Id: \");\n\t\t\t\t\t\t\tint custId1 = sc.nextInt();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!custService.getCust(custId1)) {\n\t\t\t\t\t\t\t\t//System.out.println(\"\\nInvalid Customer Id...!\");\n\t\t\t\t\t\t\t\tlogger.info(\"\\nException Occured : Invalid Customer ID \"+custId1+\" ...!\");\n\t\t\t\t\t\t\t\tthrow new Exception(\"\\nException: Invalid Customer Id...!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tList<PurchaseOrder> poList = poService.getPurchaseOrdersForSpecificCustomer(custId1);\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tif(poList.isEmpty())\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\nNo Purchase orders found, Please place your first order...!\");\n\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\tfor(PurchaseOrder p : poList)\n\t\t\t\t\t\t\t\t\t\tpoService.displayPurchaseOrder(p);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\n\t\t\t\t\tcase 6: int ch1 = 0;\n\t\t\t\t\t\t\twhile(ch1 != 3) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"\\n1. Placed between From and To date\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"2. Placed for specific date\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"3. Back\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tSystem.out.print(\"\\nYour choice: \");\n\t\t\t\t\t\t\t\tch1 = sc.nextInt();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tswitch(ch1) {\n\t\t\t\t\t\t\t\t\tcase 1: System.out.print(\"\\nFrom date: \");\n\t\t\t\t\t\t\t\t\t\t\tString fromDate = sc.next();\n\t\t\t\t\t\t\t\t\t\t\tSystem.out.print(\"To date: \");\n\t\t\t\t\t\t\t\t\t\t\tString toDate = sc.next();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tList<PurchaseOrder> poList1 = poService.getPurchaseOrdersForSpecificDuration(Date.valueOf(fromDate), Date.valueOf(toDate));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(poList1.isEmpty())\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\nNo Purchase orders found for given duration...!\");\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tfor(PurchaseOrder p : poList1)\n\t\t\t\t\t\t\t\t\t\t\t\t\tpoService.displayPurchaseOrder(p);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\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\tcase 2: System.out.print(\"\\nEnter date: \");\n\t\t\t\t\t\t\t\t\t\t\tString orderDate1 = sc.next();\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tList<PurchaseOrder> poList2 = poService.getPurchaseOrdersForSpecificDate(Date.valueOf(orderDate1));\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tif(poList2.isEmpty())\n\t\t\t\t\t\t\t\t\t\t\t\tSystem.out.println(\"\\nNo purchase orders found for given date...!\");\n\t\t\t\t\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\t\t\t\t\tfor(PurchaseOrder p : poList2)\n\t\t\t\t\t\t\t\t\t\t\t\t\tpoService.displayPurchaseOrder(p);\n\t\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\t\t\n\t\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\tcase 3: \n\t\t\t\t\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\t\t\n\t\t\t\t\tcase 7: System.out.println(\"\\nEnter Purchase-Order Number whose ship date is to be updated: \");\n\t\t\t\t\t\t\tint PONumber = sc.nextInt();\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif(!poService.getPurchOrder(PONumber)) {\n\t\t\t\t\t\t\t\t //System.out.println(\"\\nInvalid Purchase-Order Number...!\");\n\t\t\t\t\t\t\t\t logger.info(\"\\nException Occured : Invalid Purchase Order Number \"+PONumber+\" ...!\"); \n\t\t\t\t\t\t\t\t throw new Exception(\"\\nException: Invalid Purchase-Order Number...!\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tSystem.out.print(\"Enter Updated Ship Date: \");\n\t\t\t\t\t\t\t\tString updatedShipDate = sc.next();\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tpoService.updateShipDate(PONumber, Date.valueOf(updatedShipDate));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 8: List<PurchaseOrder> poList3 = poService.getDelayedPurchaseOrders();\n\t\t\t\t\t\n\t\t\t\t\t\t\tif(poList3.isEmpty())\n\t\t\t\t\t\t\t\tSystem.out.println(\"\\nThere is no delayed order...!\");\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tfor(PurchaseOrder p : poList3)\n\t\t\t\t\t\t\t\t\tpoService.displayPurchaseOrder(p);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 9: List<StockItem> siList = siService.getAllStockItems();\n\t\t\t\t\t\n\t\t\t\t\t\t\tif(siList.isEmpty())\n\t\t\t\t\t\t\t\tSystem.out.println(\"\\nNo available stock...! Add stock items...!\");\n\t\t\t\t\t\t\telse {\n\t\t\t\t\t\t\t\tSystem.out.println(\"\\n------------------------------------------------------------------\");\n\t\t\t\t\t\t\t\tSystem.out.printf(\"%-15s%-15s%-15s%-20s%-5s\\n\", \"Item Number\", \"| Item Name\", \"| Item Price\", \"| Quantity in Stock\", \" |\");\n\t\t\t\t\t\t\t\tSystem.out.println(\"------------------------------------------------------------------\");\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\tfor(StockItem s : siList)\n\t\t\t\t\t\t\t\t\tsiService.displayStockItem(s);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 10: poService.getMonthWiseTotalOrdersShipped();\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\n\t\t\t\t\tcase 11: poService.getMonthlyTotalAmountCollected();\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 12: poService.getCustomerWithMaximumOrders();\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\n\t\t\t\t\tcase 13: System.out.print(\"\\nEnter Purchase-Order Number: \");\n\t\t\t\t\t\t\t int poNumber1 = sc.nextInt();\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t if(!poService.getPurchOrder(poNumber1)) {\n\t\t\t\t\t\t\t\t //System.out.println(\"\\nInvalid Purchase-Order Number...!\");\n\t\t\t\t\t\t\t\t logger.info(\"\\nException Occured : Invalid Purchase Order Number \"+poNumber1+\" ...!\");\n\t\t\t\t\t\t\t\t throw new Exception(\"\\nException: Invalid Purchase-Order Number...!\");\n\t\t\t\t\t\t\t }\n\t\t\t\t\t\t\t else\n\t\t\t\t\t\t\t\t poService.generateBill(poService.getPurchaseOrder(poNumber1));\n\t\t\t\t\t\t\t \n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\n\t\t\t\t\tcase 14: System.out.println(\"\\nThank you for using the \\\"Order Management System\\\"!!!\");\n\t\t\t\t\t\t\t logger.info(\"\\nThank you for using \\\"Order Management System\\\"!!!\");\n\t\t\t\t\t\t\t System.exit(0);\n\t\t\t\t\t\t\t break;\n\t\t\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t\t//System.out.println(e.getMessage());\n\t\t}\n\t\t\n\t\tsc.close();\n\t}", "@PostMapping(\"/order\")\n public ResponseEntity<OrderConfirmation> placeOrder(final HttpSession session) throws Exception {\n Map<String, CartProduct> initialCart = (Map<String, CartProduct>) session.getAttribute(CART_SESSION_CONSTANT);\n log.info(session.getId() + \" : Reviewing the order\");\n //check if the cart is empty\n ControllerUtils.checkEmptyCart(initialCart, session.getId());\n\n //check if items are still available during confirmation of order\n List<OrderProduct> orderProducts = new ArrayList<>();\n for (String key : initialCart.keySet())\n orderProducts.add(ControllerUtils.parse(initialCart.get(key)));\n List<String> chckQuantity = prodService.checkQuantityList(orderProducts);\n if (chckQuantity != null) {\n log.error(session.getId() + \" : Error submitting order for products unavailable\");\n throw new AvailabilityException(chckQuantity);\n }\n\n //Confirm order and update tables\n log.info(session.getId() + \" : confirming the order and killing the session\");\n OrderConfirmation orderConfirmation = prodService.confirmOrder(initialCart);\n session.invalidate();\n return ResponseEntity.status(HttpStatus.OK).body(orderConfirmation);\n }", "private void addOrder() {\r\n // Variables\r\n String date = null, cust_email = null, cust_location = null, product_id = null;\r\n int quantity = 0;\r\n\r\n // Date-Time Format \"YYYY-MM-DD\"\r\n DateTimeFormatter dateFormatter = DateTimeFormatter.ISO_LOCAL_DATE;\r\n boolean date_Valid = false;\r\n\r\n // Separator for user readability\r\n String s = \"----------------------------------------\"; // separator\r\n\r\n boolean user_confirmed = false;\r\n while (!user_confirmed) {\r\n\r\n // module header\r\n System.out.println(s);\r\n System.out.println(\"Adding Order: \");\r\n System.out.println(s);\r\n\r\n // Getting the user date for entry\r\n System.out.print(\"Enter Date(YYYY-MM-DD): \");\r\n date = console.next();\r\n //This while loop will check if the date is valid\r\n while (!date_Valid) {\r\n try {\r\n LocalDate.parse(date, dateFormatter);\r\n System.out.println(\"Validated Date\");\r\n date_Valid = true;\r\n } catch (DateTimeParseException e) {\r\n date_Valid = false;\r\n System.out.println(\"Invalid Date\");\r\n System.out.print(\"Enter valid date(YYYY-MM-DD):\");\r\n date = console.next();\r\n }\r\n }\r\n\r\n // Getting user email\r\n System.out.print(\"Enter customer email: \");\r\n cust_email = console.next();\r\n boolean flag = false;\r\n int countr = 0, countd = 0;\r\n while(!flag) {\r\n //This loop will check if the email is valid\r\n for (int i = 0; i < cust_email.length(); i++) {\r\n if (cust_email.charAt(i) == '@') {\r\n countr++;\r\n if (countr > 1) {\r\n flag = false;\r\n break;\r\n }\r\n if (i >= 1) flag = true;\r\n else {\r\n flag = false;\r\n break;\r\n }\r\n\r\n }\r\n if (cust_email.charAt(i) == '.') {\r\n countd++;\r\n if (countd > 1) {\r\n flag = false;\r\n break;\r\n }\r\n if (i >= 3) flag = true;\r\n else {\r\n flag = false;\r\n break;\r\n }\r\n }\r\n if (cust_email.indexOf(\".\") - cust_email.indexOf(\"@\") >= 2) {\r\n flag = true;\r\n }\r\n if (!flag) break;\r\n }\r\n if (flag && cust_email.length() >= 5) {\r\n System.out.println(\"Validated Email\");\r\n break;\r\n } else {\r\n System.out.println(\"Invalid Email\");\r\n }\r\n }\r\n\r\n //Validate the customer ZIP code\r\n System.out.print(\"Enter ZIP Code: \");\r\n cust_location = console.next();\r\n while((cust_location.length()) != 5){\r\n System.out.println(\"ZIP Code must be 5 characters long\");\r\n System.out.print(\"Enter ZIP Code: \");\r\n cust_location = console.next();\r\n }\r\n\r\n // Validate product id\r\n System.out.print(\"Enter Product ID: \");\r\n product_id = console.next();\r\n while ((product_id.length()) != 12) {\r\n System.out.println(\"Product ID must be 12 characters long!\");\r\n System.out.print(\"Enter Product ID: \");\r\n product_id = console.next();\r\n }\r\n\r\n // Validate quantity\r\n System.out.print(\"Enter Quantity: \");\r\n while (!console.hasNextInt()) {\r\n System.out.println(\"Quantity must be a whole number!\");\r\n System.out.print(\"Enter Quantity: \");\r\n console.next();\r\n }\r\n quantity = console.nextInt();\r\n\r\n //Confirming Entries\r\n System.out.println(s);\r\n System.out.println(\"You entered the following values:\");\r\n System.out.println(s);\r\n System.out.printf(\"%-11s %-20s %-20s %-18s %-11s\\n\", \"|DATE:|\", \"|CUSTOMER EMAIL:|\", \"|CUSTOMER LOCATION:|\", \"|PRODUCT ID:|\", \"|QUANTITY:|\");\r\n System.out.printf(\"%-11s %-20s %-20s %-18s %11s\\n\", date, cust_email, cust_location, product_id, quantity);\r\n System.out.println(s);\r\n System.out.println(\"Is this correct?\");\r\n System.out.print(\"Type 'yes' to add this record, type 'no' to start over: \");\r\n String inp = console.next();\r\n boolean validated = false;\r\n while (validated == false) {\r\n if (inp.toLowerCase().equals(\"yes\")) {\r\n validated = true;\r\n user_confirmed = true;\r\n }\r\n else if (inp.toLowerCase().equals(\"no\")) {\r\n validated = true;\r\n\r\n }\r\n else {\r\n System.out.print(\"Invalid response. Please type 'yes' or 'no': \");\r\n inp = console.next();\r\n }\r\n }\r\n }\r\n OrderItem newItem = new OrderItem(date, cust_email, cust_location, product_id, quantity);\r\n orderInfo.add(newItem);\r\n\r\n // alert user and get next step\r\n System.out.println(s);\r\n System.out.println(\"Entry added to Data Base!\");\r\n System.out.println(s);\r\n System.out.println(\"Do you want to add another entry?\");\r\n System.out.print(\"Type 'yes' to add another entry, or 'no' to exit to main menu: \");\r\n String inp = console.next();\r\n boolean valid = false;\r\n while (valid == false) {\r\n if (inp.toLowerCase().equals(\"yes\")) {\r\n valid = true;\r\n addOrder();\r\n } else if (inp.toLowerCase().equals(\"no\")) {\r\n valid = true; // possibly direct to main menu later\r\n } else {\r\n System.out.print(\"Invalid response. Please type 'yes' or 'no': \");\r\n inp = console.next();\r\n }\r\n }\r\n }", "void insertCustomer() {\n\t\tCallableStatement cs = null;\n\t\ttry {\n\t\t\tString call = \"call insert_customer (?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?,?)\";\n\t\t\tcs = conn.prepareCall(call);\t\t\t\n\t\t\tArrayList <String> param = new ArrayList<String>(); \n\t\t\tparam.add(genderBox.getSelectedItem().toString());\n\t\t\tparam.add(titleBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldFirstName.getText());\t\t\t\n\t\t\tparam.add(fieldMidName.getText());\n\t\t\tparam.add(fieldLastName.getText());\n\t\t\tparam.add(fieldAddress.getText());\n\t\t\tparam.add(fieldCity.getText());\n\t\t\tparam.add(fieldState.getText());\n\t\t\tparam.add(fieldZipcode.getText());\n\t\t\tparam.add(fieldEmail.getText());\t\t\t\n\t\t\tparam.add(fieldUsername.getText());\n\t\t\tparam.add(fieldPassword.getText());\n\t\t\tparam.add(fieldTelephone.getText());\n\t\t\tparam.add(fieldMaidenName.getText());\n\t\t\tparam.add(fieldBirthday.getText());\n\t\t\tparam.add(cctypeBox.getSelectedItem().toString());\n\t\t\tparam.add(fieldCCnumber.getText());\n\t\t\tparam.add(fieldCCV.getText());\n\t\t\tparam.add(fieldExpirDate.getText());\n\t\t\tparam.add(fieldSocialSecurity.getText() + \" \");\n\t\t\t\n\t\t\tfor (int i = 0; i < 20; i++) {\n\t\t\t\tcs.setString(i+1, param.get(i));\n\t\t\t}\n\t\t\tcs.executeUpdate();\n\t\t\tconn.commit();\n\t\t} catch (SQLException e) {\n\t\t\tSystem.err.println(\"Exception caught: \" + e.getMessage());\n\t\t\tJOptionPane.showMessageDialog(this, \"User, \" + fieldUsername.getText() +\" already exists.\");\n\t\t} finally {\n\t\t\t\n\t\t}\n\t}", "public PreferredCustomer() \n\t{\n\t\tsuper();\n\t\tcustomerPurchase = 0; \n\t}", "private void Confirm(Stage stage){\n //Set the customer information as the text inputted\n int length = MainGui.obBookingsLedger.getCustomerList().size();\n obCustomer.setCustomerID(length++);\n obCustomer.setName(txtName.getText());\n obCustomer.setLast(txtLast.getText());\n obCustomer.setAddress(txtAddress.getText());\n obCustomer.setCity(txtCity.getText());\n obCustomer.setProvince(txtProvince.getText());\n obCustomer.setCountry(txtCountry.getText());\n obCustomer.setPostal(txtPostal.getText());\n obCustomer.setEmail(txtEmail.getText());\n\n //Concatenates the phone boxes into one string each.\n String sPhone = txtPhone.getText() + txtPhone2.getText() + txtPhone3.getText();\n String sSecPhone = txtSecPhone.getText() + txtSecPhone2.getText() + txtSecPhone3.getText();\n String sFax = txtFax.getText() + txtFax2.getText() + txtFax3.getText();\n //Having the fax or secondary phone fields blank will cause errors, so they're set to 0 if they don't exist.\n if (sFax.equals(\"\")) {\n sFax = \"0\";\n }\n if (sSecPhone.equals(\"\"))\n {\n sSecPhone = \"0\";\n }\n String sVal = \"\";\n\n //Try/catch block to prevent non-numbers from being entered in phone/fax fields.\n try {\n sVal = obCustomer.updateCustomer(obCustomer.getName(), obCustomer.getLast(), obCustomer.getAddress(),\n obCustomer.getProvince(), obCustomer.getCity(), obCustomer.getPostal(), obCustomer.getCountry(),\n obCustomer.getEmail(), Long.parseLong(sPhone), Long.parseLong(sFax), Long.parseLong(sSecPhone), 1);\n }\n catch (NumberFormatException exp){\n sVal = \"Please enter only numbers in phone and fax fields.\";\n }\n\n //An alert will pop up denoting success or failure. The error contents come from Customer's UpdateCustomer method.\n //If successful, all fields will revert to being non-editable.\n if (sVal.equals(\"Successfully added\")){\n MainGui.obBookingsLedger.getCustomerList().add(obCustomer);\n\n /* Save Data */\n PersistentDataManager.saveAll(obBookingsLedger);\n\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Success!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Customer successfully added\");\n alert.showAndWait();\n stage.setScene(MainGui.mainScene);\n }\n else {\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error Detected\");\n alert.setHeaderText(\"Not all fields were correctly entered.\");\n alert.setContentText(sVal);\n alert.showAndWait();\n }\n\n }", "public Order(Customer customer, List<AbstractProduct> removedItems) {\n this.customer = customer;\n this.outOfStock = removedItems;\n status = OrderStatus.PENDING;\n }", "@Test(alwaysRun=true, priority=15,enabled=true)\n\tpublic void addNewCustomer() throws InterruptedException, IOException {\t\n\t\tadminPage.addNewCustomer(driver);\n\t}", "@Override\n\tpublic void msgIWantStuff(MarketCustomer c, ArrayList<String> needs) {\n\t\tprint(\"Recieved order from Customer: \" + c.getCustomerName());\n\t\tmyCustomers.add(new MyCustomer(c, needs));\n\t\tprint(\"Size of myCustomer list: \" + myCustomers.size());\n\t\tstateChanged();\n\t}", "public void add(Customer customer) {\n\t\tSessionFactory sessionFactory = HibernateUtil.getSessionFactory();\n\t\t//Step 2. Create/Obtain Session object\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//Step 3. Start/Participate in a Transaction\n\t\tTransaction tx = session.beginTransaction();\n\t\t\n\t\t//Now we can insert/update/delete/select whatever we want\n\t\tsession.save(customer); //save method generates insert query\n\t\t\n\t\ttx.commit();\n\t}", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "public static void askCustomer(Cart cart){\n // Code to read from console the product name, seller,\n // price, number of products, discount and\n // if Buy2Take3 applies.\n // Then create a product of the correct type\n // and add it to the shopping cart\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.print(\"Product name: \");\n String pName = scanner.nextLine();\n\n System.out.print(\"Seller: \");\n String seller = scanner.nextLine();\n\n System.out.print(\"Price: \");\n double price = scanner.nextDouble();\n\n System.out.print(\"How many: \");\n int howMany = scanner.nextInt();\n\n System.out.print(\"Discount (enter 0 if no discount applies): \");\n int discount = scanner.nextInt();\n\n\n System.out.print(\"Does Buy2Take3 apply? Y/N: \");\n String buy2take3 =scanner.next();\n\n\n Product product;\n\n\n if(discount>0&&buy2take3.equals(\"N\")) {\n product=new Product(pName,seller,price);\n DiscountedProduct bt=new DiscountedProduct(product,discount);\n cart.addProduct(bt,howMany);\n }\n else if(discount==0&&buy2take3.equals(\"Y\")) {\n product=new Product(pName,seller,price);\n Buy2Take3Product bt2=new Buy2Take3Product(product);\n cart.addProduct(bt2,howMany);\n }else {\n throw new IllegalArgumentException(\"You can not use both campaign\");\n }\n }", "@Override\n\tpublic void saveCustomer(Customer theCustomer) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// save the customer\n\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t//currentSession.save(theCustomer);\n\t}", "void createCustomers() {\r\n\t\tSystem.out.println(\"\\nCreating 5 customers:\");\r\n\t\tEntityManager em = emf.createEntityManager();\r\n\t\tEntityTransaction tx = em.getTransaction();\r\n\t\tCustomer2 c1 = new Customer2(\"Ali\", \"Telli\");\r\n\t\tCustomer2 c2 = new Customer2(\"Serap\", \"Atik\");\r\n\t\tCustomer2 c3 = new Customer2(\"Kemal\", \"Tanir\");\r\n\t\tCustomer2 c4 = new Customer2(\"Betul\", \"Kara\");\r\n\t\tCustomer2 c5 = new Customer2(\"Selman\", \"Saki\");\r\n\t\ttx.begin();\r\n\t\tem.persist(c1);\r\n\t\tem.persist(c2);\r\n\t\tem.persist(c3);\r\n\t\tem.persist(c4);\r\n\t\tem.persist(c5);\r\n\t\ttx.commit();\r\n\t\tem.close();\r\n\t}", "public void buySellChrystite(boolean buy, Player customer) {\n if (buy && crysQuantity == 0) {\n GameController.errorMessageBox(\"Not enough Crystite in the store.\");\n } else {\n if (buy) {\n crysQuantity--;\n if (customer.getMoney() >= crysCost) {\n customer.addSubMoney(-crysCost);\n customer.addSubCrystite(1);\n if (crysQuantity == 0) {\n crysCost = 100;\n } else {\n crysCost += 10;\n }\n } else {\n GameController.errorMessageBox(\"You do not have enough money for this item\");\n }\n } else {\n if (customer.getCrystite() >= 1) {\n customer.addSubMoney(crysCost-15);\n if (crysQuantity == 0) {\n crysCost = 100;\n } else {\n crysCost -= 10;\n }\n customer.addSubCrystite(-1);\n crysQuantity++;\n } else {\n GameController.errorMessageBox(\"You do not have enough money for this item\");\n }\n }\n }\n }", "@Action\r\n public String proceed() {\n ServiceFunctions.clearCache();\r\n\r\n // Validation in the controller, because custom validators\r\n // for the complex UI would be an overhead\r\n\r\n // If nothing is chosen, return to the results page\r\n if (selectedEntry == null) {\r\n addError(\"mustSelectEntry\");\r\n return null;\r\n }\r\n\r\n if (TWO_WAY.equals(travelType) && selectedReturnEntry == null) {\r\n addError(\"mustSelectReturnEntry\");\r\n return null;\r\n }\r\n\r\n // Creating many ticket instances\r\n List<Seat> selectedSeats = seatController.getSeatHandler()\r\n .getSelectedSeats();\r\n List<Seat> selectedReturnSeats = null;\r\n\r\n if (seatController.getReturnSeatHandler() != null) {\r\n selectedReturnSeats = seatController.getReturnSeatHandler()\r\n .getSelectedSeats();\r\n }\r\n\r\n try {\r\n ticket = getTicketToAlter();\r\n if (ticket == null) {\r\n ticket = ticketService.createTicket(selectedEntry, selectedReturnEntry,\r\n ticketCountsHolder, selectedSeats, selectedReturnSeats);\r\n } else {\r\n\r\n ticketService.alterTicket(ticket, selectedEntry, selectedReturnEntry,\r\n ticketCountsHolder, selectedSeats, selectedReturnSeats);\r\n\r\n if (ticket.getAlterationPriceDifference().compareTo(BigDecimal.ZERO) < 0) {\r\n addMessage(\"priceDiffereceIsSubstracted\");\r\n }\r\n }\r\n } catch (TicketCreationException ex) {\r\n addError(ex.getMessageKey(), ex.getArguments());\r\n if (ex.isRedoSearch()) {\r\n return search();\r\n }\r\n return null;\r\n }\r\n\r\n purchaseController.getTickets().add(ticket);\r\n\r\n // If the user is staff-member, i.e. this is admin panel,\r\n // set the customer name, and mark the tickets as sold\r\n User user = loggedUserHolder.getLoggedUser();\r\n if (user != null && user.isStaff() && isAdmin()) {\r\n ticket.setCustomerInformation(new Customer());\r\n ticket.getCustomerInformation().setName(customerName);\r\n // setting to empty values in order to bypass validation on cascade\r\n ticket.getCustomerInformation().setEmail(\"\");\r\n ticket.getCustomerInformation().setContactPhone(\"\");\r\n\r\n purchaseController.finalizePurchase(user);\r\n // redo the search\r\n adminSearch();\r\n return null; // returning null, because the action is\r\n // called from modal window with ajax\r\n }\r\n\r\n if (ticket.isAltered() && ticket.getAlterationPriceDifference().compareTo(BigDecimal.ZERO) == 0) {\r\n purchaseController.finalizePurchase(user);\r\n return navigateToSearch();\r\n }\r\n\r\n // before redirecting to the payments page, reset the selections\r\n // in order to have a fresh page if a back button is pressed\r\n resetSelectionsPartial();\r\n purchaseController.setCurrentStep(Step.PAYMENT);\r\n return Screen.PAYMENT_SCREEN.getOutcome();\r\n\r\n }", "@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n\tpublic void addCustomer(Customer customer, Branch branch) {\n\t\t\n\t}", "private void jButton1ActionPerformed(java.awt.event.ActionEvent evt) {\n\t \t\n\t \tboolean custCreated = createCustomer();\n\t \t\n\t \t\t\n\t \tif(custCreated){\n\t \t\tdispose();\n\t \t\thome home = new home(cust);\n\t \t\thome.setLocationRelativeTo(null);\n\t \t\thome.setVisible(true);\n\t \t}\n\t \t\n\t \t\n\t }", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "public void purchase(){\n\t\t\n\t\t//Ask the user for notes about the item\n\t\tSystem.out.println(\"Please enter any special requests regarding your \" +\n\t\t\t\t\t\t\t\"food item for our staff to see while they prepare it.\");\n\t\tScanner scan = new Scanner(System.in);\n\t\tString foodNotes = scan.nextLine();\n\t\tnotes = foodNotes;\n\t\t\n\t\t//Add this item's price to the order total\n\t\tMenu.orderPrice += price;\n\t\t\n\t}", "public void setCustomer(Customer customer) {\r\n\t\tthis.customer = customer;\r\n\t\tpassengers.add(customer);\r\n\t}", "@Override\n\tpublic void msgReadyToOrder(Customer customerAgent) {\n\t\t\n\t}" ]
[ "0.7213447", "0.6913898", "0.68684673", "0.6840123", "0.68215036", "0.67424834", "0.6674146", "0.6556172", "0.6414465", "0.63968587", "0.63904953", "0.63356584", "0.6312178", "0.629775", "0.6146422", "0.6104262", "0.61005986", "0.60858315", "0.6073899", "0.6073899", "0.6073899", "0.6058552", "0.6039417", "0.60157377", "0.6013675", "0.6004071", "0.6003709", "0.5989915", "0.596149", "0.5956472", "0.594338", "0.5939699", "0.59345496", "0.59309816", "0.5910201", "0.58656234", "0.58578694", "0.58356774", "0.580986", "0.57755405", "0.57740176", "0.57721484", "0.57695514", "0.57643735", "0.57561374", "0.5744424", "0.57413346", "0.57309604", "0.5729507", "0.5717715", "0.5707387", "0.57039875", "0.5694478", "0.56924057", "0.5669566", "0.5668747", "0.5664808", "0.5662253", "0.5657468", "0.56569594", "0.56561834", "0.56525224", "0.56470376", "0.56454873", "0.56389284", "0.5636296", "0.5633362", "0.56317437", "0.563155", "0.5624566", "0.5623028", "0.5622708", "0.562159", "0.5619509", "0.5619123", "0.56147295", "0.56135345", "0.5611526", "0.5597112", "0.55948865", "0.5582612", "0.5572364", "0.5561254", "0.5554167", "0.5553896", "0.55515087", "0.5548115", "0.5542861", "0.5537744", "0.5536052", "0.5530217", "0.55300456", "0.55215096", "0.55191237", "0.55113196", "0.55016536", "0.549952", "0.5495072", "0.5485878", "0.5482373" ]
0.6213201
14
This is the entry point method.
public void onModuleLoad() { singleton = this; dockPanel.setWidth("100%"); dockPanel.setSpacing(8); menuBar.setVisible(false); menuBar.setStyleName("menu"); flowPanel.setWidth("100%"); flowPanel.add(menuBar); statusBar.setVisible(false); statusBar.setStyleName("status"); flowPanel.add(statusBar); dockPanel.add(flowPanel,DockPanel.NORTH); loginPanel.setVisible(false); dockPanel.add(loginPanel,DockPanel.WEST); publisherListPanel.setVisible(false); publisherListPanel.setWidth("100%"); dockPanel.add(publisherListPanel,DockPanel.CENTER); RootPanel.get("publisher").add(dockPanel); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Main() {\n\n super();\n }", "public static void main() {\n \n }", "public Main() {\n \n \n }", "public void run() {\n // The run method should be overridden by the subordinate class. Please\n // see the example applications provided for more details.\n }", "public Main() {\r\n\t\tsuper();\r\n\t\tinitialize();\r\n\r\n\t}", "private void start() {\n\n\t}", "private Main ()\n {\n super ();\n }", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "public static void main(String[] args) throws Exception {\n\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t}", "@Override\n protected void startUp() {\n }", "public MainEntryPoint() {\r\n\r\n }", "public static void main(String[] args) {\n \n \n \n \n }", "public Main() {\n\t\tsuper();\n\t}", "public static void main(String[] args) {\n // TODO code application logic here\n // some testing? or actually we can't run it standalone??\n }", "protected void start() {\n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "public static void main(String[] args) {\n \n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n public void start() {\n\n }", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n\t\t\tpublic void run() {\n\t\t\t\t\n\t\t\t}", "public void run() {\n\n }", "@Override public void run(ApplicationArguments args) {\n }", "@Override\n public void startup() {\n }", "@Override\n protected void appStart() {\n }", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\t\t\n\t}", "@Override\n\tpublic void start() {\n\n\t}", "@Override\n\t\t\tpublic void run() {\n\n\t\t\t}", "@Override\n public void start() {\n }", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "@Override\n public void run(ApplicationArguments args) {\n }", "@Override\r\n\tpublic void start() {\n\t\t\r\n\t}", "public static void main(){\n\t}", "@Override\n\t public void run(ApplicationArguments args) throws Exception {\n\n\t }", "public main() {\n initComponents();\n \n }", "@Override\n\tpublic void entry() {\n\n\t}", "public static void main(String[] args) {\n\r\n Starter starter = new Starter();\r\n starter.start();\r\n\r\n\r\n }", "public void start() {\n\n\t}", "public static void main()\n\t{\n\t}", "public static void main(String []args){\n\n }", "public static void main(String[] args) {\r\n// Use for unit testing\r\n }", "private Main() {\n }", "public void startup(){}", "public Main() {\r\n\t}", "public void start() {\n\t\t\n\t}", "public void start() {\n\t\t\n\t}", "public static void main(String[] args) {\n \n \n \n\t}", "public static void main(String[] args) {\n\t \t\n\t \t\n\t }", "public static void main() {\n }", "public static void main(String[] args) {\n staticFiles.location(\"/public\");\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model\", (req, res) -> newModel());\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:row/:col\", (req, res) -> fireAt(req));\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:id/:row/:col/:orientation\", (req, res) -> placeShip(req));\n }", "@Override\n public void start() { }", "public void run() {\n\t\tport(8080);\n\n\t\t// Main Page, welcome\n\t\tget(\"/\", (request, response) -> \"Welcome!\");\n\n\t\t// Date\n\t\tget(\"/date\", (request, response) -> {\n\t\t\tDate d = new Date(\"frida.org\", Calendar.getInstance().get(Calendar.YEAR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MONTH), Calendar.getInstance().get(Calendar.DAY_OF_MONTH));\n\t\t\treturn om.writeValueAsString(d);\n\t\t});\n\n\t\t// Time\n\t\tget(\"/time\", (request, response) -> {\n\t\t\tTime t = new Time(\"frida.org\", Calendar.getInstance().get(Calendar.HOUR),\n\t\t\t\t\tCalendar.getInstance().get(Calendar.MINUTE), Calendar.getInstance().get(Calendar.SECOND));\n\t\t\treturn om.writeValueAsString(t);\n\t\t});\n\t}", "public void run() {\n }", "@Override\r\n public void start() {\r\n }", "public void start()\n {\n }", "public void run() {\n\t\t\t\t\n\t\t\t}", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\n public void start() {\n }", "@Override\r\n\tpublic void run(String... args) throws Exception {\n\t\t\r\n\t}", "public static void main(String []args){\n }", "public static void main(String []args){\n }", "public static void main (String []args){\n }", "@Override\r\n\t\tprotected void run() {\n\t\t\t\r\n\t\t}", "public static void main(String[] args) {\n staticFiles.location(\"/public\");\n\n //This will listen to GET requests to /model and return a clean new model\n get(\"/model/:Version\", (req, res) -> newModel( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to fire to\n post(\"/fire/:Version/:row/:col/:hard\", (req, res) -> fireAt( req ));\n //This will handle the scan feature\n post(\"/scan/:Version/:row/:col/:hard\", (req, res) -> scan( req ));\n\n //This will listen to POST requests and expects to receive a game model, as well as location to place the ship\n post(\"/placeShip/:Version/:id/:row/:col/:orientation/:hard\", (req, res) -> placeShip( req ));\n }", "@Override public void start() {\n }", "@Override\n\tpublic void start() {\n\t}", "@Override\n\tpublic void start() {\n\t}", "public static void main(String[] args) {\n \n\n }", "@Override\n public void start() {}", "void startup();", "void startup();", "@Override\n public void run() {\n startup();\n }", "private Main() {}", "public static void run() {\n }", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void launch() {\n\t\t\r\n\t}", "public static void main(String[] args)\r\t{", "protected void index()\r\n\t{\n\t}", "public void run() {\n\t\t\r\n\t}", "public void run() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void run(String... args) throws Exception {\n\t\t\n\t}", "Main ()\n\t{\n\t\tview = new View ();\t\t\n\t\tmodel = new Model(view);\n\t\tcontroller = new Controller(model, view);\n\t}" ]
[ "0.6960738", "0.69552404", "0.66707826", "0.66208535", "0.6555327", "0.64776266", "0.64771515", "0.64659804", "0.64316505", "0.64081883", "0.6335417", "0.63307303", "0.63175744", "0.6270908", "0.6238488", "0.6237389", "0.6237389", "0.6235709", "0.6235709", "0.6235709", "0.6235709", "0.6235709", "0.6235709", "0.6235162", "0.6235162", "0.6235162", "0.62305546", "0.62305546", "0.62300134", "0.62238896", "0.62235516", "0.62223476", "0.6215727", "0.6215727", "0.6215727", "0.6215727", "0.62011397", "0.62006915", "0.6199479", "0.6189238", "0.6189025", "0.61833894", "0.61821145", "0.6173178", "0.61637986", "0.6163775", "0.6155601", "0.61548257", "0.6154415", "0.614913", "0.6144427", "0.6138581", "0.61100346", "0.6108789", "0.6108068", "0.6108068", "0.60964036", "0.6093366", "0.6090984", "0.6084713", "0.6077541", "0.60754824", "0.6068671", "0.60639447", "0.6058585", "0.60573876", "0.6056404", "0.6056404", "0.6056404", "0.6056404", "0.6056404", "0.6056404", "0.6056404", "0.6049267", "0.6047899", "0.6047899", "0.6047002", "0.6039554", "0.60381866", "0.60350984", "0.6034692", "0.6034692", "0.6031681", "0.6029989", "0.602855", "0.602855", "0.60262364", "0.60225827", "0.6021755", "0.6012416", "0.6012416", "0.6012416", "0.60089284", "0.6007561", "0.6004948", "0.6004948", "0.5995004", "0.5990427", "0.5990427", "0.5990427", "0.5988969" ]
0.0
-1
Instantiates a new index already exists exception.
public IndexAlreadyExistsException(Index index) { super(index, "Already exists"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public EntityAlreadyExistsException() {\n\t\tsuper(\"exception.entity.already.exists\");\n\t}", "public synchronized void createIndexIfNeeded(final String index) throws NeutronCheckedException {\n try {\n if (!doesIndexExist(index)) {\n LOGGER.warn(\"ES INDEX {} DOES NOT EXIST!!\", index);\n createIndex(index, NUMBER_OF_SHARDS, NUMBER_OF_REPLICAS);\n\n // Give Elasticsearch a moment to catch its breath.\n Thread.sleep(2000); // NOSONAR\n }\n } catch (InterruptedException | IOException e) {\n throw JobLogs.checked(LOGGER, e, \"CREATE INDEX FAILED! {}\", e.getMessage());\n }\n }", "InstAssignIndex createInstAssignIndex();", "private void ensureHashingIndexExists() {\n DB metadataDB = client.getDB(\"cacheManagerMetadata\");\n if (!metadataDB.collectionExists(\"hashingIndex\")) {\n DBCollection hashingIndex = metadataDB.getCollection(\"hashingIndex\");\n hashingIndex.createIndex(new BasicDBObject(\"hashValue\", 1),\n new BasicDBObject(\"unique\", 1));\n }\n }", "boolean indexExists(String name) throws ElasticException;", "String createIndex() {\n\t\tboolean res = indexExists();\n\t\t@SuppressWarnings(\"unused\")\n\t\tint resCode;\n\t\tif (!res) {\n\t\t\tresCode = doHttpOperation(esIndexUrl, HTTP_PUT, null);\n\t\t}\n\t\treturn lastResponse;\n\t}", "private void ensureIndexes() throws Exception {\n LOGGER.info(\"Ensuring all Indexes are created.\");\n\n QueryResult indexResult = bucket.query(\n Query.simple(select(\"indexes.*\").from(\"system:indexes\").where(i(\"keyspace_id\").eq(s(bucket.name()))))\n );\n\n\n List<String> indexesToCreate = new ArrayList<String>();\n indexesToCreate.addAll(Arrays.asList(\n \"def_sourceairport\", \"def_airportname\", \"def_type\", \"def_faa\", \"def_icao\", \"def_city\"\n ));\n\n boolean hasPrimary = false;\n List<String> foundIndexes = new ArrayList<String>();\n for (QueryRow indexRow : indexResult) {\n String name = indexRow.value().getString(\"name\");\n if (name.equals(\"#primary\")) {\n hasPrimary = true;\n } else {\n foundIndexes.add(name);\n }\n }\n indexesToCreate.removeAll(foundIndexes);\n\n if (!hasPrimary) {\n String query = \"CREATE PRIMARY INDEX def_primary ON `\" + bucket.name() + \"` WITH {\\\"defer_build\\\":true}\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created primary index.\");\n } else {\n LOGGER.warn(\"Could not create primary index: {}\", result.errors());\n }\n }\n\n for (String name : indexesToCreate) {\n String query = \"CREATE INDEX \" + name + \" ON `\" + bucket.name() + \"` (\" + name.replace(\"def_\", \"\") + \") \"\n + \"WITH {\\\"defer_build\\\":true}\\\"\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully created index with name {}.\", name);\n } else {\n LOGGER.warn(\"Could not create index {}: {}\", name, result.errors());\n }\n }\n\n LOGGER.info(\"Waiting 5 seconds before building the indexes.\");\n\n Thread.sleep(5000);\n\n StringBuilder indexes = new StringBuilder();\n boolean first = true;\n for (String name : indexesToCreate) {\n if (first) {\n first = false;\n } else {\n indexes.append(\",\");\n }\n indexes.append(name);\n }\n\n if (!hasPrimary) {\n indexes.append(\",\").append(\"def_primary\");\n }\n\n String query = \"BUILD INDEX ON `\" + bucket.name() + \"` (\" + indexes.toString() + \")\";\n LOGGER.info(\"Executing index query: {}\", query);\n QueryResult result = bucket.query(Query.simple(query));\n if (result.finalSuccess()) {\n LOGGER.info(\"Successfully executed build index query.\");\n } else {\n LOGGER.warn(\"Could not execute build index query {}.\", result.errors());\n }\n }", "public void ensureIndex(Index index) {\n try {\n createIndex(index);\n } catch (HttpConflict ex) {\n // pass\n }\n }", "public EANAlreadyExists() {\n }", "public createIndex_result(createIndex_result other) {\n }", "boolean isNewIndex();", "@Test\n public void testErrorFlow() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 10, true);\n\n String idxName = \"IDX0\";\n BreakBuildIndexConsumer breakBuildIdxConsumer = addBreakIdxCreateConsumer(n, idxName, 1);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n breakBuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n breakBuildIdxConsumer.finishBuildIdxFut.onDone();\n assertThrows(log, () -> createIdxFut.get(getTestTimeout()), IgniteCheckedException.class, null);\n\n checkCompletedStatus(n, cacheName);\n\n enableCheckpointsAsync(n, getTestIgniteInstanceName(), true).get(getTestTimeout());\n\n checkNoStatus(n, cacheName);\n }", "IndexNameReference createIndexNameReference();", "@Test\n public void testCreate() throws Exception {\n System.out.println(\"create\");\n Index entity = TestUtils.getTestIndex();\n IndexResponse result = instance.create(entity);\n assertNotNull(result);\n assertEquals(entity.getDatabaseName(), result.getIndex().getDatabaseName());\n assertEquals(entity.getName(), result.getIndex().getName());\n assertEquals(entity.getTableName(), result.getIndex().getTableName());\n assertEquals(entity.getFields(), result.getIndex().getFields());\n }", "private synchronized void criarIndice() throws Exception {\r\n\t\tIndexWriter indexWriter = getWriterPadrao(true);\r\n\t\ttry {\r\n\t\t\tindexWriter.getAnalyzer().close();\r\n\t\t\tindexWriter.close();\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t}", "public boolean createIndex() {\n RestClient client = esrResource.getClient();\n\n try {\n Response r = client.performRequest(\"HEAD\", \"/\" + index);\n\n if (r.getStatusLine().getStatusCode() != 200) {\n client.performRequest(\"PUT\", \"/\" + index);\n\n return true;\n }\n } catch (IOException ioe) {\n getMonitor().error(\"Unable to create index\", ioe);\n }\n\n return false;\n }", "IndexCreated createIndex(String name, Index index) throws ElasticException;", "public void createIndexOnProcessName() throws ServiceFailureException;", "public com.guidewire.datamodel.IndexDocument.Index addNewIndex()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.IndexDocument.Index target = null;\r\n target = (com.guidewire.datamodel.IndexDocument.Index)get_store().add_element_user(INDEX$12);\r\n return target;\r\n }\r\n }", "public void testAddingNewIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null,\n true, null));\n PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs);\n setPrimaryKey(tableSchema1);\n PSJdbcForeignKey fk = createForeignKey(tableSchema1);\n\n List<String> indexCols = new ArrayList<String>();\n indexCols.add(\"col3\");\n PSJdbcIndex index1 = new PSJdbcIndex(\"IX_col1\", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE);\n tableSchema1.setIndex(index1);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema1.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next();\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema1.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema1.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the number of foreign key columns and eqal to that of\n // index columns.\n assertTrue(fk.getForeignKeyColumnNames().size() == newIndex.getIndexColumnNames().size());\n\n // Makes sure if the new index that got created has the same set of\n // columns as foreign key.\n assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames()));\n\n // Makes sure if the index name of newly created index has a unique name.\n assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName()));\n\n }", "private GetRequest getIndexExistsRequest() {\n return Requests.getRequest(config.getIndex())\n .type(config.getType())\n .id(\"_\");\n }", "@Test\n public void testNoCheckpointAfterIndexCreation() throws Exception {\n String cacheName = DEFAULT_CACHE_NAME;\n\n IgniteEx n = prepareNodeToCreateNewIndex(cacheName, 10, true);\n\n String idxName = \"IDX0\";\n SlowdownBuildIndexConsumer slowdownIdxCreateConsumer = addSlowdownIdxCreateConsumer(n, idxName, 0);\n\n IgniteInternalFuture<List<List<?>>> createIdxFut = createIdxAsync(n.cache(cacheName), idxName);\n\n slowdownIdxCreateConsumer.startBuildIdxFut.get(getTestTimeout());\n\n checkInitStatus(n, cacheName, false, 1);\n\n slowdownIdxCreateConsumer.finishBuildIdxFut.onDone();\n createIdxFut.get(getTestTimeout());\n\n checkCompletedStatus(n, cacheName);\n\n stopGrid(0);\n\n IndexesRebuildTaskEx.prepareBeforeNodeStart();\n StopBuildIndexConsumer stopRebuildIdxConsumer = addStopRebuildIndexConsumer(n, cacheName);\n\n n = startGrid(0);\n stopRebuildIdxConsumer.startBuildIdxFut.get(getTestTimeout());\n\n IgniteInternalFuture<?> idxRebFut = indexRebuildFuture(n, CU.cacheId(cacheName));\n assertNotNull(idxRebFut);\n\n checkInitStatus(n, cacheName, true, 0);\n assertTrue(allIndexes(n).containsKey(new QueryIndexKey(cacheName, idxName)));\n\n stopRebuildIdxConsumer.finishBuildIdxFut.onDone();\n idxRebFut.get(getTestTimeout());\n\n forceCheckpoint();\n\n checkNoStatus(n, cacheName);\n assertEquals(10, selectPersonByName(n.cache(cacheName)).size());\n }", "private boolean isIndexExist(int index) {\n return index >= 0 && index < size();\n }", "@Ignore\n @Test\n public void testCreateIndex() {\n System.out.println(\"createIndex\");\n Util.commonServiceIPs=\"127.0.0.1\";\n \n EntityManager em=Util.getEntityManagerFactory(100).createEntityManager();\n EntityManager platformEm = Util.getPlatformEntityManagerFactory().createEntityManager();\n \n Client client = ESUtil.getClient(em,platformEm,1,false);\n \n RuntimeContext.dataobjectTypes = Util.getDataobjectTypes();\n String indexName = \"test000000\";\n try {\n ESUtil.createIndex(platformEm, client, indexName, true);\n }\n catch(Exception e)\n {\n \n }\n \n\n }", "public SimpleIndexFactory() {\n\t}", "public void testAddingNewIndexWithoutIndex() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n PSJdbcTableSchema tableSchema = createTableSchema(coldefs);\n setPrimaryKey(tableSchema);\n PSJdbcForeignKey fk = createForeignKey(tableSchema);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n\n Iterator<?> itIndex = tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE);\n PSJdbcIndex index = (PSJdbcIndex) itIndex.next();\n String IndexName = index.getName();\n String fkcolname = fk.getForeignKeyColumnNames().get(0);\n\n // Makes sure if the table schema has changed\n assertFalse((tableSchema.equals(tableSchema2)));\n\n // Makes sure if a new index definition of non unique have been added to\n // table schema.\n assertFalse((tableSchema.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n assertTrue((tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE)).hasNext());\n\n // Makes sure if the index name has taken the first foreign key column name.\n assertTrue((StringUtils.equalsIgnoreCase(IndexName, \"IX_\" + fkcolname)));\n\n // Makes sure if the createForeignkeyIndexes attribute for mysql.\n assertTrue(dataTypeMap.isCreateForeignKeyIndexes());\n\n }", "public H_index() {\n\t\tsuper();\n\t}", "public AccountTypeAlreadyExistException(Account akun){\n super(\"Unable to create duplicate account of type \");\n this.akun=akun;\n }", "boolean createIndex(String indexName);", "public void addIndex() throws JNCException {\n setLeafValue(Epc.NAMESPACE,\n \"index\",\n null,\n childrenNames());\n }", "public void createIndexesIfNotExists(String indexName) throws IOException {\n\t\ttry {\n\t\t\tclient.admin().indices().prepareCreate(indexName).execute().actionGet();\n\t\t} catch (Exception e) {\n\t\t}\n\t\tcreateMappings();\n\t\tclient.admin().indices().refresh(new RefreshRequest(indexName)).actionGet();\n\t}", "@Test\n @Ignore\n public void testExists() throws Exception {\n System.out.println(\"exists\");\n Identifier identifier = null;\n IndexDaoImpl instance = null;\n boolean expResult = false;\n boolean result = instance.exists(identifier);\n assertEquals(expResult, result);\n // TODO review the generated test code and remove the default call to fail.\n fail(\"The test case is a prototype.\");\n }", "private void syncIndex(FundamentalData fd) throws Exception {\n\n List<MarketIndex> indexes = marketIndexService.findBySymbol(fd.getSymbol());\n if(indexes.size()>1){\n throw new Exception(\"Multiple instances (\"+indexes.size()+\") of symbol \"+fd.getSymbol()+\" present in the database.\");\n }\n\n MarketIndex index;\n if(indexes.size()==0){ // does not exist in db\n index=new MarketIndex();\n index.setSymbol(fd.getSymbol());\n index.setName(fd.getName());\n index.setCategory(fd.getType().getCode());\n\n }else{ // index exists in db\n index = indexes.get(0);\n if(fd.getName()!=null){\n index.setName(fd.getName());\n }\n if(fd.getType()!=null){\n index.setCategory(fd.getType().getCode());\n }\n\n }\n\n updateIcon(index);\n marketIndexService.update(index);\n\n }", "SpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException createSpaceInvaderTest_test_UnNouveauVaisseauPositionneHorsEspaceJeu_DoitLeverUneException();", "public ContainerAlreadyExistsInFacilityException() {\r\n\t\tsuper();\r\n\t}", "public ItemNotFoundException() {\n super();\n }", "public void createIndex(Configuration configuration){\n }", "public DuplicateItemException() {\r\n super();\r\n }", "public VertexExistsException() {\r\n\t\tsuper(\"The VextexExistsException occured!\");\r\n\t}", "public void start() throws Exception {\n\n createIndex();\n }", "public EANAlreadyExists(String msg) {\n super(msg);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeys() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public createIndex_args(createIndex_args other) {\n }", "public void testCreIdx(){\r\n\t \r\n\t String dataDir = \"C:\\\\study\\\\Lucene\\\\Data\";\r\n\t String idxDir = \"C:\\\\study\\\\Lucene\\\\Index\";\r\n\t \r\n\t LuceneUtils.delAll(idxDir);\r\n\t \r\n\t CreateIndex ci = new CreateIndex();\r\n\t \r\n\t ci.Indexer(new File(idxDir), new File(dataDir));\r\n\t \r\n\t\t\r\n\t}", "DuplicateEntryException() {\n super();\n }", "public ViaturaExistenteException(){\n super();\n }", "public DukeBadIndexException(int index) {\n if (index < 0) {\n super.message = \"You can't enter a negative index!!\";\n } else if (index == 0) {\n super.message = \"There is no index 0 ://\";\n } else {\n super.message = \"I don't think you have that many tasks my dude.\";\n }\n }", "private static RDFIndex createDefaultIndex() {\n defaultIndex = new RDFIndex(com.hp.hpl.jena.graph.Factory.createGraphMem());\n try {\n File indexFile = new File(INDEX_FILE);\n if(indexFile.exists()) {\n defaultIndex.read(new FileReader(indexFile),Constants.RESOURCE_URL);\n }\n } catch(Throwable t) {\n t.printStackTrace();\n }\n return defaultIndex;\n }", "private void log(IndexObjectException e) {\n\t\t\r\n\t}", "@Test\n @Ignore\n public void testDelete_Index() throws Exception {\n System.out.println(\"delete\");\n Index entity = TestUtils.getTestIndex();\n Identifier identifier = entity.getId();\n instance.create(entity);\n assertTrue(instance.exists(identifier));\n instance.delete(entity);\n assertFalse(instance.exists(identifier));\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetEntries() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.getEntries() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "@Test\r\n public void testIndexOf() {\r\n Grocery entry1 = new Grocery(\"Mayo\", \"Dressing / Mayo\", 1, 2.99f, 1);\r\n\r\n // Test element not found case\r\n boolean elementNotFound = false;\r\n try {\r\n instance.indexOf(entry1);\r\n fail(\"Should throw ENFE - testIndexOf\");\r\n } catch (ElementNotFoundException e) {\r\n elementNotFound = true;\r\n }\r\n assertTrue(elementNotFound);\r\n\r\n instance.add(entry1);\r\n\r\n // Test element found case\r\n try {\r\n assertEquals(0, instance.indexOf(entry1));\r\n\r\n } catch (ElementNotFoundException e) {\r\n fail(\"Should not throw exception - testIndexOf\");\r\n }\r\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodEntrySet() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"entries.value.getID\",\n SEPARATOR + \"portfolio.entrySet() entries\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForEntries(ri);\n }", "private boolean doesIndexExist(final String index) {\n final IndexMetaData indexMetaData = client.admin().cluster()\n .state(Requests.clusterStateRequest()).actionGet().getState().getMetaData().index(index);\n return indexMetaData != null;\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodKeySet() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.keySet() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public static IndexExpression makeIndex(Expression instance, PropertyInfo indexer, Iterable<Expression> arguments) { throw Extensions.todo(); }", "indexSet createindexSet();", "public static Index create(String name, Path path) {\n try {\n Files.createDirectory(path.resolve(INDEX));\n return new Index(name, path);\n\n } catch (IOException e) {\n throw new IOFailureException(e);\n }\n }", "public EntityAlreadyExistsException(String message, Object... args) {\n\t\tsuper(message, args);\n\t}", "public DuplicatedUserException() {\n super();\n }", "public ObjectNotFoundException() {\r\n super(\"ObjectNotFound Exception\");\r\n }", "EntryNotFoundException() {\n super();\n }", "public RecordNotFoundException() {\n super();\n }", "public AttributeAlreadyExistsException() {\n super();\n }", "private void createIndex(Message<JsonObject> msg, int timeout, JsonObject headers, String dbName) {\n // check required params / attributes\n \n // REQUIRED: The name of the collection for which to create the index\n String collection = helper.getMandatoryString(msg.body(), MSG_PROPERTY_COLLECTION, msg);\n if (collection == null) return;\n\n // REQUIRED: A JSON representation of the index (see ArangoDB docs for details)\n JsonObject document = helper.getMandatoryObject(msg.body(), MSG_PROPERTY_DOCUMENT, msg);\n if (document == null) return;\n\n if (!ensureAttribute(document, DOC_ATTRIBUTE_TYPE, msg)) return;\n if (!document.getString(DOC_ATTRIBUTE_TYPE).equals(TYPE_CAP)) {\n if (!ensureAttribute(document, DOC_ATTRIBUTE_FIELDS, msg)) return;\n }\n\n // prepare PATH\n StringBuilder apiPath = new StringBuilder();\n if (dbName != null) apiPath.append(\"/_db/\").append(dbName);\n apiPath.append(API_PATH);\n apiPath.append(\"/?\").append(MSG_PROPERTY_COLLECTION).append(\"=\").append(collection);\n\n httpPost(persistor, apiPath.toString(), headers, document, timeout, msg);\n }", "public IndexException(int min, int max, int value) {\n super(\"Index is out of range\");\n this.min = min;\n this.max = max;\n this.value = value;\n }", "private void checkIndex(int index) {\n int size = model.size();\n if ((index < 0) || (index >= size)) {\n throw new IllegalArgumentException(\"Index out of valid scope 0..\"\n + (size - 1)\n + \": \"\n + index);\n }\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodValues() throws Exception {\n Index i1 = qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.values() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "private void ElasticIndexValidation(TransportClient client) {\n if (!client.admin().indices().prepareExists(ES_TAG_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_TAG_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_TAG_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/tag_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_TAG_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_TAG_INDEX, e);\n }\n }\n // Create/migrate the logbook index\n if (!client.admin().indices().prepareExists(ES_LOGBOOK_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_LOGBOOK_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_LOGBOOK_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/logbook_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_LOGBOOK_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_LOGBOOK_INDEX, e);\n }\n }\n\n // Create/migrate the property index\n if (!client.admin().indices().prepareExists(ES_PROPERTY_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_PROPERTY_INDEX).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_PROPERTY_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/property_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_PROPERTY_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_PROPERTY_INDEX, e);\n }\n }\n\n // Create/migrate the sequence index\n if (!client.admin().indices().prepareExists(ES_SEQ_INDEX).get(\"5s\").isExists()) {\n client.admin().indices().prepareCreate(ES_SEQ_INDEX).setSettings(Settings.builder() \n .put(\"index.number_of_shards\", 1)\n .put(\"auto_expand_replicas\", \"0-all\")).get();\n PutMappingRequestBuilder request = client.admin().indices().preparePutMapping(ES_SEQ_INDEX);\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/seq_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n request.setType(ES_SEQ_TYPE).setSource(jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }\n\n // create/migrate log template\n PutIndexTemplateRequestBuilder templateRequest = client.admin().indices().preparePutTemplate(ES_LOG_INDEX);\n templateRequest.setPatterns(Arrays.asList(ES_LOG_INDEX));\n ObjectMapper mapper = new ObjectMapper();\n InputStream is = Config.class.getResourceAsStream(\"/log_template_mapping.json\");\n try {\n Map<String, String> jsonMap = mapper.readValue(is, Map.class);\n templateRequest.addMapping(ES_LOG_TYPE, XContentFactory.jsonBuilder().map(jsonMap)).get();\n// templateRequest.setSource(jsonMap);\n// templateRequest.addMapping(ES_LOG_TYPE, jsonMap).get(\"5s\");\n } catch (IOException e) {\n logger.log(Level.WARNING, \"Failed to create index \" + ES_SEQ_INDEX, e);\n }\n }", "public void start() throws Exception {\n if (!getClient().admin().indices().exists(Requests.indicesExistsRequest(INDEX_NAME)).actionGet().isExists()) {\n getClient().admin().indices().prepareCreate(INDEX_NAME).execute().actionGet().isAcknowledged();\n }\n\n //Create mapping for the key. Leave it not_analyzed so it doesn't tokenize the \"-\" delimiters\n PutMappingResponse response = getClient().admin().indices()\n .preparePutMapping(INDEX_NAME)\n .setType(TYPE_NAME)\n .setSource(buildMapping())\n .execute().actionGet();\n if (!response.isAcknowledged()) {\n throw new Exception(\"Could not define mapping.\");\n }\n }", "public interface IndexBuilder {\n\n /**\n * Rebuilds the index only when the existing index is not populated.\n */\n void rebuildIfNecessary();\n\n}", "private Reindex() {}", "private Reindex() {}", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetKeys() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"ks.toString\",\n SEPARATOR + \"portfolio.getKeys() ks\");\n CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForKeys(ri);\n }", "public void addIndex(Index index) throws AppException {\n\t\taddIndex(index, false);\n\t}", "@Test\n public void testCreateIdxOnClient() {\n getDefaultCacheOnClient().query(new SqlFieldsQuery(((\"CREATE INDEX IDX_11 ON \" + (GridCacheDynamicLoadOnClientTest.FULL_TABLE_NAME)) + \" (name asc)\"))).getAll();\n }", "public com.guidewire.datamodel.IndexDocument.Index insertNewIndex(int i)\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n com.guidewire.datamodel.IndexDocument.Index target = null;\r\n target = (com.guidewire.datamodel.IndexDocument.Index)get_store().insert_element_user(INDEX$12, i);\r\n return target;\r\n }\r\n }", "@Override\n public void beforeRerunningIndexCreationQuery() {\n Thread th = new Thread(() -> {\n // Assert that the size of region is now 0\n assertTrue(region.size() == 0);\n region.put(\"\" + 8, new Portfolio(8));\n });\n th.start();\n ThreadUtils.join(th, 30 * 1000);\n assertTrue(region.size() == 1);\n }", "@Test\n public void testIndexMaintenanceWithIndexOnMethodGetValues() throws Exception {\n Index i1 =\n qs.createIndex(\"indx1\", IndexType.FUNCTIONAL, \"pf.getID\",\n SEPARATOR + \"portfolio.getValues() pf\");\n assertTrue(i1 instanceof CompactRangeIndex);\n Cache cache = CacheUtils.getCache();\n region = CacheUtils.getRegion(SEPARATOR + \"portfolio\");\n region.put(\"4\", new Portfolio(4));\n region.put(\"5\", new Portfolio(5));\n CompactRangeIndex ri = (CompactRangeIndex) i1;\n validateIndexForValues(ri);\n }", "public void testAddingNewIndexWithFKName() throws Exception\n {\n PSJdbcDataTypeMap dataTypeMap = new PSJdbcDataTypeMap(\"MYSQL\", \"mysql\", null);\n ArrayList<PSJdbcColumnDef> coldefs = createColumnDef(dataTypeMap);\n coldefs.add(new PSJdbcColumnDef(dataTypeMap, \"col3\", PSJdbcTableComponent.ACTION_DELETE, Types.INTEGER, null,\n true, null));\n PSJdbcTableSchema tableSchema1 = createTableSchema(coldefs);\n setPrimaryKey(tableSchema1);\n\n String foreignKeyName = \"FK_Name\";\n List<String[]> fkCols = new ArrayList<String[]>();\n String[] fcol1 =\n {\"col1\", \"etable\", \"ecol1\"};\n fkCols.add(fcol1);\n PSJdbcForeignKey fk = new PSJdbcForeignKey(foreignKeyName, fkCols.iterator(),\n PSJdbcTableComponent.ACTION_DELETE);\n List<PSJdbcForeignKey> fks = new ArrayList<>();\n fks.add(fk);\n tableSchema1.setForeignKeys(fks,true);\n\n List<String> indexCols = new ArrayList<String>();\n indexCols.add(\"col2\");\n PSJdbcIndex index1 = new PSJdbcIndex(\"IX_Name\", indexCols.iterator(), PSJdbcTableComponent.ACTION_CREATE);\n tableSchema1.setIndex(index1);\n\n Document doc = PSXmlDocumentBuilder.createXmlDocument();\n Element el = tableSchema1.toXml(doc);\n PSJdbcTableSchema tableSchema2 = new PSJdbcTableSchema(el, dataTypeMap);\n PSJdbcIndex newIndex = (PSJdbcIndex) tableSchema2.getIndexes(PSJdbcIndex.TYPE_NON_UNIQUE).next();\n\n // Makes sure if the table schema has changed.\n assertFalse((tableSchema1.equals(tableSchema2)));\n\n // Makes sure if the new index that got created has the same set of\n // columns as foreign key.\n assertTrue(fk.getForeignKeyColumnNames().containsAll(newIndex.getIndexColumnNames()));\n\n // Makes sure if the index name of newly created index has a unique name.\n assertTrue(tableSchema1.doesIndexNameExists(newIndex.getName()));\n }", "public void createIndex(Index index) {\n Span span = this.tracer.buildSpan(\"Client.CreateIndex\").start();\n try {\n String path = String.format(\"/index/%s\", index.getName());\n String body = index.getOptions().toString();\n ByteArrayEntity data = new ByteArrayEntity(body.getBytes(StandardCharsets.UTF_8));\n clientExecute(\"POST\", path, data, null, \"Error while creating index\");\n } finally {\n span.finish();\n }\n }", "@Nullable\n abstract Integer getInstanceIndex();", "@Test\n public void test005_test_duplicate_key() {\n try {\n HashTableADT test = new HashTable<Integer, String>();\n test.insert(1, \"2\");\n test.insert(2, \"3\");\n test.insert(1, \"4\");\n } catch (DuplicateKeyException q) {\n //Expected Exception\n } catch (Exception e) {\n fail(\"Correct Exception wasn't thrown\");\n }\n }", "@Test\n public void testIndexCreationThreshold() throws Exception {\n SchemaModel sm;\n //\n // sm = Util.loadSchemaModel2(\"resources/performance2/B.xsd\"); // NOI18N\n sm = Util.loadSchemaModel2(\"resources/performance2.zip\", \"B.xsd\"); // NOI18N\n //\n assertTrue(sm.getState() == State.VALID);\n //\n assertTrue(sm instanceof SchemaModelImpl);\n SchemaModelImpl smImpl = SchemaModelImpl.class.cast(sm);\n GlobalComponentsIndexSupport indexSupport = smImpl.getGlobalComponentsIndexSupport();\n assertNotNull(indexSupport);\n GlobalComponentsIndexSupport.JUnitTestSupport testSupport =\n indexSupport.getJUnitTestSupport();\n assertNotNull(testSupport);\n //\n // Initiate index building\n GlobalElement found = sm.findByNameAndType(\"B000\", GlobalElement.class);\n assertNotNull(found);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n int indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n UndoManager um = new javax.swing.undo.UndoManager();\n AbstractDocumentModel.class.cast(sm).addUndoableEditListener(um);\n //\n sm.startTransaction();\n try {\n Schema schema = sm.getSchema();\n java.util.List<SchemaComponent> gChildren = schema.getChildren();\n int counter = 0;\n for (SchemaComponent child : gChildren) {\n //\n assertTrue(child instanceof GlobalElement);\n GlobalElement gElem = GlobalElement.class.cast(child);\n schema.removeElement(gElem);\n //\n counter++;\n if (counter >= 50) {\n break;\n }\n }\n } finally {\n sm.endTransaction();\n }\n //\n int childrenCount = sm.getSchema().getChildren().size();\n assertEquals(childrenCount, 40);\n assertFalse(testSupport.isSupportIndex());\n //\n //\n um.undo();\n //\n // Initiate index building again\n found = sm.findByNameAndType(\"B000\", GlobalElement.class);\n assertNotNull(found);\n Thread.sleep(500); // Wait the index is build\n //\n assertTrue(testSupport.isSupportIndex());\n indexSise = testSupport.getIndexSize();\n assertEquals(indexSise, 90);\n //\n System.out.println(\"=============================\"); // NOI18N\n System.out.println(\" testIndexCreationThreshold \"); // NOI18N\n System.out.println(\"=============LOG=============\"); // NOI18N\n String log = testSupport.printLog();\n System.out.print(log);\n System.out.println(\"=============================\"); // NOI18N\n //\n }", "@Test\n public void testMultiIndexCreation() {\n Host host = Host.getHost(0);\n VM vm0 = host.getVM(1);\n setCacheInVMs(vm0);\n vm0.invoke(helper.getCacheSerializableRunnableForReplicatedRegionCreation(regionName));\n\n ArrayList<String> names = new ArrayList<>();\n names.add(indexName);\n names.add(rindexName);\n\n ArrayList<String> exps = new ArrayList<>();\n exps.add(indexedExpression);\n exps.add(rindexedExpression);\n\n ArrayList<String> fromClauses = new ArrayList<>();\n fromClauses.add(fromClause);\n fromClauses.add(rfromClause);\n\n vm0.invoke(\n helper.getCacheSerializableRunnableForDefineIndex(regionName, names, exps, fromClauses));\n\n AsyncInvocation<?>[] asyncInvs = new AsyncInvocation[2];\n\n asyncInvs[0] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n asyncInvs[1] =\n vm0.invokeAsync(helper.getCacheSerializableRunnableForPRRandomOps(regionName, 0, stepSize));\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n ThreadUtils.join(inv, 30 * 000);\n }\n\n for (AsyncInvocation<?> inv : asyncInvs) {\n if (inv.exceptionOccurred()) {\n Assert.fail(\"Random region operation failed on VM_\" + inv.getId(), inv.getException());\n }\n }\n\n vm0.invoke(getCacheSerializableRunnableForIndexValidation(regionName, indexName));\n\n }", "public static boolean createIndex(String appid) {\n\t\treturn createIndex(appid, Para.getConfig().elasticsearchRootIndexShards(), Para.getConfig().elasticsearchRootIndexReplicas());\n\t}", "public DuplicateSensorException(){\n }", "public ElFicheroNoExisteException() {\n }", "@DefaultMessage(\"A record with this value already exists. Please enter a unique value for this field\")\n @Key(\"gen.fieldUniqueException\")\n String gen_fieldUniqueException();", "public NotSearchableException() {\n }", "public void createIndex(final DBObject keys, final String name) {\n createIndex(keys, name, false);\n }", "public static HashIndexBuilder hashIndex(String name) {\n return new HashIndexBuilderImpl(name);\n }", "public SearchException() {\n }", "@Override\n public MethodOutcome fileAlreadyExistsOutcome() {\n return new MethodOutcome(MethodOutcome.Type.THROWS_EXCEPTION, IOException.class);\n }", "public ConfigProcessNameAlreadyDefinedException()\n {\n }", "@Override\n\tpublic void onApplicationEvent(final ContextRefreshedEvent event) {\n\t\ttry {\n\t\t\tQueryService localQueryService = getQueryService(event);\n\n\t\t\tif (localQueryService != null) {\n\t\t\t\tlocalQueryService.createDefinedIndexes();\n\t\t\t}\n\t\t}\n\t\tcatch (Exception ignore) {\n\t\t\tlogger.warn(String.format(\"unable to create defined Indexes (if any): %1$s\", ignore.getMessage()));\n\t\t}\n\t}", "@Test\n public void testCheckExists()\n throws SQLException, ClassNotFoundException, InstantiationException,\n IllegalAccessException\n {\n int existingQuizId = 2;\n int unexistingQuizId = 945273;\n try {\n QuizModel.checkExists(existingQuizId);\n }\n catch (NoQuizFoundException e) {\n fail(\"A quiz should have been found.\");\n }\n try {\n QuizModel.checkExists(unexistingQuizId);\n fail(\"NO quiz should have been found.\");\n }\n catch (NoQuizFoundException e) {\n \n }\n }", "public DuplicateRecordException(String msg){\n\t\tsuper(msg);\n\t}", "public void beforeIndexCreated(Index index) {\n\n }", "public void createIndex(final DBObject keys, final DBObject options) {\n try {\n executor.execute(createIndexOperation(keys, options), getReadConcern());\n } catch (MongoWriteConcernException e) {\n throw createWriteConcernException(e);\n }\n }" ]
[ "0.6733176", "0.6536741", "0.6469834", "0.6343868", "0.6323572", "0.6241234", "0.6186905", "0.61646956", "0.6146986", "0.6080547", "0.60488075", "0.60439885", "0.6036117", "0.59950083", "0.59772956", "0.59542197", "0.59401685", "0.59345615", "0.5912848", "0.59034044", "0.5846636", "0.5813223", "0.5804706", "0.5793959", "0.574402", "0.57411885", "0.5722142", "0.57024145", "0.56952757", "0.5685017", "0.56697226", "0.5650298", "0.56422645", "0.5636424", "0.56123716", "0.5610989", "0.5610678", "0.55970526", "0.5587345", "0.55741", "0.55674624", "0.5564512", "0.55514", "0.55251807", "0.5510896", "0.55092406", "0.5505286", "0.5504116", "0.5498014", "0.5494718", "0.54843074", "0.5478859", "0.54770404", "0.547588", "0.5467281", "0.5462216", "0.54568446", "0.5446727", "0.5442562", "0.543884", "0.54385895", "0.54340845", "0.54325676", "0.54305947", "0.542345", "0.54168767", "0.5410778", "0.5407283", "0.53860414", "0.5384132", "0.53787494", "0.5372496", "0.5372496", "0.537219", "0.5347101", "0.5324673", "0.5291244", "0.52886635", "0.52721107", "0.5254344", "0.52468354", "0.52453184", "0.5240272", "0.52366424", "0.52138734", "0.5211174", "0.5210771", "0.5199754", "0.5196338", "0.51959777", "0.5187901", "0.5173205", "0.5172599", "0.5170462", "0.51666224", "0.5152553", "0.5141169", "0.51355106", "0.51325184", "0.5131655" ]
0.76434743
0
activity will bind to service
@Override public IBinder onBind(Intent intent) { return musicBind; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void doBindService() {\r\n\r\n bindService(new Intent(MainActivity.this, CurrentLocationUtil.class),\r\n connection, // ServiceConnection object\r\n Context.BIND_AUTO_CREATE); // Create service if not\r\n\r\n isBound = true;\r\n\r\n }", "public void bind() {\n\n Intent startintent = new Intent(context, MafService.class);\n startintent.setAction(\"com.baidu.maf.service\");\n\n if(ServiceControlUtil.showInSeperateProcess(context)) {\n try {\n context.startService(startintent);\n } catch (Exception e) {\n LogUtil.e(TAG, \"fail to startService\", e);\n }\n }\n\n //Intent intent = new Intent(InAppApplication.getInstance().getContext(), OutAppService.class);\n\n\n boolean result =\n context.bindService(startintent, mConnection, Context.BIND_AUTO_CREATE);\n\n LogUtil.printMainProcess(\"Service bind. reslut = \" + result);\n LogUtil.printMainProcess(\"bind. serverMessenger = \" + serverMessenger);\n mIsBound = result;\n }", "public void doBindService() {\n\r\n\t\tIntent serviceIntent = new Intent(MainActivity.this, LocalService.class);\r\n\r\n\t\tstartService(serviceIntent);\r\n\t\t// bindService(serviceIntent, mServiceConnection, 0);\r\n\t\tbindService(serviceIntent, mServiceConnection, BIND_AUTO_CREATE);\r\n\r\n\t\tmIsBound = true;\r\n\t}", "public void bindService() {\n mIntent = new Intent();\n mIntent.setPackage(\"com.eebbk.studyos.themes\");\n mIntent.setAction(THEME_SERVICE_ACTION);\n mContext.bindService(mIntent,mConnection, Context.BIND_AUTO_CREATE);\n }", "void doBindService() {\n\n if (bindService(new Intent(MainActivity.this, PositionService.class),\n mConnection, Context.BIND_AUTO_CREATE)) {\n mBound = true;\n } else {\n Log.e(\"MY_APP_TAG\", \"Error: The requested service doesn't \" +\n \"exist, or this client isn't allowed access to it.\");\n }\n }", "private void bind()\n {\n /* Cancel unbind */\n cancelUnbind();\n\n /* Bind to the Engagement service if not already done or being done */\n if (mEngagementService == null && !mBindingService)\n {\n mBindingService = true;\n mContext.bindService(EngagementAgentUtils.getServiceIntent(mContext), mServiceConnection,\n BIND_AUTO_CREATE);\n }\n }", "void doBindService() {\n\t\tbindService(new Intent(this, eidService.class), mConnection, Context.BIND_AUTO_CREATE);\n//\t\tLog.i(\"Convert\", \"At doBind2.\");\n\n\t\tmIsBound = true;\n\t\n\t\tif (mService != null) {\n//\t\t\tLog.i(\"Convert\", \"At doBind3.\");\n\t\t\ttry {\n\t\t\t\t//Request status update\n\t\t\t\tMessage msg = Message.obtain(null, eidService.MSG_UPDATE_STATUS, 0, 0);\n\t\t\t\tmsg.replyTo = mMessenger;\n\t\t\t\tmService.send(msg);\n\t\t\t\tLog.i(\"Convert\", \"At doBind4.\");\n\t\t\t\t//Request full log from service.\n\t\t\t\tmsg = Message.obtain(null, eidService.MSG_UPDATE_LOG_FULL, 0, 0);\n\t\t\t\tmService.send(msg);\n\t\t\t} catch (RemoteException e) {}\n\t\t}\n//\t\tLog.i(\"Convert\", \"At doBind5.\");\n\t}", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n BinderService.LocalBinder binder = (BinderService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override\n\tpublic IBinder onBind(Intent intent) {\n\t\treturn serviceBinder;\n\t}", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n LocalBinder binder = (LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "void doBindService() {\n final Intent serviceIntent = new Intent(Testing.this, UploadService.class);\n bindService(serviceIntent, mConnection, Context.BIND_AUTO_CREATE);\n mIsBound = true;\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n TranscriptDownService.LocalBinder binder = (TranscriptDownService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "public void doBind(){\n\t\tboolean isBound = settings.getBoolean(\"isBound\", false);\n\t\tif(!isBound){\n \t\ti = new Intent(context, LocationService.class);\n \t\tcontext.bindService(i, SpeedConnection, Context.BIND_AUTO_CREATE);\n \t\tcontext.startService(i);\n \t\teditor.putBoolean(\"isBound\", true);\n \t\teditor.apply();\n \t}\n\t}", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n LocalService.LocalBinder binder = (LocalService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n LocalService.LocalBinder binder = (LocalService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "public boolean bindService(Intent intent, ServiceConnection connection, int mode);", "void doAccelBindService() {\n\t\tbindService(accelIntentDelay, accelConnection, Context.BIND_AUTO_CREATE);\n\t\taccelIsBound = true;\n\t}", "@Override\n\tpublic IBinder onBind(Intent intent) {\n\t\tLog.i(TAG, \"service on bind\");\n\t\treturn mBinder;\n\t}", "@Override\n public IBinder onBind(Intent intent) {\n if(DEBUG)Log.d(TAG, \"onBind\");\n serviceConnected = true;\n Toast.makeText(getApplicationContext(), \"binding\", Toast.LENGTH_SHORT).show();\n return mMessenger.getBinder();\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n HomeActivityWatcherService.MyBinder binder = (HomeActivityWatcherService.MyBinder) service;\n mWatcherService = binder.getService();\n mBound = true;\n }", "private void bindAudioService() {\n if (audioServiceBinder == null) {\n Intent intent = new Intent(MainActivity.this, AudioService.class);\n\n // Below code will invoke serviceConnection's onServiceConnected method.\n bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent intent = new Intent(MainActivity.this, MyService.class);\n//\t\t\t\t// startService(intent);\n\t\t\t\tbindService(intent, conn, BIND_AUTO_CREATE);\n\n\t\t\t}", "@Override\r\n\tpublic IBinder onBind(Intent intent) {\n\t\tSystem.out.println(\"Service onBind\");\r\n\t\treturn null;\r\n\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MyService.LocalBinder binder = (MyService.LocalBinder) service;\n myService = binder.getService();\n isBound = true;\n\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n\t\t\tmBoundService = ((LocalService.LocalBinder) service).getService();\r\n\r\n\t\t\t// Wenn während des Setups der Service noch nicht fertig geladen\r\n\t\t\t// ist, wird solange Warte-Overlay angezeigt\r\n\t\t\t// Wenn der Service fertig ist wird das Overlay ausgeblendet\r\n\r\n\t\t\t// if (OverlayActivity.isCreated) {\r\n\t\t\t// OverlayActivity.getInstance().dismiss();\r\n\t\t\t// }\r\n\t\t\tSetupSearchDevicesFragment fragment = (SetupSearchDevicesFragment) getFragmentById(\"SetupSearchDevicesFragment\");\r\n\t\t\tif (fragment.isVisible()) {\r\n\t\t\t\tfragment.initViewBluetooth();\r\n\t\t\t}\r\n\r\n\t\t\t// Tell the user about this for our demo.\r\n\t\t\tLog.i(TAG, \"Service connected with app...\");\r\n\t\t\t// Toast.makeText(MainActivity.this, \"Service connected.\", Toast.LENGTH_SHORT).show();\r\n\r\n\t\t\t// Verbinde mit gespeichertem Device (falls noch keine Verbindung\r\n\t\t\t// besteht)\r\n\t\t\tif (mSharedPrefs.getConnectivityType() == 1) { // BEI BT\r\n\r\n\t\t\t\tfinal ConnectionInterface connection = mBoundService.getConnection();\r\n\t\t\t\tif (connection != null) {\r\n\t\t\t\t\tif (!connection.isConnected()) {\r\n\r\n\t\t\t\t\t\t// OnConnectedListener\r\n\t\t\t\t\t\tconnection.setOnConnectedListener(new OnConnectedListener() {\r\n\t\t\t\t\t\t\t@Override\r\n\t\t\t\t\t\t\tpublic void onConnectedListener(String deviceName) {\r\n\r\n\t\t\t\t\t\t\t\tconnection.registerDisconnectHandler();\r\n\r\n\t\t\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\t\t\t// HELLO Nachricht senden\r\n\t\t\t\t\t\t\t\t\tString msg = mContext.getString(R.string.BABYFON_MSG_CONNECTION_HELLO) + \";\"\r\n\t\t\t\t\t\t\t\t\t\t\t+ mSharedPrefs.getHostAddress() + \";\" + mSharedPrefs.getPassword();\r\n\t\t\t\t\t\t\t\t\tconnection.sendMessage(msg);\r\n\r\n\t\t\t\t\t\t\t\t\tmSharedPrefs.setRemoteOnlineState(true);\r\n\t\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t});\r\n\r\n\t\t\t\t\t\tif (mSharedPrefs.getDeviceMode() == 1) { // ELTERN\r\n\t\t\t\t\t\t\tif (mSharedPrefs.getRemoteAddress() != null) { // Gespeichertes Gerät\r\n\t\t\t\t\t\t\t\t// Verbinde\r\n\t\t\t\t\t\t\t\tmBoundService.connectTo(mSharedPrefs.getRemoteAddress());\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t} else if (mSharedPrefs.getDeviceMode() == 0) { // BABY\r\n\t\t\t\t\t\t\t// Warte auf Verbindung\r\n\t\t\t\t\t\t\tmBoundService.startServer();\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}", "@Override\n public IBinder onBind(Intent intent) {\n \tinit(\"scream\", Boolean.parseBoolean(intent.getStringExtra(MessageCode.DEBUG_FLAG)));\n \t\n \tStrandLog.d(ScreamService.TAG, \"Binding Service started\");\n \t\n\t\tIntent i = new Intent(this, ScreamService.class);\n\t\ti.putExtra(MessageCode.PARAM_LIST, intent.getStringExtra(MessageCode.PARAM_LIST));\n\t\tstartService(i);\n\n\t\treturn mMessenger.getBinder();\n }", "protected void onServiceConnectedExtended(ComponentName className,\n IBinder service) {\n mAllowedToBind = true;\n\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n System.out.println(\"绑定成功\");\n }", "private void initService() {\n connection = new AppServiceConnection();\n Intent i = new Intent(this, AppService.class);\n boolean ret = bindService(i, connection, Context.BIND_AUTO_CREATE);\n Log.d(TAG, \"initService() bound with \" + ret);\n }", "@Override\n public IBinder onBind(Intent intent)\n {\n Log.d(\"MyService\", \"return\");\n return new MyBind();\n }", "@Override\n\tprotected void onStart() {\n\t\tsuper.onStart();\n\t\tIntent i = new Intent(this, M_Service.class);\n\t\tbindService(i, mServiceConn, Context.BIND_AUTO_CREATE);\n\t}", "public void onServiceConnected(ComponentName className, IBinder service) {\n imService = ((FriendLocationService.IMBinder)service).getService(); \r\n \r\n \r\n }", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tLocalBinder binder = (LocalBinder)service;\n\t\t\tmService = binder.getService();\n\t\t\t//Toast.makeText(SyncServiceActivity.this, \"onServiceConnected=>\"+mService, Toast.LENGTH_SHORT).show();\n\t\t\t\n\t\t}", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n ConnectionService.ConnectionBinder binder = (ConnectionService.ConnectionBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n ServerService.LocalBinder binder = (ServerService.LocalBinder) service;\n mService = binder.getService();\n mBound = true;\n }", "@Override \n public IBinder onBind(Intent intent) {\n \tToast.makeText(this, \"MyAlarmService.onBind()\", Toast.LENGTH_LONG).show();\n \n \tLog.d(\"this is daya\",\"daya alaram\");\n \treturn null;\n }", "public void bindSendService(){\r\n\t\tif (sendService!=null){\r\n\t\t\tIntent intent = new Intent(context, SendService.class);\r\n\t context.bindService(intent, sendServiceConnection, Context.BIND_AUTO_CREATE);\r\n\t \r\n\t\t}\r\n\t}", "@Override\n public IBinder onBind(Intent mIntent) {\n Log.i(TAG, \"onBind\");\n String action = mIntent.getAction();\n Log.d(TAG, \"onBind: \" + action);\n\n if (SERVICE_INTERFACE.equals(action)) {\n Log.d(TAG, \"Bound by system\");\n return super.onBind(mIntent);\n } else {\n Log.d(TAG, \"Bound by application\");\n return mBinder;\n }\n }", "private void bindMediaPlayerService() {\n if (!serviceIsBound) {\n Intent bindInt = new Intent(this, MediaPlayerService.class);\n serviceIsBound = bindService(bindInt, mediaPlayerConnection, Context.BIND_AUTO_CREATE);\n\n Log.v(TAG, \"Service bound\");\n } else {\n Log.v(TAG, \"no Service to bind\");\n }\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n mBound = true;\n LocalBinder binder = (LocalBinder) service;\n sensorService = binder.getService();\n\n if(dni != null) {\n Log.d(\"TAG\", \"MBOUND 1\");\n if (mBound) {\n Log.d(\"TAG\", \"MBOUND 2\");\n if (sensorService == null) {\n Log.d(\"TAG\", \"sensorService es null\");\n }\n\n sensorValues = sensorService.getCurrentValues();\n if(sensorValues != null) {\n //Log.d(\"TAG\", sensorValues.getLocLat() + \"-\" + sensorValues.getLocLong());\n new UpdateUserStateTask().execute(dni, sensorValues.getLocLat(), sensorValues.getLocLong());\n }\n else {\n //Log.d(\"TAG\", \"Obteniendo localizacion de LocationManager\");\n LocationManager locationManager = (LocationManager) getActivity().getSystemService(Context.LOCATION_SERVICE);\n // Sale error porque requiere minimo API 23 y nosotros tenemos minimo API 15\n // No falla al ejecutarse\n try {\n Location location = locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n //Log.d(\"TAG\", location.getLatitude() + \"-\" + location.getLongitude());\n new UpdateUserStateTask().execute(dni, location.getLatitude(), location.getLongitude());\n }\n catch (SecurityException e) {\n Log.e(\"PERMISSION_EXCEPTION\",\"PERMISSION_NOT_GRANTED\");\n }\n }\n }\n else {\n Log.d(\"TAG\", \"NO BOUND\");\n }\n }\n else {\n Log.d(\"TAG\", \"DNI nulo\");\n }\n\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MediaPlayerService.LocalBinder binder = (MediaPlayerService.LocalBinder) service;\n player = binder.getService();\n serviceBound = true;\n\n\n //Toast.makeText(QuranListenActivity.this, \"Service Bound\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public IBinder onBind(Intent intent) {\n return new SimpleBinder(this);\n }", "@Override\r\n public IBinder onBind(Intent intent) {\r\n return mBinder;\r\n }", "@Override\n\t\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\t}", "private void bindService() {\n synchronized (mLock) {\n if (!mEnabled || mConnection != null || mRemoteService != null) {\n if (!mEnabled) {\n Slog.i(TAG, \"Not binding to service, service disabled\");\n } else if (mRemoteService != null) {\n Slog.i(TAG, \"Not binding to service, service already connected\");\n } else {\n Slog.i(TAG, \"Not binding to service, service already connecting\");\n }\n return;\n }\n ComponentName component = getServiceComponentNameLocked();\n if (component == null) {\n Slog.wtf(TAG, \"Explicit health check service not found\");\n return;\n }\n\n Intent intent = new Intent();\n intent.setComponent(component);\n mConnection = new ServiceConnection() {\n @Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n Slog.i(TAG, \"Explicit health check service is connected \" + name);\n initState(service);\n }\n\n @Override\n @MainThread\n public void onServiceDisconnected(ComponentName name) {\n // Service crashed or process was killed, #onServiceConnected will be called.\n // Don't need to re-bind.\n Slog.i(TAG, \"Explicit health check service is disconnected \" + name);\n synchronized (mLock) {\n mRemoteService = null;\n }\n }\n\n @Override\n public void onBindingDied(ComponentName name) {\n // Application hosting service probably got updated\n // Need to re-bind.\n Slog.i(TAG, \"Explicit health check service binding is dead. Rebind: \" + name);\n unbindService();\n bindService();\n }\n\n @Override\n public void onNullBinding(ComponentName name) {\n // Should never happen. Service returned null from #onBind.\n Slog.wtf(TAG, \"Explicit health check service binding is null?? \" + name);\n }\n };\n\n mContext.bindServiceAsUser(intent, mConnection,\n Context.BIND_AUTO_CREATE, UserHandle.of(UserHandle.USER_SYSTEM));\n Slog.i(TAG, \"Explicit health check service is bound\");\n }\n }", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tBind bind = (Bind) service;\n\t\t\tParcel data = Parcel.obtain();\n\t\t\tParcel reply = Parcel.obtain();\n\t\t\tdata.writeString(\"test\");\n\t\t\ttry {\n\t\t\t\tbind.transact(0, data, reply, 0);\n\t\t\t} catch (RemoteException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\tLog.i(tag, bind.a);\n\t\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service)\n {\n mEngagementService = IEngagementService.Stub.asInterface(service);\n\n /* We are not binding anymore */\n mBindingService = false;\n\n /* Send pending commands */\n for (Runnable cmd : mPendingCmds)\n cmd.run();\n mPendingCmds.clear();\n\n /* Schedule unbind (if not in session) */\n scheduleUnbind();\n }", "@Override\n\tpublic IBinder onBind(Intent arg0)\n\t{\n\t\tLog.i(\"JSChatClientService\", \"JSChatClientService bound.\");\n\t\treturn binder;\n\t}", "@Override\r\n\tpublic IBinder onBind(Intent arg0) {\r\n\t\treturn new BDBServiceBinder();\r\n\t}", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tmBinder = (Stub) service;\n\t\t\tLog.d(TAG, \"mBinder init\");\n\t\t}", "@Override\n public IBinder onBind(Intent intent) {\n return mBinder;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return mBinder;\n }", "@Override\n public IBinder onBind(Intent intent) {\n return mBinder;\n }", "@Override\n\tpublic void onStart() {\n\t\tsuper.onStart();\n\t\tIntent intent = new Intent(getActivity(), DownloadService.class);\n\t\tgetActivity().bindService(intent, mServiceConnection,\n\t\t\t\tService.BIND_AUTO_CREATE);\n\t}", "@Override\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\n\t\t\tib = service;\n\t\t\tSystem.out.println(\"DEBUG>>>ServiceConnection.\");\n\t\t}", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n MediaPlayerService.LocalBinder binder = (MediaPlayerService.LocalBinder) service;\n player = binder.getService();\n serviceBound = true;\n player.setCallbacks(MainActivity.this);\n\n //Toast.makeText(MainActivity.this, \"Service Bound\", Toast.LENGTH_SHORT).show();\n }", "@Override\n public IBinder onBind(Intent arg0) {\n return binder;\n }", "@Override\n protected void onStart() {\n super.onStart();\n\n if (mBangingTunesItent == null) {\n mBangingTunesItent = new Intent(this, BangingTunes.class);\n final boolean bindIndicator = bindService(mBangingTunesItent, mServiceConnection, Context.BIND_AUTO_CREATE);\n final ComponentName componentName = startService(mBangingTunesItent);\n }\n }", "@Override\n public IBinder onBind(Intent intent) {\n return new MyBinder(this);\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n Log.d(\"service\", \"onServiceConnected() \" + name.getClassName());\n mMyServ = ((MyService.LocalBinder) service).getService();\n }", "@Override\n public IBinder onBind(Intent intent) {\n\n return myBinder;\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n PositionService.PositionBinder binder = (PositionService.PositionBinder) service;\n positionService = binder.getService();\n positionService.setCallbacks(MainActivity.this);\n }", "@Override\n protected void onStart() {\n super.onStart();\n Intent intent = new Intent(this, PlayerService.class);\n bindService(intent, serviceConnection, Context.BIND_AUTO_CREATE);\n\n }", "@Override\n public IBinder onBind(Intent intent) {\n return localBinder;\n }", "@Override\n public void onServiceConnected(ComponentName className, IBinder service) {\n OpenVPNService.LocalBinder binder = (OpenVPNService.LocalBinder) service;\n mService = binder.getService();\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n mService = new Messenger(service);\n mBound = true;\n }", "public void onServiceConnected(ComponentName className, IBinder service) {\n mService = new Messenger(service);\n mBound = true;\n }", "void bind(EventService service);", "@Override\n protected void onResume() {\n\n super.onResume();\n\n bindService(serviceIntent, connection, BIND_AUTO_CREATE);\n\n }", "@GuardedBy(\"mLock\")\n private void bindLocked() {\n // No need to bind if service is binding or has already been bound.\n if (mBinding || mService != null) {\n return;\n }\n\n mBinding = true;\n // mContext.bindServiceAsUser() calls into ActivityManagerService which it may already\n // hold the lock and had called into PowerManagerService, which holds a lock.\n // That would create a deadlock. To solve that, putting it on a handler.\n mAttentionHandler.post(() -> {\n final Intent serviceIntent = new Intent(\n AttentionService.SERVICE_INTERFACE).setComponent(\n mComponentName);\n // Note: no reason to clear the calling identity, we won't have one in a handler.\n mContext.bindServiceAsUser(serviceIntent, mConnection,\n Context.BIND_AUTO_CREATE, UserHandle.CURRENT);\n\n });\n }", "@Override\n public void onClick(View v) {\n startService(new Intent(MainActivity.this, MyService.class));\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n\n messengerService = new Messenger(service);\n messengerServiceBound = true;\n }", "public void onServiceConnected(ComponentName className,\n\t\t\t\tIBinder service) {\n\t\t\tLocalBinder binder = (LocalBinder) service;\n\t\t\tconnService = binder.getService();\n\t\t\tconnServiceBound = true;\n\t\t}", "@Override\n public IBinder onBind(Intent intent) {\n Log.e(TAG, \"onbind\");\n return binder;\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n\n // Sets the binder for the service.\n SSMusicService.SSMusicBinder binder = (SSMusicService.SSMusicBinder) service;\n musicService = binder.getService();\n serviceBound = true; // Indicates that the service is bounded.\n }", "private void automaticBinding() {\n if (SensorReaderService.isRunning()){\n doBindService();\n } else{\n startSensingService();\n doBindService();\n }\n if (v != null) {\n v.vibrate(500);\n }\n }", "@Override\r\n public IBinder onBind(Intent intent) {\n return binder;\r\n }", "@Override\n\tpublic void onRebind(Intent intent) {\n\t\tLog.i(TAG, \"service on rebind\");\n\t\tsuper.onRebind(intent);\n\t}", "@Override\n public void onRebind(Intent intent) {\n // TODO: Return the communication channel to the service.\n if(org.mcopenplatform.muoapi.BuildConfig.DEBUG)Log.d(TAG,\"onRebind\");\n if(startIntent != null){\n intent=startIntent;\n }\n engine.newClient(intent,this,true);\n }", "@Override\n public void onServiceConnected(ComponentName name, IBinder service) {\n TimerService.TimerBinder binder = (TimerService.TimerBinder)service;\n mService = binder.getService();\n mBound = true;\n // Ensure the service is not in the foreground when bound\n mService.background();\n }", "public void onInCallServiceBind() {\n HiLog.info(LOG_LABEL, \"onInCallServiceBind.\", new Object[0]);\n this.mIsInCallServiceBinded = true;\n }", "@Override\n public IBinder onBind(Intent intent) {\n throw new UnsupportedOperationException(\"AutoUpdateService自动更新 - Not yet implemented\");\n }", "@Override\n\tpublic IBinder onBind(Intent arg0) {\n\t\treturn mBinder;\n\t}", "@Override\n public IBinder onBind(Intent intent) {\n return getBinder;\n }", "@Override\n public IBinder onBind(Intent intent) {\n// Return the BackgroundAudioServiceBinder object\n return basBinder;\n }", "@Override\n public IBinder onBind(Intent intent) {\n Log.v(LOG_TAG, \"in onBind\");\n return mBinder;\n }", "@Override\r\n\t\tpublic void onServiceConnected(ComponentName name, IBinder service) {\r\n\t\t\tRestartAppService.MyBinder mBinder = (RestartAppService.MyBinder) service;\r\n\t\t\tmBinder.startRestartTask(App.this);\r\n\t\t}", "@Override\n public IBinder onBind(Intent arg0) {\n return null;\n }", "@Override\n public IBinder onBind(Intent arg0) {\n intent=arg0;\n return null;\n }", "@Override\r\n\tpublic IBinder onBind(Intent intent) {\n\t\tLog.v(\"shadow\", \"2\");\r\n\t\tinfos = packageInfo.getRunningProcess();\r\n\t\thandler.postDelayed(runnable, 3000);\r\n\t\treturn myBinder;\r\n\r\n\t}", "@Override\r\n\tpublic IBinder onBind(Intent arg0) {\n\t\treturn binder;\r\n\t}", "@Override\n\tpublic IBinder onBind(Intent arg0) {\n\t\treturn new LocalBinder();\n\t}", "@Override\n public IBinder onBind(Intent intent) {\n Log.e(TAG,\"connected\");\n return null;\n }", "@Override\n\tpublic IBinder onBind(Intent intent) {\n\t\treturn mBinder;\n\t}", "@Override\n\tpublic IBinder onBind(Intent intent) {\n\t\treturn mBinder;\n\t}", "@Override\n\tpublic IBinder onBind(Intent intent) {\n\t\treturn mBinder;\n\t}", "@Override\n public IBinder onBind(Intent arg0) {\n return null;\n }", "@Override\n public IBinder onBind(Intent arg0) {\n return null;\n }", "@Override\n public IBinder onBind(Intent arg0) {\n return null;\n }", "@Override\n public void onClick(View v) {\n Intent intent = new Intent(Server.this, RemoteService.class);\n // bind the same interface name\n intent.setAction(IRemoteService.class.getName());\n bindService(intent, mConnection, Context.BIND_AUTO_CREATE);\n\n intent.setAction(ISecondary.class.getName());\n bindService(intent, mSecondaryConnection, Context.BIND_AUTO_CREATE);\n\n mIsBound = true;\n mCallbackText.setText(\"Binding the Remote Service\");\n\n }", "@Override\n public void onServiceConnected(ComponentName className,\n IBinder service) {\n final CurrencyRatesService.LocalBinder binder = (CurrencyRatesService.LocalBinder) service;\n currencyRatesService = binder.getService();\n isServiceBound = true;\n }" ]
[ "0.8209938", "0.796345", "0.7894911", "0.78868645", "0.786143", "0.77452344", "0.7673315", "0.76676327", "0.7628442", "0.7599289", "0.75743526", "0.7574221", "0.7551525", "0.7545207", "0.7545207", "0.75220954", "0.7494166", "0.747682", "0.74573386", "0.7440741", "0.7416225", "0.7411634", "0.73906434", "0.7386746", "0.7380395", "0.73645884", "0.73373365", "0.73230934", "0.7298197", "0.7265876", "0.7248663", "0.7248039", "0.72366357", "0.7174518", "0.7162837", "0.71609175", "0.7158777", "0.71558994", "0.7136026", "0.7098845", "0.70918995", "0.70732063", "0.7063898", "0.7058429", "0.70510316", "0.70419526", "0.70388263", "0.70176244", "0.70152164", "0.7002737", "0.69935", "0.69935", "0.69935", "0.69906324", "0.69744307", "0.6965453", "0.6949212", "0.6943828", "0.6943326", "0.6939532", "0.69380075", "0.69339275", "0.6932706", "0.6911215", "0.6904046", "0.68948895", "0.68948895", "0.68893355", "0.6887679", "0.68776935", "0.6874866", "0.68646514", "0.68623", "0.68547374", "0.68539536", "0.6848245", "0.68474376", "0.68425035", "0.6842247", "0.68319273", "0.6821073", "0.68130356", "0.6803872", "0.67929304", "0.67706716", "0.67693436", "0.67650145", "0.6752827", "0.6751529", "0.67484903", "0.674791", "0.6743103", "0.6738636", "0.6738318", "0.6738318", "0.6738318", "0.673068", "0.673068", "0.673068", "0.6720137", "0.6703749" ]
0.0
-1
release resources when unbind
@Override public boolean onUnbind(Intent intent) { stopPlayer(); return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void unbind() { }", "void unbind();", "protected abstract void unbind();", "protected abstract void unbind();", "public void close() {\n unbind();\n }", "public void free(){\n\t\t\t\tif(this.handle != GlBuffer.UNBIND_HANDLE){\n\t\t\t\t\tfinal int[] handles = new int[]{this.handle};\n\t\t\t\t\tthis.handle = GlBuffer.UNBIND_HANDLE;\n\t\t\t\t\tGLES20.glDeleteBuffers(1, handles, 0);\n\t\t\t\t}\n\t\t\t}", "void onUnbind();", "void unbindAll();", "public void onDestroy(){\n\t\tsuper.onDestroy();\n\t\tdoUnbind();\n\t}", "private void releaseResources() {\n\t\tstopForeground(true);\n\t\taudioManager.unregisterRemoteControlClient(remoteControlClient);\n\t\taudioManager.unregisterMediaButtonEventReceiver(remoteReceiver);\n\t\t\n\t\tif (mediaPlayer != null){\n\t\t\tmediaPlayer.reset();\n\t\t\tmediaPlayer.release();\n\t\t\tmediaPlayer = null;\n\t\t}\n\t\t\n\t\tif (wifiLock.isHeld()) {\n\t\t\twifiLock.release();\n\t\t}\n\t}", "public void finalize() {\n\n if (mBtManager != null) {\n //mBtManager.stop();\n mBtManager.setHandler(null);\n }\n mBtManager = null;\n mContext = null;\n mConnectionInfo = null;\n }", "public abstract void unbindComponents();", "private void release() {\n\t\tinitialized = false;\n\t\tpause();\n\t\tsetOnCompletionListener(null);\n\t\tgetMp().release();\n\t\tmp = null;\n\t}", "public void disposeResources() {\n Arrays.fill(icons, null);\n iconComponent.removeAncestorListener(this);\n }", "public void freeDragResources()\n\t{\n\t}", "public void release() {\n HiLog.info(LOG_LABEL, \"release.\", new Object[0]);\n this.mCallMapById.clear();\n this.mRemote = null;\n disconnect();\n destroyHandler();\n this.mContext = null;\n this.mPendingCallAudioState = null;\n this.mCurrentCallAudioState = null;\n this.mPendingCanAddCall = null;\n this.mPreAddedCall = null;\n this.mPendingDisconnectPreAddedCall = null;\n this.mIsConnected = false;\n this.mIsBound = false;\n this.mIsInCallServiceBinded = false;\n this.mIsPreConnected = false;\n Listener listener = this.mListener;\n if (listener != null) {\n listener.onReleased(this);\n this.mListener = null;\n }\n }", "void unbind(boolean shouldPlaceSpacer, boolean switchingStream);", "public void release() {\n\n mTextureRender = null;\n mSurfaceTexture = null;\n }", "public void releaseResource() {\n if (!isPreConnected() && !isInCallServiceBinded() && this.mCallMapById.isEmpty() && this.mPreAddedCall == null && this.mPendingDisconnectPreAddedCall == null) {\n release();\n }\n }", "@Override public void onDestroyView() {\n super.onDestroyView();\n unbinder.unbind();\n }", "private void cleanup() {\n\t\tif (myListener!=null)\n\t\t\t_prb.removeListener(myListener);\n\t}", "@Override\n\tpublic void finalize() {\n\t\tcontext.unbindService(CONNECTION);\n\t}", "public void cleanup() {\n\t\tref.removeEventListener(listener);\n\t\tmodels.clear();\n\t\tmodelNames.clear();\n\t\tmodelNamesMapping.clear();\n\t}", "public void doUnbind(){\n\t\tboolean isBound = settings.getBoolean(\"isBound\", false);\n\t\tif(isBound){\n\t\t\tcontext.unbindService(SpeedConnection);\n\t\t\tcontext.stopService(i);\n\t\t\teditor.putBoolean(\"isBound\", false);\n\t\t\teditor.apply();\n\t\t}\n\t}", "@Override\n\tpublic void onDestroyView() {\n\t\tsuper.onDestroyView();\n\t\tunbinder.unbind();\n\t}", "public void release() {\n\t\tsuper.release();\r\n\t\tinnerContent = null;\r\n\t\tlabelHead = null;\r\n\t\tscroll = null;\r\n\t}", "public void unbind() {\n\t\tview.setAdapter(null);\n\t}", "@Override\n public void release() {\n super.release();\n init();\n }", "public void release() {\n mPhoneNumberInput.removeTextChangedListener(this);\n mPhoneNumberInput = null;\n mCountryCodeInput = null;\n }", "private void releaseService() {\n unbindService(connection);\n connection = null;\n Log.d(TAG, \"releaseService() unbound.\");\n }", "@Override\n public boolean onUnbind(Intent intent) {\n close();\n return super.onUnbind(intent);\n }", "public void release() { \r\n\t remoteControlClient = null;\r\n\t }", "@Override\n public void onDestroyView() {\n super.onDestroyView();\n mUnbinder.unbind();\n }", "@Override\n\tpublic void onDestroy() {\n\t\tquitAllFocus();\n\t\timg.setImageBitmap(null);\n\t\tclearMemory();\n\t\tsuper.onDestroy();\n\t\ttry {\n\t\t\t//GARBAGE COLLECTOR\n\t\t\tSystem.gc();\n\t\t} catch (Exception e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\t}", "@Override\n protected void onDestroy() {\n unBoundAudioService();\n super.onDestroy();\n }", "@Override\r\n public void release() {\r\n videoRendererStatus = NexVideoRendererStatus.VIDEO_RENDERER_NONE;\r\n if(mBaseView instanceof NexSurfaceTextureView) {\r\n ((NexSurfaceTextureView)mBaseView).release();\r\n }\r\n mNexPlayer = null;\r\n mSurface.release();\r\n setListener(null);\r\n }", "@Override\n public void onDestroy() {\n nm.cancelAll(); \t\n \tsuper.onDestroy();\n \t\n }", "@Override\n protected void onDestroy() {\n super.onDestroy();\n unbindService(connection);\n }", "@Override\n\tprotected void onDestroy() {\n\t\tif (isServiceBinded) {\n\t\t\tunbindService(this);\n\t\t\tisServiceBinded = false;\n\t\t\tserviceMessenger = null;\n\t\t}\n\t\tsuper.onDestroy();\n\t}", "@Override\n protected void onDestroy() {\n super.onDestroy();\n\n unbindService(conn);\n unregisterReceiver(mbtBroadcastReceiver);\n }", "public void unbind()\n {\n glBindTexture(GL_TEXTURE_2D, 0);\n }", "public void releaseResources();", "private void releaseMediaPlayerResources(){\n if(mRingTonePlayer != null){\n mRingTonePlayer.stop();\n mRingTonePlayer.release();\n mRingTonePlayer = null;\n }\n }", "public void onDestroy() {\n super.onDestroy();\n C0938a.m5006c(\"SR/SoundRecorder\", \"~~~~~~~~~~~~~~~~~~~~~~~~~~~~onDestroy\");\n m6659t();\n ServiceConnection serviceConnection = this.f5403W;\n if (serviceConnection != null) {\n unbindService(serviceConnection);\n }\n }", "public void freeResources() {\n borderPane = null;\n }", "@Override\n\tpublic void unloadResources() {\n\t\ttextureManager.unLoadTextures();\n\t}", "synchronized void m6640c() {\n if (!m6637a()) {\n this.f5128e = null;\n this.f5127d = true;\n try {\n this.f5126c.unbindService(this);\n } catch (IllegalArgumentException e) {\n StringBuilder stringBuilder = new StringBuilder();\n stringBuilder.append(\"Error unbinding service: \");\n stringBuilder.append(e.getMessage());\n Log.w(\"FJD.ExternalReceiver\", stringBuilder.toString());\n }\n }\n return;\n }", "public void release()\r\n\t{\r\n\t\tsuper.release();\r\n\t\t_href = null;\r\n\t\t_box = null;\r\n\t\t_bracket = null;\r\n\t\t_bracketFont = null;\r\n\r\n\t}", "public void dispose() {\n\t\tSet<IRI> ids = new HashSet<IRI>(getModelIds());\n\t\tfor (IRI id : ids) {\n\t\t\tunlinkModel(id);\n\t\t}\n\t}", "public synchronized void dispose() {\n\n\t\tthis.direction = -1;\n\t\tGameMethods.playSound(\"spell_disolve.wav\");\n\t\tanimator.setAnimation(\"/images/weapons_sprites/spell_off.png\", 50, 11);\n\t}", "@PreDestroy\n public void onClose() {\n progSpin.progressProperty().unbind();\n progLabel.textProperty().unbind();\n processButton.disableProperty().unbind();\n }", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tunbindService(mServiceConn);\n\t}", "void unbind(Object element);", "@Override\n\tpublic void releaseResouces() {\n\t\tsuper.releaseResouces();\n\t}", "protected abstract void disposeResources();", "@Override\n\tpublic void dispose() {\n\t\tbackground.dispose();\n\t\ttexture.dispose();\n\t\ttexture2.dispose();\n\t\tspriteBatch.dispose();\n\t\tclient.removeListener(listener);\n\t\tui.dispose();\n\t}", "private void cleanupResources() {\n Log.d(TAG, \"Initiating resource cleanup\");\n if (mWorkerThread != null) {\n mWorkerThread.quitSafely();\n try {\n mWorkerThread.join();\n mWorkerThread = null;\n } catch (InterruptedException e) {\n Log.e(TAG, \"Failed to join on mWorkerThread\");\n }\n }\n //mListener = null;//Release later when being finalized\n mDisplayHandler = null;\n mERDHandler = null;\n mContext = null;\n surface = null;\n mIface = null;\n mLocalWfdDevice = null;\n mPeerWfdDevice = null;\n mActionListener = null;\n Log.d(TAG, \"Done with resource cleanup\");\n }", "protected void finalize() {\n\t\tdestroyImages();\n\t}", "@Override\n\tpublic void dispose() {\n\t\tdestroy();\n\t}", "public void unbindAll() {\n\t\tmGlobalCallbacks.clear();\n\t\t/* remove all local callback lists, that is removes all local callbacks */\n\t\tmLocalCallbacks.clear();\n\t}", "protected void onDispose() {\n\t\t/* Shutdown procedure */\n\t\tshutDown();\n\t}", "@Override\n public void unbindRequested(ChannelHandlerContext ctx, ChannelStateEvent e) {\n \tSystem.out.println(\"unBind Requested\");\n \t/*\n \tPlayer player = (Player) ctx.getAttachment();\n if (player != null && !player.destroyed()) {\n \tplayer.destroy(false);\n }\n ctx.getChannel().disconnect(); */\n }", "void doAccelUnbindService() {\n\t\tif (accelIsBound) {\n\t\t\tunbindService(accelConnection);\n\t\t\taccelIsBound = false;\n\t\t}\n\t}", "private void release() {\n noxItemCatalog.release();\n noxItemCatalog.deleteObserver(catalogObserver);\n }", "public void dispose() {\n cachedModelMap.clear();\n ResourcesPlugin.getWorkspace()\n .removeResourceChangeListener(this);\n }", "public void release() {\n stop();\n\n Intent i = new Intent(AudioEffect.ACTION_CLOSE_AUDIO_EFFECT_CONTROL_SESSION);\n i.putExtra(AudioEffect.EXTRA_AUDIO_SESSION, getAudioSessionId());\n i.putExtra(AudioEffect.EXTRA_PACKAGE_NAME, mContext.getPackageName());\n mContext.sendBroadcast(i);\n\n mPlayer.release();\n mWakeLock.release();\n }", "@Override\n protected final void deallocate() {\n ByteBuf wrapped = unwrap();\n recyclerHandle.recycle(this);\n wrapped.release();\n }", "@Override\n\t public void onRelease() {\n\n\t }", "public void dispose()\n {\n synchronized (this)\n {\n if (iHandle == 0)\n {\n return;\n }\n disposeProxy();\n iHandle = 0;\n iActionSubscribe.destroy();\n iActionUnsubscribe.destroy();\n iActionRenew.destroy();\n iActionGetPropertyUpdates.destroy();\n }\n }", "@Override\n public void cleanup() {\n if (this.cleanedUp) {\n throw new IllegalStateException(\"Tried cleanup already cleared swapchain!\");\n }\n\n if (this.swapchain != VK_NULL_HANDLE) {\n for (final var imageView : this.imageViews) {\n imageView.close();\n }\n\n vkDestroySwapchainKHR(this.deviceContext.getDeviceHandle(), this.swapchain, null);\n }\n this.cleanedUp = true;\n }", "protected void cleanupOnClose() {\n\t}", "protected abstract void deAllocateNativeResource();", "void unbind(EventService service);", "private void unbind() {\n ThreadUtil.checkOnMainThread();\n Iterator<Map.Entry<ComponentName, InCallServiceConnection>> iterator =\n mServiceConnections.entrySet().iterator();\n while (iterator.hasNext()) {\n Log.i(this, \"Unbinding from InCallService %s\");\n mContext.unbindService(iterator.next().getValue());\n iterator.remove();\n }\n mInCallServices.clear();\n }", "@Override\n public void release() {\n\n super.release();\n collection = null;\n labelName = null;\n labelProperty = null;\n name = null;\n property = null;\n style = null;\n styleClass = null;\n\n }", "public void release() {\n synchronized (mLock) {\n super.release();\n detachMediaController();\n setContentUri(PlayMode.NONE, null);\n setContentFd(PlayMode.NONE, null);\n setCurrentState(State.RELEASED);\n mContext = null;\n }\n }", "public void dispose() {\r\n \t\r\n \tGLES10.glBindTexture(GLES10.GL_TEXTURE_2D, this.textureId);\r\n int[] textureIds = {textureId};\r\n GLES10.glDeleteTextures(1, textureIds, 0);\r\n }", "public void onDestroy() {\n cancelPausedTimer();\n k.a().b();\n stopSocket();\n clearAllMapData();\n if (this.pushManager != null) {\n this.pushManager.i();\n this.pushManager = null;\n }\n if (this.liveAnimationView != null) {\n this.liveAnimationView.onDestroy();\n }\n if (this.mLivePusherInfoView != null) {\n this.mLivePusherInfoView.onDestroy();\n }\n if (this.countDownAnimSet != null) {\n this.countDownAnimSet.cancel();\n }\n if (this.mainHandler != null) {\n this.mainHandler.removeCallbacksAndMessages(null);\n this.mainHandler = null;\n }\n if (this.workHandler != null) {\n this.workHandler.removeCallbacksAndMessages(null);\n this.workHandler = null;\n }\n if (this.mGiftBoxView != null) {\n this.mGiftBoxView.release();\n }\n if (this.mInputTextMsgDialog != null) {\n this.mInputTextMsgDialog.onDestroy();\n this.mInputTextMsgDialog = null;\n }\n super.onDestroy();\n }", "public void deallocate() {\n\tsetLoaded(false);\n\n if (!externalAudioPlayer) {\n if (audioPlayer != null) {\n audioPlayer.close();\n audioPlayer = null;\n }\n }\n \n\tif (!externalOutputQueue) {\n\t outputQueue.close();\n\t}\n }", "@SuppressWarnings(\"unused\")\n\t\t\tprivate void dispose() {\n\t\t\t\t\n\t\t\t}", "public void dispose() {\n\t\tif (_slideCacheEntry != null) {\r\n\t\t\t_slideCacheEntry.dispose();\r\n\t\t}\r\n\r\n\t\tif (_precacheCacheEntry != null) {\r\n\t\t\t_precacheCacheEntry.dispose();\r\n\t\t}\r\n\t\t\r\n\t\t// The slide might remain in usage, this graphicsListener not:\r\n\t\t_slide.removeListener(_graphicsListener);\r\n\t}", "public void release() {\n changeToUninitialized();\n mHasDisplay = false;\n mPlayer.release();\n }", "@Override\n public void onCatalystInstanceDestroy() {\n super.onCatalystInstanceDestroy();\n\n Set<Map.Entry<Integer, PlayerInfo>> entries = playerPool.entrySet();\n for (Map.Entry<Integer, PlayerInfo> entry : entries) {\n PlayerInfo info = entry.getValue();\n if (info == null) {\n continue;\n }\n AudioPlayer player = info.audioPlayer;\n if (player == null) {\n continue;\n }\n try {\n player.setOnCompletionListener(null);\n player.setOnPreparedListener(null);\n player.setOnErrorListener(null);\n if (player.isPlaying()) {\n player.pause();\n }\n player.reset();\n player.release();\n } catch (Exception ex) {\n Log.e(\"RNSoundModule\", \"Exception when closing audios during app exit. \", ex);\n }\n }\n entries.clear();\n }", "@Override protected void onDetachedFromWindow() {\n super.onDetachedFromWindow();\n release();\n }", "@Override\n public void release() {\n if (mSettingsObserver != null) {\n mContentQueryMap.deleteObserver(mSettingsObserver);\n }\n }", "@Override\r\n\tpublic void dispose() {\n\t\tif ( disposed ) { return; }\r\n\t\tif ( getOutput() != null ) {\r\n\t\t\tgetOutput().getData().removeListener(this);\r\n\t\t}\r\n\t\tdisposed = true;\r\n\t\tif ( surfaceComposite != null ) {\r\n\t\t\tsurfaceComposite.dispose();\r\n\t\t}\r\n\t\tIDisplaySurface s = getDisplaySurface();\r\n\t\tif ( s != null ) {\r\n\t\t\treleaseLock();\r\n\t\t}\r\n\t\tif ( updateThread != null ) {\r\n\t\t\tupdateThread.interrupt();\r\n\t\t}\r\n\r\n\t\tif ( perspectiveListener != null ) {\r\n\t\t\tSwtGui.getWindow().removePerspectiveListener(perspectiveListener);\r\n\t\t}\r\n\t\t// FIXME Remove the listeners\r\n\r\n\t\tif ( overlay != null ) {\r\n\t\t\toverlay.close();\r\n\t\t}\r\n\t\tsuper.dispose();\r\n\t}", "private void unbindMediaPlayerService() {\n mediaPlayerService.setCoverArt(coverArt);\n mediaPlayerService.setSelectedMed(selectedMed);\n mediaPlayerService.setBindIsOngoing(true);\n\n unbindService(mediaPlayerConnection);\n serviceIsBound = false;\n setControlsVisible(false);\n\n Log.v(TAG, \"Service unbound\");\n }", "@Override\n protected void onDestroy() {\n Initialization.exit(this);\n super.onDestroy();\n }", "public static void destroy() {\n handler = null;\n initialized = false;\n }", "public void yUnbind(String bind_name);", "@Override\n public void onBindingDied(ComponentName name) {\n mService = null;\n hostConnection = null;\n }", "public void dispose() {\n\t\tResourcesPlugin.getWorkspace().removeResourceChangeListener(this);\n\t\tsuper.dispose();\n\t}", "@Override\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\n\t\tif (qrBmp != null && !qrBmp.isRecycled()) {\n\t\t\tqrBmp.recycle();\n\t\t}\n\t\tqrBmp = null;\n\t\tSystem.gc();\n\t}", "@Override\n\tpublic void releaseAllResources() {\n\t}", "@Override\n protected void unBindTarget() {\n this.mThemeCallback = null;\n }", "@Override public void onDestroyView() {\n super.onDestroyView();\n ButterKnife.unbind(this);\n }", "@Override\n public void release() {\n \n }", "@Override\r\n\tprotected void onDestroy() {\n\t\tsuper.onDestroy();\r\n\t\tCleanup();\r\n\t}", "@Override\n public boolean onUnbind(Intent intent) {\n \tcloseBluetooth();\n return super.onUnbind(intent);\n }", "public void onDestroy() {\r\n Disposable disposable = this.followingDisposable;\r\n if (disposable != null) {\r\n disposable.dispose();\r\n }\r\n Disposable disposable2 = this.unfollowingDisposable;\r\n if (disposable2 != null) {\r\n disposable2.dispose();\r\n }\r\n Disposable disposable3 = this.loadingDisposable;\r\n if (disposable3 != null) {\r\n disposable3.dispose();\r\n }\r\n Disposable disposable4 = this.personalizedRecommendDisposable;\r\n if (disposable4 != null) {\r\n disposable4.dispose();\r\n }\r\n EventBus.getDefault().unregister(this);\r\n super.onDestroy();\r\n }", "private void onModuleDestroy() {\n //!\n //! Handle the destroy notification.\n //!\n mLifecycle.onPause();\n mLifecycle.onDispose();\n\n //!\n //! Unload resource module.\n //!\n mResources.onModuleDestroy();\n mResources.unloadAll();\n\n //!\n //! Unload input module.\n //!\n mInputThread.cancel();\n mInput.onModuleDestroy();\n\n //!\n //! Unload audio module.\n //!\n mAudioThread.cancel();\n mAudio.onModuleDestroy();\n\n //!\n //! Unload render module.\n //!\n //! NOTE: Update the render to destroy all render component(s)\n //!\n mRender.onModuleDestroy();\n\n //!\n //! Unload display module.\n //!\n mDisplay.onModuleDestroy();\n }" ]
[ "0.76172966", "0.7448128", "0.7367516", "0.7367516", "0.73388207", "0.72317296", "0.7203394", "0.71361125", "0.7007634", "0.6899548", "0.6831062", "0.68064505", "0.67927545", "0.67691684", "0.66818535", "0.6667235", "0.6667216", "0.6634525", "0.6629231", "0.65584373", "0.6547634", "0.65370315", "0.64893365", "0.6489169", "0.64483786", "0.6439669", "0.6432947", "0.6424842", "0.64187086", "0.64159995", "0.64020246", "0.64008975", "0.63979477", "0.6388748", "0.6381995", "0.6368134", "0.6333222", "0.6326495", "0.63227963", "0.63051045", "0.6299945", "0.6269037", "0.6268958", "0.6266818", "0.6255651", "0.62552565", "0.6253265", "0.62392485", "0.6231655", "0.62309086", "0.62269115", "0.621631", "0.62149984", "0.6213612", "0.6213526", "0.62090325", "0.6206725", "0.62049675", "0.61984825", "0.6178416", "0.61778927", "0.6177308", "0.61761355", "0.6175457", "0.61689985", "0.6166401", "0.61609566", "0.61601603", "0.6159928", "0.615203", "0.61372536", "0.61302286", "0.61269844", "0.61226493", "0.61188984", "0.61166394", "0.61118454", "0.61046094", "0.6104164", "0.6101311", "0.6098375", "0.6096601", "0.6096507", "0.609509", "0.60886836", "0.60797524", "0.6078386", "0.60758466", "0.6074323", "0.6073743", "0.6070894", "0.6067453", "0.6065402", "0.6056713", "0.6047574", "0.60459137", "0.6042725", "0.60422146", "0.6041182", "0.60336065", "0.60328573" ]
0.0
-1
Construct a new job priority attribute with the given integer value.
public JobPriority(int value) { super (value, 1, 100); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Builder setPriority(int value) {\n\n priority_ = value;\n bitField0_ |= 0x00000010;\n onChanged();\n return this;\n }", "public Builder setPriorityValue(int value) {\n priority_ = value;\n bitField0_ |= 0x00000040;\n onChanged();\n return this;\n }", "Builder withPriority(int priority);", "public void setPriority(int value) {\n this.priority = value;\n }", "public final com.francetelecom.admindm.model.Parameter createPriority()\n\t\t\tthrows Fault {\n\t\tcom.francetelecom.admindm.model.Parameter param;\n\t\tparam = data.createOrRetrieveParameter(basePath + \"Priority\");\n\t\tparam.setNotification(0);\n\t\tparam.setStorageMode(StorageMode.DM_ONLY);\n\t\tparam.setType(ParameterType.UINT);\n\t\tparam.addCheck(new CheckMinimum(0));\n\t\tparam.addCheck(new CheckMaximum(4294967295L));\n\t\tparam.setValue(new Long(0));\n\t\tparam.addCheck(new CheckMaximum(99));\n\t\tparam.setWritable(false);\n\t\treturn param;\n\t}", "@IcalProperty(pindex = PropertyInfoIndex.PRIORITY,\n eventProperty = true,\n todoProperty = true\n )\n public void setPriority(final Integer val) {\n priority = val;\n }", "AgentPolicyBuilder setJobPriority(JobPriority jobPriority);", "@Test(timeout = 10000)\n public void testJobPriorityChange() throws Exception {\n org.apache.hadoop.mapreduce.JobID jid = new JobID(\"001\", 1);\n JobPriorityChangeEvent test = new JobPriorityChangeEvent(jid, JobPriority.LOW);\n Assert.assertEquals(test.getJobId().toString(), jid.toString());\n Assert.assertEquals(test.getPriority(), LOW);\n }", "IPriorityQueue add(Integer priority, String value);", "public Priority(int id) {\r\n\t\tsuper(id);\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "public IssueBuilderAbstract priority(Integer priority){\n if(priority > 0 && priority <= 10)\n fieldPriority = priority;\n else fieldPriority = -1;\n return this;\n }", "interface WithPriority {\n /**\n * Specifies priority.\n * @param priority Priority associated with the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0\n * @return the next definition stage\n */\n WithCreate withPriority(Integer priority);\n }", "public Builder setPriority(com.google.cloud.recommender.v1.Recommendation.Priority value) {\n if (value == null) {\n throw new NullPointerException();\n }\n bitField0_ |= 0x00000040;\n priority_ = value.getNumber();\n onChanged();\n return this;\n }", "public void generatePriority() {\n\t\tpriority = .25 * frequency + .25 * age + .25 * links + .25 * money;\n\t}", "public void setPriority(Priority priority);", "public Priority() {\r\n\t\tsuper();\r\n\t\t// TODO Auto-generated constructor stub\r\n\t}", "protected FunctionPriority createFunctionPrioritizer() {\n final String functionPriorities = getCommandLine().getOptionValue(FUNCTION_PRIORITY_OPTION);\n if (functionPriorities != null) {\n try {\n final Class<?> functionPrioritiesClass = ClassUtils.loadClass(functionPriorities);\n Object prioritiesObject = functionPrioritiesClass.newInstance();\n if (prioritiesObject instanceof InitializingBean) {\n ((InitializingBean) prioritiesObject).afterPropertiesSet();\n }\n if (prioritiesObject instanceof FactoryBean) {\n prioritiesObject = ((FactoryBean<?>) prioritiesObject).getObject();\n }\n if (prioritiesObject instanceof FunctionPriority) {\n return (FunctionPriority) prioritiesObject;\n }\n } catch (final Exception e) {\n throw new OpenGammaRuntimeException(\"Error loading function priorities\", e);\n }\n }\n return new FunctionPriority() {\n @Override\n public int getPriority(final CompiledFunctionDefinition function) {\n return 0;\n }\n };\n }", "public void setPriority(int data) {\n priority = data;\n }", "void setPriority(int priority);", "void setPriority(int priority);", "public void setPriority(int v) \n {\n \n if (this.priority != v)\n {\n this.priority = v;\n setModified(true);\n }\n \n \n }", "public void setPriority(@EntityInstance int i, @IntRange(from = 0, to = 7) int priority) {\n nSetPriority(mNativeObject, i, priority);\n }", "public final String getName() {\n return \"job-priority\";\n }", "@Override\n public void setPriorityValue(int priorityValue) {\n priority = priorityValue;\n }", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "public void setPriority(int newPriority) {\n\t\tpriority = newPriority;\n\t}", "@NotNull\n PriorityClass createPriorityClass(@NotNull String name, @NotNull String description, int priority)\n throws InvalidPriorityClassNameException, InvalidPriorityClassDescriptionException, DuplicatePriorityClassNameException;", "public static RequestPriority valueOf(int index) {\n RequestPriority[] values = RequestPriority.values();\n if (index < 0 || index >= values.length) {\n return LOW;\n }\n return values[index];\n }", "public static Priority of(int priority) {\n var normalizedPriority = normalize(priority);\n\n if (cache.containsKey(normalizedPriority)) {\n return cache.get(normalizedPriority);\n }\n\n var priorityObj = new Priority(normalizedPriority);\n cache.put(normalizedPriority, priorityObj);\n return priorityObj;\n }", "public void setPriority(int priority){\n this.priority = priority;\n }", "public Proc(int priority, int id) {\n\t\tthis.priority = priority;\n\t\tthis.procID = id;\n\t}", "@NotNull\n PriorityClass createPriorityClass(@NotNull String name, @NotNull String description, int priority, @NotNull Set<SBuildType> buildTypes)\n throws InvalidPriorityClassNameException, InvalidPriorityClassDescriptionException, DuplicatePriorityClassNameException;", "public AbstractCreatorStrategy(Integer priority) {\n\n this.priority = priority;\n }", "public RegionCreator priority(int priority)\n\t{\n\t\tthis.priority = priority;\n\t\treturn this;\n\t}", "@java.lang.Override\n public int getPriorityValue() {\n return priority_;\n }", "public abstract int priority();", "PrioritySpecifierType createPrioritySpecifierType();", "public void setPriority(long priority) {\n\t\tsuper.priority = priority;\n\t}", "int getPriority( int priority );", "public void setPriority(int r) {\n priority = r;\n }", "public void setPriority(int priority){\n\t\tthis.priority = priority;\n\t}", "private void initializePriorities()\n {\n try\n {\n this.resourcePriorityAvailable =\n Integer.parseInt(parentProvider.getAccountID()\n .getAccountPropertyString(\n ProtocolProviderFactory.RESOURCE_PRIORITY));\n }\n catch(NumberFormatException ex)\n {\n logger.error(\"Wrong value for resource priority\", ex);\n }\n\n addDefaultValue(JabberStatusEnum.AWAY, -5);\n addDefaultValue(JabberStatusEnum.EXTENDED_AWAY, -10);\n addDefaultValue(JabberStatusEnum.ON_THE_PHONE, -15);\n addDefaultValue(JabberStatusEnum.IN_A_MEETING, -16);\n addDefaultValue(JabberStatusEnum.DO_NOT_DISTURB, -20);\n addDefaultValue(JabberStatusEnum.FREE_FOR_CHAT, +5);\n }", "public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int priority) {\n this.priority = priority;\n }", "public void setPriority(int newPriority)throws Exception{\n\t\t\n\t\tif (newPriority >= 0){\n\t\t\tthis.priority = newPriority;\n\t\t\tString txt = Integer.toString(newPriority);\n\t\t\toverWriteLine(\"Priority\", txt);\n\t\t}\n\t\n\t}", "public void setPrikey(String value) {\r\n setAttributeInternal(PRIKEY, value);\r\n }", "String getSpecifiedPriority();", "public void setPriority(String arg, String compcode) throws ReadWriteException\n\t{\n\t\tsetValue(_Prefix + HardZone.PRIORITY.toString(), arg, compcode);\n\t}", "public void setPriority(Priority priority) {\r\n this.priority = priority;\r\n }", "public int getPriority(){\n\t\treturn priority;\n\t}", "int priority();", "int priority();", "public void setPriority( int priority , int telObsCompIndex )\n\t{\n\t\t_avTable.set( ATTR_PRIORITY , priority , telObsCompIndex ) ;\n\t}", "public void setPriority(int priority) {\n this.mPriority = priority;\n }", "public IntPar(int val) { value = val; }", "default byte getPriority() {\n\t\treturn 0;\n\t}", "@JsonProperty(\"priority\")\r\n @JacksonXmlProperty(localName = \"priority\", isAttribute = true)\r\n public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "public Integer getPriority() {\n return priority;\n }", "public JobPreference(Integer id) {\n super.id=id;\n }", "public int priority(){\n return 0; //TODO codavaj!!\n }", "private CasePreinstConditionValue(int value, String name, String literal) {\n\t\tsuper(value, name, literal);\n\t}", "@NonNull\n @Override\n public SliceActionImpl setPriority(@IntRange(from = 0) int priority) {\n mPriority = priority;\n return this;\n }", "public ToDoBuilder changePriority(String priority) throws IllegalArgumentException{\n if (!priority.equals(\"?\") && !priority.equals(\"null\")) {\n this.priority = Integer.parseInt(priority);\n }\n return this;\n }", "public Integer getPriority() {\n return priority;\n }", "public Integer getPriority() {\n return priority;\n }", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "int getPriority();", "public int getPriority() {\n\t\tInteger prop = (Integer) getObject(\"priority\");\n\t\tif (prop != null) {\n\t\t\treturn prop;\n\t\t} else {\n\t\t\tthrow new IllegalStateException(\"The Task doesn't have its priority set\");\n\t\t}\n\t}", "public int getPriority();", "public int getPriority();", "public abstract int getPriority();", "public abstract int getPriority();", "public abstract int getPriority();", "public int getPriority(){\n return priority;\n }", "@Override\n public int compareTo(Building b) {\n if((b.priority == null)||(this.priority == null)) {\n return 0;\n }\n else if(this.priority.getValue() == b.priority.getValue()){\n return 0;\n }\n else if(this.priority.getValue() < b.priority.getValue()){\n return 1;\n }\n else if(this.priority.getValue() > b.priority.getValue()){\n return -1;\n }\n else{\n return 0;\n }\n }", "public int getPriority(){\n\t\t\n\t\treturn this.priority;\n\t}", "public Item(String n, int value) {\n\t\tname = n;\n\t\tmaxValue = value;\n\t}", "@Override\r\n\tpublic void setPriority(int arg0) throws NotesApiException {\n\r\n\t}", "public JDK8TriggerBuilder <T> withPriority (final int triggerPriority)\n {\n m_nPriority = triggerPriority;\n return this;\n }", "public int getPriority( int telObsCompIndex )\n\t{\n\t\treturn _avTable.getInt( ATTR_PRIORITY , telObsCompIndex , 0 ) ;\n\t}", "interface WithPriority {\n /**\n * Specifies priority.\n * @param priority Priority associated with the job. Priority values can range from -1000 to 1000, with -1000 being the lowest priority and 1000 being the highest priority. The default value is 0\n * @return the next update stage\n */\n Update withPriority(Integer priority);\n }", "@Override\n\tpublic Integer getPriorityForIntuitiveCreation() {\n\t\treturn null;\n\t}", "@JsonSetter(\"priority\")\r\n public void setPriority(String priority) {\r\n this.priority = priority;\r\n }", "public void setPriority(final int priority) {\n\t\tthis.priority = priority;\n\t}", "public void setJobType(int value) {\n this.jobType = value;\n }", "public void setPriority(String priority) {\n\t\tthis.ticketPriority = priority;\n\t}", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public int getPriority() {\n return priority;\n }", "public void setPriority(java.lang.Object priority) {\n this.priority = priority;\n }" ]
[ "0.6510222", "0.6432557", "0.6282937", "0.6186982", "0.6163367", "0.6034902", "0.57835615", "0.5651614", "0.56301427", "0.56180114", "0.55657667", "0.55311334", "0.55192137", "0.5500556", "0.5488072", "0.5485534", "0.5481617", "0.5479656", "0.54673153", "0.54673153", "0.5435935", "0.5430614", "0.54050267", "0.53350186", "0.5308856", "0.5303796", "0.5298537", "0.5295341", "0.5286876", "0.52686316", "0.52352077", "0.52348864", "0.5229419", "0.52219784", "0.5216949", "0.52128893", "0.51961654", "0.51928055", "0.5159969", "0.51535904", "0.51526564", "0.5141373", "0.5140103", "0.51223457", "0.51223457", "0.5121531", "0.5100349", "0.508973", "0.5087177", "0.50870633", "0.5085606", "0.50845563", "0.50845563", "0.50807065", "0.50785637", "0.50765693", "0.50750095", "0.50693125", "0.50303465", "0.5019373", "0.50107205", "0.4994884", "0.4991668", "0.4978714", "0.4974386", "0.4974386", "0.49719122", "0.49719122", "0.49719122", "0.49719122", "0.49719122", "0.49719122", "0.49719122", "0.49719122", "0.4971103", "0.49645886", "0.49645886", "0.49605966", "0.49605966", "0.49605966", "0.49568447", "0.49499133", "0.49482113", "0.4937156", "0.4935417", "0.49263236", "0.49259102", "0.49235168", "0.49230757", "0.49141464", "0.48980427", "0.48978338", "0.4896163", "0.48890957", "0.48890957", "0.48890957", "0.48890957", "0.48890957", "0.48890957", "0.48845875" ]
0.7561133
0
Returns whether this job priority attribute is equivalent to the passed in object. To be equivalent, all of the following conditions must be true: object is not null. object is an instance of class JobPriority. This job priority attribute's value and object's value are equal.
public boolean equals(Object object) { return (super.equals (object) && object instanceof JobPriority); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override public boolean equals(Object obj)\n {\n if(this == obj){\n return false;\n }\n if(obj == null){\n return false;\n }\n if (!(obj instanceof Priority))\n {\n return false;\n }\n Priority other = (Priority) obj;\n return priority == other.priority;\n }", "@Override\r\n\tpublic boolean equals(Object object) {\n\t\tif (!(object instanceof Priorities)) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tPriorities other = (Priorities) object;\r\n\t\tif ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "public boolean evaluateWithObject(java.lang.Object object){\n return false; //TODO codavaj!!\n }", "public boolean equals(Object object) {\r\n\t\treturn (this.compareTo(object) == 0);\r\n\t}", "@Test\n\tpublic void test_TCM__boolean_equals_Object() {\n\t\tfinal Attribute attribute = new Attribute(\"test\", \"value\");\n\n assertFalse(\"attribute equal to null\", attribute.equals(null));\n\n final Object object = attribute;\n assertTrue(\"object not equal to attribute\", attribute.equals(object));\n assertTrue(\"attribute not equal to object\", object.equals(attribute));\n\n // current implementation checks only for identity\n// final Attribute clonedAttribute = (Attribute) attribute.clone();\n// assertTrue(\"attribute not equal to its clone\", attribute.equals(clonedAttribute));\n// assertTrue(\"clone not equal to attribute\", clonedAttribute.equals(attribute));\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Tarjeta)) {\r\n return false;\r\n }\r\n Tarjeta other = (Tarjeta) object;\r\n if ((this.tarjetaPK == null && other.tarjetaPK != null) || (this.tarjetaPK != null && !this.tarjetaPK.equals(other.tarjetaPK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean equals(Object anObject) {\n\t\t//use short circuit evaluation, so we know that if it gets to isValuesEqual test, anObject is a BinaryMessage\n\t\tif(!isNull(anObject) &&\n\t\t isBinaryMessage(anObject) && \n\t\t isValuesEqual((BinaryMessage)anObject, this)) {\n\t\t\treturn true;\n\t\t}\n\t\telse {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean equals(Object object) {\n block5 : {\n block4 : {\n if (this == object) break block4;\n if (object == null || !(object instanceof EncodedValue)) {\n return false;\n }\n if (this.compareTo((EncodedValue)object) != 0) break block5;\n }\n return true;\n }\n return false;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TbStudentAssignment)) {\n return false;\n }\n TbStudentAssignment other = (TbStudentAssignment) object;\n if ((this.tbStudentAssignmentPK == null && other.tbStudentAssignmentPK != null) || (this.tbStudentAssignmentPK != null && !this.tbStudentAssignmentPK.equals(other.tbStudentAssignmentPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object obj) {\n if (obj instanceof Behavior) {\n Behavior other = (Behavior) obj;\n return (this.priority == other.priority) &&\n (this.myName.equals(other.myName));\n } else {\n return false;\n }\n }", "public boolean equals(Object obj)\n {\n TAPosition taPosition;\n if(obj instanceof TAPosition)\n {\n taPosition = (TAPosition)obj;\n return position.equals(taPosition.getPosition());\n }\n else\n return false;\n }", "@Override\n public boolean contains(Object object) {\n T value = (T) object;\n boolean result = false;\n for (int index = 0; index < this.values.length; index++) {\n T data = (T) this.values[index];\n if (data != null) {\n if (value.equals(data)) {\n result = true;\n }\n }\n }\n\n return result;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof CostoActividadPK)) {\n return false;\n }\n CostoActividadPK other = (CostoActividadPK) object;\n if (this.numeroPeriodo != other.numeroPeriodo) {\n return false;\n }\n if ((this.idActividad == null && other.idActividad != null) || (this.idActividad != null && !this.idActividad.equals(other.idActividad))) {\n return false;\n }\n return true;\n }", "public boolean compareEqual(Matchable object) {\n\t\tif (this == object) {\n\t\t\treturn (true);\n\t\t}\n\t\tif (object != null && object instanceof SolverTaskDescription) {\n\t\t\tSolverTaskDescription solverTaskDescription = (SolverTaskDescription) object;\n\t\t\tif (getTaskType() != solverTaskDescription.getTaskType()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t//\n\t\t\tif (!getTimeBounds().compareEqual(solverTaskDescription.getTimeBounds())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!getTimeStep().compareEqual(solverTaskDescription.getTimeStep())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!getErrorTolerance().compareEqual(solverTaskDescription.getErrorTolerance())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(getStochOpt(),solverTaskDescription.getStochOpt())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (getUseSymbolicJacobian() != solverTaskDescription.getUseSymbolicJacobian()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!getOutputTimeSpec().compareEqual(solverTaskDescription.getOutputTimeSpec())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(getSensitivityParameter(),solverTaskDescription.getSensitivityParameter())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqual(getSolverDescription(),solverTaskDescription.getSolverDescription())) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif(getSolverDescription() == SolverDescription.HybridEuler || \t\t\t\t// -------- deal with hybrid solvers (non-spatial)\n\t\t\t\t\tgetSolverDescription() == SolverDescription.HybridMilAdaptive ||\n\t\t\t\t\tgetSolverDescription() == SolverDescription.HybridMilstein) {\n\t\t\t\tif (!getStochHybridOpt().compareEqual(solverTaskDescription.getStochHybridOpt())) {\n\t\t\t\t\treturn false;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (getTaskType() != solverTaskDescription.getTaskType()) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(stopAtSpatiallyUniformErrorTolerance, solverTaskDescription.stopAtSpatiallyUniformErrorTolerance)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (bSerialParameterScan != solverTaskDescription.bSerialParameterScan) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (bTimeoutDisabled != solverTaskDescription.bTimeoutDisabled) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (bBorderExtrapolationDisabled != solverTaskDescription.bBorderExtrapolationDisabled) {\n\t\t\t\treturn false;\n\t\t\t}\n\n\t\t\tif (!Compare.isEqualOrNull(smoldynSimulationOptions,solverTaskDescription.smoldynSimulationOptions)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(sundialsPdeSolverOptions,solverTaskDescription.sundialsPdeSolverOptions)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(chomboSolverSpec,solverTaskDescription.chomboSolverSpec)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(nfsimSimulationOptions,solverTaskDescription.nfsimSimulationOptions)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(langevinSimulationOptions,solverTaskDescription.langevinSimulationOptions)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\tif (!Compare.isEqualOrNull(movingBoundarySolverOptions,solverTaskDescription.movingBoundarySolverOptions)) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\treturn numProcessors == solverTaskDescription.numProcessors;\n\t\t}\n\t\treturn false;\n\t}", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Rolepermission)) {\r\n return false;\r\n }\r\n Rolepermission other = (Rolepermission) object;\r\n if ((this.rolePermissionId == null && other.rolePermissionId != null) || (this.rolePermissionId != null && !this.rolePermissionId.equals(other.rolePermissionId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof EmployeeSkillsPK)) {\n return false;\n }\n EmployeeSkillsPK other = (EmployeeSkillsPK) object;\n if (this.employeeID != other.employeeID) {\n return false;\n }\n if ((this.skill == null && other.skill != null) || (this.skill != null && !this.skill.equals(other.skill))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object object) {\n if (object == null || !(object instanceof TimeUnit))\n return false;\n TimeUnit other = (TimeUnit) object;\n return this.baseType.equals(other.baseType) && this.factor == other.factor && this.type.equals(other.type);\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof PmaUsergroupsPK)) {\r\n return false;\r\n }\r\n PmaUsergroupsPK other = (PmaUsergroupsPK) object;\r\n if ((this.usergroup == null && other.usergroup != null) || (this.usergroup != null && !this.usergroup.equals(other.usergroup))) {\r\n return false;\r\n }\r\n if ((this.tab == null && other.tab != null) || (this.tab != null && !this.tab.equals(other.tab))) {\r\n return false;\r\n }\r\n if ((this.allowed == null && other.allowed != null) || (this.allowed != null && !this.allowed.equals(other.allowed))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean equals(Object object) {\n\n if (object == null || object.getClass() != this.getClass()) {\n return false;\n }\n\n Card other;\n other = (Card) object;\n\n return getRank() == other.getRank() && getSuit() == other.getSuit();\n }", "public boolean equals(Object object) {\n if (this == object) return true;\n if (object == null || this.getClass() != object.getClass()) return false;\n if (super.equals(object)==false) return false;\n else return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TagJPA)) {\n return false;\n }\n TagJPA other = (TagJPA) object;\n if ((this.seqTag == null && other.seqTag != null) || (this.seqTag != null && !this.seqTag.equals(other.seqTag))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TbProduct)) {\n return false;\n }\n TbProduct other = (TbProduct) object;\n if ((this.productID == null && other.productID != null) || (this.productID != null && !this.productID.equals(other.productID))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof ParametersEntityPK)) {\r\n return false;\r\n }\r\n ParametersEntityPK other = (ParametersEntityPK) object;\r\n if ((this.process == null && other.process != null) || (this.process != null && !this.process.equals(other.process))) {\r\n return false;\r\n }\r\n if ((this.parameter == null && other.parameter != null) || (this.parameter != null && !this.parameter.equals(other.parameter))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object o) {\n if (o == this) {\n return true;\n }\n\n /* Check if o is an instance of Complex or not\n \"null instanceof [type]\" also returns false */\n if (!(o instanceof DynamicPriorityVMState)) {\n return false;\n }\n\n // typecast o to Complex so that we can compare data members\n DynamicPriorityVMState c = (DynamicPriorityVMState) o;\n\n // Compare the data members and return accordingly\n return this.threadInfo.equals(c.threadInfo);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof CleaningSchedule)) {\n return false;\n }\n CleaningSchedule other = (CleaningSchedule) object;\n if ((this.cleaningScheduleID == null && other.cleaningScheduleID != null) || (this.cleaningScheduleID != null && !this.cleaningScheduleID.equals(other.cleaningScheduleID))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object obj) {\n if (obj instanceof MutableInteger) {\n return m_value == ((MutableInteger) obj).intValue();\n }\n return false;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Relation)) {\r\n return false;\r\n }\r\n Relation other = (Relation) object;\r\n return !((this.relationPK == null && other.relationPK != null) || (this.relationPK != null && !this.relationPK.equals(other.relationPK)));\r\n }", "@Override\n protected boolean doEquals(Object obj) {\n if (obj instanceof BsProject) {\n BsProject other = (BsProject)obj;\n if (!xSV(_projectId, other._projectId)) { return false; }\n return true;\n } else {\n return false;\n }\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof JobHistory)) {\n return false;\n }\n JobHistory other = (JobHistory) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.\n equals(other.id))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object object1) {\n if (object1 != null && object1.getClass() != this.getClass())\n {\n return false;\n }\n else\n {\n Computer c1 = (Computer) object1;\n return (this.brand.equals(c1.brand) && this.model.equals(c1.model) && this.price == c1.price);\n }\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof TipoTratamientoObraSocialPK)) {\r\n return false;\r\n }\r\n TipoTratamientoObraSocialPK other = (TipoTratamientoObraSocialPK) object;\r\n if (this.tipotratamientoid != other.tipotratamientoid) {\r\n return false;\r\n }\r\n if (this.obrasocialid != other.obrasocialid) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean equals(Object object);", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof UserHasRole)) {\n return false;\n }\n UserHasRole other = (UserHasRole) object;\n if ((this.userHasRolePK == null && other.userHasRolePK != null) || (this.userHasRolePK != null && !this.userHasRolePK.equals(other.userHasRolePK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Producto)) {\n return false;\n }\n Producto other = (Producto) object;\n if ((this.productoPK == null && other.productoPK != null) || (this.productoPK != null && !this.productoPK.equals(other.productoPK))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Actividadesrubro)) {\r\n return false;\r\n }\r\n Actividadesrubro other = (Actividadesrubro) object;\r\n if ((this.codigo == null && other.codigo != null) || (this.codigo != null && !this.codigo.equals(other.codigo))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(final Object obj)\n {\n return this.value.equals(obj);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TipoMovimentacao)) {\n return false;\n }\n TipoMovimentacao other = (TipoMovimentacao) object;\n if ((this.idtipoMovimentacao == null && other.idtipoMovimentacao != null) || (this.idtipoMovimentacao != null && !this.idtipoMovimentacao.equals(other.idtipoMovimentacao))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object obj) {\n\t\tif (obj == this) {\n\t\t\treturn true;\n\t\t}\n\t\tif (!(obj instanceof TaskItem)) {\n\t\t\treturn false;\n\t\t}\n\t\tTaskItem task = (TaskItem) obj;\n\n\t\tboolean equalDescription = this.description.equals(task.description);\n\t\tboolean equalPriority = this.priority == task.priority;\n\t\tboolean equalStatus = this.status.equals(task.status);\n\t\tboolean equalTask = equalDescription && equalPriority && equalStatus;\n\t\treturn equalTask;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Portaria)) {\n return false;\n }\n Portaria other = (Portaria) object;\n if ((this.portariaPK == null && other.portariaPK != null) || (this.portariaPK != null && !this.portariaPK.equals(other.portariaPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Schedule)) {\n return false;\n }\n Schedule other = (Schedule) object;\n if ((this.scheduleId == null && other.scheduleId != null) || (this.scheduleId != null && !this.scheduleId.equals(other.scheduleId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Item)) {\n return false;\n }\n Item other = (Item) object;\n if ((this.itemPK == null && other.itemPK != null) || (this.itemPK != null && !this.itemPK.equals(other.itemPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Permiso)) {\n return false;\n }\n Permiso other = (Permiso) object;\n if ((this.permisoPK == null && other.permisoPK != null) || (this.permisoPK != null && !this.permisoPK.equals(other.permisoPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Abono)) {\n return false;\n }\n Abono other = (Abono) object;\n if ((this.abonoPK == null && other.abonoPK != null) || (this.abonoPK != null && !this.abonoPK.equals(other.abonoPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof UserRoleEntity)) {\n return false;\n }\n UserRoleEntity other = (UserRoleEntity) object;\n if ((this.getUuid() == null && other.getUuid() != null) || (this.getUuid() != null && !this.uuid.equals(other.uuid))) {\n return false;\n }\n return true;\n }", "public static Boolean isEquals(String object1, String object2) {\n if (object1.equalsIgnoreCase(object2)) {\n return true;\n } else if (object1.equalsIgnoreCase(null) && object2.equalsIgnoreCase(null)) {\n return true;\n } else if (object1 == null && object2.equalsIgnoreCase(\"1\")) {\n return false;\n } else if (object1.equalsIgnoreCase(null) && !(object2.equalsIgnoreCase(null))){\n return false;\n }\n return false;\n\n }", "boolean canEqual(Object obj);", "public boolean compare(Object object) {\n if (object instanceof IBond) {\n Bond bond = (Bond) object;\n for (IAtom atom : atoms) {\n if (!bond.contains(atom)) {\n return false;\n }\n }\n\n // not important ??!!\n //if (order==bond.order)\n // return false;\n\n return true;\n }\n return false;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Parametros)) {\r\n return false;\r\n }\r\n Parametros other = (Parametros) object;\r\n if ((this.consecutivo == null && other.consecutivo != null) || (this.consecutivo != null && !this.consecutivo.equals(other.consecutivo))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(@Nullable Object object) {\n // TODO: Warning - this method won't work in the case the id fields are not set\n if (!(object instanceof XBENodeTree)) {\n return false;\n }\n\n XBENodeTree other = (XBENodeTree) object;\n return this.getId() == other.getId();\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof OrdenitemPK)) {\r\n return false;\r\n }\r\n OrdenitemPK other = (OrdenitemPK) object;\r\n if (this.ordencompraNumeroorden != other.ordencompraNumeroorden) {\r\n return false;\r\n }\r\n if (this.libroIsbn != other.libroIsbn) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean equals(Object o) { return compareTo(o) == 0; }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ContratTache)) {\n return false;\n }\n ContratTache other = (ContratTache) object;\n if ((this.contratTachePK == null && other.contratTachePK != null) || (this.contratTachePK != null && !this.contratTachePK.equals(other.contratTachePK))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object object)\r\n {\r\n if (this == object)\r\n {\r\n return true;\r\n }\r\n if (!(object instanceof GrupoTrabajo))\r\n {\r\n return false;\r\n }\r\n final GrupoTrabajo that = (GrupoTrabajo)object;\r\n if (this.identificador == null || that.identificador == null || !this.identificador.equals(that.identificador))\r\n {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean equals(Object o) {\r\n\t\treturn o instanceof BooleanValue?value == ((BooleanValue) o).value:false;\r\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ResourceFilterParameter)) {\n return false;\n }\n ResourceFilterParameter other = (ResourceFilterParameter) object;\n if ((this.resourceFilterParameterId == null && other.resourceFilterParameterId != null) || (this.resourceFilterParameterId != null && !this.resourceFilterParameterId.equals(other.resourceFilterParameterId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Compra)) {\n return false;\n }\n Compra other = (Compra) object;\n if ((this.compraPK == null && other.compraPK != null) || (this.compraPK != null && !this.compraPK.equals(other.compraPK))) {\n return false;\n }\n return true;\n }", "@Test\n\tpublic void testEqualsObject() {\n\t\tJob testJob = new Job(\"Trash Pickup\", initialPark, cal, cal2,\n\t\t\t\t\"This job will just be picking up trash.\", new ArrayList<User>(), 5, 2, 0);\n\t\tassertEquals(testJob, initialJob);\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof CriteriocotizacionPK)) {\n return false;\n }\n CriteriocotizacionPK other = (CriteriocotizacionPK) object;\n if (this.criterioEvaluacionCoCriterio != other.criterioEvaluacionCoCriterio) {\n return false;\n }\n if (this.cotizacionNuCotizacion != other.cotizacionNuCotizacion) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof WorkingExperience)) {\n return false;\n }\n WorkingExperience other = (WorkingExperience) object;\n if ((this.weId == null && other.weId != null) || (this.weId != null && !this.weId.equals(other.weId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Bitacora)) {\n return false;\n }\n Bitacora other = (Bitacora) object;\n if ((this.bitacoraPK == null && other.bitacoraPK != null) || (this.bitacoraPK != null && !this.bitacoraPK.equals(other.bitacoraPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ParametroGeneracionCapacitacion)) {\n return false;\n }\n ParametroGeneracionCapacitacion other = (ParametroGeneracionCapacitacion) object;\n if ((this.codigo == null && other.codigo != null) || (this.codigo != null && !this.codigo.equals(other.codigo))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof GroupTB)) {\n return false;\n }\n GroupTB other = (GroupTB) object;\n if ((this.groupTBPK == null && other.groupTBPK != null) || (this.groupTBPK != null && !this.groupTBPK.equals(other.groupTBPK))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Movietime)) {\r\n return false;\r\n }\r\n Movietime other = (Movietime) object;\r\n if ((this.movietimePK == null && other.movietimePK != null) || (this.movietimePK != null && !this.movietimePK.equals(other.movietimePK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof InstitucionVariable)) {\n return false;\n }\n InstitucionVariable other = (InstitucionVariable) object;\n if ((this.institucionVariablePK == null && other.institucionVariablePK != null) || (this.institucionVariablePK != null && !this.institucionVariablePK.equals(other.institucionVariablePK))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof GlAccountHistoryPK)) {\r\n return false;\r\n }\r\n GlAccountHistoryPK other = (GlAccountHistoryPK) object;\r\n if ((this.glAccountId == null && other.glAccountId != null) || (this.glAccountId != null && !this.glAccountId.equals(other.glAccountId))) {\r\n return false;\r\n }\r\n if ((this.organizationPartyId == null && other.organizationPartyId != null) || (this.organizationPartyId != null && !this.organizationPartyId.equals(other.organizationPartyId))) {\r\n return false;\r\n }\r\n if ((this.customTimePeriodId == null && other.customTimePeriodId != null) || (this.customTimePeriodId != null && !this.customTimePeriodId.equals(other.customTimePeriodId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof Usernotification)) {\r\n return false;\r\n }\r\n Usernotification other = (Usernotification) object;\r\n if ((this.usernotificationPK == null && other.usernotificationPK != null) || (this.usernotificationPK != null && !this.usernotificationPK.equals(other.usernotificationPK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof PositionInTimeEntity)) {\n return false;\n }\n PositionInTimeEntity other = (PositionInTimeEntity) object;\n return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof AssetParameterDta)) {\n return false;\n }\n AssetParameterDta other = (AssetParameterDta) object;\n if (this.id != null && other.id != null) {\n return this.id.equals(other.id);\n }\n return this.seq == other.seq;\n }", "public boolean equals(Object paramObject)\r\n/* 149: */ {\r\n/* 150:151 */ if (!(paramObject instanceof PotionEffect)) {\r\n/* 151:152 */ return false;\r\n/* 152: */ }\r\n/* 153:154 */ PotionEffect localwq = (PotionEffect)paramObject;\r\n/* 154:155 */ return (this.id == localwq.id) && (this.amplifier == localwq.amplifier) && (this.duration == localwq.duration) && (this.splash == localwq.splash) && (this.ambient == localwq.ambient);\r\n/* 155: */ }", "public boolean equals(Object obj)\n {\n //first, make sure objects are equal at the base\n //which also handles null and type for person check\n boolean baseResult = super.equals(obj);\n if (!baseResult)\n {\n return false;\n }\n \n //next, make sure it's a commander, and not just any old person\n if (!(obj instanceof Commander))\n {\n return false;\n }\n \n //cast and compare specific properties for equality:\n Commander c = (Commander)obj;\n return (this.getSerialNumber().equals(c.getSerialNumber())\n && this.getRank().equals(c.getRank()));\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof CancelLoadingService)) {\n return false;\n }\n CancelLoadingService other = (CancelLoadingService) object;\n if ((this.jobSlip == null && other.jobSlip != null) || (this.jobSlip != null && !this.jobSlip.equals(other.jobSlip))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof RateCriteria)) {\n return false;\n }\n RateCriteria other = (RateCriteria) object;\n if ((this.criteriaId == null && other.criteriaId != null) || (this.criteriaId != null && !this.criteriaId.equals(other.criteriaId))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof DeliverySchedule)) {\r\n return false;\r\n }\r\n DeliverySchedule other = (DeliverySchedule) object;\r\n if ((this.scheduleId == null && other.scheduleId != null) || (this.scheduleId != null && !this.scheduleId.equals(other.scheduleId))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof InvConsumosMotivo)) {\n return false;\n }\n InvConsumosMotivo other = (InvConsumosMotivo) object;\n if ((this.invConsumosMotivoPK == null && other.invConsumosMotivoPK != null) || (this.invConsumosMotivoPK != null && !this.invConsumosMotivoPK.equals(other.invConsumosMotivoPK))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof ProductrecommendationPK)) {\r\n return false;\r\n }\r\n ProductrecommendationPK other = (ProductrecommendationPK) object;\r\n if ((this.queryproduct == null && other.queryproduct != null) || (this.queryproduct != null && !this.queryproduct.equals(other.queryproduct))) {\r\n return false;\r\n }\r\n if ((this.recommendation == null && other.recommendation != null) || (this.recommendation != null && !this.recommendation.equals(other.recommendation))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Tarjeta)) {\n return false;\n }\n Tarjeta other = (Tarjeta) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof AccountApproval)) {\n return false;\n }\n AccountApproval other = (AccountApproval) object;\n \n return this.approver.equals(other.approver) && this.candidate.equals(other.candidate);\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TbFasesEmprestimoBemPermanentePK)) {\n return false;\n }\n TbFasesEmprestimoBemPermanentePK other = (TbFasesEmprestimoBemPermanentePK) object;\n if (this.idPedidoEmprestimo != other.idPedidoEmprestimo) {\n return false;\n }\n if ((this.idStatus == null && other.idStatus != null) || (this.idStatus != null && !this.idStatus.equals(other.idStatus))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof Availability)) {\n return false;\n }\n Availability other = (Availability) object;\n if ((this.availabilityId == null && other.availabilityId != null) || (this.availabilityId != null && !this.availabilityId.equals(other.availabilityId))) {\n return false;\n }\n return true;\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof TarifasParqueaderos)) {\r\n return false;\r\n }\r\n TarifasParqueaderos other = (TarifasParqueaderos) object;\r\n if ((this.tarifasParqueaderosPK == null && other.tarifasParqueaderosPK != null) || (this.tarifasParqueaderosPK != null && !this.tarifasParqueaderosPK.equals(other.tarifasParqueaderosPK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof TicketHistoricoPK)) {\r\n return false;\r\n }\r\n TicketHistoricoPK other = (TicketHistoricoPK) object;\r\n if ((this.ticketId == null && other.ticketId != null) || (this.ticketId != null && !this.ticketId.equals(other.ticketId))) {\r\n return false;\r\n }\r\n if ((this.usuarioId == null && other.usuarioId != null) || (this.usuarioId != null && !this.usuarioId.equals(other.usuarioId))) {\r\n return false;\r\n }\r\n if ((this.fecha == null && other.fecha != null) || (this.fecha != null && !this.fecha.equals(other.fecha))) {\r\n return false;\r\n }\r\n return true;\r\n }", "public boolean equals(Object obj) {\n\t\tif (obj instanceof Trip) {\n\t\t\treturn getTripID().equalsIgnoreCase(\n\t\t\t\t((Trip) obj).getTripID());\n\t\t}\n\t\treturn false;\n\t}", "public boolean equals( Object obj );", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof PremiumPackageContent)) {\n return false;\n }\n PremiumPackageContent other = (PremiumPackageContent) object;\n if ((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id))) {\n return false;\n }\n return true;\n }", "public boolean betterEquals(Object obj)\n\t{\n\t\tif (obj instanceof Player)\n\t\t{\n\t\t\tPlayer other = (Player) obj;\n\t\t\treturn this.name.equals(other.name) && this.pawn == other.pawn;\n\t\t}\n\t\treturn false;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof AtributosEntidadEntity)) {\n return false;\n }\n AtributosEntidadEntity other = (AtributosEntidadEntity) object;\n if ((this.atributoEntidadId == null && other.atributoEntidadId != null) || (this.atributoEntidadId != null && !this.atributoEntidadId.equals(other.atributoEntidadId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof OpmInterval)) {\n return false;\n }\n OpmInterval other = (OpmInterval) object;\n if ((this.opminvlId == null && other.opminvlId != null) || (this.opminvlId != null && !this.opminvlId.equals(other.opminvlId))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof JobLine)) {\n return false;\n }\n JobLine other = (JobLine) object;\n if ((this.joblineID == null && other.joblineID != null) || (this.joblineID != null && !this.joblineID.equals(other.joblineID))) {\n return false;\n }\n return true;\n }", "public boolean equal(Object obj) {\n\t\tif((super.equal(obj))==false) {return false;}\n\t\tif (!(this.purpose).equals(((Airborne)obj).purpose)) {return false;}\n\t\treturn true;\n\t}", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof LearningResult)) {\n return false;\n }\n LearningResult other = (LearningResult) object;\n if ((this.learningResultPK == null && other.learningResultPK != null) || (this.learningResultPK != null && !this.learningResultPK.equals(other.learningResultPK))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof TenderCompanyProjectDTO)) {\n return false;\n }\n TenderCompanyProjectDTO other = (TenderCompanyProjectDTO) object;\n if ((this.tenderCompanyProjectID == null && other.tenderCompanyProjectID != null) || (this.tenderCompanyProjectID != null && !this.tenderCompanyProjectID.equals(other.tenderCompanyProjectID))) {\n return false;\n }\n return true;\n }", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof CatCategoriasConstruccionValores)) {\n return false;\n }\n CatCategoriasConstruccionValores other = (CatCategoriasConstruccionValores) object;\n return !((this.id == null && other.id != null) || (this.id != null && !this.id.equals(other.id)));\n }", "@Override\n\tpublic boolean equals(final Object object) {\n\t\ttry {\n\t\t\tfinal FSATransition t = (FSATransition) object;\n\t\t\treturn super.equals(t) && myLabel.equals(t.myLabel);\n\t\t} catch (final ClassCastException e) {\n\t\t\treturn false;\n\t\t}\n\t}", "public boolean equals(Object object)\n {\n return hashCode() == object.hashCode();\n }", "public boolean equals(AMRStitchCellAttributes obj)\n {\n return ((CreateCellsOfType == obj.CreateCellsOfType));\n }", "@Override\r\n public boolean equals(Object object) {\n if (!(object instanceof MgArchivosCopiadosUap)) {\r\n return false;\r\n }\r\n MgArchivosCopiadosUap other = (MgArchivosCopiadosUap) object;\r\n if ((this.mgArchivosCopiadosUapPK == null && other.mgArchivosCopiadosUapPK != null) || (this.mgArchivosCopiadosUapPK != null && !this.mgArchivosCopiadosUapPK.equals(other.mgArchivosCopiadosUapPK))) {\r\n return false;\r\n }\r\n return true;\r\n }", "@Override\n protected int compare(PriorityQueueElement<P, V> data, PriorityQueueElement<P, V> o) {\n return comparePriority(data.priority, o.priority);\n }", "public boolean equals(Object obj);", "@Override\n public boolean equals(Object object) {\n if (!(object instanceof ScEntregaRetorno)) {\n return false;\n }\n ScEntregaRetorno other = (ScEntregaRetorno) object;\n if ((this.scEntregaRetornoPK == null && other.scEntregaRetornoPK != null) || (this.scEntregaRetornoPK != null && !this.scEntregaRetornoPK.equals(other.scEntregaRetornoPK))) {\n return false;\n }\n return true;\n }", "public boolean equals(Object o){\r\n if (this.compareTo(o)==0)\r\n return true;\r\n else\r\n return false;\r\n }" ]
[ "0.61986953", "0.5973907", "0.55110776", "0.5499987", "0.53881437", "0.53227174", "0.5308726", "0.52871436", "0.52426547", "0.5223436", "0.5214473", "0.5202793", "0.5198696", "0.51911306", "0.51782423", "0.5155848", "0.5140938", "0.5139749", "0.51312447", "0.5129724", "0.5112616", "0.5096067", "0.509435", "0.50784796", "0.5072078", "0.5063151", "0.5059761", "0.5040018", "0.50302184", "0.5029616", "0.50278896", "0.50155866", "0.501518", "0.500692", "0.49973604", "0.49938765", "0.4991475", "0.49787244", "0.49579304", "0.49561208", "0.49531803", "0.49520957", "0.49496448", "0.49467978", "0.49455646", "0.49395043", "0.49257383", "0.491828", "0.4914175", "0.4912448", "0.49082825", "0.49066103", "0.49023986", "0.49019438", "0.48993957", "0.48983812", "0.489335", "0.48920467", "0.48900703", "0.48891166", "0.4878472", "0.4870116", "0.4869799", "0.4863743", "0.48622274", "0.48615012", "0.48557547", "0.48547193", "0.485433", "0.48510277", "0.48508325", "0.48504126", "0.48415056", "0.4840191", "0.48396036", "0.48377424", "0.48300523", "0.48278546", "0.4827257", "0.48249084", "0.48202908", "0.48184857", "0.48148197", "0.48132005", "0.48093277", "0.4807617", "0.48050824", "0.4803474", "0.48028052", "0.47982144", "0.47979698", "0.4797401", "0.47960454", "0.47917813", "0.47888628", "0.47866613", "0.47852895", "0.4782233", "0.4782169", "0.4779074" ]
0.73752815
0
Get the name of the category of which this attribute value is an instance. For class JobPriority, the category name is "jobpriority".
public final String getName() { return "job-priority"; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String getCategoryName() {\n return category.getName();\n }", "public String getCategoryName() {\n\t\treturn this.category.getName();\n\t}", "public String getAttributeCategory()\n {\n return (String)getAttributeInternal(ATTRIBUTECATEGORY);\n }", "public String getName()\r\n\t{\r\n\t\treturn categoryName;\r\n\t}", "public String category() {\n return this.category;\n }", "public String category() {\n return this.category;\n }", "public String getName() {\n return categoryName;\n }", "public String toString() {\n\t\treturn category;\n\t}", "public String getCategoryString(){\r\n\t\tMarketplaceConfig.Category c = MarketplaceConfig.Category.get(this.category);\r\n\t\tif(c == null || c.name() == null || \"\".equals(c.name())) return \"NONE\";\r\n\t\treturn c.name();\r\n\t}", "public String getCategory() {\t//TODO - change to array list of categories\n\t\treturn category;\n\t}", "public String getCatName() {\n return (String)getAttributeInternal(CATNAME);\n }", "public java.lang.String getCategory() {\n return category;\n }", "public String getCategoryName() {\n return categoryName;\n }", "public String getCategory()\n {\n return (String) getProperty(PropertyIDMap.PID_CATEGORY);\n }", "public String getName(){\n return category;\n }", "public String getCategoryName() {\n return categoryName;\n }", "public String getCategoryName() {\n return categoryName;\n }", "public String getStrCategoryName() {\n return strCategoryName;\n }", "public String getCategory()\r\n {\r\n return (m_category);\r\n }", "public String getCategoryName() {\n\t\treturn this.categoryName;\n\t}", "public String getCategory(){\r\n\t\treturn this.category;\r\n\t}", "public String getCategory() {\n return this.category;\n }", "public String getCategoryName() {\n\t\treturn categoryName;\n\t}", "public String getIntAttributeCategory() {\n return (String) getAttributeInternal(INTATTRIBUTECATEGORY);\n }", "public String getCategory() {\n\t\treturn category;\n\t}", "public String getCategory() {\n\t\treturn category;\n\t}", "public String getCategory()\n\t{\n\t\treturn category;\n\t}", "public String getCategory() {\n return mCategory;\n }", "@java.lang.Override public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "public String getCategory() {\r\n return category;\r\n }", "public final Class<? extends Attribute> getCategory() {\n/* 219 */ return (Class)SheetCollate.class;\n/* */ }", "public long getCategory() {\r\n\t\treturn this.category;\r\n\t}", "@Override\n public String getCategoryLabel() {\n return categoryLabel;\n }", "public String getCategoryKey() {\n return getCategory().getWordVal();\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "@java.lang.Override\n public google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory() {\n @SuppressWarnings(\"deprecation\")\n google.maps.fleetengine.v1.Vehicle.VehicleType.Category result = google.maps.fleetengine.v1.Vehicle.VehicleType.Category.valueOf(category_);\n return result == null ? google.maps.fleetengine.v1.Vehicle.VehicleType.Category.UNRECOGNIZED : result;\n }", "public String getPeriodicalCategoryName() {\n return (String) getAttributeInternal(PERIODICALCATEGORYNAME);\n }", "public String getCategory() {\n return this.category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "public String getCategory() {\n return category;\n }", "@java.lang.Override public int getCategoryValue() {\n return category_;\n }", "public String getNotiCategory() {\r\n return (String) getAttributeInternal(NOTICATEGORY);\r\n }", "public String getCategory() {\n return category;\n }", "public int getCategory() {\r\n\t\treturn category;\r\n\t}", "@java.lang.Override public int getCategoryValue() {\n return category_;\n }", "public String getCategory() {\n\t\treturn null;\n\t}", "public String getCategory() {\n\t\treturn null;\n\t}", "public String getCategory() {\n\t\treturn null;\r\n\t}", "@Override\n\t\t\t\tpublic String getKey() {\n\t\t\t\t\treturn \"category\";\n\t\t\t\t}", "@Override\n public String getCategory() {\n return category;\n }", "String category();", "public String getCat() {\n\t\treturn this.cat;\n\t}", "public String getCategCode() {\n return (String) getAttributeInternal(CATEGCODE);\n }", "public int getCategory(){\n\t\treturn this.cat;\n\t}", "String getCategory();", "String getCategory();", "public BwCategory getCategory() {\n if (category == null) {\n category = BwCategory.makeCategory();\n }\n\n return category;\n }", "protected final String getCategory() {\n\t\tString category = null;\n\n\t\tif (getSplit() != null) {\n\t\t\tcategory = getSplit();\n\t\t} else {\n\t\t\tcategory = getForm().getPayTo();\n\t\t}\n\n\t\treturn category;\n\t}", "public String getCostCategory() {\n\t\treturn this.costCategory;\n\t}", "@Override\n\tpublic String toString() {\n\t\treturn \"Category [categoryid=\" + categoryid + \", name=\" + capitalize(name) + \"]\";\n\t}", "public int getCategoryValue() {\n return category_;\n }", "public String getCategory()\n {\n return category;\n }", "public int getCategoryValue() {\n return category_;\n }", "public String getCategory();", "CodeType getCategory();", "public Integer getCategory() {\n return category;\n }", "public String getCncategory() {\n return cncategory;\n }", "public String getApplicationCategoryName() {\n return applicationCategoryName;\n }", "public String getProductCategory() {\n return (String)getAttributeInternal(PRODUCTCATEGORY);\n }", "@Override\n\tpublic java.lang.String getName() {\n\t\treturn _lineaGastoCategoria.getName();\n\t}", "public String getConversionCategoryName() {\r\n return conversionCategoryName;\r\n }", "public BwString getCategoryWord() {\n if (categoryWord == null) {\n categoryWord = new BwString();\n }\n\n return categoryWord;\n }", "public proto.SocialMetricCategoryEnum getCategory() {\n proto.SocialMetricCategoryEnum result = proto.SocialMetricCategoryEnum.valueOf(category_);\n return result == null ? proto.SocialMetricCategoryEnum.UNRECOGNIZED : result;\n }", "private Category classify() {\n Category category = null;\n if (name != null) {\n if (name.contains(\"potato\") || name.contains(\"apple\")) {\n category = Category.FOOD;\n } else if (name.contains(\"cloths\") || name.contains(\"pants\") || name.contains(\"shirt\")) {\n category = Category.CLOTHING;\n }\n }\n return category;\n }", "public String getVehicleTypeCategory() {\r\n return vehicleType.getCategory();\r\n }", "public proto.SocialMetricCategoryEnum getCategory() {\n proto.SocialMetricCategoryEnum result = proto.SocialMetricCategoryEnum.valueOf(category_);\n return result == null ? proto.SocialMetricCategoryEnum.UNRECOGNIZED : result;\n }", "public java.lang.String getDocumentCategory()\r\n {\r\n synchronized (monitor())\r\n {\r\n check_orphaned();\r\n org.apache.xmlbeans.SimpleValue target = null;\r\n target = (org.apache.xmlbeans.SimpleValue)get_store().find_element_user(DOCUMENTCATEGORY$0, 0);\r\n if (target == null)\r\n {\r\n return null;\r\n }\r\n return target.getStringValue();\r\n }\r\n }", "public String getCategory() {\n //return ATPlugin.CLI_CATEGORY + \" \" + ATPlugin.DEFAULT_CATEGORY;\n return ATPlugin.CLI_CATEGORY;\n }", "public AnnotationCategory getCategory () {\n\t\treturn category;\n\t}", "public String getExtAttributeCategory() {\n return (String) getAttributeInternal(EXTATTRIBUTECATEGORY);\n }", "protected static String getConceptClassNameForCategory(Category category) {\n if (category == Category.CHIRURGIE) {\n return \"Procedure\";\n }\n if (category == Category.LABORATOIRE) {\n return \"Test\";\n }\n if (category == Category.MEDICAMENTS) {\n return \"Drug\";\n }\n return \"Misc\";\n }", "private Object getAnomizedCategory() {\r\n\tString categorie = (String) record.get(\"categorie\");\r\n\tif (categorie != null) {\r\n\t switch (categorie) {\r\n\t case \"AD\":\r\n\t case \"CO\":\r\n\t case \"FI\":\r\n\t case \"IBL\":\r\n\t case \"KI\":\r\n\t case \"KL\":\r\n\t case \"VO\":\r\n\t\tbreak;\r\n\t default:\r\n\t\tcategorie = null;\r\n\t\tbreak;\r\n\t }\r\n\t}\r\n\r\n\treturn categorie;\r\n }", "@AutoEscape\n public String getCategory();", "public Byte getCategoryType() {\n return categoryType;\n }", "public Category getCategory() {\n return (category == null) ? new Category() : category;\n }", "public String getCategory() {\n return fullPhoto.getCategory();\n }", "google.maps.fleetengine.v1.Vehicle.VehicleType.Category getCategory();", "com.google.ads.googleads.v14.services.AudienceInsightsCategory getCategory();", "public String getCategoryName() {\r\n return PirolPlugInMessages.getString(\"unsorted\");\r\n }", "public Category getCategory() {\n return this.category;\n }", "public Category getCategory() {\n return this.category;\n }", "public Category getCategory() {\n return this.category;\n }", "@Override\n\tpublic java.lang.String getCategoryCode() {\n\t\treturn _lineaGastoCategoria.getCategoryCode();\n\t}", "public String categoryDesc() { //to show the description of the category\n String desc = \"\";\n if (category.equals(\"H\")) {\n desc = \"Trump category: Hardness\";\n } else if (category.equals(\"S\")) {\n desc = \"Trump category: Specific Gravity\";\n } else if (category.equals(\"C\")) {\n desc = \"Trump category: Cleavage\";\n } else if (category.equals(\"CA\")) {\n desc = \"Trump category: Crustal Abundance\";\n } else if (category.equals(\"EV\")) {\n desc = \"Trump category: Economic Value\";\n }\n return desc;\n }", "public String getClassificationName()\n {\n return classificationName;\n }" ]
[ "0.74353445", "0.73406404", "0.7278181", "0.72636676", "0.7244271", "0.7244271", "0.7231741", "0.72146904", "0.718526", "0.7125845", "0.7093056", "0.70774937", "0.704393", "0.7033584", "0.70335746", "0.7020444", "0.7020444", "0.70092696", "0.69770217", "0.69588274", "0.69382507", "0.6904273", "0.6892066", "0.6885921", "0.6857088", "0.6857088", "0.6833577", "0.68270147", "0.6823066", "0.68225145", "0.68093246", "0.68065417", "0.68015945", "0.67941284", "0.6782093", "0.6782093", "0.67754036", "0.6760026", "0.6737784", "0.67338216", "0.67338216", "0.67338216", "0.67338216", "0.67338216", "0.67338216", "0.67338216", "0.67263645", "0.6721207", "0.6699187", "0.6682634", "0.6680558", "0.6675474", "0.6675474", "0.6656674", "0.66526496", "0.6651869", "0.66513383", "0.6643787", "0.6639035", "0.66310394", "0.66152745", "0.66152745", "0.6592469", "0.65871865", "0.6584278", "0.65806127", "0.6563497", "0.655583", "0.65092784", "0.6499226", "0.64946645", "0.64715886", "0.6457101", "0.64451694", "0.64396", "0.64389247", "0.6424331", "0.6391839", "0.6389718", "0.63779765", "0.6374373", "0.6361836", "0.63563794", "0.6289679", "0.6278039", "0.62723184", "0.6270485", "0.6227032", "0.62220705", "0.6220627", "0.62065995", "0.61993134", "0.6161635", "0.6158642", "0.61531043", "0.61515605", "0.61515605", "0.61515605", "0.61315995", "0.61142373", "0.6105365" ]
0.0
-1
NewShape should display a fish that flips orientation upon hitting the left and right walls
public NewShape() { super(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tprotected void initShape() {\n\t\tgetPositions().putAll(createSymmetricLines(0, 1.5, .5, 1.1, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//->upper corner\r\n\t\tgetPositions().putAll(createSymmetricLines(.5, 1.1, 1, .7, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower outer corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .7, 1.1, .3, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> lower inner corner\r\n\t\tgetPositions().putAll(createSymmetricLines(1.1, .3, .7, .25, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//-> middle\r\n\t\tgetPositions().putAll(createSymmetricLines(.7, .25, .2, 1.35, WingPart.OUTER_LEFT, WingPart.OUTER_RIGHT));\r\n\t\t//inner\r\n\t\tgetPositions().putAll(createSymmetricLines(1, .5, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricLines(0.8, .4, .55, 0.95, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\t\tgetPositions().putAll(createSymmetricPoints(0.9, .5, WingPart.INNER_LEFT, WingPart.INNER_RIGHT));\r\n\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_RIGHT, WingPart.INNER_RIGHT));\r\n//\t\tgetPositions().putAll(fill(WingPart.OUTER_LEFT, WingPart.INNER_LEFT));\r\n\t}", "void addShape(IShape shape, int appear, int disappear);", "@Override\n public void generateShape() {\n AffineTransform tx = new AffineTransform();\n tx.rotate(-this.getRotation(), this.getX(), this.getY());\n this.shape = tx.createTransformedShape(new Ellipse2D.Double(\n this.getX() + this.getWidth() / 2 - D / 2,\n this.getY() + this.getHeight() / 2 - D / 2,\n D, D));\n }", "@Override\n\tpublic void createCollisionShape() {\n\t\t\n\t}", "private static void addShaped()\n {}", "public void Display() \n {\n float theta = velocity.heading() + PI/2;\n fill(175);\n stroke(0);\n pushMatrix();\n translate(pos.x,pos.y);\n rotate(theta);\n beginShape();\n vertex(0, -birdSize*2);\n vertex(-birdSize, birdSize*2);\n vertex(birdSize, birdSize*2);\n endShape(CLOSE);\n popMatrix();\n }", "protected abstract void showRightFace();", "IShape getCurrentShape();", "public void shape() {\n\t\tSystem.out.println(\"super robot입니다. 팔, 다리, 몸통, 머리가 있습니다.\");\r\n\t}", "private void flip()\r\n\t{\r\n\t\tif(heading == Direction.WEST)\r\n\t\t{\r\n\t\t\tsetDirection(Direction.EAST);\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tsetDirection(Direction.WEST);\r\n\t\t}\r\n\t}", "public void generateShape() {\n\n //TODO for tetris game - copy added to Tetris\n Shape newShape = null;\n //if(GAME_TO_TEST==GameEnum.TETRIS){\n //newShape = TetrisShapeFactory.getRandomShape(this.board);\n //} else if (GAME_TO_TEST== GameEnum.DRMARIO){\n //newShape = DrMarioShapeFactory.getRandomShape(this.board);\n //}\n\n //Temporary\n //-------------------------------------//\n Image image = null;\n try {\n image = new Image(new FileInputStream(\"resources/BlockPurple.png\"));\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n\n int spawnColIndex = 0;\n int spawnRowIndex = 0;\n int tileSize = 0;\n boolean setColor = false;\n boolean setTileBorder = false; //toggle to add boarder to tile\n boolean setImage = true;\n spawnColIndex = (board.gridWidth-1)/2; //half of board width\n spawnRowIndex = 0;\n tileSize = board.tileSize;\n\n Tile tile1 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 0 , Direction.DOWN); //Center Tile\n Tile tile2 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex,1 , Direction.RIGHT);\n Tile tile3 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.LEFT);\n Tile tile4 = new Tile(tileSize, setColor, Color.VIOLET, setTileBorder, setImage, image, spawnColIndex,spawnRowIndex, 1 , Direction.DOWN);\n\n List<Tile> tiles = new ArrayList<Tile>();\n tiles.add(tile1);\n tiles.add(tile2);\n tiles.add(tile3);\n tiles.add(tile4);\n newShape = new Shape(tiles);\n\n //set newly created shape as the currently active shape\n this.currentActiveShape = newShape;\n\n //check if spawn area is occupied\n boolean isOccupied =false;\n for (Tile newTile : this.currentActiveShape.tiles) {\n if(this.board.getTile(newTile.columnIndex,newTile.rowIndex)!=null){\n isOccupied = true;\n }\n }\n\n //TODO\n //check if shape reaches top\n if(!isOccupied){\n //add tiles to board\n for (Tile newTile : this.currentActiveShape.tiles) {\n this.board.placeTile(newTile);\n }\n } else {\n //TODO later add Game Over JavaFx message\n System.out.println(\"GAME OVER\");\n\n //TODO Finishlater\n //Text gameoverText = new Text(10,20,\"GAME OVER\");\n //gameoverText.setFill(Color.RED);\n //gameoverText.setX( 100/*( ((board.gridWidth-1)*tileSize)/2)*/ );\n //gameoverText.setY( 100/*( ((board.gridHeight-1)*tileSize)/2)*/ );\n //gameoverText.setStyle(\"-fx-font: 70 arial;\");\n //this.group.getChildren().add(gameoverText);\n\n //Text t = new Text();\n //t.setX(20.0f);\n //t.setY(65.0f);\n //t.setX(100);\n //t.setY(200);\n //t.setText(\"Perspective\");\n //t.setFill(Color.YELLOW);\n //t.setFont(Font.font(null, FontWeight.BOLD, 36));\n //this.group.getChildren().add(t);\n //this.pane.getChildren().add(t);\n\n //System.exit(0);\n }\n\n }", "protected abstract void showLeftFace();", "public void syria(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(206,17,38);//red\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,122,61);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,122,61);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,122,61);//green\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(206,17,38);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(0);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(206,17,38);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "protected abstract boolean isShapeSimple();", "@Override\r\n public Shape createShape(RenderContext ctx) {\n float v[] = { -1, -1, 1, 1, -1, 1, 1, 1, 1, -1, 1, 1, // front face\r\n -1, -1, -1, -1, -1, 1, -1, 1, 1, -1, 1, -1, // left face\r\n -1, -1, 1, -1, -1, -1, 1, -1, -1, 1, -1, 1 }; // bottom face\r\n\r\n // The vertex normals\r\n float n[] = { 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, // front face\r\n -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, // left face\r\n 0, -1, 0, 0, -1, 0, 0, -1, 0, 0, -1, 0 }; // bottom face\r\n\r\n // The vertex colors\r\n float c[] = { 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, //\r\n 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, //\r\n 0, 0, 1, 0, 0, 1, 0, 0, 1, 0, 0, 1 };\r\n\r\n // Texture coordinates\r\n float uv[] = { 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1, //\r\n 0, 0, 1, 0, 1, 1, 0, 1 };\r\n\r\n // The triangles (three vertex indices for each triangle)\r\n int indices[] = { 0, 2, 3, 0, 1, 2, // front face\r\n 4, 6, 7, 4, 5, 6, // left face\r\n 8, 10, 11, 8, 9, 10 }; // bottom face\r\n\r\n // Construct a data structure that stores the vertices, their\r\n // attributes, and the triangle mesh connectivity\r\n VertexData vertexData = ctx.makeVertexData(12);\r\n vertexData.addElement(c, VertexData.Semantic.COLOR, 3);\r\n vertexData.addElement(v, VertexData.Semantic.POSITION, 3);\r\n vertexData.addElement(n, VertexData.Semantic.NORMAL, 3);\r\n vertexData.addElement(uv, VertexData.Semantic.TEXCOORD, 2);\r\n vertexData.addIndices(indices);\r\n\r\n return new jrtr.Shape(vertexData);\r\n }", "private void setShape(ChamberShape theShape) {\n mySize = theShape;\n createDoorsFromExits();\n }", "void displayShape(Shape shape);", "Frog(){\n\t\tx = frogInitX;\n\t\ty = frogInitY;\n\t\tdx = 0;\n\t\tdy = 0;\n\t\talive = true;\n\t\torientation = Orientation.UP;\n\t}", "public void swim() {\r\n\t\tif(super.getPosition()[0] == Ocean.getInstance().getWidth()-71){\r\n\t\t\tinvX = true;\r\n\t\t} else if(super.getPosition()[0] == 0){\r\n\t\t\tinvX = false;\r\n\t\t}\r\n\t\tif(super.getPosition()[1] == Ocean.getInstance().getDepth()-71){\r\n\t\t\tinvY = true;\r\n\t\t} else if(super.getPosition()[1] == 0){\r\n\t\t\tinvY = false;\r\n\t\t}\r\n\t\tif(invX){\r\n\t\t\tsuper.getPosition()[0]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[0]+=1;\r\n\t\t}\r\n\t\tif(invY){\r\n\t\t\tsuper.getPosition()[1]-=1;\r\n\t\t} else {\r\n\t\t\tsuper.getPosition()[1]+=1;\r\n\t\t}\r\n\t}", "@Override\n\tpublic void BuildShape(Graphics g) {\n\t\t\n\t}", "private void setShape(){\n // 0 - index of the vertex at the top of the polygon\n shapex[0] = x + MathUtils.cos(radians) * 8;\n shapey[0] = y + MathUtils.sin(radians) * 8;\n\n // 1 - index of the vertex at the bottom left of the polygon\n shapex[1] = x + MathUtils.cos(radians - 4 * 3.1415f / 5) * 8;\n shapey[1] = y + MathUtils.sin(radians - 4 * 3.1415f / 5) * 8;\n\n // 2 - index of the vertex at the bottom right of the polygon\n shapex[2] = x + MathUtils.cos(radians + 4 * 3.1415f / 5) * 8;\n shapey[2] = y + MathUtils.sin(radians + 4 * 3.1415f / 5) * 8;\n }", "public IShape(Position position, boolean magic) {\r\n\t\tsuper(position, magic, true);\r\n\t\tPosition position1 = new Position(position.row() + 1, position.col());\r\n\t\tPosition position2 = new Position(position1.row() + 1, position1.col());\r\n\t\tsuper.setCell(new Cell(new Block(Color.CYAN, magic), position),\r\n\t\t\t\tnew Cell(new Block(Color.CYAN, false), position1), new Cell(new Block(Color.CYAN, false), position2));\r\n\r\n\t}", "public Shape rotateLeft() \n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, y(i));\n\t\t\tresult.setY(i, -x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\n void adjust_foil_shape_in_tab () {\n in.toggle_cyl_tab();\n }", "public void setMyShape(int shapeIndex){this.myShape = shapeIndex;}", "public void buildShape(Shape shape, boolean ghost) {\n\t\tbuildShape(shape, -1, ghost, 0);\n\t}", "void letToPlay(Shape shape);", "public void assignShape() {\n\t\t\n\t}", "public void display()\n {\n if(corner == 1)\n {\n moveTo(new Location(0,0));\n setDirection(135);\n }\n else if(corner == 2)\n {\n moveTo(new Location(0,9));\n setDirection(225);\n }\n else if(corner == 3)\n {\n moveTo(new Location(9,9));\n setDirection(315);\n }\n else if(corner == 4)\n {\n moveTo(new Location(9,0));\n setDirection(45);\n }\n }", "public void addShape(TShape aShape){\r\n // fShapes.remove(aShape); // just in case it was already there\r\n\r\n /*unfortunately we need to have a front to back screen order, properties at the back\r\n (drawn first), then individuals, finally relations between individuals*/\r\n\r\n /* if (aShape instanceof TLine)\r\n fShapes.add(aShape); // add at the end\r\n else if (aShape instanceof TProperty)\r\n fShapes.add(0,aShape); // add at the beginning\r\n else {\r\n int insertIndex=0;\r\n if (fShapes.size() > 0) {\r\n Iterator iter = fShapes.iterator();\r\n\r\n while (iter.hasNext()) {\r\n if (! ((TShape) iter.next()instanceof TProperty))\r\n break; //put it after rectangles\r\n else\r\n insertIndex++;\r\n }\r\n }\r\n fShapes.add(insertIndex,aShape);\r\n }*/\r\n\r\n\r\n // aShape.setSemantics(fSemantics);\r\n\r\n aShape.addChangeListener(this); // and we'll listen for any of its changes, such as being selected\r\n\r\n addShapeToList(aShape,fShapes);\r\n\r\n if (aShape instanceof TInterpretationBoard)\r\n ((TInterpretationBoard)aShape).setSemantics(fSemantics);\r\n\r\n\r\n fPalette.check(); // some of the names may need updating\r\n\r\n repaint();\r\n }", "protected void drawImpl()\n {\n if (mode == 2) {\n // Invader\n background(0);\n noStroke();\n int triangleXDensity = 32;\n int triangleYDensity = 18;\n for (int i = 0; i < triangleXDensity + 100; i++) {\n for (int j = 0; j < triangleYDensity + 100; j++) {\n float value = scaledBandLevels[(i % scaledBandLevels.length)];\n float shapeSize = map(value, 0, 255, 0, 150);\n int currentX = (width/triangleXDensity) * i;\n int currentY = (int)(((height/triangleYDensity) * j));\n\n if (subMode == 1) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 3));\n }\n else if (subMode == 3) {\n currentY = (int)(((height/triangleYDensity) * j) - (frameCount % height * 6));\n }\n\n if (subMode == 4) {\n shapeSize = map(value, 0, 255, 0, 500);\n }\n\n if ((i + j) % (int)random(1,5) == 0) {\n fill(0, 255, 255);\n }\n else {\n fill(234,100,255);\n }\n pushMatrix();\n if (subMode == 2) {\n translate(width/2, height/2);\n rotate(radians(frameCount % value * 2));\n translate(-width/2, -height/2);\n }\n triangle(currentX, currentY - shapeSize/2, currentX - shapeSize/2, currentY + shapeSize/2, currentX + shapeSize/2, currentY + shapeSize/2);\n popMatrix();\n }\n }\n\n }\n else if (mode == 5) {\n // Mirror Ball\n background(0);\n translate(width/2, height/2, 500);\n noStroke();\n if (subMode == 0) {\n rotateY(frameCount * PI/800);\n }\n else if (subMode == 1 || subMode == 2) {\n rotateY(frameCount * PI/800);\n rotateX(frameCount * PI/100);\n }\n else if (subMode == 3) {\n rotateY(frameCount * PI/400);\n }\n\n for (int i = 0; i < 100; i++) {\n for (int j = 0; j < 100; j++) {\n rotateY((2*PI/200) * j);\n pushMatrix();\n rotateX((2*PI/200) * i);\n translate(0,200);\n if (j > 50 && j < 150) {\n rotateX(PI/2);\n }\n else {\n rotateX(-PI/2);\n }\n if (subMode == 2 || subMode == 3) {\n fill(i * 2, 0, j, scaledBandLevels[i % scaledBandLevels.length] * 2);\n }\n else {\n fill(255, scaledBandLevels[i % scaledBandLevels.length]);\n }\n rect(0,200,20,20);\n popMatrix();\n }\n }\n }\n else if (mode == 8) {\n // End To Begin\n background(0);\n\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i] && modSizes[i] < 60) {\n modSizes[i]+=2;\n }\n else if (modSizes[i] > 5) {\n modSizes[i]--;\n }\n }\n \n theta += .2;\n\n if (subMode >=3) {\n theta += .6;\n }\n\n float tempAngle = theta;\n for (int i = 0; i < yvalues.length; i++) {\n yvalues[i] = sin(tempAngle)*amplitude;\n tempAngle+=dx;\n }\n\n noStroke();\n if (subMode >= 4) {\n translate(0, height/2);\n }\n int currentFrameCount = frameCount;\n for (int x = 0; x < yvalues.length; x++) {\n if (subMode >= 4) {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length] * 3);\n rotateX(currentFrameCount * (PI/200));\n }\n else {\n fill(0,random(128,255),255, scaledBandLevels[x % scaledBandLevels.length]);\n }\n ellipse(x*xspacing - period/2, height/2+yvalues[x], modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n if (subMode >= 1) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/4, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n if (subMode >= 2) {\n ellipse(x*xspacing, height/2+yvalues[x] - height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n ellipse(x*xspacing, height/2+yvalues[x] + height/8, modSizes[x % modSizes.length], modSizes[x % modSizes.length]);\n }\n }\n }\n else if (mode == 1) {\n // Life Support\n background(0);\n noStroke();\n if (trigger) { \n if (subMode == 0) {\n fill(255, 0, 0, triggerHold - (triggerCount * 4));\n }\n else if (subMode == 1) {\n fill(255, triggerHold - (triggerCount * 4));\n }\n rect(0,0,width,height);\n if (triggerCount > triggerHold) {\n trigger = false;\n triggerCount = 1;\n }\n else {\n triggerCount++;\n }\n }\n }\n else if (mode == 6) {\n // Stacking Cards\n background(255);\n if (subMode >= 1) {\n translate(width/2, 0);\n rotateY(frameCount * PI/200);\n }\n imageMode(CENTER);\n\n if (subMode <= 1) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=40;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n else if (subMode == 2) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 4; j++) {\n rotateY(j * (PI/4));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 3) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), (height/2), modSizes[i], modSizes[i]);\n }\n }\n }\n else if (subMode == 4) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n if (modSizes[i] < scaledBandLevels[i]) {\n modSizes[i]+=20;\n }\n else if (modSizes[i] > 40) {\n modSizes[i]--;\n }\n }\n for (int j = 0; j < 8; j++) {\n rotateY(j * (PI/8));\n for (int k = 0; k < height; k+= 300) {\n for (int i = 0; i < scaledBandLevels.length; i++) {\n image(mod, ((width/scaledBandLevels.length) * i) + ((width/scaledBandLevels.length)/2), k, modSizes[i], modSizes[i]);\n }\n }\n }\n }\n } \n else if (mode == 4) {\n background(0);\n noStroke();\n for (int i = 0; i < letterStrings.length; i++) { \n if (subMode == 0) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), (height/2) + 75);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, (height/2) + 75);\n }\n }\n else if (subMode == 1) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100; j < height + 100; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 2) {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 2);\n for (int j = -100 - (frameCount % 400); j < height + 600; j+=200) {\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n else if (subMode == 3) {\n for (int j = -100; j < height + 100; j+=200) {\n if (random(0,1) < .5) {\n fill(0,250,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n else {\n fill(234,100,255, scaledBandLevels[i % scaledBandLevels.length] * 4);\n }\n if (i < letterStrings.length/2) {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) - scaledBandLevels[i % scaledBandLevels.length] - (400 - (i * 100)), j);\n }\n else {\n text(letterStrings[i], (width/2) - (textWidth(letterStrings[i])/2) + scaledBandLevels[i % scaledBandLevels.length] + (i * 100) - 400, j);\n }\n }\n }\n }\n }\n else if (mode == 9) {\n background(0);\n noStroke();\n fill(234,100,255);\n String bandName = \"ELAPHANT\";\n text(bandName, (width/2) - (textWidth(bandName)/2), (height/2) + 75);\n }\n else {\n background(0);\n }\n }", "public void render() {\n float theta = velocity.heading2D() + radians(90);\n\n\n fill(255, 0, 0);\n stroke(0, 0, 0);\n strokeWeight(0.5f);\n pushMatrix();\n translate(position.x, position.y);\n rotate(theta);\n beginShape(QUAD);\n fill(130);\n vertex(r, -r*2);\n\n vertex(-r, -r*2);\n vertex(-r, r*2);\n vertex(r, r*2);\n\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(r,-r*2);\n vertex(r*2.5f,r);\n vertex(r,r);\n endShape();\n strokeWeight(0.5f);\n beginShape(TRIANGLES);\n vertex(-r, -r*2);\n vertex(r, -r*2);\n vertex(0, -r*4);\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, r*5);\n vertex(r, r*5);\n vertex(0, r*2);\n endShape();\n strokeWeight(1.7f*r);\n stroke(255);\n fill(255);\n point(0, -r*2.5f);\n stroke(0);\n fill(0);\n strokeWeight(0.75f*r);\n point(0, -r*2.5f);\n popMatrix();\n }", "private void createEdgeForShape(Shape shape) {\n\t\tcurrentShape = shape;\n\t\tif (holdAltKey && !(shape instanceof JoinPoint)) {\n\t\t\tShape edge = createEdge();\n\t\t\t((Edge)edge).setSource(currentShape);\n\t\t\taddShape(edge);\n\t\t\tcurrentShape.setDrawing(false);\n\t\t\tcurrentShape = edge;\n\t\t}\n\t}", "@Override\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\n\t}", "public void drawShape(Shape shape);", "public void usa(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(200);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(192,0,11);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n //green\n fill(0,0,67);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n //green\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n //green\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n //green\n fill(192,0,11);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n }", "Car(int x, int y) {\n // ASSIGN ALL PARAMETERS TO THE CAR CLASS GLOBAL VARIABLES HERE\n xCord = x;\n yCord = y;\n targetCord = 0;\n // CREATE CAR PSHAPE HERE\n // ATTEMPT TO CREATE A CAR-LOOKING-THING USING YOUR OWN VERTICES\n\n //front of car\n //let's slam a bunch of vertices down and hope.\n car = createShape();\n fullCar = createShape(GROUP);\n car.beginShape();\n car.vertex(0, 20);\n car.vertex(2, 10);\n car.vertex(2.25f, 9);\n car.vertex(3, 7);\n car.vertex(4, 5);\n car.vertex(5, 3);\n car.vertex(6, 2);\n car.vertex(7, 1);\n car.vertex(8, .33f);\n car.vertex(9, .1f);\n car.vertex(10, 0);\n car.vertex(20, 0);\n\n car.vertex(21, .1f);\n car.vertex(22, .33f);\n car.vertex(23, 1);\n car.vertex(24, 2);\n car.vertex(25, 3);\n car.vertex(26, 5);\n car.vertex(27, 7);\n car.vertex(27.75f, 9);\n car.vertex(28, 10);\n car.vertex(30, 20);\n ////hood curve\n car.vertex(0, 20);\n car.vertex(0, 50);\n car.vertex(30, 50);\n car.vertex(30, 20);\n car.endShape(CLOSE);\n\n\n ////main body\n //have as three shape groups on top\n carTopLeft = createShape();\n carTopLeft.beginShape();\n carTopLeft.vertex(7, 24);\n carTopLeft.vertex(0, 50);\n carTopLeft.vertex(0, 20);\n carTopLeft.vertex(7, 24);\n carTopLeft.endShape(CLOSE);\n\n carTopRight = createShape();\n carTopRight.beginShape();\n carTopRight.vertex(23, 24);\n carTopRight.vertex(30, 50);\n carTopRight.vertex(30, 20);\n carTopRight.vertex(23, 24);\n carTopRight.endShape(CLOSE);\n\n carTop = createShape();\n carTop.beginShape();\n carTop.vertex(23, 24);\n\n carTop.vertex(15, 21);\n\n carTop.vertex(7, 24);\n carTop.vertex(0, 50);\n carTop.vertex(30, 50);\n carTop.vertex(23, 24);\n carTop.endShape(CLOSE);\n //car.vertex(23,24);\n //car.vertex(30,50);\n //car.vertex(30,20);\n //car.vertex(23,24);\n //car.vertex(22,23.25);\n //car.vertex(21,22.6);\n //car.vertex(20,22.1);\n //car.vertex(19,21.8);\n //car.vertex(18,21.4);\n //car.vertex(17,21.2);\n //car.vertex(16,21.1);\n //car.vertex(15,21);\n\n //car.vertex(14,21.1);\n //car.vertex(13,21.2);\n //car.vertex(12,21.4);\n //car.vertex(11,21.8);\n //car.vertex(10,22.1);\n //car.vertex(9,22.6);\n //car.vertex(8,23.25);\n //car.vertex(7,24);\n //car.vertex(0,50);\n //car.vertex(0,20);\n //car.vertex(7,24);\n //car.vertex(0,50);\n ////top details\n\n ////rear\n //test vertex\n carRear = createShape();\n carRear.beginShape();\n carRear.vertex(0, 50);\n carRear.vertex(0, 70);\n carRear.vertex(1, 71.2f);\n carRear.vertex(2, 72.33f);\n carRear.vertex(3, 73);\n carRear.vertex(4, 73.25f);\n carRear.vertex(5, 73.75f);\n carRear.vertex(6, 74);\n carRear.vertex(7, 74.2f);\n carRear.vertex(8, 74.4f);\n carRear.vertex(9, 74.6f);\n carRear.vertex(10, 74.8f);\n // carRear.vertex(11,74.85);\n // carRear.vertex(12,74.9);\n //carRear.vertex(14,74.95); \n carRear.vertex(15, 75);\n //carRear.vertex(16,74.95); \n //carRear.vertex(17,74.93);\n //carRear.vertex(18,74.9);\n carRear.vertex(19, 74.85f);\n carRear.vertex(20, 74.8f);\n carRear.vertex(21, 74.6f);\n carRear.vertex(22, 74.4f);\n carRear.vertex(23, 74.2f);\n carRear.vertex(24, 74);\n carRear.vertex(25, 73.75f);\n carRear.vertex(26, 73.25f);\n carRear.vertex(27, 73);\n carRear.vertex(28, 72.33f);\n carRear.vertex(29, 71.2f);\n carRear.vertex(30, 70);\n carRear.vertex(30, 50);\n carRear.endShape(CLOSE);\n //FINISH THE PSHAPE WITH YOUR CUSTOM VERTICES\n\n //it worked\n\n // ADD WHEELS TO THE CAR (ELLIPSES)\n //leftWheel = createShape(ELLIPSE, xCoord +10, yCoord + 25, 8, 8);\n // rightWheel = createShape(ELLIPSE, xCoord +45, yCoord + 25, 8, 8);\n\n //groups everything together\n fullCar.addChild(car);\n fullCar.addChild(carRear);\n fullCar.addChild(carTopLeft);\n fullCar.addChild(carTopRight);\n fullCar.addChild(carTop);\n // fullCar.addChild(leftWheel);\n // fullCar.addChild(rightWheel);\n }", "public void setShape(String shape)\n\t{\n \t \n \tlength.setVisible(false); \n \twidth.setVisible(false); \n \theight.setVisible(false); \n \tradius.setVisible(false); \n \tradius2.setVisible(false); \n \troll.setVisible(false); \n \tpitch.setVisible(false); \n \tyaw.setVisible(false); \n \tquality.setVisible(false); \n \tsides.setVisible(false);\n \t\n \tlengthText.setVisible(false); \n \twidthText.setVisible(false); \n \theightText.setVisible(false); \n \tradiusText.setVisible(false); \n \tradius2Text.setVisible(false); \n \trollText.setVisible(false); \n \tpitchText.setVisible(false); \n \tyawText.setVisible(false); \n \tqualityText.setVisible(false); \n \tsidesText.setVisible(false);\n \t\n\t\tif(shape.equals(\"Cube\"))\n \t{\n \t\tlengthText.setVisible(true);\n \t\tlength.setVisible(true);\n \t\twidthText.setVisible(true);\n \t\twidth.setVisible(true);\n \t\theightText.setVisible(true);\n \t\theight.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\tyawText.setVisible(true);\n \t\tyaw.setVisible(true);\n \t\t\n \t\tlength.setText(\"1\");\n \t\twidth.setText(\"1\");\n \t\theight.setText(\"1\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\tyaw.setText(\"0\");\n \t}\n \telse if(shape.equals(\"Sphere\"))\n \t{\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\tqualityText.setVisible(true);\n \t\tquality.setVisible(true);\n \t\t\n \t\tradius.setText(\"1\");\n \t\tquality.setText(\"15\");\n \t}\n \telse if(shape.equals(\"Prism\"))\n \t{\n \t\theightText.setVisible(true);\n \t\theight.setVisible(true);\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\tsidesText.setVisible(true);\n \t\tsides.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\tyawText.setVisible(true);\n \t\tyaw.setVisible(true);\n \t\t\n \t\theight.setText(\"1\");\n \t\tradius.setText(\"1\");\n \t\tsides.setText(\"4\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\tyaw.setText(\"0\");\n \t\t\n \t}\n \telse if(shape.equals(\"Cylinder\"))\n \t{\n \t\theightText.setVisible(true);\n \t\theight.setVisible(true);\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\t//yawText.setVisible(true);\n \t\t//yaw.setVisible(true);\n \t\t\n \t\theight.setText(\"1\");\n \t\tradius.setText(\"1\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\t//yaw.setText(\"0\");\n \t}\n \telse if(shape.equals(\"Torus\"))\n \t{\n \t\tradiusText.setVisible(true);\n \t\tradius.setVisible(true);\n \t\tradius2Text.setVisible(true);\n \t\tradius2.setVisible(true);\n \t\tqualityText.setVisible(true);\n \t\tquality.setVisible(true);\n \t\trollText.setVisible(true);\n \t\troll.setVisible(true);\n \t\tpitchText.setVisible(true);\n \t\tpitch.setVisible(true);\n \t\tyawText.setVisible(true);\n \t\tyaw.setVisible(true);\n \t\t\n \t\tradius.setText(\"1\");\n \t\tradius2.setText(\"2\");\n \t\tquality.setText(\"15\");\n \t\troll.setText(\"0\");\n \t\tpitch.setText(\"0\");\n \t\tyaw.setText(\"0\");\n \t}\n \t\n\t}", "public void rotateShip(){\n if (this.orientation == false){\n this.orientation = true;\n }else\n orientation = false;\n \n return;\n }", "public void setShape(Info shape) {\n \n }", "public void updateDirectionFace();", "public void setShape(ChamberShape theShape) {\n mySize = theShape;\n setExits();\n }", "public void draw() {\r\n\t\t// Draw the triangle making up the mountain\r\n\t\tTriangle mountain = new Triangle(this.x, 100,\r\n\t\t\t\tthis.x + mountainSize / 2, 100, this.x + mountainSize / 4,\r\n\t\t\t\t100 - this.y / 4, Color.DARK_GRAY, true);\r\n\t\t// Draw the triangle making up the snow cap\r\n\t\tthis.snow = new Triangle(side1, bottom - this.y / 8, side2, bottom\r\n\t\t\t\t- this.y / 8, this.x + mountainSize / 4, 100 - this.y / 4,\r\n\t\t\t\tColor.WHITE, true);\r\n\t\tthis.window.add(mountain);\r\n\t\tthis.window.add(snow);\r\n\t}", "public void circulos() {\n pushMatrix();\n translate(width/2, height/2);\n rotate(-h);\n noFill();\n strokeWeight(5);\n stroke(255);\n ellipse(10, 10, 20, 20);\n popMatrix();\n\n h = h + 0.3f;\n }", "public void show(){\n fill(255);\n stroke(255);\n \n if (left){\n rect(0, y, size, brickLength);\n x = 0;\n }\n else{\n rect(width - size, y, size, brickLength);\n x = width - size;\n }\n }", "public void renderShape(final Shape theShape) {\n if (myWidth > 0) {\n final Drawing newDrawing = new Drawing(theShape, myColor, myWidth);\n myCurrentShape = newDrawing;\n repaint();\n } \n }", "@Test\r\n\tpublic void testAddNewShapeToScreen() {\r\n\r\n\t\t// Create a shape square\r\n\t\tPoint origin = new Point(5,5); \t // Set origin for square\r\n\t\tList<Double> list = new ArrayList<Double>(); \t // Create a new list of parameters\r\n double side = 5.0; \t // Add side as parameter for shape square \r\n list.add(side); \t\t\t\t\t\t\t\t\t\t \t // Add to list\r\n\t\tShape shape = ShapeFactory.createShape(0, origin, list); \t // 0 for creation of square\r\n\t\t\r\n\t\tscreen.shapesOnScreen.add(shape);\t\t\t\t\t\t \t // Add shape to screen\r\n\t\tassertEquals( 1, screen.shapesOnScreen.size());\t\t\t \t // Check if size of list is 1 after addition of shape\r\n\t}", "@Override\n \tpublic void drawBoid(Sim sim) {\n \t\tif (Set.SHOW_Awareness) {\n \t\t\tsim.stroke(255, 0, 0);\n \t\t\tsim.fill(255, 0, 0, 25);\n \t\t\tsim.ellipse(position.x, position.y,\n \t\t\t\t\t2 * AWARE_RADIUS, 2 * AWARE_RADIUS);\n \t\t}\n \t\tif (Set.SHOW_AwarenessCone) {\n \t\t\tsim.stroke(255, 0, 0);\n \t\t\tsim.fill(255, 0, 0, 25);\n \n \t\t\tPVector cone[] = {\n \t\t\t\t\tnew PVector(0, -1 * AWARE_CONE_WIDTH_MAX),\n \t\t\t\t\tnew PVector(AWARE_CONE_LENGTH, -1 * AWARE_CONE_WIDTH_MIN),\n \t\t\t\t\tnew PVector(AWARE_CONE_LENGTH, AWARE_CONE_WIDTH_MIN),\n \t\t\t\t\tnew PVector(0, AWARE_CONE_WIDTH_MAX) };\n \n \t\t\tcone = Boid.matrixMultParallel(basis, cone);\n \n \t\t\tsim.beginShape();\n \t\t\tsim.vertex(position.x + cone[0].x, position.y + cone[0].y);\n \t\t\tsim.vertex(position.x + cone[1].x, position.y + cone[1].y);\n \t\t\tsim.vertex(position.x + cone[2].x, position.y + cone[2].y);\n \t\t\tsim.vertex(position.x + cone[3].x, position.y + cone[3].y);\n \t\t\tsim.endShape();\n \t\t}\n \n \t\t//=========DRAW FISH===========\n \t\tif( Set.SHOW_Sprites ) {\n \t\t\t// Code to animate sprites\n \t\t\t\n \t\t\tfloat angle = (float) getHeading();\n \t\t\tsim.fishSprite.setRot(angle);\n \t\t\tsim.fishSprite.setXY(position.x, position.y);\n \t\t\tfloat totalAccel = recentAccel.mag();\n \t\t\t\n \t\t\tif(totalAccel < 1)\n \t\t\t{\n \t\t\t\tsim.fishSprite.setFrame(Sim.frameCounter/6 % 5);\n \t\t\t}\n \t\t\telse if(totalAccel < 2)\n \t\t\t{\n \t\t\t\tsim.fishSprite.setFrame(Sim.frameCounter/3 % 5);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tsim.fishSprite.setFrame(Sim.frameCounter % 5);\n \t\t\t}\n \t\t\t//fishSprite.setZorder(frameCounter%62);\n \t\t\tS4P.drawSprites();\n \t\t\n \t\t\t\n \t\t} else {\n \t\t\t// Code to draw the fish from scratch\n \t\t\t\n \t\t\t// head are the three points that define the head\n \t\t\tPVector head[] = {\n \t\t\t\t\tnew PVector((float) (H_WIDTH * Math.cos(getHeading()\n \t\t\t\t\t\t\t+ PConstants.PI / 2)),\n \t\t\t\t\t\t\t(float) (H_WIDTH * Math.sin(getHeading() + PConstants.PI / 2))),\n \t\t\t\t\tnew PVector(\n \t\t\t\t\t\t\t(float) (H_LENGTH * Math.cos(getHeading())),\n \t\t\t\t\t\t\t(float) (H_LENGTH * Math.sin(getHeading()))),\n \t\t\t\t\tnew PVector((float) (H_WIDTH * Math.cos(getHeading()\n \t\t\t\t\t\t\t- PConstants.PI / 2)),\n \t\t\t\t\t\t\t(float) (H_WIDTH * Math.sin(getHeading() - PConstants.PI / 2))) };\n \n \t\t\t\n \t\t\t// Scales the width of head inversely and length directly with %speed\n \t\t\tfloat fracSpeed = (float) speed.mag() / getMAX_SPEED();\n \n \t\t\tif (speed.mag() > 1) {\n \t\t\t\thead[0].mult(1.1f - .3f * fracSpeed);\n \t\t\t\thead[1].mult(.9f + .5f * fracSpeed);\n \t\t\t\thead[2].mult(1.1f - .3f * fracSpeed);\n \t\t\t}\n \n \t\t\t// tail are the two points that define the tail\n \t\t\tPVector tail[] = {\n \t\t\t\t\tnew PVector((float) (T_LENGTH * Math.cos(getHeading()\n \t\t\t\t\t\t\t\t\t\t+ PConstants.PI / 2 + T_ANGLE)),\n \t\t\t\t\t\t\t\t(float) (T_LENGTH * Math.sin(getHeading()\n \t\t\t\t\t\t\t\t\t\t+ PConstants.PI / 2 + T_ANGLE))),\n \t\t\t\t\tnew PVector((float) (T_LENGTH * Math.cos(getHeading()\n \t\t\t\t\t\t\t\t\t\t- PConstants.PI / 2 - T_ANGLE)),\n \t\t\t\t\t\t\t\t(float) (T_LENGTH * Math.sin(getHeading()\n \t\t\t\t\t\t\t\t\t\t- PConstants.PI / 2 - T_ANGLE))) };\n \n \t\t/*\n \t\t * PVector accel = recentAccel;\n \t\t * \n \t\t * \n \t\t * if( accel != null ) { accel =\n \t\t * Boid.matrixMult(Boid.inverse(basis), recentAccel );\n \t\t * accel.normalize(); accel.mult((float)T_LENGTH/2); if( accel.x >\n \t\t * 0 ) { accel.x = - accel.x; } accel.y *= .5f; //if( accel.x >\n \t\t * -.5f*T_LENGTH ) { // accel.x = (float) (-.5*T_LENGTH); //}\n \t\t * } else { accel = new PVector( -1, 0 ); } accel =\n \t\t * Boid.matrixMult(basis, accel);\n \t\t * \n \t\t * //PVector accel = recentAccel; PVector tail[] = { PVector.sub(\n \t\t * accel, head[2] ), PVector.sub( accel, head[0] ) };\n \t\t * \n \t\t * tail[0].normalize(); tail[1].normalize(); tail[0].mult( (float)\n \t\t * T_LENGTH ); tail[1].mult( (float) T_LENGTH );\n \t\t */\n \n \t\t\n \t\t\t// Draw head\n \t\t\tsim.fill(head_color);\n \t\t\tsim.stroke(head_color);\n \n \t\t\t// Connect the dots\n \t\t\tsim.beginShape();\n \t\t\tsim.vertex((int) (position.x + head[0].x),\n \t\t\t\t\t(int) (position.y + head[0].y));\n \t\t\tsim.vertex((int) (position.x + head[1].x),\n \t\t\t\t\t(int) (position.y + head[1].y));\n \t\t\tsim.vertex((int) (position.x + head[2].x),\n \t\t\t\t\t(int) (position.y + head[2].y));\n \t\t\tsim.vertex((int) (position.x + head[0].x),\n \t\t\t\t\t(int) (position.y + head[0].y));\n \t\t\tsim.endShape();\n \n \t\t\t// Draw body\n \t\t\tsim.fill(color);\n \t\t\tsim.stroke(color);\n \n \t\t\t// Connect the dots\n \t\t\tsim.beginShape();\n \t\t\tsim.vertex((int) (position.x + head[0].x),\n \t\t\t\t\t(int) (position.y + head[0].y));\n \t\t\tsim.vertex((int) (position.x + head[2].x),\n \t\t\t\t\t(int) (position.y + head[2].y));\n \t\t\tsim.vertex((int) (position.x + tail[0].x),\n \t\t\t\t\t(int) (position.y + tail[0].y));\n \t\t\tsim.vertex((int) (position.x + tail[1].x),\n \t\t\t\t\t(int) (position.y + tail[1].y));\n \t\t\tsim.vertex((int) (position.x + head[0].x),\n \t\t\t\t\t(int) (position.y + head[0].y));\n \t\t\tsim.endShape();\n \n \t\t}\n \t\t// END DRAW FISH\t\n \t\t\n \t\t//====DISPLAY EXTRAS====\n \t\t// Draws each fish's basis vectors\n \t\tif (Set.SHOW_Bases) {\n \t\t\tsim.stroke(255, 255, 0);\n \t\t\tsim.line(position.x, position.y, position.x + 20\n \t\t\t\t\t* basis[0].x, position.y + 20 * basis[0].y);\n \t\t\tsim.line(position.x, position.y, position.x + 15\n \t\t\t\t\t* basis[1].x, position.y + 15 * basis[1].y);\n \t\t}\n \n \t\t// Draws each fish's acceleration and velocity vectors\n \t\tif (Set.SHOW_KinematicVectors) {\n \t\t\tsim.stroke(255, 255, 0);\n \t\t\tsim.line(position.x, position.y, position.x + 10\n \t\t\t\t\t* speed.x, position.y + 10 * speed.y);\n \t\t\tif (recentAccel != null) {\n \t\t\t\tsim.stroke(0, 0, 255);\n \t\t\t\tsim.line(position.x, position.y, position.x + 35\n \t\t\t\t\t\t* recentAccel.x, position.y + 35\n \t\t\t\t\t\t* recentAccel.y);\n \t\t\t}\n \t\t}\n \n \t}", "public void russia(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings\n fill(165,0,0);//gray\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n fill(0);//black\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(18,39,148);//blue\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //white\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //red\n fill(194,24,11);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n //white\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(194,24,11);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(194,24,11);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(192,0,11);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n fill(0);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n fill(160,0,0);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "@Test\r\n\tpublic void testDeleteShapeFromScreen() {\r\n\t\t\r\n\t\t// Create a first shape square\r\n\t\tPoint origin = new Point(5,5); \t\t// Set origin for square\r\n\t\tList<Double> list = new ArrayList<Double>(); \t\t// Create a new list of parameters\r\n double side = 5.0; \t\t// Add side as parameter for shape square \r\n list.add(side); \t\t\t\t\t\t\t\t\t\t \t\t// Add to list\r\n\t\tShape shape = ShapeFactory.createShape(0, origin, list); \t\t// 0 for creation of square\r\n\t\tscreen.shapesOnScreen.add(shape);\t\t\t\t\t\t \t\t// Add shape to screen\r\n\t\t\r\n\t\t// Create a second shape square\r\n\t\tPoint secondOrigin = new Point(5,5); // Set origin for square\r\n\t\tList<Double> secondList = new ArrayList<Double>(); // Create a new list of parameters\r\n double secondSide = 5.0; // Add side as parameter for shape square \r\n secondList.add(secondSide); \t\t\t\t\t\t\t\t\t // Add to list\r\n\t\tShape secondShape = ShapeFactory.createShape(0, secondOrigin, secondList); // 0 for creation of square\r\n\t\tscreen.shapesOnScreen.add(secondShape);\t\t\t\t\t\t \t // Add shape to screen\r\n\t\t\r\n\t\t// Delete shape from screen\r\n\t\tassertEquals( true, screen.deleteShapeFromScreen( secondShape ));\t\t\r\n\t}", "@Test\r\n\tpublic void testLShapeMotion() {\n\t\tGrid g = new Grid();\r\n\t\tTetris display = new Tetris();\r\n\t\tGame game = new Game(display);\r\n\t\t\r\n\t\t\r\n\t\t// Makes the piece \r\n\t\tgame.setPiece(new LShape(1,0,g));\r\n\t\tassertTrue(!game.getPiece().canMove(Direction.LEFT) && game.getPiece().canMove(Direction.RIGHT));\r\n\t\t\r\n\t\tfor (int i = 1; i < g.WIDTH; i++) {\r\n\t\t\tgame.movePiece(Direction.RIGHT);\r\n\t\t\tif (i < g.WIDTH - 2) {\r\n\t\t\t\tassertTrue(game.getPiece().canMove(Direction.RIGHT));\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t\tassertFalse(game.getPiece().canMove(Direction.RIGHT));\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\tgame.getPiece().instantDrop();\r\n\t\tassertFalse(game.getPiece().canMove(Direction.DOWN));\t\r\n\t}", "static float[] makeSwell(float x, float y, float z,\n float scale, float pt_size, float f0, float f1,\n float[] vx, float[] vy, float[] vz, int[] numv) {\n \n float d, xd, yd;\n float x0, y0, x1, y1, x2, y2, x3, y3, x4, y4;\n float sscale = 0.75f * scale;\n \n float[] mbarb = new float[4];\n mbarb[0] = x;\n mbarb[1] = y;\n \n float swell_height = (float) Math.sqrt(f0 * f0 + f1 * f1);\n \n int lenv = vx.length;\n int nv = numv[0];\n \n //determine the initial (minimum) length of the flag pole\n if (swell_height >= 0.1f) {\n // normalize direction\n x0 = f0 / swell_height;\n y0 = f1 / swell_height;\n \n float start_arrow = 0.9f * sscale;\n float end_arrow = 1.9f * sscale;\n float arrow_head = 0.3f * sscale;\n x1 = (x + x0 * start_arrow);\n y1 = (y + y0 * start_arrow);\n x2 = (x + x0 * end_arrow);\n y2 = (y + y0 * end_arrow);\n \n // draw arrow shaft\n vx[nv] = x1;\n vy[nv] = y1;\n vz[nv] = z;\n nv++;\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n \n mbarb[2] = x2;\n mbarb[3] = y2;\n \n xd = x2 - x1;\n yd = y2 - y1;\n \n x3 = x2 - 0.3f * (xd - yd);\n y3 = y2 - 0.3f * (yd + xd);\n x4 = x2 - 0.3f * (xd + yd);\n y4 = y2 - 0.3f * (yd - xd);\n \n // draw arrow head\n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x3;\n vy[nv] = y3;\n vz[nv] = z;\n nv++;\n \n vx[nv] = x2;\n vy[nv] = y2;\n vz[nv] = z;\n nv++;\n vx[nv] = x4;\n vy[nv] = y4;\n vz[nv] = z;\n nv++;\n \n int shi = (int) (10.0f * (swell_height + 0.5f));\n float shf = 0.1f * shi;\n String sh_string = Float.toString(shf);\n int point = sh_string.indexOf('.');\n sh_string = sh_string.substring(0, point + 2);\n double[] start = {x, y - 0.25 * sscale, 0.0};\n double[] base = {0.5 * sscale, 0.0, 0.0};\n double[] up = {0.0, 0.5 * sscale, 0.0};\n VisADLineArray array =\n PlotText.render_label(sh_string, start, base, up, true);\n int nl = array.vertexCount;\n int k = 0;\n for (int i=0; i<nl; i++) {\n vx[nv] = array.coordinates[k++];\n vy[nv] = array.coordinates[k++];\n vz[nv] = array.coordinates[k++];\n nv++;\n }\n }\n else { // if (swell_height < 0.1)\n \n // wind < 2.5 kts. Plot a circle\n float rad = (0.7f * pt_size);\n \n // draw 8 segment circle, center = (x, y), radius = rad\n // 1st segment\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 2nd segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n // 3rd segment\n vx[nv] = x;\n vy[nv] = y + rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 4th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y + 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // 5th segment\n vx[nv] = x + rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 6th segment\n vx[nv] = x + 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n // 7th segment\n vx[nv] = x;\n vy[nv] = y - rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n // 8th segment\n vx[nv] = x - 0.7f * rad;\n vy[nv] = y - 0.7f * rad;\n vz[nv] = z;\n nv++;\n vx[nv] = x - rad;\n vy[nv] = y;\n vz[nv] = z;\n nv++;\n // System.out.println(\"circle \" + x + \" \" + y + \"\" + rad);\n mbarb[2] = x;\n mbarb[3] = y;\n }\n \n numv[0] = nv;\n return mbarb;\n }", "public void interface1(){\n noStroke();\n fill(10,100);//light gray\n rect(0,60,600,590);\n fill(220);//gray\n noStroke();\n beginShape();\n vertex(365,40);\n vertex(600,40);\n vertex(600,80);\n vertex(365,80);\n vertex(345,60);\n endShape(CLOSE);\n fill(19,70,100,100);//dark blue\n rect(0,110,600,215);\n rect(0,380,600,215);\n}", "public void buildShape(Shape shape) {\n\t\tbuildShape(shape, -1, false, 0);\n\t}", "void currentFrame(List<IShape> shapes);", "void addShape(IShape shape);", "public void render() {\n float theta = velocity.heading2D() + radians(90);\n\n\n fill(255, 0, 0);\n stroke(255, 0, 0);\n strokeWeight(0.5f);\n pushMatrix();\n translate(position.x, position.y);\n rotate(theta);\n beginShape(QUAD);\n fill(255, 0, 0);\n vertex(r, -r*2);\n\n vertex(-r, -r*2);\n vertex(-r, r*2);\n vertex(r, r*2);\n\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, -r*2);\n vertex(r, -r*2);\n vertex(0, -r*4);\n endShape();\n beginShape(TRIANGLES);\n vertex(-r, r*5);\n vertex(r, r*5);\n vertex(0, r*2);\n endShape();\n fill(0);\n stroke(255);\n fill(255);\n strokeWeight(1.7f*r);\n\n point(0, -r*2.5f);\n stroke(0);\n fill(0);\n strokeWeight(0.75f*r);\n point(0, -r*2.5f);\n\n\n popMatrix();\n textSize(6+(this.kidsHad/2));\n textMode(CENTER);\n stroke(0);\n text(\" g:\"+this.gen+\"/\"+kidsHad + \"/id: \" + (this.id+1), this.position.x, this.position.y);\n }", "public void addPolyGon() {\n abstractEditor.drawNewShape(new ESurfaceDT());\n }", "public void actionPerformed(ActionEvent event) {\r\n if (event.getActionCommand().equals(\"Undo\")) {\r\n panel.clearLastShape();\r\n } else if (event.getActionCommand().equals(\"Redo\")) {\r\n panel.redoLastShape();\r\n } else if (event.getActionCommand().equals(\"Circle\")) {\r\n panel.setShape(0); //sending 0 for Circle\r\n } else if (event.getActionCommand().equals(\"Box\")) {\r\n panel.setShape(1); //sending 1 for box\r\n }\r\n\r\n\r\n }", "public Shape rotateRight()\n\t{\n\t\tif (detailShape == Tetromino.SQUARE)\n\t\t{\n\t\t\treturn this;\n\t\t}\n\t\t\n\t\tvar result = new Shape();\n\t\tresult.detailShape = detailShape;\n\t\t\n\t\tfor (int i=0; i<4; i++)\n\t\t{\n\t\t\tresult.setX(i, -y(i));\n\t\t\tresult.setY(i, x(i));\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "private void createFinalLine() {\n //Up\n if (orOpActive.row > origin.row) {\n for (int i = origin.row + 1; i <= orOpActive.row; i++) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n\n //Down\n if (orOpActive.row < origin.row) {\n for (int i = origin.row - 1; i >= orOpActive.row; i--) {\n game.gridMap.get(i).get(origin.column).setState(game.STATE_FINAL);\n //setState(gridMap.get(i).get(origin.column), STATE_FINAL);\n }\n }\n //Right\n if (orOpActive.column > origin.column) {\n for (int i = origin.column + 1; i <= orOpActive.column; i++) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n //Left\n if (orOpActive.column < origin.column) {\n for (int i = origin.column - 1; i >= orOpActive.column; i--) {\n game.gridMap.get(origin.row).get(i).setState(game.STATE_FINAL);\n //setState(gridMap.get(origin.row).get(i), STATE_FINAL);\n }\n }\n }", "public void fruitRegrow()\n {\n fruit.makeInvisible();\n fruit.moveVertical(-60);\n fruit.makeVisible();\n }", "public void setRandomShape()\n\t{\n\t\tvar rand = new Random();\n\t\tint x = Math.abs(rand.nextInt())%7 + 1;\n\t\t\n\t\tTetromino[] values = Tetromino.values();\n\t\tsetShape (values[x]);\n\t}", "@Override\n public void run(){\n gameItem = shapeFactory.getShape(shapeButton, shapeName);\n if (gameItem != null) {\n gameItem.clearName(); //clears text\n gameItem.draw(); //draws new shape\n }\n }", "public GJEllipseShape2D reverse();", "@Override\n\tpublic void getShape() {\n\n\t}", "public static void changePosition() {\n int direction;\n int speed;\n int newTopX;\n int newTopY;\n\n for (int i = 0; i < numShapes; ++i) {\n direction = moveDirection[i];\n speed = moveSpeed[i];\n newTopX = xTopLeft[i];\n newTopY = yTopLeft[i];\n\n //the switch uses the direction the speed should be applied to in order to find the new positions\n switch (direction) {\n case 0 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n }\n //upper left 135 degrees\n case 1 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 2 -> {\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n //upper right 45 degrees\n case 3 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY - (speed);\n yTopLeft[i] = newTopY;\n }\n case 4 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n }\n //bottom right 315 degrees\n case 5 -> {\n newTopX = newTopX + (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n case 6 -> {\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n //bottom left 225 degrees\n case 7 -> {\n newTopX = newTopX - (speed);\n xTopLeft[i] = newTopX;\n newTopY = newTopY + (speed);\n yTopLeft[i] = newTopY;\n }\n }\n }\n }", "private void render()\n\t{\n\t\ttheta = (float) (velocity.heading() + Math.toRadians(90.0));\n\n\t\t// se baser sur le temps écoulé depuis le lancement\n\t\tf = parent.frameCount / 4;\n\t\tint fi = f + 1;\n\t\tfloat x = fi % DIM * W;\n\t\tfloat y = fi / DIM % DIM * H;\n\n\t\tparent.pushMatrix();\n\t\tparent.translate(location.x, location.y);\n\t\tparent.rotate(theta);\n\t\tparent.beginShape();\n\t\tparent.texture(spritesheet);\n\t\tparent.vertex(0, 0, x, y);\n\t\tparent.vertex(100, 0, x + W, y);\n\t\tparent.vertex(100, 100, x + W, y + H);\n\t\tparent.vertex(0, 100, x, y + H);\n\t\tparent.endShape();\n\t\tparent.popMatrix();\n\t}", "@Override\n public void redo() {\n shapeList.add((newShape));\n }", "public String whatShape();", "@Override\r\n\tpublic void draw() {\n\t\tdecoratedShape.draw();\r\n\t\tsetRedBorder(decoratedShape);\r\n\t}", "@Override\n public void update() {\n head.setRadius(getSize() / 2);\n body.setFill(getColor());\n\n if (isTail()) {\n\n // TAIL\n\n if (getP().getDirection() == Direction.EAST) {\n tail(getX() * getSize(), getY() * getSize() + getSize() - MARGIN / 2, getSize() - (MARGIN / 2), getSize() - MARGIN, 0.0F);\n return;\n }\n\n if (getP().getDirection() == Direction.WEST) {\n tail(getX() * getSize() + getSize(), getY() * getSize() + getSize() - MARGIN / 2, getSize() - MARGIN / 2, getSize() - MARGIN, 90.0F);\n return;\n }\n\n if (getP().getDirection() == Direction.NORTH) {\n tail(getX() * getSize() + MARGIN / 2, getY() * getSize() + getSize(), getSize() - MARGIN, getSize() - MARGIN, 0.0F);\n return;\n }\n\n if (getP().getDirection() == Direction.SOUTH) {\n tail(getX() * getSize() + MARGIN / 2, getY() * getSize(), getSize() - MARGIN, getSize() - MARGIN, 270.0F);\n }\n\n return;\n }\n\n if (isHead()) {\n\n // HEAD\n\n switch (getDirection()) {\n case EAST:\n head.setCenterX(getX() * getSize() + (getSize() / 2));\n head.setCenterY(getY() * getSize() + (getSize() / 2));\n\n body.setX(getX() * getSize() + getSize() / 2 + 2);\n body.setY(getY() * getSize() + MARGIN / 2);\n body.setWidth(getSize() / 2);\n body.setHeight(getSize() - MARGIN);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + (getSize() / 2) - 5),\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + (getSize() / 2) + 5)\n );\n break;\n case WEST:\n head.setCenterX(getX() * getSize() + getSize() / 2);\n head.setCenterY(getY() * getSize() + getSize() / 2);\n\n body.setX(getX() * getSize());\n body.setY(getY() * getSize() + MARGIN / 2);\n body.setWidth(getSize() / 2);\n body.setHeight(getSize() - MARGIN);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + getSize() / 2 - 5),\n eye(getX() * getSize() + getSize() / 2, getY() * getSize() + getSize() / 2 + 5)\n );\n break;\n case NORTH:\n head.setCenterX(getX() * getSize() + getSize() / 2);\n head.setCenterY(getY() * getSize() + getSize() / 2);\n\n body.setX(getX() * getSize() + MARGIN / 2);\n body.setY(getY() * getSize() - 2);\n body.setWidth(getSize() - MARGIN);\n body.setHeight(getSize() / 2);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2 - 5, getY() * getSize() + getSize() / 2),\n eye(getX() * getSize() + getSize() / 2 + 5, getY() * getSize() + getSize() / 2)\n );\n break;\n case SOUTH:\n head.setCenterX(getX() * getSize() + getSize() / 2);\n head.setCenterY(getY() * getSize() + getSize() / 2);\n\n body.setX(getX() * getSize() + MARGIN / 2);\n body.setY(getY() * getSize() + getSize() / 2 + 2);\n body.setWidth(getSize() - MARGIN);\n body.setHeight(getSize() / 2);\n\n add(\n head,\n body,\n eye(getX() * getSize() + getSize() / 2 - 5, getY() * getSize() + getSize() / 2),\n eye(getX() * getSize() + getSize() / 2 + 5, getY() * getSize() + getSize() / 2)\n );\n break;\n }\n return;\n }\n\n // BODY\n\n if (getDirection() == getP().getDirection()) {\n if (getDirection() == Direction.WEST || getDirection() == Direction.EAST) {\n body.setX(getX() * getSize());\n body.setY(getY() * getSize() + MARGIN / 2);\n body.setWidth(getSize());\n body.setHeight(getSize() - MARGIN);\n } else {\n body.setX(getX() * getSize() + MARGIN / 2);\n body.setY(getY() * getSize());\n body.setWidth(getSize() - MARGIN);\n body.setHeight(getSize());\n }\n add(body);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.WEST && getP().getDirection() == Direction.SOUTH) {\n arc(getX() * getSize(), getY() * getSize(), 270.0F);\n return;\n }\n if (getDirection() == Direction.NORTH && getP().getDirection() == Direction.EAST) {\n arc(getX() * getSize(), getY() * getSize(), 270.0F);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.WEST && getP().getDirection() == Direction.NORTH) {\n arc(getX() * getSize(), getY() * getSize() + getSize(), 0.0F);\n return;\n }\n if (getDirection() == Direction.SOUTH && getP().getDirection() == Direction.EAST) {\n arc(getX() * getSize(), getY() * getSize() + getSize(), 0.0F);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.EAST && getP().getDirection() == Direction.SOUTH) {\n arc(getX() * getSize() + getSize(), getY() * getSize(), 180.0F);\n return;\n }\n if (getDirection() == Direction.NORTH && getP().getDirection() == Direction.WEST) {\n arc(getX() * getSize() + getSize(), getY() * getSize(), 180.0F);\n return;\n }\n\n // <-->\n\n if (getDirection() == Direction.EAST && getP().getDirection() == Direction.NORTH) {\n arc(getX() * getSize() + getSize(), getY() * getSize() + getSize(), 90.0F);\n return;\n }\n if (getDirection() == Direction.SOUTH && getP().getDirection() == Direction.WEST) {\n arc(getX() * getSize() + getSize(), getY() * getSize() + getSize(), 90.0F);\n }\n }", "public void create()\n/* 342: */ {\n/* 343:422 */ setupPlainVariables_xjal();\n/* 344: */ \n/* 345:424 */ this.presentation = new ShapeTopLevelPresentationGroup(this, true, 0.0D, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 346:425 */ this.icon = new ShapeGroup(this, true, 0.0D, 0.0D, 0.0D, new Object[0]);\n/* 347: */ \n/* 348: */ \n/* 349:428 */ assignInitialConditions_xjal();\n/* 350:429 */ onCreate();\n/* 351: */ }", "void loopy() {\n if (position.y < -50) {\n position.y = Constants.height + 50;\n } else\n if (position.y > Constants.height + 50) {\n position.y = -50;\n }\n if (position.x< -50) {\n position.x = Constants.width +50;\n } else if (position.x > Constants.width + 50) {\n position.x = -50;\n }\n }", "@Override\r\n\tpublic void paint(Graphics g) {\n\t\tsuper.paint(g);\r\n\t Graphics2D graphics = (Graphics2D)g;\r\n\t \r\n\t for (int i = 0; i < tom.snake.size() -1; i++) {\r\n\t \tDimension xy = new Dimension(tom.snake.get(i));\r\n\t \tgraphics.setColor(BLACK);\r\n\t \tgraphics.fillRect(xy.width*SNAKE_SIZE, xy.height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE);\r\n\t \t\r\n\t }\r\n\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE);\r\n\t \r\n\t switch (tom.getDir()){\r\n\t\tcase 0: //up\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE, SNAKE_SIZE/2+2);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/2, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 1: //down\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE, SNAKE_SIZE/2);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 2: //left\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE/2, SNAKE_SIZE);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\tcase 3: //right\r\n\t\t graphics.fillRect(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE, SNAKE_SIZE/2, SNAKE_SIZE);\r\n\t\t graphics.setColor(WHITE);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);\r\n\t\t graphics.fillOval(tom.snake.get(tom.snake.size()-1).width*SNAKE_SIZE+SNAKE_SIZE/3*2, tom.snake.get(tom.snake.size()-1).height*SNAKE_SIZE+SNAKE_SIZE/4, SNAKE_SIZE/3, SNAKE_SIZE/3);break;\r\n\t\t } \r\n\t \r\n\t graphics.setColor(RED);\r\n\t graphics.fillOval(apple.x*SNAKE_SIZE-1, apple.y*SNAKE_SIZE-1, SNAKE_SIZE+2, SNAKE_SIZE+2);\r\n\t graphics.setColor(BLACK);\r\n\t graphics.setStroke(new BasicStroke(2));\r\n\t graphics.drawLine(apple.x*SNAKE_SIZE+SNAKE_SIZE/2, apple.y*SNAKE_SIZE+SNAKE_SIZE/4, apple.x*SNAKE_SIZE+SNAKE_SIZE/3, apple.y*SNAKE_SIZE-3);\r\n\t \r\n\t if (!game) {\r\n\t \tgraphics.setColor(DIMSCREEN);\r\n\t \tgraphics.fillRect(0, 0, 607, 607);\r\n\t \tgraphics.setColor(RED);\r\n\t \tgraphics.setFont(new Font(\"TimesRoman\", Font.BOLD, 50));\r\n\t \tif(Game.status()) { //Igra je bila zakljucena\r\n\t \t\tgraphics.drawString(\"GAME OVER\", 150, 260);\r\n\t \t\tgraphics.drawString(\"CTRL-P to restart\", 110, 320);\r\n\t \t}\r\n\t \telse if(Game.firstTime) { //Zacetni prikaz drugacen kot za navadno pavzo\r\n\t\t\t\tgraphics.drawString(\"Arrow keys to move\", 80, 260);\r\n\t\t \tgraphics.drawString(\"CTRL-P to start/pause\", 55, 320);\r\n\t \t}\r\n\t \telse \r\n\t \t\tgraphics.drawString(\"PAUSED\", 200, 300);\r\n\t }\t \r\n\t}", "public void frogReposition() {\n\t\tsetY(FrogPositionY);\n\t\tsetX(FrogPositionX);\t\t\n\t\t}", "public SZShape(Position givenPosition, boolean magic)\n\t\t{\n\t\t\tsuper(givenPosition);\n\t\t\tcells = new Cell[4];\n\t\t\tposition = givenPosition;\n\t\t\tcells[0] = new Cell(new Block(Color.GREEN, magic), position);\n\t\t\tPosition position1 = new Position(givenPosition.row() + 1, givenPosition.col());\n\t\t\tcells[1] = new Cell(new Block(Color.GREEN, false), position1);\n\t\t\tPosition position2 = new Position(givenPosition.row() + 1, givenPosition.col()+1);\n\t\t\tcells[2] = new Cell(new Block(Color.GREEN, false), position2);\n\t\t\tPosition position3 = new Position(givenPosition.row() + 2, givenPosition.col()+1);\n\t\t\tcells[3] = new Cell(new Block(Color.GREEN, false), position3);\n\t\t\tsuper.setCells(cells);\n\t\t}", "public ShapeAction(CustomFrame the_frame, Node the_shape, String the_name)\n {\n super(the_name);\n my_frame = the_frame;\n Transform3D t3D = new Transform3D();\n TransformGroup tg = new TransformGroup(t3D);\n tg.setCapability(TransformGroup.ALLOW_TRANSFORM_WRITE);\n tg.setCapability(TransformGroup.ENABLE_PICK_REPORTING);\n tg.addChild(the_shape);\n bg.addChild(tg);\n bg.setCapability(BranchGroup.ALLOW_DETACH);\n bg.compile();\n }", "void drawShape(Shape s) {\n }", "public void flipJags(){\n \t\tint length = jagsLeft.length/2;\n \t\tJaguar[] tempJags = new Jaguar[length];\n \t\t\n \t\ttempJags=jagsLeft;\n \t\tfor(int i=0; i < length; i++){ \n \t\t\tjagsLeft[i]=tempJags[length-1-i]; //Flip jaguars on left\n \t\t}\n \t\tfor(int i=0; i < length; i++){\n \t\t\ttempJags[i]=jagsRight[length-1-i]; //Flip jaguars on right\n \t\t}\n \t\t\n \t\tjagsRight = jagsLeft;\n \t\tjagsLeft = tempJags;\n assignLiveWindow();\n \t}", "@Override\n public void run() {\n IShapesFactory shapeFactory = new ShapesFactory(appState);\n\n if (inShape == null) {\n if (appState.getActiveShapeType() == ShapeType.RECTANGLE)\n createdShape = shapeFactory.createRectangle(startPt, endPt);\n\n else if (appState.getActiveShapeType() == ShapeType.TRIANGLE)\n createdShape = shapeFactory.createTriangle(startPt, endPt);\n\n else if (appState.getActiveShapeType() == ShapeType.ELLIPSE)\n createdShape = shapeFactory.createEllipse(startPt, endPt);\n }\n else {\n List<IShapes> outlines = SharedContainers.getInstance().getOutlineList();\n createdShape = shapeFactory.createOutlineCopy(startPt, endPt, inShape);\n outlines.add(createdShape);\n }\n\n // if in select mode, add it to the seleted List\n if (appState.getActiveMouseMode() == MouseMode.SELECT) {\n SharedContainers.getInstance().getSelectList().add(createdShape);\n SharedContainers.getInstance().getPrevSelectList().add(createdShape);\n SharedContainers.getInstance().getOutlineList().add(createdShape);\n }\n\n shapesRepo.addShape(createdShape);\n CommandHistory.add(this);\n }", "public void flip() {\n\t\t\tif (showing.getImage() == faceUp) {\n\t\t\t\tshowing.setImage(FACE_DOWN);\n\t\t\t}\n\t\t\telse {\n\t\t\t\tshowing.setImage(faceUp);\n\t\t\t}\n\t\t}", "public WorldImage draw() {\n return new OverlayImage(\n new Stem(this.leftLength, this.leftTheta, this.left).draw(),\n new Stem(this.rightLength, this.rightTheta, this.right).draw()); \n }", "public void uk(){\n stroke(1);\n //back guns\n fill(0);\n rect(73,192,4,15);\n rect(224,192,4,15);\n rect(71,207,8,15);\n rect(222,207,8,15);\n rect(66,207,3,15);\n rect(232,207,3,17);\n rect(122,109,4,15);\n rect(175,110,4,15);\n rect(121,120,6,15);\n rect(174,120,6,15);\n rect(116,124,3,15);\n rect(182,124,3,15);\n\n //wings--england\n fill(1,0,74);//dark blue\n beginShape();\n vertex(14,286);\n vertex(61,236);\n vertex(88,308);\n vertex(51,334);\n vertex(14,313);\n endShape(CLOSE);\n beginShape();\n vertex(286,287);\n vertex(286,312);\n vertex(247,335);\n vertex(212,309);\n vertex(238,238);\n endShape(CLOSE);\n\n noStroke();\n fill(255);\n rect(15,286,74,20);\n rect(212,284,74,20);\n rect(48,248,20,74);\n rect(233,248,20,74);\n quad(26,272,35,260,83,312,72,320);\n quad(262,260,272,272,229,312,220,318);\n quad(25,318,38,328,85,278,75,263);\n quad(264,324,280,316,228,262,214,274);\n\n fill(207,20,43);\n rect(51,248,15,74);\n rect(235,247,15,74);\n rect(15,289,74,15);\n rect(211,286,74,15);\n\n stroke(1);\n fill(0);//white\n beginShape();\n vertex(38,307);\n vertex(74,307);\n vertex(80,314);\n vertex(81,337);\n vertex(68,345);\n vertex(38,327);\n endShape(CLOSE);\n beginShape();\n vertex(219,316);\n vertex(226,308);\n vertex(262,308);\n vertex(262,326);\n vertex(231,345);\n vertex(219,336);\n endShape(CLOSE);\n\n fill(0,36,125);//red\n beginShape();\n vertex(96,191);\n vertex(61,230);\n vertex(60,269);\n vertex(96,312);\n vertex(101,300);\n vertex(100,247);\n vertex(112,232);\n vertex(132,232);\n vertex(131,186);\n endShape(CLOSE);\n beginShape();\n vertex(204,191);\n vertex(240,230);\n vertex(240,270);\n vertex(205,312);\n vertex(200,302);\n vertex(200,248);\n vertex(193,238);\n vertex(185,231);\n vertex(170,230);\n vertex(170,186);\n endShape(CLOSE);\n\n //gray\n fill(200);\n beginShape();\n vertex(70,217);\n vertex(74,220);\n vertex(81,210);\n vertex(85,213);\n vertex(75,227);\n vertex(72,229);\n vertex(71,231);\n vertex(73,233);\n vertex(73,268);\n vertex(71,272);\n vertex(76,277);\n vertex(82,274);\n vertex(89,283);\n vertex(90,297);\n vertex(66,272);\n vertex(65,235);\n vertex(68,229);\n vertex(62,228);\n endShape(CLOSE);\n beginShape();\n vertex(228,217);\n vertex(225,218);\n vertex(218,211);\n vertex(215,213);\n vertex(223,227);\n vertex(226,226);\n vertex(230,230);\n vertex(227,233);\n vertex(228,270);\n vertex(229,272);\n vertex(223,276);\n vertex(218,276);\n vertex(210,283);\n vertex(211,296);\n vertex(235,273);\n vertex(234,233);\n vertex(232,228);\n vertex(237,227);\n endShape(CLOSE);\n\n //guns\n //white\n fill(200);\n beginShape();\n vertex(121,301);\n vertex(98,313);\n vertex(102,336);\n vertex(119,342);\n vertex(139,336);\n vertex(141,313);\n endShape(CLOSE);//l\n beginShape();\n vertex(159,312);\n vertex(162,336);\n vertex(180,342);\n vertex(200,336);\n vertex(202,313);\n vertex(180,302);\n endShape(CLOSE);\n\n //black\n fill(0);\n rect(105,315,30,30);\n rect(166,315,30,30);\n quad(105,344,109,355,131,355,135,344);\n quad(166,344,170,355,192,355,196,344);\n\n fill(207,20,43);\n rect(103,253,33,62);//l\n rect(164,252,33,62);//r\n\n fill(200);\n bezier(103,252,107,230,132,230,136,252);//l\n bezier(164,252,169,230,192,230,197,252);//r\n rect(103,280,33,25);//l\n rect(164,280,33,25);//r\n fill(0,36,125);\n rect(104,319,33,26,3);//l\n rect(165,319,33,26,3);//r\n fill(200);\n rect(115,310,7,28,8);//l\n rect(178,310,7,28,8);//r\n\n fill(0,0,67);\n rect(105,284,10,15);\n rect(124,284,10,15);\n rect(167,285,10,15);\n rect(185,284,10,15);\n\n //body-wings\n\n fill(0,0,67);//blue\n bezier(107,154,101,162,98,169,98,187);\n bezier(191,153,199,164,202,172,203,187);\n quad(107,154,98,186,98,223,107,224);\n quad(191,153,203,186,202,223,192,223);\n fill(0,36,125);//red\n quad(134,112,108,147,107,239,132,230);\n quad(165,112,192,147,193,239,168,230);\n //black\n fill(0);\n quad(130,122,130,142,111,164,111,147);\n quad(169,122,188,147,188,165,169,144);\n //white\n fill(200);\n beginShape();\n vertex(131,154);\n vertex(129,202);\n vertex(118,202);\n vertex(112,181);\n vertex(110,179);\n vertex(110,171);\n endShape(CLOSE);\n beginShape();\n vertex(170,154);\n vertex(190,172);\n vertex(190,182);\n vertex(188,181);\n vertex(182,201);\n vertex(172,201);\n endShape(CLOSE);\n\n\n fill(0,36,125);\n quad(134,193,166,193,154,342,146,342);\n fill(192,0,11);\n quad(142,180,159,180,152,352,148,352);\n //white\n fill(200);\n ellipse(150,374,6,50);\n\n //head\n\n fill(1,1,75);\n ellipse(149.5f,72,33,25);\n ellipse(149.5f,94,30,170);\n fill(0);\n ellipse(149.5f,94,20,160);\n fill(154,155,84);\n ellipse(149.5f,94,17,77);\n strokeWeight(2);\n line(143,74,158,74);\n line(142,104,158,104);\n strokeWeight(1);\n fill(200);\n bezier(143,15,147,2,153,2,155.5f,15);\n}", "public void draw(Graphics2D g2, int xPos, int yPos, int width, int height){\r\n int eyeD = width/10;\r\n if (this.isLeft){\r\n eye = new Arc2D.Double(xPos+width/4 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width/4-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n else{\r\n eye = new Arc2D.Double(xPos+width*5/8 ,yPos+height/3, eyeD, eyeD, 180, 180, Arc2D.PIE);\r\n eyeC = new Arc2D.Double(xPos+width*5/8-eyeD/2 ,yPos+height/3-eyeD/2, 2*eyeD, 2*eyeD, 180, 180, Arc2D.PIE);\r\n }\r\n g2.setColor(color);\r\n g2.fill(eye);\r\n g2.setColor(Color.BLACK);\r\n g2.setStroke(new BasicStroke(2.0f));\r\n g2.draw(eye);\r\n g2.draw(eyeC);\r\n }", "public void buildShape(Shape shape, float friction) {\n\t\tbuildShape(shape, friction, false, 0);\n\t}", "void updateInterpretationBoards(){\n if (fShapes.size() > 0) {\r\n Iterator iter = fShapes.iterator();\r\n\r\n while (iter.hasNext()){\r\n TShape theShape=(TShape) iter.next();\r\n if (theShape.fTypeID==TShape.IDInterpretationBoard){\r\n theShape.setSelected(false);\r\n // ((TInterpretationBoard)theShape).updateInterpretationBoard();\r\n }\r\n }\r\n }\r\n\r\n\r\n }", "void drawMancalaShape(Graphics g, int x, int y, int width, int height, int stoneNum, String pitLabel);", "public void setFreeShape(boolean freeShape) {\r\n this.freeShape = freeShape;\r\n }", "public SnowmanShape(int x, int y, int width) {\n\t\tsuper(x, y);\n\t\tthis.width = width;\n\t\tUNIT = width/3;\n\t\tfinal double ARM_OFFSET = 5;\n\t\tdouble diameter = UNIT;\n\t\tdouble topLeft = x + ((width / 2) - (UNIT / 2));\n\t\tdouble topTop = y;\n\t\tEllipse2D.Double topBall = \n\t\t\t\tnew Ellipse2D.Double(topLeft, topTop, diameter, diameter);\n\n\t\ttopTop = topTop + diameter;\n\t\tEllipse2D.Double midBall = \n\t\t\t\tnew Ellipse2D.Double(topLeft, topTop, diameter, diameter);\n\t\tPoint2D.Double armLeftStart = new Point2D.Double(topLeft, topTop + (diameter/2));\n\t\tPoint2D.Double armRightStart = new Point2D.Double(topLeft + diameter, topTop + (diameter/2));\n\t\tPoint2D.Double armLeftEnd = new Point2D.Double(x, topTop + (diameter/2) - ARM_OFFSET);\n\t\tPoint2D.Double armRightEnd = new Point2D.Double(x + width, topTop + (diameter/2) - ARM_OFFSET);\n\t\t\n\t\ttopTop = topTop + diameter;\n\t\tEllipse2D.Double botBall = \n\t\t\t\tnew Ellipse2D.Double(topLeft, topTop, diameter, diameter);\n\t\t\n\t\t\n\t\tLine2D.Double armLeft = new Line2D.Double(armLeftStart, armLeftEnd);\n\t\tLine2D.Double armRight = new Line2D.Double(armRightStart, armRightEnd);\n\t\t\n\t\tadd(topBall);\n\t\tadd(midBall);\n\t\tadd(botBall);\n\t\tadd(armLeft);\n\t\tadd(armRight);\n\t\t\n\t}", "private void defineVertexes(String orientation){\n if(\"down\".equals(orientation)){\n y2 = y1-height;\n y3 = y1-height;\n \n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"up\")){\n y2 = y1+height;\n y3 = y1+height;\n x2 = x1 - height/2;\n x3 = x1 + height/2;\n }else if(orientation.equals(\"left\")){\n x2 = x1-height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }else if(orientation.equals(\"right\")){\n x2 = x1+height;\n y2 = y1+height/2;\n x3 = x1;\n y3 = y1+height;\n }\n }", "private void drawSquare(Graphics g, int x, int y, \n Tetrominoe shape) {\n Color colors[] = {\n new Color(0, 0, 0), new Color(204, 102, 102),\n new Color(102, 204, 102), new Color(102, 102, 204),\n new Color(204, 204, 102), new Color(204, 102, 204),\n new Color(102, 204, 204), new Color(218, 170, 0)\n };\n//left and top sides are brighter, bottom and right sides to look 3d\n Color color = colors[shape.ordinal()];\n\n g.setColor(color);\n g.fillRect(x + 1, y + 1, squareWidth() - 2, squareHeight() - 2);\n\n g.setColor(color.brighter());\n g.drawLine(x, y + squareHeight() - 1, x, y);\n g.drawLine(x, y, x + squareWidth() - 1, y);\n\n g.setColor(color.darker());\n g.drawLine(x + 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + squareHeight() - 1);\n g.drawLine(x + squareWidth() - 1, y + squareHeight() - 1,\n x + squareWidth() - 1, y + 1);\n\n }", "private void insertRandomShapes() {\n for (int i = 0; i < gameProperties.numShapes; i++) {\n trayFlowPane.getChildren().add(new CardBack());\n }\n\n for (int i = 0; i < gameProperties.numShapes; i++) {\n int shapeRand = random.nextInt(gameProperties.shapes.size());\n int colorRand = random.nextInt(gameProperties.colors.size());\n\n CardShape s = new CardShape(gameProperties.shapes.get(shapeRand).getImage(),\n gameProperties.colors.get(colorRand).getImage(), shapeRand, colorRand);\n\n setCardShapeOnClicked(s);\n\n correctShapeOrdering.add(s);\n }\n\n\n //apparently getChildren.sort() doesn't work, so here we have this silly workaround:\n ObservableList<Node> workingCollection = FXCollections.observableArrayList(correctShapeOrdering);\n Collections.sort(workingCollection, null);\n shapeFlowPane.getChildren().setAll(workingCollection);\n shapeFlowPane.getChildren().forEach(s -> {\n Timeline t = new Timeline(\n new KeyFrame(new Duration(200), new KeyValue(s.rotateProperty(), 0)),\n new KeyFrame(new Duration(1000), new KeyValue(s.rotateProperty(), 360))\n );\n t.playFromStart();\n });\n }", "public abstract void moveShape(double lon, double lat);", "protected void preMoveShape(IMoveShapeContext context) {\n \t}", "protected abstract void setShapes();", "public void convertToShape(RMShape aShape)\n{\n // Get center point in shape coords\n RMPoint cp = convertPointToShape(new RMPoint(getWidth()/2, getHeight()/2), aShape);\n \n // Coalesce transforms up the parent chain\n for(RMShape s=_parent; s!=aShape; s=s._parent) {\n setRoll(getRoll() + s.getRoll());\n setScaleX(getScaleX() * s.getScaleX()); setScaleY(getScaleY() * s.getScaleY());\n setSkewX(getSkewX() + s.getSkewX()); setSkewY(getSkewY() + s.getSkewY());\n }\n \n // Convert center point back from _parent, calc vector to old center from new center (in parent coords) & translate\n convertPointFromShape(cp, _parent);\n RMSize v = convertVectorToShape(new RMSize(cp.x - getWidth()/2, cp.y - getHeight()/2), _parent);\n offsetXY(v.width, v.height);\n}", "public void render(Entity entity, float f, float f1, float f2, float f3, float f4, float f5) {\n\n if(NarutoSettings.betterArms) {\n\n this.right_leg = new ModelRenderer(this, 43, -3);\n this.right_leg.setTextureSize(64, 64);\n\n this.left_leg = new ModelRenderer(this, 43, -3);\n this.left_leg.setTextureSize(64, 64);\n this.left_leg.mirror = true;\n\n this.right_legLower = new ModelRenderer(this, 43, -3);\n this.right_legLower.setTextureSize(64, 64);\n\n this.left_legLower = new ModelRenderer(this, 43, -3);\n this.left_legLower.setTextureSize(64, 64);\n this.left_legLower.mirror = true;\n }\n\n setRotationAngles(f, f1, f2, f3, f4, f5, entity);\n\n if (this.bipedLeftLegUpper.rotateAngleX <= -0.05F) {\n this.front_leg_plate_1.rotateAngleX += this.bipedLeftLegUpper.rotateAngleX + 0.05F;\n //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F;\n }\n if (this.bipedRightLegUpper.rotateAngleX <= -0.05F) {\n this.front_leg_plate_1.rotateAngleX += this.bipedRightLegUpper.rotateAngleX + 0.05F;\n //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F;\n }\n\n if (this.bipedLeftLegUpper.rotateAngleX >= 0.05F) {\n this.back_leg_plate_1.rotateAngleX += this.bipedLeftLegUpper.rotateAngleX - 0.05F;\n //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F;\n }\n if (this.bipedRightLegUpper.rotateAngleX >= 0.05F) {\n this.back_leg_plate_1.rotateAngleX += this.bipedRightLegUpper.rotateAngleX - 0.05F;\n //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F;\n }\n\n // old stuff for crouching and things\n /*this.front_leg_plate_1.setRotationPoint(-0.5F, 11.06667F + this.bipedLeftLegUpper.rotationPointY - 12, -2F + this.bipedLeftLegUpper.rotationPointZ);\n\n this.back_leg_plate_1.setRotationPoint(0F, 11.06667F + this.bipedLeftLegUpper.rotationPointY - 12, 2F + this.bipedLeftLegUpper.rotationPointZ);\n\n this.left_leg_plate.setRotationPoint(3.8F, 11.5F + this.bipedLeftLegUpper.rotationPointY - 12, 0F + this.bipedLeftLegUpper.rotationPointZ);\n\n this.right_leg_plate.setRotationPoint(-3.8F, 11.5F + this.bipedLeftLegUpper.rotationPointY - 12, 0F + this.bipedLeftLegUpper.rotationPointZ);*/\n\n if (this.bipedLeftLegUpper.rotateAngleX >= 0.05F) {\n this.left_leg_plate.rotateAngleZ -= (this.bipedLeftLegUpper.rotateAngleX - 0.05F) / 10;\n //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F;\n }\n if (this.bipedRightLegUpper.rotateAngleX >= 0.05F) {\n this.left_leg_plate.rotateAngleZ -= (this.bipedRightLegUpper.rotateAngleX - 0.05F) / 10;\n //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F;\n }\n\n if (this.bipedLeftLegUpper.rotateAngleX >= 0.05F) {\n right_leg_plate.rotateAngleZ += (this.bipedLeftLegUpper.rotateAngleX - 0.05F) / 10;\n //front_leg_plate_2.rotateAngleX += this.bipedLeftLeg.rotateAngleX + 0.05F;\n }\n if (this.bipedRightLegUpper.rotateAngleX >= 0.05F) {\n this.right_leg_plate.rotateAngleZ += (this.bipedRightLegUpper.rotateAngleX - 0.05F) / 10;\n //front_leg_plate_2.rotateAngleX += this.bipedRightLeg.rotateAngleX + 0.05F;\n }\n\n if(NarutoSettings.betterArms) {\n this.upperLeftLegBox.setLowerRotation(this.left_leg,this.bipedLeftLegLower.rotateAngleX);\n this.upperRightLegBox.setLowerRotation(this.right_leg,this.bipedRightLegLower.rotateAngleX);\n\n this.lowerLeftLegBox.setUpperRotation(this.left_legLower,this.bipedLeftLegLower.rotateAngleX);\n this.lowerRightLegBox.setUpperRotation(this.right_legLower,this.bipedRightLegLower.rotateAngleX);\n\n this.left_leg.cubeList.add(upperLeftLegBox);\n this.right_leg.cubeList.add(upperRightLegBox);\n\n this.left_legLower.cubeList.add(lowerLeftLegBox);\n this.right_legLower.cubeList.add(lowerRightLegBox);\n }\n\n /*front_leg_plate_1.render(f5);\n //back_leg_plate_2.render(f5);\n back_leg_plate_1.render(f5);\n left_leg_plate.render(f5);\n right_leg_plate.render(f5);*/\n //front_leg_plate_2.render(f5);\n\n trackPart(this.bipedLeftLegLower, this.legLockLeftLower);\n\n trackPart(this.bipedRightLegLower, this.legLockRightLower);\n\n renderWithLock(this.bipedLeftLegUpper, this.legLockLeft, f5);\n\n renderWithLock(this.bipedRightLegUpper, this.legLockRight, f5);\n\n renderWithLock(this.bipedLowerBody, this.lowerBodyLock, f5);\n }", "private void panelMousePressed(java.awt.event.MouseEvent evt)\n throws Exception {\n\n if (evt.getButton() == MouseEvent.BUTTON1) {\n /*Get the point where the mouse was clicked*/\n Point pointClicked = evt.getPoint();\n\n /*Read and save the object on that Point*/\n selectedShape = getLabelInPoint(pointClicked);\n\n /*Save this point, to be used during Transformations*/\n preTranslationPoint = pointClicked;\n\n /*Check which tool is selected*/\n if (drawConsoleUI.getSelectedToolID() == 2) {\n\n /*Check if ShapeConcept are connected*/\n if (! haveConnect) {\n\n /*Check if the first Shape selected is either a Concept or a Link*/\n if (selectedShape instanceof ShapeConcept)\n firstConcept = (ShapeConcept) selectedShape;\n else if (selectedShape instanceof ShapeLinking)\n firstLinking = (ShapeLinking) selectedShape;\n }//end inner if\n else\n {\n /*Get the second componenet at point*/\n\n ShapesInterface shape = getLabelInPoint(pointClicked);\n\n /*Check whether the second Shape is Concept or either Linking*/\n if (shape instanceof ShapeConcept)\n secondConcept = (ShapeConcept) selectedShape;\n else if (shape instanceof ShapeLinking)\n secondLinking = (ShapeLinking) selectedShape;\n\n /***************\n * START CASES *\n ***************/\n\n /*CASE-1: first=Concept & sec=Concept*/\n if (firstConcept !=null && secondConcept !=null && firstLinking == null && secondLinking == null) {\n\n /*Find the middle between the two points*/\n Point p1 = firstConcept.getCenter();\n Point p2 = secondConcept.getCenter();\n\n /*Find the mid point of the line*/\n Point midPoint = new Point((p1.x + p2.x)/2,(p1.y + p2.y)/2);\n\n /*Find the rectangle at the center*/\n Rectangle encloseRect = new Rectangle(midPoint.x - (int) 140/2,\n midPoint.y - (int) 40/2,\n 140,\n 40);\n\n /*Create a new LinkingPhaze*/\n ShapeLinking linkPhraze = new ShapeLinking(encloseRect,\"This is a link\",\n \"UserTest\", \"id\");\n\n /*Save Link phraze it in the shape buffer List*/\n this.labelBuffer.add(linkPhraze);\n\n /*Draw the ShapeConcept object on the JPanel*/\n this.add(linkPhraze);\n\n /**/\n if (! firstConcept.isEntry(linkPhraze)){\n linkPhraze.addComponent(firstConcept);\n }\n\n if (! linkPhraze.isEntry(secondConcept)){\n secondConcept.addComponent(linkPhraze);\n }\n\n }//END CASE 1\n /*CASE-2: first=Concept & sec=Link*/\n else if (firstConcept != null && secondConcept == null && firstLinking == null && secondLinking != null) {\n \n if (! firstConcept.isEntry(secondLinking))\n secondLinking.addComponent(firstConcept);\n else {\n /*Detect two way*/\n\n //tempConcept.addComponent(getLabelInPoint(pointClicked));\n //System.out.println(\"Detect two way\");\n }//else\n }//END CASE 2\n /*CASE-3: first=Link & sec=Concept*/\n else if (firstConcept == null && secondConcept != null && firstLinking != null && secondLinking == null) {\n \n if (! firstLinking.isEntry(secondConcept))\n secondConcept.addComponent(firstLinking);\n else {\n /*Detect two way*/\n\n //tempConcept.addComponent(getLabelInPoint(pointClicked));\n //System.out.println(\"Detect two way\");\n }\n }//END CASE 3\n /*CASE-4: first=Link & sec=Link*/\n else if (firstConcept == null && secondConcept == null && firstLinking != null && secondLinking != null) {\n }//END CASE 4\n\n /*Testing*/\n //System.out.println(\"firstConcept : \" + firstConcept);\n //System.out.println(\"firstLinking : \" + firstLinking);\n //System.out.println(\"secondConcept : \" + secondConcept);\n //System.out.println(\"secondLinking : \" + secondLinking);\n\n\n /*Clear variables for Cases*/\n firstConcept = null;\n firstLinking = null;\n secondConcept = null;\n secondLinking = null;\n\n /*When done switch back to the default SELECTION TOOL*/\n drawConsoleUI.setSelectedToolID(1);\n repaint();\n }//end inner else\n\n haveConnect = !haveConnect;\n }//end if tool selected\n /*ELSE: Select shape to drag*/\n else {\n\n /*CASE : ShapeConcept*/\n if (selectedShape instanceof ShapeConcept) {\n\n Rectangle rect = ((ShapeConcept) selectedShape).getBounds();\n\n offsetX = preTranslationPoint.x - rect.x;\n offsetY = preTranslationPoint.y - rect.y;\n\n }//end inner if\n /*CASE : ShapeLinking*/\n else if (selectedShape instanceof ShapeLinking) {\n\n Rectangle rect = ((ShapeLinking) selectedShape).getBounds();\n\n offsetX = preTranslationPoint.x - rect.x;\n offsetY = preTranslationPoint.y - rect.y;\n\n }//end inner if\n else if (selectedShape instanceof ShapeComment) {\n\n Rectangle rect = ((ShapeComment) selectedShape).getBounds();\n\n offsetX = preTranslationPoint.x - rect.x;\n offsetY = preTranslationPoint.y - rect.y;\n\n }//end inner if\n else if (selectedShape instanceof ShapeURL) {\n\n Rectangle rect = ((ShapeURL) selectedShape).getBounds();\n\n offsetX = preTranslationPoint.x - rect.x;\n offsetY = preTranslationPoint.y - rect.y;\n\n }//end inner if\n }//end else\n }//BUTTON 1\n}", "public static LayerDefinition createLayer(boolean isRightHand) {\n MeshDefinition meshdefinition = new MeshDefinition();\n PartDefinition partdefinition = meshdefinition.getRoot();\n\n // Main arm parts\n /** mainarm is supposed to be a first person representation of the player's actual arm */\n partdefinition.addOrReplaceChild(\"mainarm\", CubeListBuilder.create().texOffs( 0, 16).addBox(-3F, 0F, -8F, 6, 6, 10).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"armorright\", CubeListBuilder.create().texOffs( 42, 0).addBox(1F, -1F, -9F, 3, 5, 8).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"armorleft\", CubeListBuilder.create().texOffs( 42, 0).addBox(-4F, -1F, -9F, 3, 5, 8).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristtopright\", CubeListBuilder.create().texOffs( 0, 11).addBox(1F, 1F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristtopleft\", CubeListBuilder.create().texOffs( 0, 11).addBox(-2F, 1F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristbottomright\", CubeListBuilder.create().texOffs( 0, 11).addBox(1F, 3F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"wristbottomleft\", CubeListBuilder.create().texOffs( 0, 11).addBox(-2F, 3F, 2F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"fingerguard\", CubeListBuilder.create().texOffs( 28, 9).addBox(-3F, -2F, 8.1F, 5, 2, 2).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"crystalholder\", CubeListBuilder.create().texOffs( 48, 13).addBox(-2F, -1F, -3F, 4, 4, 4).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"crystal\", CubeListBuilder.create().texOffs( 32, 27).addBox(-1F, -2F, -2F, 2, 2, 2).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n\n // Hand Parts ---------------------------------------------------------------------------------------------------\n PartDefinition palmPartDef = partdefinition.addOrReplaceChild(\"palm\", CubeListBuilder.create().texOffs( 18, 0).addBox(isRightHand? -4F : -3F, -1F, 5F, 7, 4, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n\n // Thumb\n PartDefinition thumb1PartDef = palmPartDef.addOrReplaceChild(\"thumb1\", CubeListBuilder.create().texOffs( 16, 9).addBox(-.5F, -1F, 0F, 1, 2, 4).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand ? -4F : 4F, 1.5F, 8F, 0F, isRightHand? -0.4014257F : 0.4014257F, 0F));\n thumb1PartDef.addOrReplaceChild(\"thumb2\", CubeListBuilder.create().texOffs( 10, 0).addBox(-.5F, -.5F, 0F, 1, 1, 3).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 4F, 0F, 0F, 0F));\n\n // Index finger\n PartDefinition index1PartDef = palmPartDef.addOrReplaceChild(\"index1\", CubeListBuilder.create().texOffs(34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? -3.5F : 3.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n index1PartDef.addOrReplaceChild(\"index2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 5F, -0.2617994F * 2, 0F, 0F));\n\n // Middle finger\n PartDefinition middlefinger1PartDef = palmPartDef.addOrReplaceChild(\"middlefinger1\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 6).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? -1.5F : 1.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n middlefinger1PartDef.addOrReplaceChild(\"middlefinger2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 6F, -0.3444116F, 0F, 0F));\n\n // Ring finger\n PartDefinition ringfinger1PartDef = palmPartDef.addOrReplaceChild(\"ringfinger1\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? 0.5F : -0.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n ringfinger1PartDef.addOrReplaceChild(\"ringfinger2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 5F, -0.2617994F, 0F, 0F));\n\n // Pinky\n PartDefinition pinky1PartDef = palmPartDef.addOrReplaceChild(\"pinky1\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(isRightHand? 2.5F : -2.5F, -1.5F, 10F, 0.2617994F, 0F, 0F));\n pinky1PartDef.addOrReplaceChild(\"pinky2\", CubeListBuilder.create().texOffs( 34, 13).addBox(-.5F, -.5F, 0F, 1, 1, 4).mirror(isRightHand), PartPose.offsetAndRotation(0, 0, 4F, -0.4537856F, 0F, 0F));\n\n /** FINISH me below *--------------------*/\n // Left supports\n partdefinition.addOrReplaceChild(\"supportbaseleft\", CubeListBuilder.create().texOffs( 47, 21).addBox(-4.4F, -0.6666667F, -5.4F, 3, 3, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportleftfront\", CubeListBuilder.create().texOffs( 49, 23).addBox(isRightHand? -4.333333F : -3.333333F, 0.3333333F, 4.666667F, 1, 2, 3).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft1\", CubeListBuilder.create().texOffs( 54, 27).addBox(-2.2F, -0.4F, -6.066667F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2722714F, 1.066978F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft2\", CubeListBuilder.create().texOffs( 52, 21).addBox(-6F, 0.4666667F, 2.5F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, -0.6329727F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft3\", CubeListBuilder.create().texOffs(52, 21).addBox(-6.5F, 1F, -0.5F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft4\", CubeListBuilder.create().texOffs(52, 21).addBox(-7.9F, 0.4666667F, 1.7F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0.3688462F, 0F));\n partdefinition.addOrReplaceChild(\"supportleft5\", CubeListBuilder.create().texOffs(54, 27).addBox(-0.8666667F, 1F, isRightHand? 7F : 6.333333F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F,0F, -0.7714355F, 0F));\n\n // Right supports\n partdefinition.addOrReplaceChild(\"supportbaseright\", CubeListBuilder.create().texOffs( 47, 21).addBox(1.433333F, -0.6666667F, -5.4F, 3, 3, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2617994F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportrightfront\", CubeListBuilder.create().texOffs( 49, 23).addBox(isRightHand? 2.3F : 3.3F, 0.3333333F, 4.666667F, 1, 2, 3).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportright1\", CubeListBuilder.create().texOffs( 54, 27).addBox(-1.8F, -0.8F, -6.066667F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0.2722714F, -1.066972F, 0F));\n partdefinition.addOrReplaceChild(\"supportright2\", CubeListBuilder.create().texOffs( 52, 21).addBox(4F, 0.4666667F, 2.5F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0.6329786F, 0F));\n partdefinition.addOrReplaceChild(\"supportright3\", CubeListBuilder.create().texOffs( 52, 21).addBox(5.1F, 1F, -0.8333333F, 1, 1, 5).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0F, 0F));\n partdefinition.addOrReplaceChild(\"supportright4\", CubeListBuilder.create().texOffs( 52, 21).addBox(5.633333F, 0.4666667F, 1.7F, 2, 2, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, -0.3688404F, 0F));\n partdefinition.addOrReplaceChild(\"supportright5\", CubeListBuilder.create().texOffs( 54, 27).addBox(-2.866667F, 1F, isRightHand? 6.333333F : 7F, 4, 1, 1).mirror(isRightHand), PartPose.offsetAndRotation(0F, 0F, 0F, 0F, 0.7714355F, 0F));\n\n return LayerDefinition.create(meshdefinition, 64, 32);\n }" ]
[ "0.627459", "0.6200777", "0.6036553", "0.59826684", "0.5930666", "0.58148015", "0.5813439", "0.58019495", "0.57686794", "0.5756643", "0.5737316", "0.5686701", "0.5686296", "0.5673414", "0.5664998", "0.565161", "0.5643424", "0.5631283", "0.5623671", "0.5617795", "0.5543979", "0.5537551", "0.5530794", "0.55302566", "0.55274004", "0.5513139", "0.55098933", "0.55082864", "0.55005527", "0.54919046", "0.547101", "0.54697925", "0.5461451", "0.54506105", "0.5443312", "0.5441095", "0.5436797", "0.5428259", "0.5424925", "0.54232925", "0.54199284", "0.54080695", "0.5399949", "0.538704", "0.5381685", "0.5377123", "0.5376676", "0.53684473", "0.53642005", "0.5361558", "0.5355986", "0.53481144", "0.53448033", "0.534451", "0.5336016", "0.5324655", "0.53147686", "0.5311455", "0.5309406", "0.5308592", "0.5304196", "0.5300287", "0.5297578", "0.5296559", "0.5293969", "0.5292166", "0.52838194", "0.5283595", "0.5282657", "0.52822006", "0.5281015", "0.5277365", "0.5275235", "0.5273459", "0.526957", "0.52626586", "0.5260504", "0.52592057", "0.5252374", "0.52522", "0.5247194", "0.52414864", "0.5232522", "0.523115", "0.5224334", "0.5219472", "0.5213458", "0.5212618", "0.5212282", "0.52015954", "0.519567", "0.5194663", "0.51898646", "0.51863885", "0.5185684", "0.51851505", "0.51849717", "0.518401", "0.51818067", "0.51794004" ]
0.54463166
34
Created by kdoherty on 7/4/15.
@ImplementedBy(AbstractRoomDaoImpl.class) public interface AbstractRoomDao extends GenericDao<AbstractRoom> { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "private stendhal() {\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void interr() {\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n public void init() {\n }", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\n void init() {\n }", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void gored() {\n\t\t\n\t}", "private void init() {\n\n\t}", "private static void cajas() {\n\t\t\n\t}", "@Override\n public void init() {}", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n public void init() {\n\n }", "@Override\n public void init() {\n\n }", "private void kk12() {\n\n\t}", "@Override\n protected void init() {\n }", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\r\n\tpublic void init() {}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void init() {\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\n\tpublic void init()\n\t{\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "private Rekenhulp()\n\t{\n\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "@Override\n public void initialize() { \n }", "@Override\n protected void getExras() {\n }", "private void strin() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n public int retroceder() {\n return 0;\n }", "@Override\r\n\tprotected void doF8() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\t\tpublic void init() {\n\t\t}", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void init() {\n }", "@Override\n\tprotected void initialize() {\n\t}", "@Override\n\tprotected void initialize() {\n\t}", "public void method_4270() {}", "public abstract void mo70713b();", "private void init() {\n\n\n\n }", "@Override\n public void memoria() {\n \n }" ]
[ "0.6117941", "0.5988411", "0.5930197", "0.59283316", "0.5807113", "0.5798625", "0.5798625", "0.57607", "0.5747133", "0.57419336", "0.5738766", "0.5722724", "0.5710918", "0.57008713", "0.5691793", "0.5691793", "0.5691793", "0.5691793", "0.5691793", "0.56842875", "0.5673634", "0.5654858", "0.5643744", "0.56387633", "0.5635604", "0.5627891", "0.5617689", "0.56045365", "0.5601278", "0.56002307", "0.55985504", "0.559754", "0.5594365", "0.5588748", "0.5583749", "0.5570955", "0.5570766", "0.55676174", "0.5566556", "0.5566556", "0.5557242", "0.5557242", "0.5557242", "0.5557242", "0.5557242", "0.5557242", "0.5553565", "0.5553565", "0.55532855", "0.55499256", "0.5547478", "0.5547478", "0.5547478", "0.5545404", "0.5542765", "0.5537907", "0.5537907", "0.5537907", "0.55368763", "0.55282897", "0.5510935", "0.5510935", "0.5510935", "0.5507862", "0.5498732", "0.54979324", "0.54921037", "0.5485843", "0.5485843", "0.5485472", "0.548455", "0.54739374", "0.54705244", "0.5469317", "0.54562056", "0.54481995", "0.54399574", "0.5435981", "0.5423991", "0.542348", "0.5423417", "0.54180187", "0.5402145", "0.5402145", "0.5402145", "0.5402145", "0.5402145", "0.5402145", "0.5402145", "0.5399465", "0.53826106", "0.53801763", "0.5368968", "0.53682035", "0.5363094", "0.5361161", "0.5361161", "0.5348996", "0.53484803", "0.53416365", "0.5328263" ]
0.0
-1
The method calls a matching method inside the container, and passes the phone parameter to find a customer with the phone number. The method then returns the found customer.
public Customer getCustomer(int phone) { return CustomerContainer.getInstance().getCustomer(phone); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Customer searchCustomerByPhone() {\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\treturn f;\r\n\t}", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "Optional<Customer> findByPhoneNumber(Long number);", "public List<Customer> findByPhone(String p) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE phone = ?\");\n ppst.setString(1, p);\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "public static Customer find(String key) throws NotFoundException\r\n\t{\n\t\taCustomer = null;\r\n\t\t// define the SQL query statement using the phone number key\r\n\t\tString sqlQuery = \"SELECT CustomerName, Address, PhoneNo, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" StateRegistrationNo, BoatLength, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" Manufacturer, Year\" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" FROM CustomerTable, BoatTable \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" WHERE PhoneNo = CustomerPhoneNo\" +\r\n\t\t\t\t\t\t\t\t\t\t\t\" AND PhoneNo = '\" + key +\"'\" ;\r\n\r\n\t \t// execute the SQL query statement\r\n\t\ttry\r\n \t\t{\r\n\t \tResultSet rs = aStatement.executeQuery(sqlQuery);\r\n\t\t\t// next method sets cursor & returns true if there is data\r\n\t\t\tboolean gotIt = rs.next();\r\n\t \tif (gotIt)\r\n\t \t\t{\t// extract the data\r\n\t\t\t\t\tname = rs.getString(1);\r\n\t\t\t\t\taddress = rs.getString(2);\r\n\t\t\t\t\tphoneNumber = rs.getString(3);\r\n\t\t\t\t\tstateRegistrationNo = rs.getString(4);\r\n \t\t\t\t\tlength = rs.getDouble(5);\r\n\t\t\t\t\tmanufacturer = rs.getString(6);\r\n\t\t\t\t\tyear = rs.getInt(7);\r\n\r\n\t\t\t\t\t// create Customer & Boat instance\r\n\t\t\t\t\taCustomer = new Customer(name, address, phoneNumber);\r\n\t\t\t\t\taBoat = new Boat(stateRegistrationNo, length, manufacturer, year);\r\n\t\t\t\t\taBoat.assignBoatToCustomer(aCustomer);\r\n\t\t\t\t}\r\n\t\t\telse\t// nothing was retrieved\r\n\t\t\t\t{throw (new NotFoundException(\"not found \"));}\r\n\t\t\trs.close();\r\n\t \t}\r\n\t\tcatch (SQLException e)\r\n\t\t{ System.out.println(e);}\r\n\t\treturn aCustomer;\r\n\t}", "public Customer getCustomerByName(String customerName);", "@Override\n\tpublic UserVO searchPhone(String phone) throws Exception {\n\t\treturn dao.searchPhone(phone);\n\t}", "Customer getCustomerById(int customerId);", "@Override\n\tpublic List<CustomerAddressDto> queryConsignee(String mobilePhone) {\n\t\treturn null;\n\t}", "public String getCustomer(String custId);", "@Override\n\tpublic List<PersonTelInfo> findByPhone(String phone) {\n\t\treturn getSqlSession().selectList(getIbatisMapperNameSpace() + \".findByPhone\", phone);\t \n\t}", "private Customer findCustomer(String customerName){\n for(int i=0; i<customers.size(); i+=1){\n Customer existingCustomer = this.customers.get(i);\n if(existingCustomer.getName().equals(customerName)){\n return existingCustomer;\n }\n }\n return null;\n }", "Customer getCustomerById(final Long id);", "Phone findPhoneById(int phoneId);", "Customer getCustomer();", "@Override\r\n\tpublic User findUserByPhone (String phone) {\n\t\tUser user = userMapper.getUserByPhone(phone);\r\n\t\r\n\t\treturn user;\r\n\t}", "@Override\n\tpublic User findUserByPhone(String phone) {\n\t\treturn dao.findUserByPhone(phone);\n\t}", "public Customer getCustomer(String cID, ArrayList<Customer> customers) throws NotFoundException\r\n\t{\t\r\n\t\tCustomer cust = null;\r\n\t\tfor(int i=0; i<customers.size(); i++)\r\n\t\t{\r\n\t\t\tif(customers.get(i).getcID().equals(cID))\r\n\t\t\t\tcust = customers.get(i);\r\n\t\t}\r\n\t\t\r\n\t\tif(cust == null)\r\n\t\t\tthrow new NotFoundException(cID);\r\n\t\t\r\n\t\treturn cust;\t\t\r\n\t}", "@Override\n public Customer getCustomerById(Long id) {\n log.debug(\"Inside getCustomerById method\");\n return customerRepository.findById(id).orElseThrow(\n () -> new ResourceNotFoundException(\"No customer present with the id : \" + id));\n }", "@RequestMapping(value=\"/getByPhone/{phone}\", method=RequestMethod.GET)\r\n\t @ResponseBody\r\n\t public UserDto getByPhone(@PathVariable String phone) {\r\n\t \r\n\t \r\n\t return service.findByPhone(phone);\r\n\r\n\t }", "@Override\n\tpublic Customer findCustomer(int customerId) {\n\t\treturn null;\n\t}", "public ReturnCustomer getCustomer() {\n return (ReturnCustomer) get(\"customer\");\n }", "public Supplier findSupplierByPhone(String phone) throws NameValidationException, AddressValidationException, ZipCodeValidationException, CityValidationException, PhoneValidationException, EmailValidationException {\n\t\tResultSet rs;\n\t\tSupplier res = null; \n\t\ttry {\n\t\t\tfindSupplierByPhone.setString(1, phone);\n\t\t\trs = findSupplierByPhone.executeQuery();\n\t\t\tif (rs.next()) {\n\t\t\t\tres = buildSupplierObject(rs);\n\t\t\t} \n\t\t} catch (SQLException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn res;\n\t}", "@RequestMapping(value = \"/customers/{phoneNo}/calldetails\", method = RequestMethod.GET, produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic List<CallDetailsDTO> getCustomerCallDetails(@PathVariable long phoneNo) {\n\n\t\tlogger.info(\"Calldetails request for customer {}\", phoneNo);\n\n\t\treturn callDetailsService.getCustomerCallDetails(phoneNo);\n\t}", "public static Customer findCustomer(int i) throws CustomerNotFoundException\r\n\t{\r\n\t\t// simple integer search algorithm\r\n\t\tfor(Customer c:customers)\r\n\t\t{\r\n\t\t\tif(c.getCustomerID() == i)\r\n\t\t\t\treturn c;\r\n\t\t}\r\n\t\tthrow new CustomerNotFoundException();\r\n\t}", "public Customer getCustomers(int customerId) {\n for(Customer customer:customers){\n if(customer.getId() == customerId){\n return customer;\n }\n }\n return null;\n }", "cb.Careerbuilder.Company.PhoneNumber getPhone(int index);", "@Override\r\n\tpublic Customer getCustomer(String custId) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer = null;\r\n\t\toptionalCustomer = customerRepository.findById(custId);\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityNotFoundException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic Customer retrieveCustomer(Integer id) {\n\n\t\tCustomer customer = new Customer();\n\n\t\tfor (Customer cust : customers) {\n\t\t\tif (cust.getId() == id) {\n\t\t\t\tcustomer.setId(id);\n\t\t\t\tcustomer.setUsername(cust.getUsername());\n\t\t\t\tcustomer.setFirstName(cust.getFirstName());\n\t\t\t\tcustomer.setLastName(cust.getLastName());\n\t\t\t\tcustomer.setEmail(cust.getEmail());\n\t\t\t\tcustomer.setUserType(cust.getUserType());\n\t\t\t\tcustomer.setPassword(cust.getPassword());\n\t\t\t\tcustomer.setAddress(cust.getAddress());\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"A GET call retrieved a customer: retrieveCustomer()\");\n\t\treturn customer;\n\t}", "public Customer getCustomerByCustomerNumber(Integer customerNumber) throws UnknownCustomer {\n\t\ttry {\n\t\t\tSystem.out.println(\"searching for customer number \" + customerNumber);\t\t\t\n\t\t\treturn (Customer)CustomerService.em\n\t\t\t\t.createNamedQuery(\"getShippingCustomerByCustomerNumber\")\n\t\t\t\t.setParameter(\"customerNumber\", customerNumber)\n\t\t\t\t.getSingleResult();\n\t\t} catch(Exception e) {\n\t\t\tthrow new UnknownCustomer();\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic Customer findById(Long customerId) {\n\t\tOptional<Customer> optional = custRepository.findById(customerId);\n\t\tif(!optional.isPresent()) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id \"+customerId+\" not found\");\n\t\t}\n\t\treturn optional.get();\n\t\t\n\t}", "Customer getCustomerByCustomerName(String code) throws CustomerCodeNotExistsException;", "@Override\n public String provideCustomerMobilePhone( )\n {\n return _signaleur.getIdTelephone( );\n }", "@Override\n\tpublic Customer getCustomer(Integer id) {\n\t\treturn customerDao.findById(id);\n\t}", "@Override\n public Personn findById(Integer idCustomer) {\n return manager.find(Personn.class,idCustomer );\n //return findByCriteria(criteria);\n }", "@Override\n\t@Transactional\n\tpublic List<IoMember> filterMemberByTelephone(String telephone) {\n\t\treturn memberDao.filterMemberByTelephone(telephone);\n\t}", "Customer findById(Long id);", "@Override\n @Transactional\n public Customer getCustomer(int customerId) {\n Optional<Customer> queryResult = customerRepository.findById(customerId);\n // if null return new Customer(), otherwise return the Customer\n return queryResult.orElseGet(Customer::new);\n }", "public Customer findCustomerById(long id) throws DatabaseOperationException;", "com.google.ads.googleads.v6.resources.Customer getCustomer();", "public Customer getCustomerById(Integer id) throws DataNotFoundException {\n Optional<Customer> optionalCustomer = customerRepository.findById(id);\n if(optionalCustomer.isPresent())\n return optionalCustomer.get();\n else\n throw new DataNotFoundException(\"Customer with id: \" + id + \" not found\");\n }", "public PersonaBean getPerson(String searched) {\r\n\t\ttry {\r\n\t\t\tConnectionUtils connectionUtils = new ConnectionUtils();\r\n\t\t\tConnection connection = connectionUtils.openConnection();\r\n\t\t\tPreparedStatement ps = connection.prepareStatement(\"select phone_number from person where name = ?\");\r\n\t\t\tps.setString(1, searched);\r\n\t\t\tResultSet rs = ps.executeQuery();\r\n\t\t\tPersonaBean person = null;\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\tperson = new PersonaBean(searched, rs.getString(\"phone_number\"));\r\n\t\t\t}\r\n\t\t\treturn person;\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn null;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic PagerModel getWorkerByPhoneNumber(String phoneNumber, int pageNum,\r\n\t\t\tint numPerPage) {\n\t\tString sql = \"select * from Worker where phoneNumber=\" + phoneNumber;\r\n\t\treturn baseDao.findPageBySql(Worker.class, sql, null, pageNum, numPerPage);\r\n\t}", "CustomerDTO getCustomerDetails(Long customerId,String userName) throws EOTException;", "public Customer getCustomer(String customerID, DataPool allData){\r\n\t\t\r\n\t\tif (allData == null || customerID== null) \r\n\t\t\treturn null;\r\n\t\treturn treeData.get(customerID);\r\n\t\t\r\n\t}", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "static Customer getCustomerWithId(int id){ return new Customer();}", "@Override\r\n\tpublic Customer search(String name) {\n\t\treturn null;\r\n\t}", "public void lookupCustomer(String customerId) {\r\n customer = transaction.getCustomerInfo(customerId);\r\n }", "public Customer retrieveCustomerByEmail(String email) throws CustomerNotFoundException;", "@Override\n\tpublic CustomerData getCustomer(Long custId) {\n\t \n\t\tOptional<CustomerData> optionalCust = customerRepository.findById(custId);\n\t\t//Optional object use for check if a customer id is existing or not\n if(optionalCust.isPresent()) {\n return optionalCust.get(); //if customer id is exist then return a value\n }\n\t\treturn null;\n\t\t\n\t}", "@Override\r\n\tpublic Customer getCustomer(int customerID) {\n\t\treturn null;\r\n\t}", "public @Nonnull Long getPrincipal(@Nullable MobilePhone mobilePhone) \n throws ValidationException, ItemNotFoundException, RepositoryServerException;", "@GetMapping(value = \"/customers/{phoneNo}/calldetails\", produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic List<CallDetailsDTO> getCustomerCallDetails(@PathVariable long phoneNo) {\n\t\tlogger.info(\"Calldetails request for customer {}\", phoneNo);\n\t\treturn custService.getCustomerCallDetails(phoneNo);\n\t}", "public Customer getSpecificCustomerByName(String name){\n Customer specificCustomer = null;\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer WHERE FirstName LIKE ? OR LastName LIKE ?\");\n preparedStatement.setString(1, name);\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n specificCustomer = new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n );\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return specificCustomer;\n }", "public Customer getCustomer(String firstName, String lastName, String username, String password) {\n\t\tfor (Customer C : customerList) {\n\t\t\tif (C.getFirstname().equals(firstName) && C.getLastname().equals(lastName)\n\t\t\t\t\t&& C.getUsername().equals(username) && C.getPassword().equals(password))\n\t\t\t\treturn C;\n\t\t}\n\t\treturn null;\n\t}", "@Override\r\n\tpublic Customer getCustomerById(int id) {\n\t\treturn customerdao.getCustomerById(id);\r\n\t}", "private Customer findCustomerById(String id) throws IllegalStateException\r\n\t{\r\n\t\treturn findCustomerById(id, false);\r\n\t}", "public JSONObject findCustomer(String email) {\n\t\tWebClient webClient = getWebClient();\n\n\t\tString response = webClient.accept(MediaType.APPLICATION_JSON)\n\t\t\t\t.path(\"get-by-filter\").query(\"email\", email).get(String.class);\n\t\ttry {\n\t\t\tJSONObject jsonObject = new JSONObject(response);\n\t\t\tjsonObject.getJSONObject(\"FindCustomerResponse\").getJSONObject(\n\t\t\t\t\t\"customerList\");\n\t\t\treturn jsonObject;\n\t\t} catch (JSONException e) {\n\t\t\tlogger.error(\"Error parsing JSONObject: \" + e.getMessage(), e);\n\t\t\tthrow new TechnicalException(e);\n\t\t}\n\t}", "@Override\n public Customer getCustomer(Long userId) {\n Optional<Customer> customer = customerDao.getCustomer(userId);\n if (!customer.isPresent()) {\n logger.error(\"Customer with this id {} doesn't exist\", userId);\n }\n return customer.orElseThrow(ResourceNotFoundException::new);\n }", "public ArrayList<String[]> searchField(String phone)\n\t{\n\t\tArrayList<Customer> customers = CustomerContainer.getInstance().getCustomers();\t\n\t\tArrayList<String[]> data = new ArrayList<>();\n\t\tif (customers == null)\n\t\t{\n\t\t\treturn data;\n\t\t}\n\t\tfor (Customer customer : customers)\n\t\t{\n\t\t\tif (Integer.toString(customer.getPhone()).contains(phone))\n\t\t\t{\n\t\t\t\tdata.add(customer.tableFill());\n\t\t\t}\n\t\t}\n\t\treturn data;\n\t}", "public Customer get(String code) {\n Customer customer = customerDAOController.get(code);\n if (customer == null) {\n return new Customer();\n }\n\n return customer;\n }", "public abstract List<CustomerType> findCustomerTypebyCustomerTypeNumber(String searchString);", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.GET)\n @ResponseStatus(HttpStatus.OK)\n public CustomerViewModel findCustomerById(@PathVariable(\"id\") int id){\n //create a customer View Model using the find method from the service layer\n CustomerViewModel customerViewModel = service.findCustomer(id);\n\n //if it does not exist, through an illegal argument exception\n if(customerViewModel == null){\n //throw new\n }\n\n //return the requested customer View Model\n return customerViewModel;\n }", "public static CustomerBean getCutomer(int customerID) {\r\n\t\tCustomerBean bean = null;\r\n\t\tint customerId;\r\n\t\tdouble monthlyIncome, familyIncome;\r\n\t\tString customerName, cnicNo, phoneNo, address, district, customer_pic, accountCreatedDate;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT customer_id, customer_name, customer_cnic, customer_address, city_name, customer_phone,customer_monthly_income, customer_family_income, customr_image,created_on FROM customer join city on customer_city=city_id Where customer_id = ?;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tstmt.setInt(1, customerID);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\taddress = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\r\n\t\t\t\tphoneNo = rs.getString(7);\r\n\t\t\t\tmonthlyIncome = rs.getDouble(8);\r\n\t\t\t\tfamilyIncome = rs.getDouble(9);\r\n\r\n\t\t\t\tcustomer_pic = rs.getString(11);\r\n\t\t\t\taccountCreatedDate = rs.getString(12);\r\n\t\t\t\tbean = new CustomerBean();\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setAddress(address);\r\n\t\t\t\tbean.setDistrict(district);\r\n\r\n\t\t\t\tbean.setFamilyIncome(familyIncome);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\r\n\t\t\t\tbean.setAccountCreatedDate(accountCreatedDate);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\tbean.setCustomer_pic(customer_pic);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn bean;\r\n\t}", "public static Customer getCustomerByKey(int customerKey) {\r\n\t\tCustomer customer = null;\r\n\t\tConnection conn = ConnectionFactory.getConnection();\r\n\t\tString query = \"SELECT customerUuid, customerType, customerName, personKey, addressKey FROM Customer WHERE customerKey = ?\";\r\n\r\n\t\tPreparedStatement ps = null;\r\n\t\tResultSet rs = null;\r\n\r\n\t\ttry {\r\n\t\t\tps = conn.prepareStatement(query);\r\n\t\t\tps.setInt(1, customerKey);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\tif (rs.next()) {\r\n\t\t\t\t\r\n\t\t\t\tString customerType = rs.getString(\"customerType\");\r\n\t\t\t\tString customerUuid = rs.getString(\"customerUuid\");\r\n\t\t\t\tString customerName = rs.getString(\"customerName\");\r\n\t\t\t\tint personKey = rs.getInt(\"personKey\");\r\n\t\t\t\tPerson person = Person.getPersonByKey(personKey);\r\n\t\t\t\tint addressKey = rs.getInt(\"addressKey\");\r\n\t\t\t\tAddress address = Address.getAddressByKey(addressKey);\r\n\t\t\t\t\r\n\t\t\t\tif (customerType.equals(\"G\")) {\r\n\t\t\t\t\tcustomer = new GovernmentCustomer(customerUuid, person, customerName, address);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcustomer = new CorporateCustomer(customerUuid, person, customerName, address);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\t\r\n\t\t} catch (SQLException e) {\r\n\t\t\t\r\n\t\t\tSystem.out.println(\"SQLException: \");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t\t\r\n\t\t} finally {\r\n\t\t\t\r\n\t\t\tConnectionFactory.closeConnection(conn, ps, rs);\r\n\t\t\t\r\n\t\t}\r\n\t\treturn customer;\r\n\t}", "@Override\n\t@Transactional\n\tpublic Customer getCustomer(int theId) {\n\t\t;\n\t\treturn customerDAO.getCustomer(theId);\n\t}", "void getContributeToday(String phone);", "String getCustomerNameById(int customerId);", "@Test\n public void getCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"dominick.dechristofaro@gmail.com\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Copy the customer added to the mock database using the CustomerAPI\n Customer customerCopy = service.findCustomer(customer.getCustomerId());\n\n // Test getCustomer() API method\n verify(customerDao, times(1)).getCustomer(customer.getCustomerId());\n TestCase.assertEquals(customerCopy, customer);\n }", "@GetMapping(value = \"/customers/{phoneNo}\", produces = MediaType.APPLICATION_JSON_VALUE)\n\tpublic CustomerDTO getCustomerProfile(@PathVariable Long phoneNo) {\n\n\t\tlogger.info(\"Profile request for customer {}\", phoneNo);\n\t\treturn custService.getCustomerProfile(phoneNo);\n\t}", "Customer search(String login);", "@Override\n\tpublic Customer getCustomerById(long customerId) {\n\t\treturn null;\n\t}", "public Customer getSpecificCustomerById(String customerId){\n Customer specificCustomer = null;\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer WHERE CustomerId=?\");\n preparedStatement.setString(1, customerId);\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n specificCustomer = new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n );\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return specificCustomer;\n }", "static customer getCustomer(String uid) {\n return null;\n }", "Verification findByPhoneNumber(String phoneNumber);", "public Customer findById(Integer id) {\n\t\treturn customerDao.findById(id);\r\n\t}", "@Override\n\tpublic Uni<Customer> findCustomerById(Long cid) {\n\t\treturn repo.findById(cid);\n\t}", "@Override\n\tpublic Customer findCustomerByUserName(String username) {\n\t\treturn (Customer) sessionFactory.getCurrentSession()\n\t\t\t\t.createCriteria(Customer.class)\n .add(Restrictions.eq(\"username\", username))\n .uniqueResult();\n\t}", "@Test\n\tpublic void testFindCustomerByGuidWithOneReturn() {\n\t\tfinal List<Customer> customers = new ArrayList<Customer>();\n\t\tCustomer customer = new CustomerImpl();\n\t\tcustomers.add(customer);\n\t\tcontext.checking(new Expectations() {\n\t\t\t{\n\t\t\t\tallowing(getMockPersistenceEngine()).retrieveByNamedQuery(with(any(String.class)), with(any(Object[].class)));\n\t\t\t\twill(returnValue(customers));\n\t\t\t}\n\t\t});\n\t\tassertSame(customer, importGuidHelper.findCustomerByGuid(SOME_GUID));\n\t}", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\t\t\n\t\treturn theCustomer;\n\t}", "public Customer getCustomer(int userId) {\n\t\tIterator i = customers.iterator();\n\t\twhile (i.hasNext()) {\n\t\t\tCustomer customer = (Customer) i.next();\n\t\t\tif (userId == customer.getUserId()) {\n\t\t\t\treturn customer;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "public Customer getCustomerBy_id(ObjectId _id) {\n\t\treturn custRepo.findBy_id(_id);\n\t}", "public Customer findByCustomerNo(int customerNo){\n Customer customer = new Customer();\n try{\n URL url = new URL(\"http://localhost:9004/rest/findByCustomerNo/\" + customerNo);\n HttpURLConnection con = (HttpURLConnection) url.openConnection();\n con.setRequestMethod(\"GET\");\n con.setRequestProperty(\"Accept\", \"application/xml\");\n InputStream xml = con.getInputStream();\n\n DocumentBuilderFactory dbf = DocumentBuilderFactory.newInstance();\n DocumentBuilder db = dbf.newDocumentBuilder();\n Document doc = db.parse(xml);\n doc.getDocumentElement().normalize();\n NodeList nList = doc.getElementsByTagName(\"customer\");\n Node node = nList.item(0);\n Element eElement = (Element) node;\n\n customer.setCustomerNo(Integer.parseInt(eElement.getAttribute(\"customerNo\")));\n customer.setFirstName(eElement.getElementsByTagName(\"firstName\").item(0).getTextContent());\n customer.setLastName(eElement.getElementsByTagName(\"lastName\").item(0).getTextContent());\n try{\n String bday = eElement.getElementsByTagName(\"birthDate\").item(0).getTextContent();\n String bdayFormat = bday.substring(0,10);\n customer.setBirthDate(LocalDate.parse((bdayFormat)));;\n //customer.setBirthDate(new SimpleDateFormat(\"yyyy-MM-dd\").parse(eElement.getElementsByTagName(\"birthDate\").item(0).getTextContent()));\n } catch(Exception e){\n System.out.println(\"couldnt parse date\");\n }\n customer.setSex(eElement.getElementsByTagName(\"sex\").item(0).getTextContent());\n customer.setStreetAddress(eElement.getElementsByTagName(\"streetAddress\").item(0).getTextContent());\n customer.setPostalCode(eElement.getElementsByTagName(\"postalCode\").item(0).getTextContent());\n customer.setPostOffice(eElement.getElementsByTagName(\"postOffice\").item(0).getTextContent());\n customer.setCountry(eElement.getElementsByTagName(\"country\").item(0).getTextContent());\n\n\n customer.setBonusCard(getBonusCardFromXml(eElement));\n\n con.disconnect();\n\n boolean found = false;\n\n for(int i = 0;i<customerList.size();i++){\n if(customer.getCustomerNo() == customerList.get(i).getCustomerNo()){\n found = true;\n return customerList.get(i);\n }\n }\n if(!found){\n customerList.add(customer);\n }\n\n return customer;\n\n } catch(IOException | ParserConfigurationException | SAXException e) {\n System.out.println(\"findCustomer failed\");\n return null;\n }\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// now retrieve/read from database using the primary key\n\t\tCustomer theCustomer = currentSession.get(Customer.class, theId);\n\n\t\treturn theCustomer;\n\t}", "public String getCustomerPhone() {\n return customerPhone;\n }", "@Override\n\tpublic Customer getCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now retrieve/read from database using the primary key or id..\n\t\tCustomer theCustomer = currentSession.get(Customer.class,theId);\n\n\t\treturn theCustomer;\n\t}", "@Override\n\tpublic Customer getCustomer(int customerId) {\n\t\tSession session=sessionFactory.getCurrentSession();\n\t\ttry {\n\t\t\t\n\t\t\tCustomer customer =session.get(Customer.class, customerId);\n\t\t return customer;\t\t\t\n\t\t}\n\t\tcatch(HibernateException exception){\n\t\t\texception.printStackTrace();\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "@Override\n\tpublic Customer findById(Long cust_id) throws Exception {\n\t\tList<Customer> lists = (List<Customer>) this.getHibernateTemplate().find(\"from Customer where cust_id = ?\",\n\t\t\t\tcust_id);\n\t\tgetHibernateTemplate().get(Customer.class, cust_id);\n\t\tif (lists.size() > 0) {\n\n\t\t\treturn lists.get(0);\n\t\t}\n\n\t\treturn null;\n\t}", "public CreditCard search(int donorID, String ccNumber) {\n for (Object creditCardObject : creditCardNumbers) {\n CreditCard creditCard = (CreditCard) creditCardObject;\n if (creditCard.getCreditCardId().equals(ccNumber) && creditCard.getDonorId()==donorID) {\n return creditCard;\n }\n }\n return null;\n }", "public static Customer FindCustomerById(String id) throws IllegalStateException\r\n\t{\r\n\t\treturn instance.findCustomerById(id);\r\n\t}", "Optional<DeliveryBoy> findByPhoneNumberIgnoreCase(String phoneNumber);", "@Override\n\t@Transactional\n\tpublic Customer getCustomerbyId(int theid) {\n\n\t\tCustomer thecustomer = hibernateTemplate.get(Customer.class, theid);\n\n\t\treturn thecustomer;\n\t}", "@Override\r\n\tpublic Users findByTelNum(String phone) {\n\t\treturn this.uMapper.selectBytelNum(phone);\r\n\t}", "public interface CustomerService {\n\n public void addCustomer(Customer customer);\n\n public Customer getCustomerById(int customerId);\n\n public List<Customer> getAllCustomers();\n\n Customer getCustomerByUsername(String username);\n}", "@RequestMapping( value = CONTEXT_URL + \"/id/{id}\",\n method = RequestMethod.GET,\n produces = {MediaType.APPLICATION_JSON_VALUE} )\n public CustomerDTO getCustomer( @PathVariable String id )\n throws CustomerNotFoundException\n {\n final String methodName = \"getCustomer\";\n logMethodBegin( methodName, id );\n CustomerDTO customerDTO = this.customerEntityService\n .getCustomerDTO( UUIDUtil.uuid( id ));\n logMethodEnd( methodName, customerDTO );\n return customerDTO;\n }", "@GetMapping(\"/customers/{customer_id}\")\n\tpublic Customer getcustomer(@PathVariable(\"customer_id\") int customerid) {\n\t\tCustomer thecustomer=thecustomerService.getCustomer(customerid);\n\t\tif(thecustomer==null) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id : \"+customerid+\" not found\");\n\t\t}\n\t\t\n\t\treturn thecustomer;\n\t}", "com.demo.springprotobuff.Demoproto.Student.PhoneNumber getPhone(int index);", "public static Customer getCustomer(int index)\n\t{\n\t\treturn customerList.get(customerSearch.get(index - 1));\n\t}", "public ICustomer getCustomer(final Customer customer) {\n ICustomer iCustomer = null;\n if(CustomerType.REGULAR.equals(customer.getCustomerType())) {\n iCustomer = new RegularCustomer();\n }\n return iCustomer;\n }" ]
[ "0.76571053", "0.6995612", "0.6476405", "0.6427697", "0.6414167", "0.62670803", "0.6261625", "0.6161979", "0.6121979", "0.6060057", "0.60405904", "0.6026121", "0.6015748", "0.58950305", "0.5890967", "0.58788526", "0.5860128", "0.57645893", "0.5741446", "0.5726386", "0.5722567", "0.57186365", "0.5712337", "0.5704523", "0.57005817", "0.5694126", "0.5688996", "0.56858027", "0.56819975", "0.5647605", "0.5644246", "0.5635549", "0.5613774", "0.5598935", "0.55928993", "0.5580475", "0.55794394", "0.557785", "0.5569128", "0.5563011", "0.55323005", "0.55291545", "0.55140746", "0.5510084", "0.55069184", "0.54953593", "0.548778", "0.5478702", "0.54775685", "0.5466164", "0.54526055", "0.5447727", "0.544562", "0.54445696", "0.54272246", "0.5415919", "0.5408923", "0.54054517", "0.53965116", "0.53908026", "0.53903985", "0.53730464", "0.5369215", "0.53620017", "0.5360863", "0.5358047", "0.53489816", "0.53462785", "0.53397894", "0.5338741", "0.532527", "0.532507", "0.5315249", "0.53152406", "0.5314112", "0.53096116", "0.53011435", "0.5298833", "0.5294381", "0.52911013", "0.5287538", "0.5286046", "0.52857214", "0.5279624", "0.52788734", "0.52785635", "0.5253446", "0.52458704", "0.5240192", "0.5238777", "0.52356267", "0.5230558", "0.522835", "0.52143615", "0.52061975", "0.5202886", "0.52006775", "0.5198531", "0.5196678", "0.51907986" ]
0.70604056
1
Made as a test method for the create order use case.
public boolean addCustomer(int phone, int discount, String name, String address, String group) { Customer customer = new Customer(phone,discount,name,address,group); return CustomerContainer.getInstance().addCustomer(customer); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void create(Order order);", "@Test(dependsOnMethods = \"checkSiteVersion\")\n public void createNewOrder() {\n actions.openRandomProduct();\n\n // save product parameters\n actions.saveProductParameters();\n\n // add product to Cart and validate product information in the Cart\n actions.addToCart();\n actions.goToCart();\n actions.validateProductInfo();\n\n // proceed to order creation, fill required information\n actions.proceedToOrderCreation();\n\n // place new order and validate order summary\n\n // check updated In Stock value\n }", "@Test\n\tpublic void createOrderTest() {\n\t\ttry {\n\t\t\tassertNull(salesOrderCtrl.getOrder());\n\t\t\tsalesOrderCtrl.createSalesOrder();\n\t\t\tassertNotNull(salesOrderCtrl.getOrder());\n\t\t} catch (Exception e) {\n\t\t\te.getMessage();\n\t\t}\n\t}", "@Test\n public void testAddOrder() {\n Order addedOrder = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Add Test\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n Order daoOrder = dao.getAllOrders().get(0);\n\n assertEquals(addedOrder, daoOrder);\n }", "@Test\n public void createOrder() {\n IngredientDTO ig1 = new IngredientDTO(\"Onion\",\"onion\",2L,null);\n\n IngredientDTO ig2 = new IngredientDTO(\"Chicken\",\"chicken\",2L,null);\n IngredientDTO ig3 = new IngredientDTO(\"Bacon\",\"chicken\",2L,null);\n\n OrderDataDTO orderDataDTO = new OrderDataDTO(TestDataProviders.NAME_1,TestDataProviders.STREET,TestDataProviders.ZIP_CODE,TestDataProviders.COUNTRY,TestDataProviders.TEST_EMAIL_1,DeliveryMethod.FASTEST);\n\n\n BurgerDTO burgerDTO = new BurgerDTO(new HashSet<>(Arrays.asList(ig1,ig2,ig3)),TestDataProviders.PRICE);\n OrderDTO inputDTO = new OrderDTO(null,burgerDTO,orderDataDTO,null,false);\n\n Optional<User> optionalUser = Optional.of(user);\n when(userRepository.findByUsername(any(String.class))).thenReturn(optionalUser);\n\n //when\n when(orderRepository.save(any(Order.class))).thenReturn(order);\n\n OrderDTO result = underTest.createOrder(inputDTO,\"user1\");\n\n verify(userRepository).findByUsername(anyString());\n assertEquals(inputDTO.getArchived(),result.getArchived());\n assertThat(result.getUserId(),is(1L));\n assertEquals(inputDTO.getBurger().getIngredients().size(),result.getBurger().getIngredients().size());\n// assertThat(result.getOrderData().getCountry(),TestDataProviders.COUNTRY);\n\n }", "@Test\n public void testOrderFactoryCreate() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n assertEquals(1, orderController.getOrders().size());\n }", "@Test (priority = 3)\n\t@Then(\"^Create Order$\")\n\tpublic void create_Order() throws Throwable {\n\t\tCommonFunctions.clickButton(\"wlnk_Home\", \"Sheet1\", \"Home\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLNK_OrderNewServices\", \"Sheet1\", \"Oreder New Service\", \"CLICK\");\n\t\t//Thread.sleep(3000);\n\t\tCommonFunctions.clickButton(\"WRD_complete\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Contine\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WCB_Additional\", \"Sheet1\", \"Additional\", \"CLICK\");\n\t\t//Thread.sleep(2000);\n\t\tCommonFunctions.clickButton(\"WLK_continue\", \"Sheet1\", \"Complete\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_checkout\", \"Sheet1\", \"Checkout\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_completeOrder\", \"Sheet1\", \"complete order\", \"CLICK\");\n\t\tCommonFunctions.clickButton(\"WBT_PayNow\", \"Sheet1\", \"Pay Now\", \"CLICK\");\n\t\tCommonFunctions.checkObjectExist(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"NO\");\n\t\tCommonFunctions.clickButton(\"WBT_PayPal\", \"Sheet1\", \"Pay pal\", \"CLICK\");\n\t}", "protected abstract Order createOrder(Cuisine cuisine);", "@Test\n public void testPopulateNewOrderInfo() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n Order order4 = service.populateNewOrderInfo(order3);\n\n assertEquals(\"Paul\", order4.getCustomerName());\n }", "@Test\n\tpublic void testOrder() {\n\t\t\n\t\tDateFormat df1 = new SimpleDateFormat(\"yyyy-MM-dd\");\t\t\n\t\tDate date = null;\n\t\ttry {\n\t\t\tdate = df1 .parse(\"2021-10-15\");\n\t\t} catch (ParseException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\tshoppingCart = new ShoppingCart();\n\t\tshoppingCart.setExpiry(date);\n\t\tshoppingCart.setUserId(11491);\n\t\tshoppingCart.setItems(shoppingCartSet);\n\t\t\n\t\torder.setId(1);\n\t\torder.setShoppingCart(shoppingCart);\n\t\t\n\t\ttry {\n\t\t\tassertEquals(orderService.order(order), 1);\n\t\t\t\n\t\t} catch (OrderException e) {\n\t\t\te.printStackTrace();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void createNewOrder()\n\t{\n\t\tnew DataBaseOperationAsyn().execute();\n\t}", "@Test\n public void testCreatePurchaseOrder() throws Exception {\n System.out.println(\"createPurchaseOrder\");\n Long factoryId = 1L;\n Long contractId = 2L;\n Double purchaseAmount = 4D;\n Long storeId = 2L;\n String destination = \"store\";\n Calendar deliveryDate = Calendar.getInstance();\n deliveryDate.set(2015, 0, 13);\n Boolean isManual = false;\n Boolean isToStore = true;\n PurchaseOrderEntity result = PurchaseOrderManagementModule.createPurchaseOrder(factoryId, contractId, purchaseAmount, storeId, destination, deliveryDate, isManual, isToStore);\n assertNotNull(result);\n }", "void newOrder();", "void createOrders(int orderNum) throws OrderBookOrderException;", "NewOrderResponse newOrder(NewOrder order);", "@Test\n public void addOrderTest() {\n Orders orders = new Orders();\n orders.addOrder(order);\n\n Order test = orders.orders.get(0);\n String[] itemTest = test.getItems();\n String[] priceTest = test.getPrices();\n\n assertEquals(items, itemTest);\n assertEquals(prices, priceTest);\n }", "@Test\n public void testOrderFactoryGetOrder() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n assertEquals(1, orderController.getOrders().size());\n assertEquals(STAFF_NAME, orderController.getOrder(1).getStaffName());\n assertEquals(1, orderController.getOrder(1).getTableId());\n assertEquals(3, orderController.getOrder(1).getOrderedMenuItems().get(menuFactory.getMenu().getMenuItem(1)));\n }", "OrderDTO create(OrderDTO orderDTO);", "@Test\n\tpublic void getOrderTest() {\n\t\tOrderDTO order = service.getOrder(2);\n\n\t\tassertEquals(3, order.getClientId());\n\t\tassertEquals(\"BT Group\", order.getInstrument().getName());\n\t\tassertEquals(\"BT\", order.getInstrument().getTicker());\n\t\tassertEquals(30.0, order.getPrice(), 1);\n\t\tassertEquals(500, order.getQuantity());\n\t\tassertEquals(OrderType.SELL, order.getType());\n\t}", "public void create(Order order) {\n order_dao.create(order);\n }", "Order placeNewOrder(Order order, Project project, User user);", "public Invoice createInvoice(Order order);", "@Test\n public void testOrderFactory() {\n assertNotNull(orderFactory);\n }", "void createOrder(List<Product> products, Customer customer);", "@Override\n public Order create(Order order) {\n this.orders.add(order);\n save();\n return order;\n }", "@Test\r\n public void testAddOrder() throws FlooringMasteryPersistenceException{\r\n firstTest = order1();\r\n secondTest = order2();\r\n\r\n assertEquals(firstTest, dao.getOrder(orderList, 1));\r\n\r\n assertEquals(secondTest, dao.getOrder(orderList, 2));\r\n\r\n }", "@Test\n public void testValidateNewOrderProduct() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n assertEquals(true, service.validateNewOrderProduct(order3));\n }", "@Test\n\tvoid testOnAddToOrder() {\n\t}", "@SuppressWarnings(\"static-access\")\r\n\t@Test\r\n\tpublic void crearOrdersTest() {\r\n\r\n\t\tpd.crearOrders();\r\n\t\tpd.pm.deletePersistent(pd.o1);\r\n\t\tpd.pm.deletePersistent(pd.o2);\r\n\t\tpd.pm.deletePersistent(pd.o3);\r\n\r\n\t}", "void prepareOrder(int orderId);", "public Map<String, String> createOrder(boolean debug) throws IOException {\n Map<String, String> map = new HashMap<>();\n OrdersCreateRequest request = new OrdersCreateRequest();\n request.prefer(\"return=representation\");\n request.requestBody(buildRequestBody());\n //3. Call PayPal to set up a transaction\n HttpResponse<Order> response = client().execute(request);\n System.out.println(\"Response: \" + response.toString());\n // if (true) {\n if (response.statusCode() == 201) {\n System.out.println(\"Status Code: \" + response.statusCode());\n System.out.println(\"Status: \" + response.result().status());\n System.out.println(\"Order ID: \" + response.result().id());\n System.out.println(\"Intent: \" + response.result().intent());\n System.out.println(\"Links: \");\n for (LinkDescription link : response.result().links()) {\n System.out.println(\"\\t\" + link.rel() + \": \" + link.href() + \"\\tCall Type: \" + link.method());\n }\n System.out.println(\"Total Amount: \" + response.result().purchaseUnits().get(0).amount().currencyCode()\n + \" \" + response.result().purchaseUnits().get(0).amount().value());\n\n\n map.put(\"statusCode\" , response.statusCode()+\"\");\n map.put(\"status\" , response.result().status());\n map.put(\"orderID\" , response.result().id());\n\n //return response.result().id();\n } else {\n System.out.println(\"Response: \" + response.toString());\n map.put(\"Reponse\",response.toString());\n //return response.toString();\n }\n\n return map;\n //}\n }", "@Override\n\tpublic boolean doCreate(Orders vo) throws Exception\n\t{\n\t\treturn false;\n\t}", "@Test\n @Order(4)\n void create_account_2() {\n Account empty = service.createAccount(client.getId());\n Assertions.assertEquals(client.getId(), empty.getClientId());\n Assertions.assertNotEquals(-1, empty.getId());\n Assertions.assertEquals(0, empty.getAmount());\n client.addAccount(empty);\n }", "public static Product[] createOrder()\n {\n Order order = new Order();\n Random r = new Random();\n int x;\n order.orderNumber++;\n int itemCount = 1 + r.nextInt(50);\n order.orderContents = new Product[itemCount];\n for (x = 0 ; x < itemCount; x++){\n Product item = productMaker.generateProduct();\n order.orderContents[x] = item;\n }\n\n return order.orderContents;\n\n }", "@Test\n @Transactional\n public void createOrderItem() throws Exception {\n assertThat(orderItemRepository.findAll()).hasSize(0);\n\n // Create the OrderItem\n restOrderItemMockMvc.perform(post(\"/api/orderItems\")\n .contentType(TestUtil.APPLICATION_JSON_UTF8)\n .content(TestUtil.convertObjectToJsonBytes(orderItem)))\n .andExpect(status().isCreated());\n\n // Validate the OrderItem in the database\n List<OrderItem> orderItems = orderItemRepository.findAll();\n assertThat(orderItems).hasSize(1);\n OrderItem testOrderItem = orderItems.iterator().next();\n assertThat(testOrderItem.getBudget_id()).isEqualTo(DEFAULT_BUDGET_ID);\n assertThat(testOrderItem.getBudgetItem_id()).isEqualTo(DEFAULT_BUDGET_ITEM_ID);\n assertThat(testOrderItem.getProductFeadute_id()).isEqualTo(DEFAULT_PRODUCT_FEADUTE_ID);\n assertThat(testOrderItem.getQuote_id()).isEqualTo(DEFAULT_QUOTE_ID);\n assertThat(testOrderItem.getQuoteItem_id()).isEqualTo(DEFAULT_QUOTE_ITEM_ID);\n assertThat(testOrderItem.getQuantity()).isEqualTo(DEFAULT_QUANTITY);\n assertThat(testOrderItem.getUnitPrice()).isEqualTo(DEFAULT_UNIT_PRICE);\n assertThat(testOrderItem.getUnitListPrice()).isEqualTo(DEFAULT_UNIT_LIST_PRICE);\n assertThat(testOrderItem.getUnitAverageCost()).isEqualTo(DEFAULT_UNIT_AVERAGE_COST);\n assertThat(testOrderItem.getEstimatedDeliveryDate().toDateTime(DateTimeZone.UTC)).isEqualTo(DEFAULT_ESTIMATED_DELIVERY_DATE);\n assertThat(testOrderItem.getItemDescription()).isEqualTo(DEFAULT_ITEM_DESCRIPTION);\n assertThat(testOrderItem.getCorrespondingPo_id()).isEqualTo(DEFAULT_CORRESPONDING_PO_ID);\n }", "@Test\n public void testAddOrder() {\n\n System.out.println(\"addOrder\");\n OrderOperations instance = new OrderOperations();\n int orderNumber = 1;\n String date = \"03251970\";\n String customerName = \"Barack\";\n String state = \"MI\";\n String productType = \"Wood\";\n double area = 700;\n ApplicationContext ctx = new ClassPathXmlApplicationContext(\"applicationContext.xml\");\n DAOInterface testInterface = (DAOInterface) ctx.getBean(\"testMode\");\n String productInfo, taxes;\n try {\n productInfo = testInterface.readFromDisk(\"productType.txt\");\n } catch (FileNotFoundException e) {\n productInfo = \"\";\n }\n\n try {\n taxes = testInterface.readFromDisk(\"taxes.txt\");\n } catch (FileNotFoundException e) {\n taxes = \"\";\n }\n instance.addOrder(customerName, date, state, productType, area, taxes, productInfo);\n assertEquals(instance.getOrderMap().containsKey(date), true);\n assertEquals(instance.getOrderMap().get(date).get(orderNumber).getCustomerName(), \"Barack\");\n\n }", "@Test\n public void testAddOrder() throws Exception {\n String stringDate1 = \"06272017\";\n LocalDate date = LocalDate.parse(stringDate1, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n Orders order1 = new Orders(2);\n order1.setOrderNumber(2);\n order1.setDate(date);\n order1.setCustomerName(\"Joel\");\n order1.setArea(new BigDecimal(\"250\"));\n Tax tax1 = new Tax(\"PA\");\n tax1.setState(\"PA\");\n order1.setTax(tax1);\n Product product1 = new Product(\"Wood\");\n product1.setProductType(\"Wood\");\n order1.setProduct(product1);\n service.addOrder(order1);\n\n assertEquals(new BigDecimal(\"4.75\"), service.getOrder(order1.getDate(), order1.getOrderNumber()).getProduct().getLaborCostPerSqFt());\n assertEquals(new BigDecimal(\"6.75\"), service.getOrder(order1.getDate(), order1.getOrderNumber()).getTax().getTaxRate());\n\n//Testing with invalid data\n Orders order2 = new Orders(2);\n order2.setOrderNumber(2);\n order2.setDate(date);\n order2.setCustomerName(\"Eric\");\n order2.setArea(new BigDecimal(\"250\"));\n Tax tax2 = new Tax(\"MN\");\n tax2.setState(\"MN\");\n order2.setTax(tax2);\n Product product = new Product(\"Carpet\");\n product.setProductType(\"Carpet\");\n order2.setProduct(product);\n try {\n service.addOrder(order2);\n fail(\"Expected exception was not thrown\");\n } catch (FlooringMasteryPersistenceException | InvalidProductAndStateException | InvalidProductException | InvalidStateException e) {\n }\n\n }", "public void create(Order order) {\n\t\torderDao.create(order);\n\t}", "private void generateAndSubmitOrder()\n {\n OrderSingle order = Factory.getInstance().createOrderSingle();\n order.setOrderType(OrderType.Limit);\n order.setPrice(BigDecimal.ONE);\n order.setQuantity(BigDecimal.TEN);\n order.setSide(Side.Buy);\n order.setInstrument(new Equity(\"METC\"));\n order.setTimeInForce(TimeInForce.GoodTillCancel);\n if(send(order)) {\n recordOrderID(order.getOrderID());\n }\n }", "@RequestMapping(value = \"/\", method = RequestMethod.POST)\n public ResponseEntity create(@RequestBody Order order)\n {\n throw new NotImplementedException();\n }", "@Test\n public void placeOrderTest() {\n Order body = new Order().id(10L)\n .petId(10L)\n .complete(false)\n .status(Order.StatusEnum.PLACED)\n .quantity(1);\n Order response = api.placeOrder(body);\n\n Assert.assertEquals(10L, response.getId().longValue());\n Assert.assertEquals(10L, response.getPetId().longValue());\n Assert.assertEquals(1, response.getQuantity().intValue());\n Assert.assertEquals(true, response.isComplete());\n Assert.assertEquals(Order.StatusEnum.APPROVED, response.getStatus());\n\n verify(exactly(1), postRequestedFor(urlEqualTo(\"/store/order\")));\n }", "@Test\n @Order(1)\n void create_client() {\n client = new Client();\n client.setName(\"Test Client\");\n Client c = service.createClient(client);\n Assertions.assertEquals(client.getName(), c.getName());\n Assertions.assertNotEquals(0, c.getId());\n client = c;\n }", "@POST(\"orders/new_order/\")\n Call<ApiStatus> createNewOrderByUser(@Body Order myOrder);", "public APIResponse placeOrder(@NotNull Order order){\n try {\n validateOrder(order);\n \n order.getItems().addAll(\n orderItemRepository.saveAll(order.getItems())\n );\n orderRepository.save( order );\n return APIResponse.builder()\n .success( true)\n .data( true )\n .error( null )\n .build();\n }catch (Exception exception){\n\n log.error(exception.getMessage());\n return APIResponse.builder()\n .success( true)\n .data( false )\n .error( exception.getMessage() )\n .build();\n }\n }", "@Override\r\n\tpublic Order create(Order order) {\r\n\t\ttry (Connection connection = JDBCUtils.getInstance().getConnection();\r\n\t\t\t\tStatement statement = connection.createStatement();) {\r\n\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders(customer_id) values(%d)\",\r\n\t\t\t\t\torder.getCustomer().getId()));\r\n\t\t\t\tHashMap<Item, Long> items = order.getItems();\r\n\t\t\t\tfor (Entry<Item, Long> entry : items.entrySet()) {\r\n\t\t\t\t\tstatement.executeUpdate(String.format(\"INSERT INTO orders_items(order_id, item_id, quantity) \"\r\n\t\t\t\t\t\t\t+ \"values(last_insert_id(), %d, %d)\", entry.getKey().getId(), entry.getValue()));\r\n\t\t\t\t}\r\n\t\t\treturn readLatest();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLOGGER.debug(e);\r\n\t\t\tLOGGER.error(e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public void saveOrder(Order order) {\n Client client = clientService.findBySecurityNumber(order.getClient().getSecurityNumber());\n Product product = productService.findByBarcode(order.getProduct().getBarcode());\n order.setClient(client);\n order.setProduct(product);\n if (isClientPresent(order) && isProductPresent(order)) {\n do {\n currencies = parseCurrencies();\n } while (currencies.isEmpty());\n\n generateTransactionDate(order);\n\n// Client client = ClientServiceImpl.getClientRepresentationMap().get(order.getClient());\n// Product product = ProductServiceImpl.getProductRepresentationMap().get(order.getProduct());\n convertPrice(order);\n orders.add(order);\n orderedClients.add(client);\n orderedProducts.add(product);\n }\n }", "@Test\n public void testGetAllOrders() {\n Order addedOrder = new Order();\n Order addedOrder2 = new Order();\n\n addedOrder.setOrderNumber(1);\n addedOrder.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder.setCustomer(\"Order One\");\n addedOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder.setArea(new BigDecimal(\"100.00\"));\n addedOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder);\n\n addedOrder2.setOrderNumber(2);\n addedOrder2.setOrderDate(LocalDate.parse(\"1900-01-01\"));\n addedOrder2.setCustomer(\"Order Two\");\n addedOrder2.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n addedOrder2.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n addedOrder2.setArea(new BigDecimal(\"100.00\"));\n addedOrder2.setMaterialCost(new BigDecimal(\"515.00\"));\n addedOrder2.setLaborCost(new BigDecimal(\"475.00\"));\n addedOrder2.setTaxCost(new BigDecimal(\"61.88\"));\n addedOrder2.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(addedOrder2);\n\n assertEquals(2, dao.getAllOrders().size());\n }", "@Test\n public void testSetOrderId() throws Exception {\n Order newOrder = new Order();\n newOrder.setOrderNumber(609);\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Wood\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n service.addOrder(newOrder);\n // addOrder(newOrder.getOrderNumber(), newOrder);\n\n Order otherOrder = new Order();\n otherOrder.setCustomerName(\"Mickey\");\n otherOrder.setState(\"PA\");\n otherOrder.setProductType(\"Wood\");\n otherOrder.setArea(new BigDecimal(\"560\"));\n\n service.setOrderId(otherOrder);\n\n Integer number = 610;\n\n Assert.assertEquals(otherOrder.getOrderNumber(), number);\n\n }", "@Override\n\tpublic OrderResponseDto createOrder(OrderRequestDto orderRequestDto) {\n\t\tLOGGER.info(\"Enter into order service impl\");\n\n\t\tOptional<Stocks> stock = stockRepository.findById(orderRequestDto.getStockId());\n\t\tOptional<User> user = userRepository.findById(orderRequestDto.getUserId());\n\n\t\tif (!stock.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_STOCK_NOT_FOUND);\n\t\tif (!user.isPresent())\n\t\t\tthrow new CommonException(TradingConstants.ERROR_USER_NOT_FOUND);\n\t\tif (orderRequestDto.getStockQuantity() >= 100)\n\t\t\tthrow new CommonException(TradingConstants.ERROR_QUANTITY);\n\t\tDouble brokeragePercent = Double.valueOf(stock.get().getBrokerageAmount() / 100d);\n\t\tDouble brokerageAmount = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokeragePercent;\n\t\tDouble totalPrice = stock.get().getStockPrice() * orderRequestDto.getStockQuantity() + brokerageAmount;\n\n\t\tOrders orders = Orders.builder().stockId(stock.get().getStockId())\n\t\t\t\t.stockQuantity(orderRequestDto.getStockQuantity()).totalPrice(totalPrice)\n\t\t\t\t.stockStatus(StockStatus.P.toString()).userId(orderRequestDto.getUserId()).build();\n\t\torderRepository.save(orders);\n\t\tResponseEntity<GlobalQuoteDto> latest = latestStockPrice(stock.get().getStockName());\n\t\treturn new OrderResponseDto(orders.getOrderId(), stock.get().getStockPrice(),\n\t\t\t\tlatest.getBody().getGlobalQuote().getPrice());\n\t}", "@Override\n @Transactional\n public OrderDTO createOrder(OrderDTO orderDTO) {\n\n String orderId = KeyUtil.genUniqueKey();\n BigDecimal orderAmount = new BigDecimal(BigInteger.ZERO);\n// List<CartDTO> cartDTOList = new ArrayList<>();\n //1.\n for (OrderDetail orderDetail : orderDTO.getOrderDetailList()) {\n ProductInfo productInfo = productInfoService.findOne(orderDetail.getProductId());\n if (productInfo == null) {\n throw new ProjectException(ResultEnum.PRODUCT_NOT_EXIST);\n }\n\n //2.\n orderAmount = productInfo.getProductPrice()\n .multiply(new BigDecimal(orderDetail.getProductQuantity()))\n .add(orderAmount);\n //3. orderDetail db insertion\n orderDetail.setDetailId(KeyUtil.genUniqueKey());\n orderDetail.setOrderId(orderId);\n BeanUtils.copyProperties(productInfo, orderDetail);\n orderDetailRepository.save(orderDetail);\n// CartDTO cartDTO = new CartDTO(orderDetail.getProductId(), orderDetail.getProductQuantity());\n// cartDTOList.add(cartDTO);\n }\n\n //3. orderMaster\n OrderMaster orderMaster = new OrderMaster();\n orderDTO.setOrderId(orderId);\n BeanUtils.copyProperties(orderDTO, orderMaster);\n orderMaster.setOrderAmount(orderAmount);\n orderMaster.setOrderStatus(OrderStatusEnum.NEW.getCode());\n orderMaster.setPayStatus(PayStatusEnum.WAIT.getCode());\n orderMasterRepository.save(orderMaster);\n\n //4.\n List<CartDTO> cartDTOList = orderDTO.getOrderDetailList().stream().map(e ->\n new CartDTO(e.getProductId(), e.getProductQuantity())\n ).collect(Collectors.toList());\n\n productInfoService.decreaseInventory(cartDTOList);\n\n return orderDTO;\n }", "@Test\n\tpublic void saveOrderLine() {\n\t\t// TODO: JUnit - Populate test inputs for operation: saveOrderLine \n\t\tOrderLine orderline_1 = new ecom.domain.OrderLine();\n\t\tservice.saveOrderLine(orderline_1);\n\t}", "public void createOrder() throws FlooringDaoException {\n boolean validData = true;\n do {\n try {\n Order newOrder = view.getNewOrderInfo();\n service.createOrder(newOrder);\n validData = true;\n } catch (InvalidDataException ex) {\n view.displayError(ex.getMessage());\n validData = false;\n } catch (NumberFormatException ex) {\n view.displayError(\"Area must consist of digits 0-9 with or without a decimal point.\");\n validData = false;\n }\n } while (!validData);\n }", "@Test\r\n\tpublic void testOrderPerform() {\n\t}", "@Test\n public void testValidateNewOrderState() throws Exception {\n\n Order order3 = new Order(\"003\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"Date_Folder_Orders/Orders_06232017.txt\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n assertEquals(true, service.validateNewOrderState(order3));\n }", "Order addOrder(String orderId, Order order) throws OrderBookOrderException;", "@Test\n public void testCreateOrderCalculations() throws Exception {\n\n service.loadFiles();\n \n\n Order newOrder = new Order();\n newOrder.setCustomerName(\"Jake\");\n newOrder.setState(\"OH\");\n newOrder.setProductType(\"Wood\");\n newOrder.setArea(new BigDecimal(\"233\"));\n\n service.calculateNewOrderDataInput(newOrder);\n\n Assert.assertEquals(newOrder.getMaterialCostTotal(), (new BigDecimal(\"1199.95\")));\n Assert.assertEquals(newOrder.getLaborCost(), (new BigDecimal(\"1106.75\")));\n Assert.assertEquals(newOrder.getTax(), (new BigDecimal(\"144.17\")));\n Assert.assertEquals(newOrder.getTotal(), (new BigDecimal(\"2450.87\")));\n\n }", "public Order() {\n }", "public Order(int _orderId){\n this.orderId = _orderId;\n }", "@Test\n public void test2_saveProductToOrder() {\n ProductDTO productDTO= new ProductDTO();\n productDTO.setSKU(UUID.randomUUID().toString());\n productDTO.setName(\"ORANGES\");\n productDTO.setPrice(new BigDecimal(40));\n productService.saveProduct(productDTO,\"test\");\n\n //get id from product and order\n long productId = productService.getIdForTest();\n long orderId = orderService.getIdForTest();\n\n OrderDetailDTO orderDetailDTO = new OrderDetailDTO();\n orderDetailDTO.setOrderId(orderId);\n orderDetailDTO.setProductId(productId);\n String res = orderService.saveProductToOrder(orderDetailDTO,\"test\");\n assertEquals(null,res);\n }", "@Test\n public void testEditExistingOrderGetOrderByIDAndDeleteOrder() throws FlooringMasteryDoesNotExistException, FlooringMasteryFilePersistenceException {\n\n Order order3 = new Order(\"002\");\n order3.setCustomerName(\"Paul\");\n order3.setState(\"Ky\");\n order3.setTaxRate(new BigDecimal(\"6.75\"));\n order3.setArea(new BigDecimal(\"5.00\"));\n order3.setOrderDate(\"2017-06-23\");\n order3.setProductName(\"tile\");\n order3.setMatCostSqFt(new BigDecimal(\"5.50\"));\n order3.setLaborCostSqFt(new BigDecimal(\"6.00\"));\n order3.setMatCost(new BigDecimal(\"50.00\"));\n order3.setLaborCost(new BigDecimal(\"500.00\"));\n order3.setOrderTax(new BigDecimal(\"50.00\"));\n order3.setTotalOrderCost(new BigDecimal(\"30000.00\"));\n\n Order originalOrder = service.getOrderByID(\"002\");\n assertEquals(\"Bree\", originalOrder.getCustomerName());\n\n Order orderToEdit = service.editExistingOrder(originalOrder.getOrderID(), order3, \"production\");\n \n assertEquals(\"Bree\", orderToEdit.getCustomerName());\n \n Order editedOrder = service.getOrderByID(\"002\");\n\n assertEquals(\"002\", editedOrder.getOrderID());\n assertEquals(\"Paul\", editedOrder.getCustomerName());\n \n Order deletedOrder = service.deleteOrder(service.getOrderByID(\"002\"), service.getConfig());\n assertEquals(\"Paul\", deletedOrder.getCustomerName());\n \n LocalDate ld = LocalDate.parse(\"2017-06-23\");\n List<Order> orderList = service.getOrdersByDate(ld);\n assertEquals(1, orderList.size());\n }", "public Order create(Order order) {\n\t\tthis.orderRepository.save(order);\n\t\tfor (Product product : order.getProducts()) {\n\t\t\tproduct.setOrder(order);\n\t\t\tthis.productService.create(product);\n\t\t}\n\t\treturn order;\n\t}", "public abstract void saveOrder(Order order);", "public static Order createOrder() {\n OrderFactory orderFactory;\n Cuisine cuisine = ORDERING_FACADE.askForCuisine(); // choosing cuisine\n Meal mealType = ORDERING_FACADE.askForMealType(); // choosing meal type\n if (mealType.equals(Meal.LUNCH)) { // setting factory for meal choosen\n orderFactory = LUNCH_FACTORY;\n \n } else {\n orderFactory = DRINK_FACTORY;\n \n }\n return orderFactory.createOrder(cuisine); // creating and returning concrete meal order\n }", "@Override\n\tpublic Order create(Order order) {\n\t\ttry (Connection connection = DBUtils.getInstance().getConnection();\n\t\t\t\tStatement statement = connection.createStatement();) {\n\t\t\tstatement.executeUpdate(\"INSERT INTO orders(customer_id) VALUES ('\" + order.getCustomer_id() + \"')\");\n\t\t\treturn readLatest();\n\t\t} catch (Exception e) {\n\t\t\tLOGGER.debug(e);\n\t\t\tLOGGER.error(e.getMessage());\n\t\t}\n\t\treturn null;\n\t}", "@Test\r\n @Rollback(true)\r\n public void testCreateOrder_ValidOrderRequest() {\r\n System.out.println(\"createOrder\");\r\n String referer = \"\";\r\n OrderRequest orderRequest = new OrderRequest();\r\n BindingResult result_2 = null;\r\n HttpSession session = new MockHttpSession();\r\n ShoppingCart cart = new ShoppingCart();\r\n session.setAttribute(LoginController.ACCOUNT_ATTRIBUTE, new Integer(1));\r\n session.setAttribute(ShoppingCartController.SHOPPING_CART_ATTRIBUTE_NAME, cart);\r\n String expResult = \"redirect:/myAccountView.htm\";\r\n String result = controller.createOrder(referer, orderRequest, result_2, session, redirect);\r\n assertEquals(expResult, result);\r\n assertNull(session.getAttribute(ShoppingCartController.SHOPPING_CART_ATTRIBUTE_NAME));\r\n }", "@Test\n public void testOrderFactoryInvoice() {\n OrderController orderController = orderFactory.getOrderController();\n // create a 2 seater table // default is vacant\n tableFactory.getTableController().addTable(2);\n // add a menu item to the menu\n menuFactory.getMenu().addMenuItem(MENU_NAME, MENU_PRICE, MENU_TYPE, MENU_DESCRIPTION);\n\n // order 3 of the menu item\n HashMap<MenuItem, Integer> orderItems = new HashMap<>();\n HashMap<SetItem, Integer> setOrderItems = new HashMap<>();\n orderItems.put(menuFactory.getMenu().getMenuItem(1), 3);\n\n // create the order\n orderController.addOrder(STAFF_NAME, 1, false, orderItems, setOrderItems);\n \n // create the invoice\n orderController.addOrderInvoice(orderController.getOrder(1));\n\n // check that the invoice is created\n assertEquals(1, orderController.getOrderInvoices().size());\n }", "@Test\r\n\tpublic void testAddPurchaseOrder() {\r\n\t\tassertNotNull(\"Test if there is valid purchase order list to add to\", purchaseOrder);\r\n\r\n\t\tpurchaseOrder.add(o1);\r\n\t\tassertEquals(\"Test that if the purchase order list size is 1\", 1, purchaseOrder.size());\r\n\r\n\t\tpurchaseOrder.add(o2);\r\n\t\tassertEquals(\"Test that if purchase order size is 2\", 2, purchaseOrder.size());\r\n\t}", "@Test\n public void createOrder(){\n String result = myService.createOrder(\"100100\", \"黄丹丹\");\n System.out.println(result);\n }", "public Order() {\n\t}", "static void addOrder(orders orders) {\n }", "@Test\n public void enterOrderWithMatchedActiveOrderToCreateTrade() throws Exception {\n List<LimitOrderRequest> orderRequests = new ArrayList<>();\n orderRequests.add(getLimitOrderRequest(Direction.BUY));\n orderRequests.add(getLimitOrderRequest(Direction.SELL));\n\n Trade tradeReference = Trade.builder()\n .matchPrice(orderRequests.get(0).getLimit())\n .matchQuantity(orderRequests.get(0).getQuantity())\n .ticker(orderRequests.get(0).getTicker())\n .buyOrder(1)\n .sellOrder(2)\n .build();\n\n //When: the orders are posted to the service\n for (LimitOrderRequest orderRequest : orderRequests) {\n String orderRequestJsonString = jsonMapper.writeValueAsString(orderRequest);\n performEnterOrderPostRequest(orderRequestJsonString);\n }\n\n MvcResult getResponse = mvc.perform(get(\"/status\")\n .contentType(MediaType.APPLICATION_JSON))\n .andReturn();\n\n PublicMarketStatus status = jsonMapper\n .readValue(getResponse.getResponse().getContentAsString(), PublicMarketStatus.class);\n\n //Then: the trade is shown correctly in the market and the orders disappear\n List<Ticker> tickers = status.getOrders();\n Assert.assertEquals(\"There is no ticker\", 0, tickers.size());\n\n List<Trade> trades = status.getTrades();\n Assert.assertEquals(\"There is a trade\", 1, trades.size());\n Trade trade = trades.get(0);\n Assert.assertEquals(\"Trade is correct one\", tradeReference, trade);\n\n }", "public void testWriteOrders() throws Exception {\n }", "@Test\n public void addOrderTest_sizeMin() {\n order.addOrder(1, 0);\n }", "@GetMapping(\"/createorders\")\n\tpublic void generateOrderRequest(){\n\t\tSystem.out.println(\" == generateOrderRequest == \");\n\t\tfor(int i=0;i<150;i++) {\n\t\t\t// create new order\n\t\t\tOrderRequest order = new OrderRequest();\n\t\t\torder.setOrderReqId(\n\t\t\t\t\tInteger.parseInt(new RandomStringGenerator.Builder().withinRange('1', '9').build().generate(5))\n\t\t\t\t\t);\n\t\t\torder.setName(new RandomStringGenerator.Builder().withinRange('a', 'z').build().generate(5));\n\t\t\t// create status row for this order\n\t\t\tOrderRequestStatus orderStatus = new OrderRequestStatus();\n\t\t\torderStatus.setStatus(\"new\");\n\t\t\torderStatus.setOrderRequest(order);\n\t\t\torderStateRepository.save(orderStatus);\n\t\t}\n\t}", "public void startOrder() {\r\n this.o= new Order();\r\n }", "public OrderItem() {}", "public LabOrder generateOrder() {\n LabOrder order = new LabOrder();\n Random r = new Random();\n Date date = getDate(r);\n order.insertts = date; //randbetween 1388534400 <-> 1420070400\n order.ordernr = \"O\" + r.nextInt();\n order.patientnr = \"P\" + r.nextInt(10000); //1 mil / 100 = 10 000\n order.visitNr = \"V\" + r.nextInt(); //unique;\n order.specimens.add(generateSpecimen(order));\n order.specimens.add(generateSpecimen(order));\n return order;\n }", "@Override\r\n\tpublic OrderItem createOrderItem(OrderItem newOrderItem) {\n\t\tSession session = SessionFactorySingleton.getSessionFactory().getFactorySession();\r\n\t\tsession.save(newOrderItem);\r\n\t\treturn newOrderItem;\r\n\r\n\t}", "@Override\n\tpublic boolean createOrderBill(OrderBill orderBill) {\n\t\treturn false;\n\t}", "Order getOrder();", "@Override\n\tpublic void createOrder(OrderDto orderDto) {\n\t\tModelMapper modelMapper = new ModelMapper();\n\t\t\n\t\tmodelMapper.getConfiguration().setMatchingStrategy(MatchingStrategies.STRICT);\n\t\t\n\t\tOrderEntity orderEntity = new OrderEntity();\n\t\t//\t\t= modelMapper.map(orderDto, OrderEntity.class);\n\t\t\n\t\t\n\t\torderEntity.setCustomerName(orderDto.getCustomer().getName());\n\t\torderEntity.setEmail(orderDto.getCustomer().getEmail());\n\t\torderEntity.setProductName(orderDto.getProduct().getName());\n\t\torderEntity.setDescription(orderDto.getProduct().getDescription());\n\t\torderEntity.setAmount(orderDto.getAmount());\n\t\torderEntity.setoId(orderDto.getoId());\n\t\torderRepository.save(orderEntity);\n\t\t\t\t\n\t}", "@RequestMapping(\"/createOrder\")\n public Order createOrder(@RequestParam(\"user_id\") int user_id){\n System.out.println(\"createOrder\");\n Order order = orderService.createOrder(user_id);\n\n return order;\n }", "Order sendNotificationNewOrder(Order order);", "@Test\n public void testWriteOrderData() throws Exception {\n dao.loadEnvironmentVariable();\n Order writeOrder = new Order();\n\n writeOrder.setOrderNumber(1);\n writeOrder.setOrderDate(LocalDate.parse(\"1901-01-01\"));\n writeOrder.setCustomer(\"Write Test\");\n writeOrder.setTax(new Tax(\"OH\", new BigDecimal(\"6.25\")));\n writeOrder.setProduct(new Product(\"Wood\", new BigDecimal(\"5.15\"), new BigDecimal(\"4.75\")));\n writeOrder.setArea(new BigDecimal(\"100.00\"));\n writeOrder.setMaterialCost(new BigDecimal(\"515.00\"));\n writeOrder.setLaborCost(new BigDecimal(\"475.00\"));\n writeOrder.setTaxCost(new BigDecimal(\"61.88\"));\n writeOrder.setTotal(new BigDecimal(\"1051.88\"));\n\n dao.addOrder(writeOrder);\n dao.writeOrderData();\n\n File orderFile = new File(System.getProperty(\"user.dir\") + \"/Orders_01011901.txt\");\n\n assertTrue(orderFile.exists());\n\n Files.deleteIfExists(Paths.get(System.getProperty(\"user.dir\") + \"/Orders_01011901.txt\"));\n\n }", "@Test\r\n public void customerService() {\r\n Customer customer;\r\n customerCrudService = (CustomerCrudService)ctx.getBean(\"customerCrudService\");\r\n \r\n Contact contact = ContactFactory.getContact(\"mphokazi@gmail.com\", \"0785566321\", \"0218897190\");\r\n Demography demo = DemographyFactory.getDemography(\"Female\", \"Black\", new Date(10/6/1986));\r\n \r\n BigDecimal sellingPrice = new BigDecimal(\"8.00\");\r\n BigDecimal broughtPrice = new BigDecimal(\"6.00\");\r\n BigDecimal profit = new BigDecimal(\"2.00\");\r\n ArrayList prices = new ArrayList<BigDecimal>();\r\n prices.add(sellingPrice);\r\n prices.add(broughtPrice);\r\n prices.add(profit);\r\n Item item = ItemFactory.getItem(\"PS\", prices);\r\n \r\n List items = new ArrayList<Item>();\r\n items.add(items);\r\n \r\n customer = new CustomerFactory\r\n .Builder(125)\r\n .CustomerName(\"Mphokazi\")\r\n .CustomerSurname(\"Mhlontlo\")\r\n .Contact(contact)\r\n .Demography(demo)\r\n .OrderItem(items)\r\n .build();\r\n \r\n customerCrudService.persist(customer);\r\n customerService = (CustomerServices)ctx.getBean(\"customerService\");\r\n List<OrderItem> orderItems = customerService.customerOrder(customer.getId());\r\n Assert.assertNotNull(orderItems);\r\n for (OrderItem orderItem : orderItems) {\r\n System.out.println(orderItem.getItem());\r\n \r\n \r\n } \r\n }", "@PostMapping\r\n\tpublic ResponseEntity< ResponseWrapper > createOrder( @RequestBody Order order, @RequestParam(\"uid\") Long userId )\r\n\t{\r\n\t\treturn orderService.createOrder( order, userId );\r\n\t}", "@Test\n void createOrderItemWithExistingId() throws Exception {\n orderItem.setId(1L);\n\n int databaseSizeBeforeCreate = orderItemRepository.findAll().collectList().block().size();\n\n // An entity with an existing ID cannot be created, so this API call must fail\n webTestClient\n .post()\n .uri(ENTITY_API_URL)\n .contentType(MediaType.APPLICATION_JSON)\n .bodyValue(TestUtil.convertObjectToJsonBytes(orderItem))\n .exchange()\n .expectStatus()\n .isBadRequest();\n\n // Validate the OrderItem in the database\n List<OrderItem> orderItemList = orderItemRepository.findAll().collectList().block();\n assertThat(orderItemList).hasSize(databaseSizeBeforeCreate);\n }", "public void setOrder(Order order){\n this.order = order;\n }", "public MOrder createTransferOrder(Integer newDocTypeID) throws Exception{\n\t\t// Crear el pedido idéntico\n\t\tMOrder newOrder = new MOrder(getCtx(), 0, get_TrxName());\n\t\tMOrder.copyValues(this, newOrder);\n\t\tnewOrder.setC_DocTypeTarget_ID(newDocTypeID);\n\t\tnewOrder.setC_DocType_ID(newDocTypeID);\n\t\t// Intercambiar el depósito y organización origen por destino \n\t\tnewOrder.setAD_Org_ID(getAD_Org_Transfer_ID());\n\t\tnewOrder.setAD_Org_Transfer_ID(getAD_Org_ID());\n\t\tnewOrder.setM_Warehouse_ID(getM_Warehouse_Transfer_ID());\n\t\tnewOrder.setM_Warehouse_Transfer_ID(getM_Warehouse_ID());\n\t\tnewOrder.setRef_Order_ID(getID());\n\t\tnewOrder.setDocStatus(DOCSTATUS_Drafted);\n\t\tnewOrder.setDocAction(DOCACTION_Complete);\n\t\tnewOrder.setProcessed(false);\n\t\t// Guardar\n\t\tif(!newOrder.save()){\n\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t}\n\t\t// Copiar las líneas\n\t\tMOrderLine newOrderLine;\n\t\tBigDecimal pendingQty;\n\t\tfor (MOrderLine orderLine : getLines(true)) {\n\t\t\tnewOrderLine = new MOrderLine(getCtx(), 0, get_TrxName());\n\t\t\tMOrderLine.copyValues(orderLine, newOrderLine);\n\t\t\tpendingQty = orderLine.getQtyOrdered().subtract(orderLine.getQtyDelivered());\n\t\t\t\n\t\t\tnewOrderLine.setC_Order_ID(newOrder.getID());\n\t\t\tnewOrderLine.setQty(pendingQty);\n\t\t\tnewOrderLine.setQtyReserved(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyInvoiced(pendingQty);\n\t\t\tnewOrderLine.setQtyDelivered(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setQtyTransferred(BigDecimal.ZERO);\n\t\t\tnewOrderLine.setPrice(orderLine.getPriceEntered());\n\t\t\tnewOrderLine.setRef_OrderLine_ID(orderLine.getID());\n\t\t\tnewOrderLine.setProcessed(false);\n\t\t\tnewOrderLine.setM_Warehouse_ID(newOrder.getM_Warehouse_ID());\n\t\t\tnewOrderLine.setAD_Org_ID(newOrder.getAD_Org_ID());\n\t\t\tif(!newOrderLine.save()){\n\t\t\t\tthrow new Exception(CLogger.retrieveErrorAsString());\n\t\t\t}\n\t\t}\n\t\treturn newOrder;\n\t}", "@ApiMethod(name = \"insertOrder\", httpMethod = ApiMethod.HttpMethod.PUT)\n public Order insertOrder(OrderPackage orderPackage) throws MOHException{\n\n Status status;\n EntityManager productManager = EMFProduct.get().createEntityManager();\n EntityManager userManager = EMFUser.get().createEntityManager();\n\n Order order= new Order(\"\");\n Identify identify = orderPackage.getIdentify();\n User user;\n\n EntityTransaction transaction = productManager.getTransaction();\n try {\n status = verifyIdentity(identify, userManager);\n if (status != Status.USER_ALREADY_EXISTS)\n throw new MOHException(status.getMessage(), status.getCode());\n identify = (Identify) status.getResponse();\n user = identify.getUser();\n\n\n List<Customer> customerList = orderPackage.getCustomerList();\n Set<User> users = new HashSet<>();\n List<CustomerOrder> customerOrderList = new ArrayList<>();\n\n order = orderPackage.getOrder();\n order.setCreation_date(new Date());\n\n //order.addOrderProduct(orderProductList);\n\n OrderStatus orderStatus = new OrderStatus(Constants.COrderStatus.PENDING_ORDER);\n orderStatus.setDate_order_status(new Date());\n orderStatus.setOrder_status(order);\n order.addOrderStatus(orderStatus);\n\n\n CustomerOrder customer = new CustomerOrder(Constants.CCustomerOrder.ACCEPTED_ORDER, Constants.CCustomerOrder.ADMIN_ROL);\n customer.setId_customer(orderPackage.getOwner().getId_customer());\n customer.setStatus_date(new Date());\n customerOrderList.add(customer);\n\n for (Customer c : customerList) {\n CustomerOrder customerOrder = new CustomerOrder(Constants.CCustomerOrder.PENDING_ORDER, Constants.CCustomerOrder.NORMAL_ROL);\n customerOrder.setStatus_date(new Date());\n customerOrder.setId_customer(c.getId_customer());\n customerOrderList.add(customerOrder);\n\n\n User user1 = userManager.find(User.class, c.getId_customer());\n logger.log(Level.INFO, \"Id \" + c.getId_customer() + \"was \" + (user1 == null ? \"null\" : \"success\"));\n if (user1 != null)\n users.add(user1);\n }\n\n order.addCustomerOrder(customerOrderList);\n\n transaction.begin();\n productManager.persist(order);\n productManager.flush();\n\n\n for (User u : users){\n if(u.getId_user()!=user.getId_user())\n for (RegistrationRecord r : u.getRecords()) {\n Formatter formatter = new Formatter();\n NotificationPackage notificationPackage = new NotificationPackage();\n HashMap<String, String> extras = new HashMap<>();\n extras.put(\"extra\", String.valueOf(order.getId_order()));\n notificationPackage.setExtras(extras);\n notificationPackage.setRegistrationRecord(r);\n try {\n String message = formatter.format(Constants.COrder.ORDER_INVITATION_MSG, user.getUser_name(),order.getOrder_name()).toString();\n new MessagingEndpoint().sendMessage(message, notificationPackage, Constants.CMessaging.ORDER_INVITATION_TOPIC);\n } catch (IOException e) {\n e.printStackTrace();\n logger.log(Level.WARNING, e.getMessage(), e.getCause());\n }\n\n }\n }\n\n transaction.commit();\n\n }\n finally {\n if(transaction.isActive())\n transaction.rollback();\n productManager.close();\n userManager.close();\n }\n\n logger.info(\"Calling insertOrder method\");\n return order;\n }", "public void testGetOrder() {\n }", "public void createWorkOrders() {\n Main.orderCount += 1;\n\n WorkOrder newOrder = new WorkOrder();\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Create a new Work Order:\");\n\n System.out.println(\"Enter description of work requested:\");\n\n newOrder.setDescription(scanner.nextLine());\n\n System.out.println(\"Enter your full name for our records:\");\n\n newOrder.setSenderName(scanner.nextLine());\n\n newOrder.setStatus(Status.INITIAL);\n\n newOrder.setId(Main.orderCount);\n\n //\n // mapper below\n //\n\n String workOrder = \"\";\n ObjectMapper mapper = new ObjectMapper();\n try {\n workOrder = mapper.writeValueAsString(newOrder);\n } catch (JsonProcessingException e) {\n e.printStackTrace();\n }\n String fileTitle = newOrder.getId() + \".json\";\n\n //\n // try catch block below for filewriting\n //\n\n try {\n File file = new File(fileTitle);\n FileWriter fileWriter = new FileWriter(file);\n fileWriter.write(workOrder);\n fileWriter.close();\n } catch (IOException ex) {\n ex.printStackTrace();\n }\n createWorkOrders();\n }", "int newOrder(OrderBean newOrder);", "public UserOrder() {\n }", "@Test\r\n\t@Order(2)\r\n\tpublic void testAddArticulo() {\r\n\t\tArticulo articulo1 = new Articulo(\"Camiseta\", 15.5);\r\n\r\n\t\tcarritoCompraService.addArticulo(articulo1);\r\n\r\n\t\tassertEquals(1, carritoCompraService.getArticulos().size());\r\n\t}", "@PostMapping(value = \"/insertorderdetails\")\r\n public OrderInfo insertDummyOrder(@RequestBody OrderInfo order) \r\n\t\r\n\t{\r\n\t\treturn new OrderService().addOrder(order); //calling the service\r\n }", "@Before\r\n\tpublic void setUp() throws Exception {\r\n\t\to = new Order(\"Customer 1\");\t\t\r\n\t\to.addProduct(new Product(\"p101\",\"Orange\",12,10));\r\n\t\to.addProduct(new Product(\"p102\",\"Banana\",4,5));\r\n\t\to.addProduct(new Product(\"p103\",\"Apple\",10,10));\r\n\t\to.addProduct(new Product(\"p104\",\"Lemons\",5,20));\r\n\t\to.addProduct(new Product(\"p105\",\"Peaches\",5,5));\r\n\t}", "@Test\n public void testEditOrder() throws Exception {\n String stringDate1 = \"10012017\";\n LocalDate date = LocalDate.parse(stringDate1, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n String stringDate2 = \"11052020\";\n LocalDate date2 = LocalDate.parse(stringDate2, DateTimeFormatter.ofPattern(\"MMddyyyy\"));\n\n Orders edittedOrder = new Orders(1);\n edittedOrder.setOrderNumber(1);\n edittedOrder.setDate(date2);\n edittedOrder.setCustomerName(\"Jenna\");\n edittedOrder.setArea(new BigDecimal(\"30\"));\n Tax tax = new Tax(\"PA\");\n tax.setState(\"PA\");\n edittedOrder.setTax(tax);\n Product product = new Product(\"Tile\");\n product.setProductType(\"Tile\");\n edittedOrder.setProduct(product);\n service.addOrder(edittedOrder);\n\n Orders oldOrder = service.getOrder(date, 1);\n service.editOrder(oldOrder, edittedOrder);\n\n// Testing order date and product change \n assertEquals(new BigDecimal(\"4.15\"), service.getOrder(edittedOrder.getDate(), edittedOrder.getOrderNumber()).getProduct().getLaborCostPerSqFt());\n assertEquals(new BigDecimal(\"6.75\"), service.getOrder(edittedOrder.getDate(), edittedOrder.getOrderNumber()).getTax().getTaxRate());\n\n try {\n// Testing if order was removed from previous the date after the edit method\n service.getOrder(date, 1).getProduct().getProductType();\n fail(\"Exception was expected\");\n } catch (Exception e) {\n return;\n }\n\n }", "@Test\n public void testOrderFactoryEmpty() {\n OrderController orderController = orderFactory.getOrderController();\n assertEquals(0, orderController.getOrders().size());\n }", "public void testRemoveOrder() {\n }", "@Test\n void whenOrderIdIsValid_thenReturnDelivery_findByOrderId(){\n Delivery delivery = deliveryService.getDeliveryByOrderId(1L);\n assertThat(delivery.getOrder_id()).isEqualTo(1L);\n }" ]
[ "0.8111436", "0.7608253", "0.75644404", "0.7419548", "0.7418578", "0.7388611", "0.73382914", "0.7301959", "0.7247998", "0.7246683", "0.72242874", "0.72211426", "0.72133005", "0.7204268", "0.7070552", "0.7033311", "0.7010919", "0.70105094", "0.7006937", "0.6993082", "0.6974389", "0.6951354", "0.6947663", "0.69425285", "0.69274074", "0.69095117", "0.6896572", "0.6886166", "0.6856062", "0.6852823", "0.68408436", "0.68402207", "0.68164366", "0.68087345", "0.67692614", "0.6739262", "0.67325366", "0.6715963", "0.6695053", "0.66877747", "0.66845113", "0.668154", "0.66799396", "0.66683835", "0.66651225", "0.6662474", "0.66527015", "0.6652589", "0.665131", "0.66424257", "0.66342896", "0.6630061", "0.6607726", "0.6600914", "0.65642625", "0.6564043", "0.65532273", "0.6544726", "0.6537883", "0.65186286", "0.6494829", "0.64803046", "0.64751214", "0.64725", "0.64709413", "0.64656734", "0.64627516", "0.6457215", "0.6455893", "0.64439684", "0.6440796", "0.6425356", "0.64220214", "0.64195335", "0.64019316", "0.6373347", "0.63696957", "0.63650715", "0.636187", "0.6361596", "0.6339805", "0.63197285", "0.63059276", "0.6305323", "0.630142", "0.6298496", "0.62763464", "0.62690043", "0.6268047", "0.62670153", "0.62669766", "0.62638235", "0.62629443", "0.6260996", "0.6249917", "0.624256", "0.6241314", "0.6229581", "0.6221936", "0.622008", "0.6219452" ]
0.0
-1
Finds and deletes customer based on phoneNumber.
public boolean deleteCustomerByPhone(int phone) { boolean result = false; Customer customer = getCustomer(phone); if (customer != null) { result = CustomerContainer.getInstance().deleteCustomer(customer); } return result; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void deleteCustomerById(int customerId);", "public Boolean removeCustomer() {\r\n boolean ok = false;\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\tif (f != null) {\r\n ok = my.remove(f);\r\n\t\t\t\r\n\t\t}\r\n\t\telse alert(\"Customer not found\\n\");\t\r\n return ok;\r\n\t}", "@GetMapping(\"delete/{phoneNumber}\")\n\tpublic ServiceResponse<GenricResponse> deleteByPhoneNumber(@PathVariable String phoneNumber) {\n\t\treturn contactService.deleteContactByPhoneNumber(phoneNumber);\n\n\t}", "public boolean deleteCustomer(String custId);", "public void delete(String custNo) {\n\t\tcstCustomerDao.update(custNo);\n\t\t\n\t}", "void deleteCustomerById(Long id);", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "public Customer searchCustomerByPhone() {\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\treturn f;\r\n\t}", "void deleteAccountByCustomer(String customerId, String accountNumber) throws AccountException, CustomerException;", "public void deletePerson() {\n\t\tSystem.out.println(\"*****Delete the record*****\");\n\t\tSystem.out.println(\" \");\n\t\tSystem.out.println(\"Enter phone number for deletion : \");\n\t\tlong PhoneDelete = sc.nextLong();\n\t\tfor (int i = 0; i < details.length; i++) {\n\t\t\tif (details[i] != null && details[i].getPhoneNo() == PhoneDelete) {\n\t\t\t\tdetails[i] = null;\n\t\t\t\tSystem.out.println(\"Record deleted successfully\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t}", "Optional<Customer> findByPhoneNumber(Long number);", "public void deleteCustomer(Customer customer){\n _db.delete(\"Customer\", \"customer_name = ?\", new String[]{customer.getName()});\n }", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Phone phone) {\n\t\t\n\t}", "BrainTreeCustomerResult removeCustomer(BrainTreeCustomerRequest request);", "public int delete(String phone){\n SQLiteDatabase sqLiteDatabase = this.getWritableDatabase();\n int delete = sqLiteDatabase.delete(TABLE_NAME, \" phone = ? \", new String[]{phone});\n return delete;\n\n // sqLiteDatabase.execSQL(sql);\n }", "void delete(Customer customer);", "@Override\n\tpublic void delete(CelPhone celphone) {\n\t\t\n\t}", "public void deleteOneForCustomer(Customer customer, int todoListNum) {\n TodoList todoList = todoListDao.findByCustomerAndNum(customer, todoListNum);\n todoListDao.deleteById(todoList.getId());\n computeTodoListNum(customer);\n }", "public void deletecustomer(long id) {\n\t\t customerdb.deleteById(id);\n\t }", "boolean delete(CustomerOrder customerOrder);", "public void deleteCustomerbyId(int i) {\n\t\tObjectSet result = db.queryByExample(new Customer(i, null, null, null, null, null));\n\n\t\twhile (result.hasNext()) {\n\t\t\tdb.delete(result.next());\n\t\t}\n\t\tSystem.out.println(\"\\nEsborrat el customer \" + i);\n\t}", "void removeCustomer(String code) throws CustomerCodeNotExistsException;", "@Override\n\tpublic void delete() {\n\t\tSystem.out.println(\"Mobile Customer delete()\");\n\t}", "public void DeleteCust(String id);", "@DeleteMapping()\n public Customer deleteCustomer(@RequestBody Customer customer ) {\n customerRepository.delete(customer);\n return customerRepository.findById(customer.getId()).isPresent() ? customer : null;\n }", "@Test\n\tpublic void deleteCustomer() {\n\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tint originalLength = customerController.read().size();\n\n\t\t// When\n\t\tICustomer cus = customerController.delete(id);\n\n\t\t// Then\n\t\tint expected = originalLength - 1;\n\t\tint actual = customerController.read().size();\n\t\tAssert.assertEquals(expected, actual);\n\t\tAssert.assertNotNull(cus);\n\t}", "@Test\n public void deleteCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"dominick.dechristofaro@gmail.com\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Delete the Customer from the database\n service.removeCustomer(customer.getCustomerId());\n\n // Test the deleteCustomer() method\n verify(customerDao, times(1)).deleteCustomer(integerArgumentCaptor.getValue());\n assertEquals(customer.getCustomerId(), integerArgumentCaptor.getValue().intValue());\n }", "void removeCustomer(Customer customer);", "int deleteAllPhonesForPerson(int personId);", "void deleteCustomerDDPayById(int id);", "public void delete(Customer customer) {\n\t\tcustRepo.delete(customer);\n\t}", "int deleteByPrimaryKey(String deviceNo);", "@Override\n\tpublic void deleteCustomer(Long custId) {\n\t\tcustomerRepository.deleteById(custId);\n\t\t\n\t}", "private void deletePhone() {\n //Determines whether the phone entry was created or not\n if (mCurrentPhoneUri != null) {\n //String selection = PhoneEntry._ID + \"=?\";\n //String[] selectionArgs = new String[]{String.valueOf(PhoneEntry._ID)};\n\n int rowsDeleted = getContentResolver().delete(mCurrentPhoneUri, null, null);\n //Show if deleting the phone entry was successful or failed\n if (rowsDeleted == 0) {\n Toast.makeText(this,\"Error with deleting the phone entry\",Toast.LENGTH_SHORT).show();\n }\n else {\n Toast.makeText(this,\"Deleting the phone entry was successful\",Toast.LENGTH_SHORT).show();\n }\n }\n finish();\n }", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void delete(Customer customer) {\n\t\t\n\t}", "int deleteByPrimaryKey(PersonRegisterDo record);", "@Override\n\tpublic void removeCustomer(Customer customer) throws Exception {\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName() == null)\n\t\t\tthrow new Exception(\"No Such customer Exists.\");\n\t\t\n\t\tif(custCheck.getCustName().equalsIgnoreCase(customer.getCustName()) && customer.getId() == custCheck.getId()) {\n\t\t\ttry {\n\t\t\t\t\tStatement st = con.createStatement();\n\t\t\t\t\tString remove = String.format(\"delete from customer where id in('%d')\", \n\t\t\t\t\t\tcustomer.getId());\n\t\t\t\t\tst.executeUpdate(remove);\n\t\t\t\t\tSystem.out.println(\"Customer removed successfully\");\n\t\t\t} catch (SQLException e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB\");\n\t\t\t}finally {\n\t\t\t\ttry {\n\t\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "int deleteByPrimaryKey(String number);", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n\t\treturn false;\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete object with primary key\n\t\tQuery theQuery = \n\t\t\t\tcurrentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\t\t\n\t}", "@DeleteMapping(\"/customer/id/{id}\")\r\n\tpublic Customer deleteCustomerbyId(@PathVariable(\"id\") int customerId) {\r\n\tif(custService.deleteCustomerbyId(customerId)==null) {\r\n\t\t\tthrow new CustomerNotFoundException(\"Customer not found with this id\" +customerId);\r\n\t\t}\r\n\t\treturn custService.deleteCustomerbyId(customerId);\r\n\t}", "public void delContact() \n\t{\n\t\tSystem.out.printf(\"%n--[ Delete Contact ]--%n\");\n\t\tScanner s = new Scanner(System.in);\n\t\tshowContactIndex();\n\t\tSystem.out.printf(\"%nClient Number: \");\n\t\tint index = s.nextInt();\n\t\tthis.contacts.remove(index - 1);\n\t\tshowContactIndex();\n\t}", "public List<Customer> findByPhone(String p) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE phone = ?\");\n ppst.setString(1, p);\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// delete object with primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\n\t\ttheQuery.executeUpdate();\n\t}", "@Override\r\n\tpublic boolean deleteCustomer(int customerID) {\n\t\treturn false;\r\n\t}", "@Override\n\tpublic int deleteCustomerReprieve(Integer id) {\n\t\treturn customerDao.deleteCustomerReprieve(id);\n\t}", "int deleteByPrimaryKey(String taxregcode);", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\t// delete the object with the primary key\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\t\ttheQuery.setParameter(\"customerId\", theId);\n\t\t\n\t\ttheQuery.executeUpdate();\n\t}", "void deleteCustomerOrderBroadbandASIDById(int id);", "@Override\r\n\tpublic boolean deletePostPaidAccount(int customerID, long mobileNo) {\n\t\treturn false;\r\n\t}", "public void deleteContract(int number){\n\t\tjdbcTemplate.update(\"DELETE FROM CONTRACT WHERE NUMBER = ?\", number);\n\t}", "@Override\n\tpublic boolean deleteCustomer(int customerId) {\n Session session =sessionFactory.getCurrentSession();\n Customer customer= getCustomer(customerId);\n session.delete(customer);\n\t\treturn true;\n\t}", "@DeleteMapping(\"/{id}\")\n public Boolean deleteCustomer(@PathVariable(\"id\") Long customerId) {\n return true;\n }", "void createCustomerAccount(String mobileNumber) throws Exception;", "public static void deleteAddressSQL(Connection conn, String customerName, \r\n String address, String address2, String city, String country, \r\n String postalCode, String phone) throws SQLException { \r\n \r\n String deleteStatement = \"DELETE FROM address WHERE address = ? AND \"\r\n + \"address2 = ?\";\r\n \r\n //create prepared statement object\r\n setPreparedStatement(conn, deleteStatement);\r\n \r\n //get prepared statement reference\r\n PreparedStatement ps = getPreparedStatement(); \r\n \r\n //key-value mapping\r\n ps.setString(1, address);\r\n ps.setString(2, address2);\r\n \r\n //execute prepared statement\r\n ps.execute();\r\n\r\n //affected rows\r\n rowsAffected(); \r\n }", "private void deleteCustomerById(HttpServletRequest request, HttpServletResponse response) throws ServletException, IOException {\n int idCustomer = Integer.parseInt(request.getParameter(\"id\"));\n CustomerDao.deleteCustomer(idCustomer);\n response.sendRedirect(\"/\");\n }", "public void deleteContact(Address address){\n Address address2 = SearchContact(address.getFirstName(),address.getLastName());\r\n if (address2 != null) {\r\n contact.remove(address2);\r\n }\r\n else {\r\n System.out.println(\"Does not exist\");\r\n }\r\n }", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\n\t}", "public void removeCustomer(){\n String message = \"Choose one of the Customer to remove it\";\n if (printData.checkAndPrintCustomer(message)){\n subChoice = GetChoiceFromUser.getSubChoice(data.numberOfCustomer());\n if (subChoice!=0){\n data.removeCustomer(data.getCustomer(subChoice-1),data.getBranch(data.getBranchEmployee(ID).getBranchID()));\n System.out.println(\"Customer has removed Successfully!\");\n }\n }\n }", "public void delete(Customer customer) throws CustomerNotFoundException {\r\n customer = this.entityManager.merge(customer);\r\n this.entityManager.remove(customer);\r\n }", "@RequestMapping(value = \"/customer/{id}\",method=RequestMethod.DELETE)\n @ResponseStatus(HttpStatus.NO_CONTENT)\n public void removeCustomer(@PathVariable(\"id\") int id){\n //simply remove the customer using the id. If it does not exist, nothing will happen anyways\n service.removeCustomer(id);\n }", "void deleteById(String accountNumber) throws AccountException;", "int deleteByPrimaryKey(String contractNo);", "int deleteByPrimaryKey(String smsId);", "@DeleteMapping(\"/customers/{customerId}\")\n public String deleteCustomer(@PathVariable int customerId) {\n CustomerHibernate customerHibernate = customerService.findById(customerId);\n\n if (customerHibernate == null) {\n throw new RuntimeException(\"Customer id not found - \" + customerId);\n }\n customerService.deleteById(customerId);\n\n return String.format(\"Deleted customer id - %s \", customerId);\n }", "@Override\r\n\tpublic void removeCustomer() {\n\t\t\r\n\t}", "@Test\n public void testDeleteCustomer() {\n System.out.println(\"deleteCustomer\");\n String name = \"Gert Hansen\";\n String address = \"Grønnegade 12\";\n String phone = \"98352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(name, address, phone);\n instance.deleteCustomer(customerID);\n Customer result = instance.getCustomer(customerID);\n assertNull(result);\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "Customer getCustomerByCustomerName(String code) throws CustomerCodeNotExistsException;", "@Override\r\n\tpublic Customer removeCustomer(String custId) {\r\n\r\n\t\tOptional<Customer> optionalCustomer = customerRepository.findById(custId);\r\n\t\tCustomer customer = null;\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer = optionalCustomer.get();\r\n\t\t\tcustomerRepository.deleteById(custId);\r\n\t\t\treturn customer;\r\n\t\t} else {\r\n\t\t\tthrow new EntityDeletionException(\"Customer With Id \" + custId + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "public void delete(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"DELETE FROM customer WHERE customer_key = ?\");\n ppst.setInt(1, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Successfully deleted.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Delete error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@RequestMapping(method = RequestMethod.DELETE, value = \"/{id}\")\n\t public ResponseEntity<?> deleteCustomer(@PathVariable(\"id\") Long id, @RequestBody Customer customer) {\n\t \treturn service.deleteCustomer(id, customer);\n\t }", "@Override\n\tpublic void deleteByMobileId(int mobileId) {\n\t\tfor (int i = 0; i < dto.length; i++) {\n\t\t\tint id = dto[i].getMobileId();\n\t\t\tif (id == mobileId) {\n\t\t\t\tSystem.out.println(\"condition is true \");\n\t\t\t\tSystem.out.println(dto[i]);\n\t\t\t\tdto[i] = null;\n\t\t\t\tSystem.out.println(\"data deleted \");\n\t\t\t}\n\n\t\t}\n\t\tfor(int i=0;i<dto.length;i++) {\n\t\t\tSystem.out.println(dto[i]);\n\t\t}\n\t}", "public void deleteVehicle(String number) {\n SQLiteDatabase db = this.getWritableDatabase();\n // delete user record by id\n db.delete(TABLE_VEHICLE, COLUMN_VEHICLE_NUMBER + \" = ?\",\n new String[]{number});\n db.close();\n }", "@Override\n\tpublic void deleteCoustomer(Customer customer) throws Exception {\n\t\tgetHibernateTemplate().delete(customer);\n\t}", "public boolean removeCustomer(int deleteId) {\n\t\tCallableStatement stmt = null;\n\t\tboolean flag = true;\n\t\tCustomer ck= findCustomer(deleteId);\n\t\tif(ck==null){\n\t\t\tSystem.out.println(\"Cutomer ID not present in inventory.\");\n\t\t\treturn false;\n\t\t}\n\t\t\t\n\t\telse\n\t\t{\n\t\t\tString query = \"{call deleteCustomer(?)}\";\n\t\t\ttry {\n\t\t\t\tstmt = con.prepareCall(query);\n\t\t\t\tstmt.setInt(1, deleteId);\n\t\t\t\tflag=stmt.execute();\n\t\t\t\t//System.out.println(flag);\n\t\t\t} catch (SQLException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\tSystem.out.println(\"Error in database operation. Try agian!!\");\n\t\t\t\t//e.printStackTrace();\n\t\t\t}\n\t\t\t\n\t\t\treturn flag;\n\t\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic void delete(Customer o) {\n\n\t\tif (o.getId() == null) {\n\t\t\treturn;\n\t\t}\n\n\t\tString deleteQuery = \"DELETE FROM TB_customer WHERE \" + COLUMN_NAME_ID + \"=\" + o.getId();\n\n\t\ttry (Statement deleteStatement = dbCon.createStatement()) {\n\t\t\tdeleteStatement.execute(deleteQuery);\n\t\t} catch (SQLException s) {\n\t\t\tSystem.out.println(\"Delete of customer \" + o.getId() + \" falied : \" + s.getMessage());\n\t\t}\n\t}", "@Override\n\t@Transactional\n\tpublic void deleteCustomer(int theId) {\n\t\tcustomerDAO.deleteCustomer(theId);\n\t}", "public void deletePhoneDetails(Address address)\n\t{\n\t\tConnection conn = null;\n\t\tPreparedStatement stmt = null;\n\t\t \n\t\ttry\n\t\t{\n\t\t\t conn = ConnectionObj.getConnection();\n\t\t stmt = conn.prepareStatement(\"DELETE FROM phone_number_info \"\n\t\t \t\t+ \" WHERE person_id=?\");\n\t\t \n\t\t stmt.setInt(1, Integer.parseInt(address.getPersonId()));\n\t\t \n\t\t stmt.executeUpdate();\n\t\t\t\n\t\t}\n\t\tcatch(Exception e )\n\t\t{\n\t\t\tSystem.out.println(\"Problem in Updating Phone Data \");\n\t\t\te.printStackTrace();\n\t\t}\n\t\tfinally {\n\t\t\tif(conn!=null)\n\t\t\t\ttry {\n\t\t\t\t\tconn.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\tif(stmt!=null)\n\t\t\t\ttry {\n\t\t\t\t\tstmt.close();\n\t\t\t\t} catch (SQLException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t}\n\t}", "public String deleteContactPerson() {\n this.contactPersonService.deleteBy(this.id);\n return SUCCESS;\n }", "int deleteByPrimaryKey(String num);", "int deleteByPrimaryKey(String num);", "@Test\r\n\tpublic void deleteTeamCustomerByManagerCustFk() {\r\n\t\t// TODO: JUnit - Populate test inputs for operation: deleteTeamCustomerByManagerCustFk \r\n\t\tInteger team_teamId_2 = 0;\r\n\t\tInteger related_customerbymanagercustfk_customerId = 0;\r\n\t\tTeam response = null;\r\n\t\tresponse = service.deleteTeamCustomerByManagerCustFk(team_teamId_2, related_customerbymanagercustfk_customerId);\r\n\t\t// TODO: JUnit - Add assertions to test outputs of operation: deleteTeamCustomerByManagerCustFk\r\n\t}", "Verification findByPhoneNumber(String phoneNumber);", "public void deleteCustomer(Customer customer) {\n\n\t\tcustomers.remove(customer);\n\n\t\tString sql = \"UPDATE customer SET active = 0 WHERE customerId = ?\";\n\n\t\ttry ( Connection conn = DriverManager.getConnection(URL, USER_NAME, PASSWORD);\n\t\t\t\tPreparedStatement prepstmt = conn.prepareStatement(sql); ) {\n\n\t\t\tint customerId = Customer.getCustomerId(customer);\n\t\t\tprepstmt.setInt(1, customerId);\n\t\t\tprepstmt.executeUpdate();\n\n\t\t} catch (SQLException e){\n\t\t\tSystem.out.println(\"SQLException: \" + e.getMessage());\n\t\t\tSystem.out.println(\"SQLState: \" + e.getSQLState());\n\t\t\tSystem.out.println(\"VendorError: \" + e.getErrorCode());\n\t\t}\n\t}", "@Override\r\n\tpublic void delete(String cust_ID) {\n\t\tConnection con = null;\r\n\t\tPreparedStatement pstmt = null;\r\n\r\n\t\ttry {\r\n\t\t\tcon = ds.getConnection();\r\n\t\t\tpstmt = con.prepareStatement(DELETE);\r\n\r\n\t\t\tpstmt.setString(1, cust_ID);\r\n\r\n\t\t\tpstmt.executeUpdate();\r\n\t\t} catch (SQLException se) {\r\n\t\t\tthrow new RuntimeException(\"A database error occured.\" + se.getMessage());\r\n\t\t} finally {\r\n\t\t\tif (pstmt != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tpstmt.close();\r\n\t\t\t\t} catch (SQLException se) {\r\n\t\t\t\t\tse.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (con != null) {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tcon.close();\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\te.printStackTrace(System.err);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "@Override\n public void deleteCustomer(UUID id) {\n log.debug(\"Customer has been deleted: \"+id);\n }", "@ApiOperation(value = \"Delete a customer\", notes = \"\")\n @DeleteMapping(value = {\"/{customerId}\"}, produces = MediaType.APPLICATION_JSON_VALUE)\n @ResponseStatus(HttpStatus.OK)\n public void deleteCustomer(@PathVariable Long customerId) {\n\n customerService.deleteCustomerById(customerId);\n\n }", "public boolean deleteCustomer(int id, int customerID)\n throws RemoteException, DeadlockException;", "@Override\n\tpublic List<CustomerAddressDto> queryConsignee(String mobilePhone) {\n\t\treturn null;\n\t}", "@DeleteMapping(\"/customers/{customer_id}\")\n\tpublic String deletecustomer(@PathVariable(\"customer_id\") int customerid ) {\n\t\t\n\t\t//first check if there is a customer with that id, if not there then throw our exception to be handled by @ControllerAdvice\n\t\tCustomer thecustomer=thecustomerService.getCustomer(customerid);\n\t\tif(thecustomer==null) {\n\t\t\tthrow new CustomerNotFoundException(\"Customer with id : \"+customerid+\" not found\");\n\t\t}\n\t\t//if it is happy path(customer found) then go ahead and delete the customer\n\t\tthecustomerService.deleteCustomer(customerid);\n\t\treturn \"Deleted Customer with id: \"+customerid;\n\t}", "@Override\n\tpublic void deleteCustomer(int theId) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t//now delete the customer using parameter theId i.e., Customer id (primary key)\n\t\t//HQL query\n\t\tQuery theQuery = currentSession.createQuery(\"delete from Customer where id=:customerId\");\n\n\t\t//prev parameter theId is assigned to customerId\n\t\ttheQuery.setParameter(\"customerId\",theId);\n\n\t\t//this works with update, delete , so on ...\n\t\ttheQuery.executeUpdate();\n\n\t}", "public boolean deleteCustomer() {\n\t\treturn false;\r\n\t}", "@Test\n\t// @Disabled\n\tvoid testDeleteCustomer() {\n\t\tCustomer customer = new Customer(1, \"tommy\", \"cruise\", \"951771122\", \"tom@gmail.com\");\n\t\tMockito.when(custRep.findById(1)).thenReturn(Optional.of(customer));\n\t\tcustRep.deleteById(1);\n\t\tCustomer persistedCust = custService.deleteCustomerbyId(1);\n\t\tassertEquals(1, persistedCust.getCustomerId());\n\t\tassertEquals(\"tommy\", persistedCust.getFirstName());\n\n\t}", "@Test\n public void testCustomerFactoryRemove() {\n CustomerController customerController = customerFactory.getCustomerController();\n customerController.addCustomer(CUSTOMER_NAME, CUSTOMER_CONTACT, false);\n customerController.removeCustomer(CUSTOMER_NAME,1);\n assertEquals(0, customerController.getCustomerList().size());\n }", "public void deleteRemarks(String fromPhone, String toPhone) {\n\t\tParentDao.deleteRemarks(fromPhone,toPhone);\r\n\t\t\r\n\t}", "public abstract void delete(CustomerOrder customerOrder);", "public boolean add(String firstName, String lastName, String email, String phoneNumber) {\n Customer c = new Customer(firstName, lastName, email, phoneNumber);\n return customerCrudInterface.add(c);\n\n }", "@Override\n\tpublic void deleteOne(Customer c) {\n\t\tthis.getHibernateTemplate().delete(c);\n\t}" ]
[ "0.6866522", "0.6821376", "0.67638206", "0.66644996", "0.66607594", "0.6641864", "0.6499939", "0.6491124", "0.6418119", "0.63661706", "0.6289225", "0.6287617", "0.6282496", "0.6282496", "0.6250397", "0.6219057", "0.62162817", "0.62114644", "0.6188457", "0.6169849", "0.61343485", "0.6129532", "0.6117397", "0.60868907", "0.60801584", "0.60786957", "0.60544306", "0.601526", "0.6002929", "0.598907", "0.5930218", "0.5918705", "0.5894529", "0.58585775", "0.5850167", "0.58324903", "0.58324903", "0.58201396", "0.5814486", "0.5810627", "0.57804585", "0.5765565", "0.5764859", "0.57615674", "0.57580405", "0.57499856", "0.5747622", "0.5733125", "0.5728543", "0.57234156", "0.57214904", "0.57124984", "0.57058984", "0.5690703", "0.56775594", "0.5675769", "0.56480324", "0.5643596", "0.56384546", "0.5637742", "0.5626458", "0.56238097", "0.5616783", "0.5616153", "0.5611307", "0.5610886", "0.5610252", "0.5604883", "0.56033206", "0.5574096", "0.55696225", "0.55483687", "0.55476534", "0.55418503", "0.5538126", "0.55272776", "0.5526022", "0.5523365", "0.55190647", "0.55066234", "0.5500944", "0.5500926", "0.5500926", "0.54958946", "0.54923016", "0.54883546", "0.54876524", "0.54835117", "0.54728776", "0.545896", "0.54556566", "0.5451116", "0.5445591", "0.54428965", "0.54415035", "0.5436915", "0.5426181", "0.5425458", "0.5424617", "0.5420618" ]
0.69481266
0
Finds customer based on phone and updates the information inside it.
public void updateCustomer(int phone, int discount, String name, String address, String group, int originalNumber) { Customer customer = getCustomer(originalNumber); customer.setPhone(phone); customer.setDiscount(discount); customer.setName(name); customer.setAddress(address); customer.setGroup(group); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Customer searchCustomerByPhone() {\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\treturn f;\r\n\t}", "void updateCustomerById(Customer customer);", "@PutMapping(\"/customerupdate\")\n\tpublic void update(@RequestBody Customer theCustomer) {\n\t\t// checking whether the customer exists or not\n\t\tCustomer customerExists = customerServices.findByID(theCustomer.getMobile_number());\n\n\t\tif (customerExists != null) {\n\t\t\tcustomerServices.save(theCustomer);\n\t\t} else {\n\t\t\tthrow new RuntimeException(\"Customer with customer id - \" + theCustomer + \" not exists\");\n\t\t}\n\t}", "public static void update(Customer aCustomer) throws NotFoundException\r\n\t{\n\t\tphoneNumber = aCustomer.getPhoneNo();\r\n\t\tname = aCustomer.getName();\r\n\t\taddress = aCustomer.getAddress();\r\n\r\n\t\t// define the SQL query statement using the phone number key\r\n\t\tString sqlUpdate = \"Update CustomerTable \" +\r\n\t\t\t\t\t\t\t\t \" SET CustomerName = '\" + name +\"', \" +\r\n\t\t\t\t\t\t\t\t \" address = '\" + address +\"' \" +\r\n\t\t\t\t\t\t\t\t \" WHERE PhoneNo = '\" + phoneNumber + \"'\";\r\n\r\n\t\t// see if this customer exists in the database\r\n\t\t// NotFoundException is thrown by find method\r\n\t\ttry\r\n\t\t{\r\n\t\t\tCustomer c = Customer.find(phoneNumber);\r\n \t\t// if found, execute the SQL update statement\r\n \t\tint result = aStatement.executeUpdate(sqlUpdate);\r\n \t}\r\n\t\tcatch (SQLException e)\r\n\t\t\t{ System.out.println(e);\t}\r\n\t}", "public Customer getCustomer(int phone)\n\t{\n\t\treturn CustomerContainer.getInstance().getCustomer(phone);\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}", "Customer getCustomerByMobileNumber(String mobileNumber) throws EOTException;", "@Override\n public void setPhone(java.lang.String phone) {\n _entityCustomer.setPhone(phone);\n }", "@Test\n\tpublic void updateCustomer() {\n\t\t// Given\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tlong id = customer.getId();\n\n\t\t// When\n\t\tICustomer cus = customerController.update(id, name, address, telephoneNumber);\n\n\t\t// Then\n\t\tAssert.assertEquals(name, cus.getName());\n\t\tAssert.assertEquals(address, cus.getAddress());\n\t\tAssert.assertEquals(telephoneNumber, cus.getTelephoneNumber());\n\t\tAssert.assertEquals(id, cus.getId());\n\t}", "public void lookupCustomer(String customerId) {\r\n customer = transaction.getCustomerInfo(customerId);\r\n }", "public int updateCustomer(Customer customer) {\n return model.updateCustomer(customer); \n }", "public void update(Customer customer) {\n\n\t}", "public void updateCustomer(String id) {\n\t\t\n\t}", "public void setExistingCustomer(Customer existingCustomer) { this.existingCustomer = existingCustomer; }", "public static void updateCustomer(int customerID, String name, String address, String firstDivision, String postalCode, String phoneNumber) throws SQLException{\r\n\r\n //connection and prepared statement set up\r\n Connection conn = DBConnection.getConnection();\r\n String insertStatement = \"UPDATE customers SET Customer_Name = ?, Address = ?, Postal_Code = ?, Phone = ?, Last_Update = ?, Last_Updated_By = ?, Division_ID = ? WHERE Customer_ID = ?;\";\r\n DBQuery.setPreparedStatement(conn, insertStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n int divisionID = getDivisionID(firstDivision);\r\n String userName = DBUsers.getUser();\r\n\r\n ps.setString(1,name);\r\n ps.setString(2, address);\r\n ps.setString(3,postalCode);\r\n ps.setString(4,phoneNumber);\r\n ps.setTimestamp(5, Timestamp.valueOf(LocalDateTime.now()));\r\n ps.setString(6,userName);\r\n ps.setInt(7,divisionID);\r\n ps.setInt(8, customerID);\r\n\r\n ps.execute();\r\n\r\n if(ps.getUpdateCount() > 0) {\r\n System.out.println(ps.getUpdateCount() + \" row(s) effected\");\r\n }\r\n else {\r\n System.out.println(\"no change\");\r\n }\r\n }", "@GET\n\t@Path(\"UpdateCustomer\")\n\tpublic Reply UpdateCustomer(@QueryParam(\"id\") int id, @QueryParam(\"companyname\") String companyname,\n\t\t\t@QueryParam(\"companynumber\") String companynumber, @QueryParam(\"contactname\") String contactname,\n\t\t\t@QueryParam(\"email\") String email, @QueryParam(\"phone\") String phone, @QueryParam(\"user\") int user) {\n\t\treturn ManagerHelper.getCustomerManager().UpdateCustomer(id, companyname, companynumber, contactname, email,\n\t\t\t\tphone, user);\n\t}", "public boolean updateCustomer(String customerJSON);", "@Override\n\tpublic Uni<Customer> updateCustomer(Customer customer) {\n\t\tFunction<Customer, Uni<? extends Customer>> update = entity -> {\n\t\t\tentity.setName(customer.getName());\n\t\t\tentity.setAddress(customer.getAddress());\n\t\t\treturn repo.flush().onItem().transform(ignore -> entity);\n\t\t};\n\t\treturn repo.findById(customer.getId()).onItem().ifNotNull().transformToUni(update);\n\t}", "@Override\n public String provideCustomerMobilePhone( )\n {\n return _signaleur.getIdTelephone( );\n }", "@Override\n\tpublic void updateCustomer(Customer customer) throws Exception{\n\t\tConnection con = pool.getConnection();\n\t\tCustomer custCheck = getCustomer(customer.getId());\n\t\tif(custCheck.getCustName()== null)\n\t\t\treturn;\n\t\t\t//throws Exception no customer found in DB\n\n\t\ttry {\n\t\t\tStatement st = con.createStatement();\n\t\t\tString update = String.format(\"update customer set CUST_NAME=('%s') where id in ('%d')\" +\n\t\t\t\" update customer set PASSWORD=('%s')\"\n\t\t\t\t\t+ \" where id in('%d')\",\n\t\t\t\t\tcustomer.getCustName(),\n\t\t\t\t\tcustomer.getId(),\n\t\t\t\t\tcustomer.getPassword(),\n\t\t\t\t\tcustomer.getId());\n\t\t\t\n\t\t\tst.executeUpdate(update);\n\t\t\tSystem.out.println(\"Customer updated successfully\");\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \"Unable to update A customer, Try Again! \");\n\t\t} finally {\n\t\t\tpool.returnConnection(con);\n\t\t}\n\n\t}", "@Test\n public void testUpdatePhone() {\n System.out.println(\"updatePhone\");\n String phone = \"85352010\";\n CustomerCtr instance = new CustomerCtr();\n int customerID = instance.createCustomer(\"Gert Hansen\", \"Grønnegade 12\", \"85352010\");\n instance.updatePhone(customerID, phone);\n assertEquals(\"85352010\", instance.getCustomer(customerID).getPhone());\n // TODO review the generated test code and remove the default call to fail.\n// fail(\"The test case is a prototype.\");\n }", "public Customer createOrUpdateCustomer(final Customer customer) {\n checkNotNull(customer);\n\n String key = CustomerDbClient.computeKey(customer.getPhone(), customer.getName());\n Customer existing = dbClient.getById(key);\n if (existing == null) {\n return dbClient.putAndUpdateTimestamp(customer.toBuilder().setId(key).build());\n }\n\n List<Address> newAddresses = customer.getAddressesList()\n .stream()\n .filter(t -> !existing.getAddressesList().contains(t))\n .collect(Collectors.toList());\n\n Customer toUpdate = existing.toBuilder()\n .clearAddresses()\n .addAllAddresses(newAddresses) // The new address will be the default one.\n .addAllAddresses(existing.getAddressesList())\n .setDefaultAddressIndex(0)\n .build();\n\n return dbClient.putAndUpdateTimestamp(toUpdate);\n }", "Optional<Customer> findByPhoneNumber(Long number);", "int updateByPrimaryKey(OcCustContract record);", "@Override\r\n\tpublic void saveCustomer(CRMDto theCustomer) {\n\t\t\r\n\t\tSession session = factory.openSession();\r\n\t\tTransaction tx = session.beginTransaction();\r\n\t\tsession.update(theCustomer);\r\n\t\ttx.commit();\r\n\t\t//System.out.println(\"pk update is \" +pk);\r\n\t\t\r\n\t\t\r\n\t}", "public ResponseEntity<?> updateCustomerById(Long id, customer.controller.Customer customer);", "@Override\n\tpublic Customer update(long customerId, Customer customer) {\n\t\treturn null;\n\t}", "public void editCustomer(Customer c) {\n\t\tconnector.editCustomer(c);\n\t\t\n\t\t// Edit entries in table \"Nummern\"\n\t\tconnector.editNumbers(c, c.getNumbers());\n\t\t\n\t\tupdateCustomers();\n\t}", "@Override\n public void updateCustomer(UUID customerId, @RequestBody Customer customer) {\n log.debug(\"Updating a customer to service...\");\n }", "CustomerDto updateCustomer(CustomerDto customerDto);", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "@Override\n\tpublic void update(Customer customer) {\n\t\t\n\t}", "private void fillExistingCustomer() {\n idField.setText(String.valueOf(existingCustomer.getCustomerID()));\n nameField.setText(existingCustomer.getCustomerName());\n String[] splitAddress = existingCustomer.getAddress().split(\", \");\n addressField.setText(splitAddress[0]);\n if ( splitAddress.length > 1 ) {\n cityField.setText(splitAddress[1]);\n }\n postalField.setText(existingCustomer.getPostalCode());\n phoneField.setText(existingCustomer.getPhone());\n\n FirstLevelDivision division = getDivisionByID(existingCustomer.getDivisionID());\n divisionComboBox.getSelectionModel().select(division);\n countryComboBox.getSelectionModel().select(getCountryByID(division.getCountryID()));\n }", "int updateByPrimaryKey(SdkPhone record);", "@Override\n\tpublic Customers update(Customers updatecust) {\n\t\tCustomers custpersist= search(updatecust.getId());\n\t\tif (custpersist==null)\n\t\t{\n\t\t\treturn null;\n\t\t}\n\t\tCustomers upcust = CustRepo.save(updatecust);\n\t\treturn upcust;\n\t}", "public List<Customer> findByPhone(String p) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE phone = ?\");\n ppst.setString(1, p);\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "@Override\n\tpublic UserVO searchPhone(String phone) throws Exception {\n\t\treturn dao.searchPhone(phone);\n\t}", "@Override\r\n\tpublic Customer updateCustomer(Customer customer) {\r\n\t\tOptional<Customer> optionalCustomer = null;\r\n\t\tCustomer customer2 = null;\r\n\t\toptionalCustomer = customerRepository.findById(customer.getUserId());\r\n\t\tif (optionalCustomer.isPresent()) {\r\n\t\t\tcustomer2 = customerRepository.save(customer);\r\n\t\t\treturn customer2;\r\n\t\t} else {\r\n\t\t\tthrow new EntityUpdationException(\"Customer With Id \" + customer.getUserId() + \" does Not Exist.\");\r\n\t\t}\r\n\r\n\t}", "@Override\n\tpublic List<CustomerAddressDto> queryConsignee(String mobilePhone) {\n\t\treturn null;\n\t}", "public void update(Customer myCust){\n }", "Customer getCustomerById(final Long id);", "private void updateCustomer(HttpServletRequest request, HttpServletResponse response) throws IOException {\n int id = Integer.parseInt(request.getParameter(\"id\"));\n String name = request.getParameter(\"name\");\n String phone = request.getParameter(\"phone\");\n String email = request.getParameter(\"email\");\n Customer updateCustomer = new Customer(id, name, phone, email);\n CustomerDao.addCustomer(updateCustomer);\n response.sendRedirect(\"list\");\n\n }", "public void setCustomer(String customer) {\n this.customer = customer;\n }", "public void editCustomer() {\n int id = this.id;\n PersonInfo personInfo = dbHendler.getCustInfo(id);\n String name = personInfo.getName().toString().trim();\n String no = personInfo.getPhoneNumber().toString().trim();\n float custNo = personInfo.get_rootNo();\n String cUSTnO = String.valueOf(custNo);\n int fees = personInfo.get_fees();\n String fEES = Integer.toString(fees);\n int balance = personInfo.get_balance();\n String bALANCE = Integer.toString(balance);\n String nName = personInfo.get_nName().toString().trim();\n String startdate = personInfo.get_startdate();\n int areaID = personInfo.get_area();\n String area = dbHendler.getAreaName(areaID);\n person_name.setText(name);\n contact_no.setText(no);\n rootNo.setText(cUSTnO);\n monthly_fees.setText(fEES);\n balance_.setText(bALANCE);\n nickName.setText(nName);\n this.startdate.setText(startdate);\n // retrieving the index of element u\n int retval = items.indexOf(area);\n\n spinner.setSelection(retval);\n }", "public int updateCustomer(Map customerMap, Map allData){\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "CustomerOrder update(CustomerOrder customerOrder);", "public void update(Customer c){\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n try {\n ppst = conn.prepareCall(\"UPDATE customer SET name = ?, id = ?, phone = ? WHERE customer_key = ?\");\n ppst.setString(1, c.getName());\n ppst.setString(2, c.getId());\n ppst.setString(3, c.getPhone());\n ppst.setInt(4, c.getCustomerKey());\n ppst.executeUpdate();\n System.out.println(\"Updated successfully.\");\n } catch (SQLException e) {\n throw new RuntimeException(\"Update error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst);\n }\n }", "@Override\n\tpublic Customer update(Customer o) {\n\n\t\tif (o == null || o.getId() == null) {\n\t\t\treturn null;\n\t\t}\n\n\t\tString updateQuery = String.format(\"UPDATE TB_customer SET \");\n\t\tupdateQuery += COLUMN_NAME_FIRST_NAME + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_LAST_NAME + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_EMAIL + \"= ? ,\";\n\t\tupdateQuery += COLUMN_NAME_KNICKNAME + \"= ?,\";\n\t\tupdateQuery += COLUMN_NAME_BIRTHDATE + \"= ?,\";\n\t\tupdateQuery += COLUMN_NAME_CREDITS + \"= ?\";\n\t\tupdateQuery += \" WHERE \" + COLUMN_NAME_ID + \"= ? ;\";\n\n\t\ttry (PreparedStatement pS = dbCon.prepareStatement(updateQuery)) {\n\n\t\t\tpS.setString(1, o.getFirstName());\n\t\t\tpS.setString(2, o.getLastName());\n\t\t\tpS.setString(3, o.getEmail());\n\t\t\tpS.setString(4, o.getKnickname());\n\t\t\tpS.setDate(5, java.sql.Date.valueOf(o.getBirthdate()));\n\t\t\tpS.setDouble(6, o.getCredits());\n\t\t\tpS.setInt(7, o.getId());\n\t\t\tpS.executeUpdate();\n\n\t\t\tpS.close();\n\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"Update of tb_customer \" + o.getId() + \" failed : \" + e.getMessage());\n\t\t\treturn null;\n\t\t}\n\n\t\treturn o;\n\t}", "public void setCustomer(String Cus){\n\n this.customer = Cus;\n }", "Customer getCustomerById(int customerId);", "public void updateContact() {\r\n\t\tSystem.out.println(\"enter the name of the contact whose details are to be updated\");\r\n\t\tString name = scanner.nextLine();\r\n\t\tContact existing = service.getContact(name); //get the existing contact details from service<-dao\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"1. keep the same address\\n2. update the address\");\r\n\t\tint choice = Integer.parseInt(scanner.nextLine());\r\n\t\tString address;\r\n\t\tif(choice==1) {\r\n\t\t\taddress=existing.getAddress();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new address\");\r\n\t\t\taddress = scanner.nextLine();\r\n\t\t}\r\n\t\t\r\n\t\t//mobile number updation\r\n\t\tSystem.out.println(\"1. keep the same mobile number(s)\\n2. add new mobile number\\n3.remove existing added number\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString mobileNumber[];\r\n\t\t\r\n\t\t//if the user wants to keep same mobile number(s)\r\n\t\tif(choice==1) {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t}\r\n\t\t\r\n\t\t//if the user wants to add a new mobile number to already existing \r\n\t\telse if(choice==2) {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t\tList<String> numberList = new ArrayList<>(Arrays.asList(mobileNumber));\r\n\t\t\tSystem.out.println(\"enter new mobile number\");\r\n\t\t\tString newNumber = scanner.nextLine();\r\n\t\t\tif(numberList.contains(newNumber)) {\r\n\t\t\t\tSystem.out.println(\"the number is already a part of this contact\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumberList.add(newNumber);\r\n\t\t\t}\r\n\t\t\tmobileNumber=numberList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t//if the user wants to remove some number from existing numbers\r\n\t\telse {\r\n\t\t\tmobileNumber=existing.getMobileNumber();\r\n\t\t\tList<String> numberList = new ArrayList<>(Arrays.asList(mobileNumber));\r\n\t\t\tSystem.out.println(\"enter mobile number to remove\");\r\n\t\t\tString removingNumber = scanner.nextLine();\r\n\t\t\tif(!numberList.contains(removingNumber)) {\r\n\t\t\t\tSystem.out.println(\"no such mobile number exist\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\tnumberList.remove(removingNumber);\r\n\t\t\t}\r\n\t\t\tmobileNumber=numberList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the profile picture\r\n\t\tSystem.out.println(\"1. keep the same image\\n2. update the image\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString imageReference;\r\n\t\tif(choice==1) {\r\n\t\t\timageReference=existing.getImageReference();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new image path\");\r\n\t\t\timageReference = scanner.nextLine();\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the date of birth\r\n\t\tSystem.out.println(\"1. keep the same date of birth\\n2. update the date of birth\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tLocalDate dateOfBirth;\r\n\t\tif(choice==1) {\r\n\t\t\tdateOfBirth=existing.getDateOfBirth();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new date of birth\");\r\n\t\t\tdateOfBirth = LocalDate.parse(scanner.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t//updating the email - same logic as that of updating mobile number\r\n\t\tSystem.out.println(\"1. keep the same email Id(s)\\n2. add new email Id\\n3.remove existing email Id\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tString email[];\r\n\t\tif(choice==1) {\r\n\t\t\temail=existing.getEmail();\r\n\t\t}\r\n\t\telse if(choice==2) {\r\n\t\t\temail=existing.getEmail();\r\n\t\t\tList<String> emailList = new ArrayList<>(Arrays.asList(email));\r\n\t\t\tSystem.out.println(\"enter new email Id\");\r\n\t\t\tString newEmail = scanner.nextLine();\r\n\t\t\tif(emailList.contains(newEmail)) {\r\n\t\t\t\tSystem.out.println(\"the email is already a part of this contact\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\temailList.add(newEmail);\r\n\t\t\t}\r\n\t\t\temail=emailList.toArray(new String[0]);\r\n\t\t}\r\n\t\telse {\r\n\t\t\temail=existing.getEmail();\r\n\t\t\tList<String> emailList = new ArrayList<>(Arrays.asList(email));\r\n\t\t\tSystem.out.println(\"enter email to remove\");\r\n\t\t\tString removingEmail = scanner.nextLine();\r\n\t\t\tif(!emailList.contains(removingEmail)) {\r\n\t\t\t\tSystem.out.println(\"no such email exist\");\r\n\t\t\t}\r\n\t\t\telse {\r\n\t\t\t\temailList.remove(removingEmail);\r\n\t\t\t}\r\n\t\t\temail=emailList.toArray(new String[0]);\r\n\t\t}\r\n\t\t\r\n\t\t\r\n\t\t//updating the group id \r\n\t\tSystem.out.println(\"1. keep the same group Id\\n2. update the group Id\");\r\n\t\tchoice = Integer.parseInt(scanner.nextLine());\r\n\t\tint groupId;\r\n\t\tif(choice==1) {\r\n\t\t\tgroupId = existing.getGroupId();\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"enter new group Id\");\r\n\t\t\tshowGroups(service); \t\t\t\t\t//this is static method which shows the available groups\r\n\t\t\tgroupId = Integer.parseInt(scanner.nextLine());\r\n\t\t}\r\n\t\t\r\n\t\t//setting up the contact object \r\n\t\tContact updated = new Contact(name, address, mobileNumber, imageReference, dateOfBirth, email, groupId);\r\n\t\t\r\n\t\t//calling the service update method which calls the DAO to update the contact\r\n\t\tint rowsEffected = service.updateExistingContact(existing, updated);\r\n\t\tSystem.out.println(rowsEffected+\" row(s) updated\");\r\n\t\t\r\n\t}", "@Override\n public void updateCustomer(UUID id, CustomerDto customer) {\n log.debug(\"Customer is updated: customerId: \"+id);\n }", "@Override\n\tpublic List<PersonTelInfo> findByPhone(String phone) {\n\t\treturn getSqlSession().selectList(getIbatisMapperNameSpace() + \".findByPhone\", phone);\t \n\t}", "public static void updatePersonDetails(int customerId, Database d) {\r\n\r\n\r\n\t\tCustomer oldCustomer = d.getCustomer(customerId);\r\n\t\tCustomer newCustomer = oldCustomer;\r\n\r\n\t\tboolean update = true;\r\n\t\tboolean[] updatecheck = new boolean[6];\r\n\t\tfor (int c = 0; c < 6; c++) {\r\n\r\n\t\t\tupdatecheck[c] = false;\r\n\r\n\t\t}\r\n\r\n\t\twhile (update) {\r\n\r\n\t\t\tSystem.out.println(\"Your current personal details are: \" + oldCustomer.name + \" , \" + oldCustomer.address\r\n\t\t\t\t\t+ \" , \" + oldCustomer.phone + \" , \" + oldCustomer.sex + \" , \" + oldCustomer.dob);\r\n\t\t\tSystem.out.println(\r\n\t\t\t\t\t\"Press a number to change a value: name (1), address (2), phone(3), sex (4), dob(5), pin(6)\");\r\n\t\t\tSystem.out.println(\"To exit the updating sesson press 0.\");\r\n\t\t\tString input = inputScanner.next();\r\n\t\t\tString newvalue = \"\";\r\n\r\n\t\t\t// stops the updating process\r\n\t\t\tif (input.equals(\"0\")) {\r\n\t\t\t\tupdate = false;\r\n\t\t\t\tSystem.out.println(\"Updating stopped, changes are saved.\");\r\n\t\t\t// changes the customers name\r\n\t\t\t} else if (input.equals(\"1\")) {\r\n\t\t\t\tSystem.out.println(\"Insert new value!\");\r\n\t\t\t\twhile (updatecheck[1] == false) {\r\n\t\t\t\t\tnewvalue = (String) inputScanner.next();\r\n\t\t\t\t\tif (newvalue.length() >= 3 && newvalue.length() < 25) {\r\n\t\t\t\t\t\tnewCustomer.name = newvalue;\r\n\t\t\t\t\t\tupdatecheck[0] = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"Please enter a name between 3 and 25 charakters.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t// changes the customers address\r\n\t\t\t} else if (input.equals(\"2\")) {\r\n\t\t\t\tSystem.out.println(\"Insert new value!\");\r\n\t\t\t\twhile (updatecheck[1] == false) {\r\n\t\t\t\t\tnewvalue = (String) inputScanner.next();\r\n\t\t\t\t\tif (newvalue.length() >= 5 && newvalue.length() < 40) {\r\n\t\t\t\t\t\tnewCustomer.address = newvalue;\r\n\t\t\t\t\t\tupdatecheck[1] = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"Please enter a name between 5 and 40 charakters.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t// changes the customers phonenumber\t\r\n\t\t\t} else if (input.equals(\"3\")) {\r\n\t\t\t\tSystem.out.println(\"Insert new value!\");\r\n\t\t\t\twhile (updatecheck[2] == false) {\r\n\t\t\t\t\tnewvalue = (String) inputScanner.next();\r\n\t\t\t\t\tif (newvalue.length() >= 9 && newvalue.length() < 20) {\r\n\t\t\t\t\t\tnewCustomer.phone = newvalue;\r\n\t\t\t\t\t\tupdatecheck[2] = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"Please enter a name between 9 and 20 charakters.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t// changes the customers gender\r\n\t\t\t} else if (input.equals(\"4\")) {\r\n\t\t\t\tSystem.out.println(\"Insert new value!\");\r\n\t\t\t\twhile (updatecheck[3] == false) {\r\n\t\t\t\t\tnewvalue = (String) inputScanner.next();\r\n\t\t\t\t\tif (newvalue.equals(\"male\") || newvalue.equals(\"female\") || newvalue.equals(\"Male\") || newvalue.equals(\"Female\")) {\r\n\t\t\t\t\t\tnewCustomer.sex = newvalue;\r\n\t\t\t\t\t\tupdatecheck[3] = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"please write if the costumer is a ``male`` or a ``female``\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t// changes the customers pin, the old PIN is necessary for updating\r\n\t\t\t} else if (input.equals(\"5\")) {\r\n\t\t\t\tSystem.out.println(\"Insert new value!\");\r\n\t\t\t\tnewvalue = (String) inputScanner.next();\r\n\t\t\t\tnewCustomer.dob = newvalue;\r\n\t\t\t} else if (input.equals(\"6\")) {\r\n\t\t\t\tSystem.out.println(\"Insert new pin!\");\r\n\t\t\t\twhile (updatecheck[5] == false) {\r\n\t\t\t\t\tnewvalue = (String) inputScanner.next();\r\n\t\t\t\t\tif (newvalue.length() >= 0 && newvalue.length() < 5) {\r\n\t\t\t\t\t\tupdatecheck[5] = true;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"Please enter a number between 0 and 5.\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.println(\"Repeat new pin!\");\r\n\t\t\t\tString newvalue2 = (String) inputScanner.next();\t\t\t\t\r\n\t\t\t\tif (newvalue.equals(newvalue2)) {\r\n\t\t\t\t\tSystem.out.println(\"Insert old pin!\");\r\n\t\t\t\t\tnewvalue = (String) inputScanner.next();\r\n\t\t\t\t\tif ((oldCustomer.pin).equals(newvalue)) {\r\n\t\t\t\t\t\tnewCustomer.pin = newvalue2;\r\n\t\t\t\t\t} else {\r\n\t\t\t\t\t\tSystem.out.println(\"Old PIN was not correct!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"The PINs did not match!\");\r\n\t\t\t\t}\r\n\t\t\t} \r\n\r\n\t\t\toldCustomer = newCustomer;\r\n\r\n\t\t}\r\n\r\n\t}", "public String getCustomerPhone() {\n return customerPhone;\n }", "int updateByPrimaryKey(CustomerVisit record);", "public void updateCustomerInfo(){\n nameLabel.setText(customer.getName());\n productWantedLabel.setText(customer.getWantedItem());\n serviceManager.getTotalPrice().updateNode();\n }", "Phone findPhoneById(int phoneId);", "public boolean updatecustomer(long id , Customermodel customermodel) {\n\t\t Optional<Customermodel> customerd = customerdb.findById(id);\n\n\t\t\t\t\tif (customerd.isPresent()) {\n\t\t\t\t\t\tCustomermodel customer = customerd.get();\n\t\t\t\t\t\t\n\t\t\t\t\t\tcustomer.setDob(customermodel.getDob());\n\t\t\t\t\t\tcustomer.setName(customermodel.getName());\n\t\t\t\t\t\tcustomerdb.save(customer);\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\n\t\t\t\t\t} \n\t\t\t\t\telse {\n\t\t\t\t\t\treturn false;\n\t\t\t\t\t} \n\t\t \n\t }", "@Test\n public void getCustomer() {\n Customer customer = new Customer();\n customer.setFirstName(\"Dominick\");\n customer.setLastName(\"DeChristofaro\");\n customer.setEmail(\"dominick.dechristofaro@gmail.com\");\n customer.setCompany(\"Omni\");\n customer.setPhone(\"999-999-9999\");\n customer = service.saveCustomer(customer);\n\n // Copy the customer added to the mock database using the CustomerAPI\n Customer customerCopy = service.findCustomer(customer.getCustomerId());\n\n // Test getCustomer() API method\n verify(customerDao, times(1)).getCustomer(customer.getCustomerId());\n TestCase.assertEquals(customerCopy, customer);\n }", "@Override\n public Personn findById(Integer idCustomer) {\n return manager.find(Personn.class,idCustomer );\n //return findByCriteria(criteria);\n }", "int updateByPrimaryKeySelective(SdkPhone record);", "public void getPhone(Phone newPhone)\n {\n currentPhone = newPhone;\n }", "private Customer findCustomer(String customerName){\n for(int i=0; i<customers.size(); i+=1){\n Customer existingCustomer = this.customers.get(i);\n if(existingCustomer.getName().equals(customerName)){\n return existingCustomer;\n }\n }\n return null;\n }", "Customer findById(Long id);", "void updateCustomer(int id, String[] updateInfo);", "public void setCustomerId(long value) {\n this.customerId = value;\n }", "public boolean editCustomer(int id, String firstName, String lastName, String phone, String address) {\r\n\t\tCustomer customer = getCustomer(id);\r\n\t\tcustomer.setFirstName(firstName);\r\n\t\tcustomer.setLastName(lastName);\r\n\t\tcustomer.setPhone(phone);\r\n\t\tcustomer.setAddress(address);\r\n\t\ttry {\r\n\t\t\tcustomer.commit();\r\n\t\t\treturn true;\r\n\t\t} catch (SQLException e) {\r\n\t\t\t\r\n\t\t}\r\n\t\treturn false;\r\n\t\t\r\n\t}", "@Override\n\tpublic void update(Phone phone) {\n\t\t\n\t}", "@Override\n\tpublic void update() {\n\t\tSystem.out.println(\"Mobile Customer update()\");\n\t}", "@Test\n\tpublic void readCustomerById() {\n\t\tString name = \"Leo\";\n\t\tString address = \"Auckland\";\n\t\tString telephoneNumber = \"021123728381\";\n\t\tICustomer customer = customerController.create(name, address, telephoneNumber);\n\t\tlong id = customer.getId();\n\t\tname = \"Mark\";\n\t\taddress = \"Auckland\";\n\t\ttelephoneNumber = \"0211616447\";\n\t\tcustomerController.create(name, address, telephoneNumber);\n\n\t\t// When\n\t\tICustomer cus = customerController.read(id);\n\n\t\t// Then\n\t\tAssert.assertEquals(customer, cus);\n\t}", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public void setPhone(String phone) {\n this.phone = phone;\n }", "public CstCustomer toupdate(String custNo) {\n\t\tCstCustomer cstCustomer=cstCustomerDao.toupdate(custNo);\n\t\treturn cstCustomer;\n\t}", "@Override\r\n\tpublic void createAccount(Customer customer) {\n\t\tcustMap.put(customer.getMobileNo(),customer);\r\n\t\t\r\n\t}", "@Override\n\tpublic Customer findCustomer(int customerId) {\n\t\treturn null;\n\t}", "public Customer updateCustomer(@RequestBody Customer theCustomer)\n {\n customerService.save(theCustomer);\n return theCustomer;\n }", "@Override\n\tpublic void saveCustomer(Customer theCustomer){\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n//\t\tcurrentSession.createQuery(\"from Customer c where c.firstName=\"+ theCustomer.getFirstName()).executeUpdate();\n\n\t\tQuery<Customer> query =\n\t\t\t\tcurrentSession.createQuery(\"select c from Customer c \"+\n\t\t\t\t\t\t\t\t\"where c.firstName =:theCustomerFirstName and \" +\n\t\t\t\t\t\t\t\t\"c.lastName =:theCustomerLastName and \" +\n\t\t\t\t\t\t\t\t\"c.email=:theCustomerEmail\",\n\t\t\t\t\t\t Customer.class);\n\n\t\t// set parameter on query\n\t\tquery.setParameter(\"theCustomerFirstName\", theCustomer.getFirstName());\n\t\tquery.setParameter(\"theCustomerLastName\", theCustomer.getLastName());\n\t\tquery.setParameter(\"theCustomerEmail\", theCustomer.getEmail());\n\n\t\ttry {\n\t\t\t// execute query and get instructor\n\t\t\tCustomer temp = query.getSingleResult();\n\t\t}\n\t\tcatch (Exception exe){\n\t\t\tlogger.log(Level.INFO,\"Already exists!!\");\n\t\t\tcurrentSession.saveOrUpdate(theCustomer);\n\t\t}\n\t}", "@Override\n\tpublic void updateProfile(CustomerUpdateVO customerVO) {\n\t\tCustomer customer = customerRepository.findById(customerVO.getCid()).get();\n\t\ttry {\n\t\t\tcustomer.setImage(customerVO.getPhoto().getBytes());\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\tcustomer.setName(customerVO.getName());\n\t\tcustomer.setMobile(customerVO.getMobile());\n\t\tcustomer.setDom(new Timestamp(new Date().getTime()));\n\t\t/// customerRepository.save(customer);\n\t}", "@Override\n\tpublic Customer retrieveCustomer(Integer id) {\n\n\t\tCustomer customer = new Customer();\n\n\t\tfor (Customer cust : customers) {\n\t\t\tif (cust.getId() == id) {\n\t\t\t\tcustomer.setId(id);\n\t\t\t\tcustomer.setUsername(cust.getUsername());\n\t\t\t\tcustomer.setFirstName(cust.getFirstName());\n\t\t\t\tcustomer.setLastName(cust.getLastName());\n\t\t\t\tcustomer.setEmail(cust.getEmail());\n\t\t\t\tcustomer.setUserType(cust.getUserType());\n\t\t\t\tcustomer.setPassword(cust.getPassword());\n\t\t\t\tcustomer.setAddress(cust.getAddress());\n\t\t\t}\n\t\t}\n\t\tlogger.info(\"A GET call retrieved a customer: retrieveCustomer()\");\n\t\treturn customer;\n\t}", "public void setCustomerId(int customerId) \n {\n this.customerId = customerId;\n }", "@Override\n\tpublic void update(Customer t) {\n\n\t}", "@Then(\"^user enters customer details$\")\n\tpublic void user_enters_customer_details(DataTable customer) {\n\t\tfor(Map<String, String> data :customer.asMaps())\n\t\t{\n\t\t\t \tdriver.findElement(By.name(\"name\")).sendKeys(data.get(\"customer\"));\n\t\t\t driver.findElement(By.xpath(\"//input[@type='radio'][@value='m']\")).click();\n\t\t\t driver.findElement(By.xpath(\"//input[@type='date']\")).sendKeys(data.get(\"DOB\"));\n//\t\t\t driver.findElement(By.name(\"addr\")).sendKeys(data.get(\"add\"));\n\t\t\t driver.findElement(By.name(\"city\")).sendKeys(data.get(\"city\"));\n\t\t\t driver.findElement(By.name(\"state\")).sendKeys(data.get(\"state\"));\n\t\t\t driver.findElement(By.name(\"pinno\")).sendKeys(data.get(\"pin\"));\n\t\t\t driver.findElement(By.name(\"telephoneno\")).sendKeys(data.get(\"mobile\"));\n\t\t\t driver.findElement(By.name(\"emailid\")).sendKeys(data.get(\"emailid\"));\n\t\t\t driver.findElement(By.name(\"password\")).sendKeys(data.get(\"password\"));\n\t\t\t \n\t\t}\n\t \n\t \n\t}", "public void setPhone(String phone) {\r\n this.phone = phone;\r\n }", "public abstract CustomerOrder findOneForUpdate(Long id);", "public Customer findCustomerById(long id) throws DatabaseOperationException;", "io.opencannabis.schema.commerce.OrderCustomer.Customer getCustomer();", "public void setPhone(String newPhone) {\r\n\t\tthis.phone = newPhone;\r\n\t}", "int updateContact(String email, String firstName, String lastName, String phone, String username);", "@PutMapping(\"/{id}\")\n public String update(@ModelAttribute(CUSTOMER) CustomerDTO customerDTO, @PathVariable(\"id\") long id) {\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n customer.getActualAddress().setModified(LocalDateTime.now());\n customerService.updateCustomer(customer, id);\n return REDIRECT_CLIENTS;\n }", "public void setPhone(String phone)\n {\n this.phone = phone;\n }" ]
[ "0.7248414", "0.6640991", "0.6631523", "0.66207916", "0.65066427", "0.6487003", "0.6425555", "0.64080495", "0.6283318", "0.62362224", "0.62301415", "0.61843204", "0.6172584", "0.6170971", "0.61683434", "0.61583996", "0.61527115", "0.6129569", "0.61258245", "0.6123858", "0.6084189", "0.60723543", "0.60626286", "0.60552806", "0.60389155", "0.60341847", "0.6033054", "0.6003387", "0.5998543", "0.5996819", "0.5967319", "0.5967319", "0.5962043", "0.5957724", "0.59551835", "0.5954903", "0.5947076", "0.5932443", "0.5911652", "0.59114933", "0.59109265", "0.5908461", "0.59078515", "0.59049726", "0.59024173", "0.5900905", "0.5889072", "0.58854556", "0.58827585", "0.58801895", "0.5858154", "0.5849936", "0.583584", "0.583329", "0.5821274", "0.5814376", "0.5810873", "0.58094406", "0.58033955", "0.5801191", "0.5790609", "0.5766738", "0.5723391", "0.572142", "0.5714163", "0.56944585", "0.5688722", "0.5688027", "0.5686341", "0.5682891", "0.5679435", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5675162", "0.5669763", "0.5669492", "0.5665784", "0.56635624", "0.5663433", "0.56626517", "0.5661978", "0.56581813", "0.565351", "0.5640869", "0.56402916", "0.56349456", "0.56348556", "0.5631331", "0.5626583", "0.562448", "0.5624428", "0.5614023" ]
0.67386264
1
This method return a list of Arrays containing string containing customer information.
public ArrayList<String[]> getCustomersInfo(int index) { int customerAmount = 0; ArrayList<String[]> returnValue = new ArrayList<>(); ArrayList<Customer> customers = CustomerContainer.getInstance().getCustomers(); if (customers.size() == 0) { return returnValue; } //If we have more than 50 elements we set the customerAmount to 50 if ((int)(Math.floor(customers.size() / 50))+1 > index) { customerAmount = 50; } //If a page contains less then 50 elements, the customerAmount is set to the leftover amount. else if ((int)(Math.floor(customers.size() / 50))+1 == index) { customerAmount = (int)(customers.size()%50); } else { return returnValue; } //All of the customers are added to returnValue based on the customerAmount for (int e = (index-1)*50; e < (index-1)*50+customerAmount; e++) { returnValue.add(customers.get(e).tableFill()); } return returnValue; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<Customer> getCustomers()\n {\n List<Customer> customers = new ArrayList<>();\n\n customers.add(new Customer(\"Recipient\", \"One\", \"recipient1@example.com\", \"Green\"));\n customers.add(new Customer(\"Recipient\", \"Two\", \"recipient2@example.com\", \"Red\"));\n customers.add(new Customer(\"Recipient\", \"Three\", \"recipient3@example.com\", \"Blue\"));\n customers.add(new Customer(\"Recipient\", \"Four\", \"recipient4@example.com\", \"Orange\"));\n\n return customers;\n }", "@Override\n public ArrayList<IndividualCustomer> getData() {\n return customerList;\n }", "public List<Customer> getCustomerList() {\n return new ArrayList<Customer>(customersList);\n }", "public String allCustomers(){\n String outputString = \"Customer accounts:\"+\"\\n\";\n for(Customer record : bank.getName2CustomersMapping().values()){\n outputString += record.getFullName()+\" \"+record.getAccounts().toString()+\"\\n\";\n }\n return outputString;\n }", "List<Customer> getCustomerList();", "java.util.List<com.google.cloud.channel.v1.Customer> \n getCustomersList();", "List<Customer> getCustomers();", "public ArrayList<Customer> getCustomerList() {\n\t\treturn customerList;\n\t}", "public Customer[] getCustomers() {\r\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\r\n\t\ttry (ResultSet result = manager.performSql(\"SELECT id FROM Customer\")) {\r\n\t\t\twhile (result.next()) {\r\n\t\t\t\tcustomers.add(manager.getCustomer(result.getInt(1)));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tCustomer[] ret = new Customer[customers.size()];\r\n\t\tfor (int i = 0; i < ret.length; i++) {\r\n\t\t\tret[i] = customers.get(i);\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "List<Customer> getList();", "public ArrayList<Customer> getAllCustomers();", "public List<Customer> getCustomerList() {\r\n\t\tList<Object> columnList = null;\r\n\t\tList<Object> valueList = null;\r\n\t\tList<Customer> customers = new ArrayList<Customer>();\r\n\r\n\t\tif (searchValue != null && !searchValue.trim().equals(\"\")) {\r\n\t\t\tcolumnList = new ArrayList<Object>();\r\n\t\t\tvalueList = new ArrayList<Object>();\r\n\t\t\tcolumnList.add(searchColumn);\r\n\t\t\tvalueList.add(searchValue);\r\n\t\t}\r\n\t\tcustomers = customerService.searchCustomer(columnList, valueList,\r\n\t\t\t\tfirst, pageSize);\r\n\t\t\r\n\r\n\t\treturn customers;\r\n\t}", "public ArrayList<Customer> getCustomers()\r\n {\r\n return this.Customers;\r\n }", "public static ArrayList<Customer> getCustomerInfo() {\n File file = new File(\"./data/customer_ratings.csv\");\n Scanner scan;\n try {\n scan = new Scanner(file);\n\n } catch (IOException e) {\n throw new Error(\"Could not open customer ratings file\");\n }\n scan.nextLine();\n\n // Read File to get customer ID's\n ArrayList<Customer> customers = new ArrayList<Customer>();\n while (scan.hasNextLine()) {\n String line = scan.nextLine();\n String[] ratingParts = line.split(\"\\t\");\n int index = indexOfCustomer(customers, ratingParts[1]);\n if (index == -1) {\n Date lastActiveDate = Date.valueOf(ratingParts[3]);\n Customer customer = new Customer(ratingParts[1], lastActiveDate);\n customers.add(customer);\n } else {\n Date lastActiveDate = Date.valueOf(ratingParts[3]);\n updateLastActive(customers.get(index), lastActiveDate);\n }\n }\n\n // Close Scanner\n scan.close();\n\n // Return CustomerIDs\n return customers;\n }", "@GET\r\n\t@Produces({ MediaType.APPLICATION_JSON })\r\n\tpublic ArrayList<Customer> getCustomers() {\r\n\t\treturn custDao.readAll();\r\n\t}", "public static List<Customer> getAllCustomers() {\r\n\t\tList<Customer> customerList = new ArrayList<Customer>();\r\n\t\tConnection conn = ConnectionFactory.getConnection();\r\n\r\n\t\tString query = \"SELECT customerUuid, customerType, customerName, personKey, addressKey FROM Customer\";\r\n\r\n\t\tPreparedStatement ps = null;\r\n\t\tResultSet rs = null;\r\n\t\tCustomer customer = null;\r\n\r\n\t\ttry {\r\n\t\t\tps = conn.prepareStatement(query);\r\n\t\t\trs = ps.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tString customerUuid = rs.getString(\"customerUuid\");\r\n\t\t\t\tString customerType = rs.getString(\"customerType\");\r\n\t\t\t\tString customerName = rs.getString(\"customerName\");\r\n\t\t\t\tint personKey = rs.getInt(\"personKey\");\r\n\t\t\t\tPerson primaryContact = Person.getPersonByKey(personKey);\r\n\t\t\t\tint addressKey = rs.getInt(\"addressKey\");\r\n\t\t\t\tAddress address = Address.getAddressByKey(addressKey);\r\n\t\t\t\t\r\n\t\t\t\tif (customerType.equals(\"G\")) {\r\n\t\t\t\t\tcustomer = new GovernmentCustomer(customerUuid, primaryContact, customerName, address);\r\n\t\t\t\t} else {\r\n\t\t\t\t\tcustomer = new CorporateCustomer(customerUuid, primaryContact, customerName, address);\r\n\t\t\t\t}\r\n\t\t\t\tcustomerList.add(customer);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tSystem.out.println(\"SQLException: \");\r\n\t\t\te.printStackTrace();\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t} finally {\r\n\t\t\tConnectionFactory.closeConnection(conn, ps, rs);\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public List<String> getCustomerIds() {\r\n\t\treturn getSingleColWithMultipleRowsList(GET_CUSTOMER_IDS);\r\n\t}", "public void listCustomers() {\r\n\t\tSystem.out.println(store.listCustomers());\r\n\t}", "public List<Customer> getCustomers() {\n\t\treturn customers;\n\t}", "public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}", "public static List<Customer> getCustomers(){\n \treturn Customer.findAll();\n }", "@Override\n\tpublic Customer[] readAll() {\n\n\t\tString selectQuery = String.format(\"SELECT * FROM %s ;\", TABLE_NAME);\n\t\tCustomer[] result = null;\n\n\t\ttry (Statement s = dbCon.createStatement()) {\n\t\t\tResultSet rS = s.executeQuery(selectQuery);\n\n\t\t\tArrayList<Customer> resultTmp = new ArrayList<Customer>();\n\n\t\t\twhile (rS.next()) {\n\t\t\t\tresultTmp.add(\tresultTmp.size(),\n\t\t\t\t\t\t\t\tnew Customer(rS.getInt(COLUMN_NAME_ID),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_FIRST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_LAST_NAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_EMAIL),\n\t\t\t\t\t\t\t\t\t\t\trS.getString(COLUMN_NAME_KNICKNAME),\n\t\t\t\t\t\t\t\t\t\t\trS.getDate(COLUMN_NAME_BIRTHDATE).toLocalDate(),\n\t\t\t\t\t\t\t\t\t\t\trS.getDouble(COLUMN_NAME_CREDITS))\n\t\t\t\t\t\t\t\t);\n\t\t\t}\n\t\t\trS.close();\n\n\t\t\tresult = new Customer[resultTmp.size()];\n\t\t\tresultTmp.toArray(result);\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(\"An SQL error occured during retrieving all data from of customer table : \" + e.getMessage());\n\t\t}\n\n\t\treturn result;\n\t}", "public List<CustomerModel> getCustomers();", "@Override\n\tpublic List<Customer> listCustomers() {\n\t\treturn null;\n\t}", "@RequestMapping(value = \"/v2/customers\", method = RequestMethod.GET)\r\n\tpublic List<Customer> customers() {\r\n JPAQuery<?> query = new JPAQuery<Void>(em);\r\n QCustomer qcustomer = QCustomer.customer;\r\n List<Customer> customers = (List<Customer>) query.from(qcustomer).fetch();\r\n // Employee oneEmp = employees.get(0);\r\n\t\treturn customers;\r\n }", "private List<AdhocCustomer> getSearchUniverseSearchAdhocCustomerDataSet() {\n // The initialization of the result list must be done here\n //\n //\n return AdhocCustomer.findAll().collect(Collectors.toList());\n }", "public static List<String> read() throws ApplicationException\r\n\t{\r\n\t\tBufferedReader customerReader = null;\r\n\t\tList<String> customers = new ArrayList<>();\r\n\t\t// LOG.debug(\"Reading\" + customerDataFile.getAbsolutePath());\r\n\t\ttry\r\n\t\t{\r\n\t\t\tcustomerReader = new BufferedReader(new FileReader(\"customers.dat\"));\r\n\r\n\t\t\tString line = null;\r\n\t\t\tline = customerReader.readLine(); // skip the header line\r\n\r\n\t\t\twhile ((line = customerReader.readLine()) != null)\r\n\t\t\t{\r\n\t\t\t\t// String customer = readCustomerString(line);\r\n\t\t\t\tcustomers.add(line);\r\n\t\t\t\t// customers.add(customer);\r\n\t\t\t\t// LOG.debug(\"Added \" + customer.toString() + \" as \" + customer.getId());\r\n\t\t\t}\r\n\t\t\tcustomerReader.close();\r\n\r\n\t\t} catch (IOException e)\r\n\t\t{\r\n\t\t\tLOG.error(e.getMessage());\r\n\t\t\tthrow new ApplicationException(e.getMessage());\r\n\t\t} finally\r\n\t\t{\r\n\t\t\ttry\r\n\t\t\t{\r\n\t\t\t\tif (customerReader != null)\r\n\t\t\t\t{\r\n\t\t\t\t\tcustomerReader.close();\r\n\t\t\t\t}\r\n\t\t\t} catch (IOException e)\r\n\t\t\t{\r\n\t\t\t\tLOG.error(e.getMessage());\r\n\t\t\t\tthrow new ApplicationException(e.getMessage());\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\treturn customers;\r\n\t}", "public List<Customer> read() {\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer\");\n rest = ppst.executeQuery();\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "@Override\npublic List<Object[]> getCustomerReport() {\n\treturn dao.getCustomerReport();\n}", "@GetMapping(\"/api/customer\")\n\tpublic ResponseEntity<List<CustomerDetails>> getAllCustomerDetails() {\n\n\t\tList<CustomerDetails> customerDetaillist = customerService.getAllCustomerDetails();\n\n\t\treturn ResponseEntity.ok().body(customerDetaillist);\n\n\t}", "@Override\n\tpublic List<Customer> retrieveAllCustomers() {\n\t\tlogger.info(\"A GET call retrieved all customers: retrieveAllCustomers()\");\n\t\treturn customers;\n\t}", "public static List<CustomerItems> getCustomerItems() {\n\n\t\tList<CustomerItems> showCustomerItems = null;\n\n\t\ttry {\n\t\t\tshowCustomerItems = CustomerItemsDAO.showCustomerItemsDetails();\n\n\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn showCustomerItems;\n\t}", "@Override\n //Override method to the to-string for the concatenation of the customer name and ID\n public String toString() {\n return customerName + \" [\" + customerId + \"]\";\n }", "@Override\n\tpublic List<CustomerData> getAllCustomer() {\n\t\treturn customerRepository.findAll();\n\t}", "public void getCustomerNames() throws SQLException {\n ResultSet rs; \n Statement st = dbConnection.dbConnect().createStatement();\n String recordQuery = (\"Select * from customer\");\n rs = st.executeQuery(recordQuery);\n while(rs.next()){\n customers.getItems().add(rs.getString(\"customerName\"));\n }\n }", "public List<String> getCustomers(String p){\n\t\tif( containsProduct(p)){\n\t\t\tList<String> custlist = new ArrayList<String>();\n\t\t\tfor(int i = 0; i < list.size(); i++){\n\t\t\t\tif(hasProduct(list.get(i).getUsername(), p)){\n\t\t\t\t\tcustlist.add(list.get(i).getUsername());\n\t\t\t\t}\n\t\t\t}\n\t\t\treturn custlist;\n\t\t}\n\t\treturn null;\n\t}", "@Accessor(qualifier = \"Customers\", type = Accessor.Type.GETTER)\n\tpublic Collection<B2BCustomerModel> getCustomers()\n\t{\n\t\treturn getPersistenceContext().getPropertyValue(CUSTOMERS);\n\t}", "public ArrayList<Customer> getRegisterList();", "public static ArrayList<CustomerInfoBean> getCustomers() {\r\n\t\tSystem.out.println(\"CustomerBAL.get_customers()\");\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, e_status, c_status, state;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tConnection connection = Connect.getConnection();\r\n\t\ttry {\r\n\r\n\t\t\tif (connection != null) {\r\n\t\t\t\t// Begin Stored Procedure Calling -- Jetander\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{call get_customers()}\");\r\n\t\t\t\tResultSet rs = prepareCall.executeQuery();\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tcustomerId = rs.getInt(\"customer_id\");\r\n\t\t\t\t\tcustomerName = rs.getString(\"customer_name\");\r\n\t\t\t\t\tcnicNo = rs.getString(\"customer_cnic\");\r\n\t\t\t\t\tphoneNo = rs.getString(\"customer_phone\");\r\n\t\t\t\t\tdistrict = rs.getString(\"district_name\");\r\n\t\t\t\t\tmonthlyIncome = rs.getString(\"salary_range\");\r\n\t\t\t\t\tgsmNumber = rs.getString(\"appliance_gsmno\");\r\n\t\t\t\t\tstate = rs.getInt(\"appliance_status\");\r\n\t\t\t\t\tsalesmanName = rs.getString(\"salesman_name\");\r\n\r\n\t\t\t\t\tapplianceId = rs.getInt(\"appliance_id\");\r\n\t\t\t\t\tsalesmanId = rs.getInt(\"salesman_id\");\r\n\t\t\t\t\tapplianceName = rs.getString(\"appliance_name\");\r\n\t\t\t\t\te_status = rs.getInt(\"e.status\");\r\n\t\t\t\t\tc_status = rs.getInt(\"cs.status\");\r\n\t\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\t\tbean.setApplianceStatus(state);\r\n\t\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\t\tbean.setStatus(e_status);\r\n\t\t\t\t\tbean.setCustomerStatus(c_status);\r\n\t\t\t\t\tcustomerList.add(bean);\r\n\t\t\t\t\t// End Stored Procedure Calling -- Jetander\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tif (connection != null) {\r\n\t\t\t\tconnection.close();\r\n\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "@Override\r\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\r\n\t}", "public List<Customermodel> getCustomers() {\n\t return customerdb.findAll();\n\t }", "@Override\n\tpublic List<Customer> getCustomerList() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\tQuery query=session.createQuery(\"Select c from Customer c\");\n\t\tList<Customer> list=(List<Customer>)query.getResultList();\n\t\t/*\n\t\t * Customer customer = (Customer)session.load(Customer.class,customerId);\n\t\t * */\n\t\treturn list;\n\t}", "public ArrayList<Customer> getAllCustomers(){\n ArrayList<Customer> customers = new ArrayList<>();\n\n try{\n // try and connect\n conn = DriverManager.getConnection(URL);\n\n // make sql query\n PreparedStatement preparedStatement =\n conn.prepareStatement(\"SELECT CustomerId, FirstName, LastName, Country, PostalCode, Phone, Email FROM Customer \");\n\n // execute query\n ResultSet set = preparedStatement.executeQuery();\n\n while(set.next()){\n customers.add(\n new Customer(\n set.getString(\"CustomerId\"),\n set.getString(\"FirstName\"),\n set.getString(\"LastName\"),\n set.getString(\"Country\"),\n set.getString(\"PostalCode\"),\n set.getString(\"Phone\"),\n set.getString(\"Email\")\n ));\n\n }\n }\n catch(Exception exception){\n System.out.println(exception.toString());\n }\n finally{\n try{\n conn.close();\n }\n catch (Exception exception){\n System.out.println(exception.toString());\n }\n }\n return customers;\n }", "public static ArrayList<CustomerInfoBean> getCutomers_Accepted() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id WHERE e.status=1 or e.status=6;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "@Override\n\tpublic List<MstCustomerDto> getAllCustomer() {\n\t\tList<MstCustomerDto> listMstCustomerDtos=new ArrayList<>();\n\t\tList<Object[]> obj=new ArrayList<>();\n\t\t\n\t\tobj = mstCustomerDao.getAll();\n\t\tlistMstCustomerDtos = mapperFacade.mapAsList(obj, MstCustomerDto.class);\n\t\t\n\t\treturn listMstCustomerDtos;\n\t}", "public void getCustomerBooks() {\n\t\tfor (Book b : customerBooks) {\n\t\t\tSystem.out.println(b);\n\t\t}\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_onCash() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name ,sld.payement_option, a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" WHERE sld.payement_option=0\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public static ObservableList<Customer> getCustomerList() throws SQLException{\r\n customerList.clear();\r\n Connection conn = DBConnection.getConnection();\r\n String selectStatement = \"SELECT * FROM customers;\";\r\n DBQuery.setPreparedStatement(conn, selectStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.execute();\r\n ResultSet rs = ps.getResultSet();\r\n\r\n //creates customer and adds to list\r\n while(rs.next())\r\n {\r\n int customerID = rs.getInt(\"Customer_ID\");\r\n String customerName = rs.getString(\"Customer_Name\");\r\n String address = rs.getString(\"Address\");\r\n String state = getDivisionName(rs.getInt(\"Division_ID\"));\r\n String postalCode = rs.getString(\"Postal_Code\");\r\n String country = getCountryName(getCountryID(rs.getInt(\"Division_ID\")));\r\n String phoneNumber = rs.getString(\"Phone\");\r\n Customer customer = new Customer(customerID,customerName,address,state,postalCode,country,phoneNumber);\r\n customerList.add(customer);\r\n }\r\n return customerList;\r\n }", "@Override\n\tpublic List<Customer> getAllCustomers() {\n\t\treturn null;\n\t}", "@GetMapping(value = CustomerRestURIConstants.GET_ALL_CUSTOMER )\n\tpublic ResponseEntity<List<Customer>> list() {\n\t\tList<Customer> customers = customerService.getAllCustomers();\n\t\treturn ResponseEntity.ok().body(customers);\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_notinterested() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status, cs.customer_family_size FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id join city c on cs.customer_city=c.city_id WHERE cs.status=3 GROUP BY cs.customer_id\\n\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_suggested() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE e.status=3\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "@GetMapping(\"/customers\")\n\tpublic List<Customer> getcustomers(){\n\t\t\n\t\treturn thecustomerService.getCustomers();\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from Customer order by lastName\", Customer.class)\n\t\t\t\t.getResultList();\n\n\t}", "public String list(){\n\t\tif(name == null) {\n\t\t\ttry {\n\t\t\t\tlist = customerBO.getAll();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tList<Customer> l = new ArrayList<Customer>();\n\t\t\ttry {\n\t\t\t\tl = customerBO.getAll();\n\t\t\t\tfor(Customer cus: l) {\n\t\t\t\t\tString CustomerName = cus.getFirstName() + \" \" + cus.getLastName();\n\t\t\t\t\tif(CustomerName.compareTo(name) == 0) {\n\t\t\t\t\t\tlist.add(cus);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint total = list.size();\n\t\t\t\tint div = total / STATIC_ROW_MAX;\n\t\t\t\tif(div * STATIC_ROW_MAX == total) {\n\t\t\t\t\ttotalPage = div;\n\t\t\t\t} else {\n\t\t\t\t\ttotalPage = div + 1;\n\t\t\t\t}\t\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\n\t\treturn \"list\";\n\t}", "public List<Account> getAccounts(String customerName){\n List<Account> accounts = new ArrayList<>();\n try {\n accounts = getAccountsFromFile();\n } catch (Exception e) {\n System.out.println(messageService.unexpectedError(e));\n }\n System.out.println(accounts.stream().filter(a -> a.getCustomerName().equals(customerName))\n .collect(Collectors.toList()));\n return accounts.stream().filter(a -> a.getCustomerName().equals(customerName))\n .collect(Collectors.toList());\n }", "public List<Customer> getCustomerByID() {\n Query query = em.createNamedQuery(\"Customer.findByCustomerId\")\r\n .setParameter(\"customerId\", custID);\r\n // return query result\r\n return query.getResultList();\r\n }", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession session = sessionFactory.getCurrentSession();\n\t\t//create the query\n\t\tQuery<Customer> query = session.createQuery(\"from Customer order by lastName\", Customer.class);\n\t\t//get the result list\n\t\tList<Customer> customers = query.getResultList();\n\t\treturn customers;\n\t}", "public List<Customer> getAllCustomers() {\n return customerRepository.findAll();\n }", "public ArrayList<Customer> getservedCustomers()\r\n {\r\n return this.servedCustomers;\r\n }", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Customer> theQuery =\n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\treturn customers;\n\t}", "@Override\n\tpublic Iterable<Customer> displayCust() {\n\t\treturn customerRepository.findAll();\n\t}", "public void listCustomers() {\n\t\tSystem.out.println(\"\\nCustomers llegits desde la base de dades\");\n\n\t\tObjectSet<Customer> customers = db.query(Customer.class);\n\t\tcustomers.stream()\n\t\t\t.forEach(System.out::println);\n\n\t}", "static void testPrintCustomerArray(Customer[] customers) {\r\n\t\tfor (Customer c : customers) {\r\n\t\t\tSystem.out.println(c.customerId + \" \"\r\n\t\t\t\t\t\t + c.firstName + \" \"\r\n\t\t\t\t\t\t + c.lastName + \" \"\r\n\t\t\t\t\t\t + c.transactionAmount + \" \"\r\n\t\t\t\t\t\t + c.transactionType + \" \"\r\n\t\t\t\t\t\t + c.balance + \" \"\r\n\t\t\t\t\t\t + c.tellerNo);\r\n\t\t}\r\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_notinterested_Super() {\r\n\t\tCustomerInfoBean bean = null;\r\n\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city_district cd ON cs.customer_city=cd.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id WHERE e.status=3 GROUP BY cs.customer_id\\n\";\r\n\t\t\tStatement st = con.prepareStatement(query);\r\n\t\t\tResultSet rs = st.executeQuery(query);\r\n\t\t\tSystem.err.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "@GET\n\t@Path(\"getAllCustomer\")\n\tpublic List<Customer> getAllCustomer() {\n\t\treturn ManagerHelper.getCustomerManager().getAllCustomer();\n\t}", "@SuppressWarnings(\"unchecked\")\r\n\tpublic List<Customer> listRecords() {\n\t\treturn sessionFactory.getCurrentSession().createQuery(\"from CUSTOMER\").list();\r\n\r\n\t}", "private static List<CustomerDetails> buildInput() {\r\n\t\tList<CustomerDetails> iList = new ArrayList<CustomerDetails>();\r\n\t\tiList.add(new CustomerDetails(\"Abhay\", \"abhay@demo.com\", \"11001\", 7402,\r\n\t\t\t\t\"22-06-2012 11:23\", \"2348723\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 5000, \"22-06-2012 13:48\",\r\n\t\t\t\t\"3830283\"));\r\n\t\tiList.add(new CustomerDetails(\"Anant\", \"anant@example.com\", \"11002\",\r\n\t\t\t\t3839, \"22-06-2012 15:39\", \"2939303\"));\r\n\t\tiList.add(new CustomerDetails(\"Ashish\", \"ashish@mettl.com\", \"11003\",\r\n\t\t\t\t13890, \"22-06-2012 17:15\", \"2828939\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"11001\", 12083,\r\n\t\t\t\t\"23-06-2012 11:38\", \"3839403\"));\r\n\t\tiList.add(new CustomerDetails(\"Abhimanyu\", \"abhi@mettl.com\", \"11004\",\r\n\t\t\t\t33283, \"23-06-2012 14:18\", \"1384839\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 5984, \"23-06-2012 19:56\",\r\n\t\t\t\t\"8383939\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"11003\", 38103,\r\n\t\t\t\t\"24-06-2012 15:38\", \"9388383\"));\r\n\t\tiList.add(new CustomerDetails(\"Anant\", \"anant@mettl.com\", \"11002\",\r\n\t\t\t\t7281, \"24-06-2012 19:18\", \"2938381\"));\r\n\t\tiList.add(new CustomerDetails(\"\", \"\", \"\", 1038, \"24-06-2012 20:00\",\r\n\t\t\t\t\"8383383\"));\r\n\t\tiList.add(new CustomerDetails(\"Abhijeet\", \"abhi@mettl.com\", \"11005\",\r\n\t\t\t\t17937, \"25-06-2012 18:83\", \"3833838\"));\r\n\r\n\t\t// Collections.unmodifiableList(iList);\r\n\t\treturn iList;\r\n\t}", "@Override\n public String toString() {\n return \"Customer{\" +\n \"name='\" + name + '\\'' +\n \", surname='\" + surname + '\\'' +\n \", address='\" + address + '\\'' +\n \", email='\" + email + '\\'' +\n \", tel=\" + tel +\n '}';\n }", "@Override\n\tpublic List<Customer> findAllCustomer() {\n\t\treturn customerDao.findAllCustomer();\n\t}", "@Override\n\tpublic Uni<List<Customer>> findAllCustomer() {\n\t\treturn repo.findAll().list();\n\t}", "public String getCustomersName()\r\n {\r\n return customersName;\r\n }", "@Override\n\t@Transactional\n\tpublic List<Customer> getCustomers() {\n\t\treturn customerDAO.getCustomers();\n\t\t\n\t}", "public List<Customer> findAll(){\n\t\treturn custRepo.findAll();\n\t}", "public String list(){\n\t\tlist = connC.getAll();\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\t\treturn \"list\";\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\t\t\n\t\t// create a query ... sort by the lastname\n\t\tQuery<Customer> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\",Customer.class);\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}", "@Override\r\n\tpublic String toString() {\n\t\treturn \"Customer[id=\"+id+\",firstName=\"+firstName+\",lastName=\"+lastName+\",age=\"\r\n\t\t\t\t+age+\",createdTime=\"+createdTime+\",updateTime=\"+updateTime+\"]\";\r\n\t}", "@Override\n public List<Customer> call() throws Exception {\n string = string.replace(\"[\", \"\");\n string = string.replace(\"]\",\"\");\n string = string.replace(\" \", \"\");\n String str = \"http://10.0.2.2:8082/getCustomersByID?customerIDs=\" + string.replace(\"\\\"\", \"'\");\n URLConnection urlConn;\n BufferedReader bufferedReader;\n List<Customer> customerList = new ArrayList<>();\n\n\n try {\n URL url = new URL(str);\n urlConn = url.openConnection();\n bufferedReader = new BufferedReader(new InputStreamReader(urlConn.getInputStream()));\n\n String line;\n while ((line = bufferedReader.readLine()) != null) {\n JSONObject jsonObject = new JSONObject(line);\n Customer customer = new Customer();\n customer.setCustomerID(jsonObject.getString(\"_id\"));\n customer.setLastName(jsonObject.getString(\"lastName\"));\n customer.setFirstName(jsonObject.getString(\"firstName\"));\n customer.setPhoneNumber(jsonObject.getString(\"phoneNumber\"));\n customer.setAddress(jsonObject.getString(\"address\"));\n customer.setBalance(jsonObject.getString(\"balance\"));\n customerList.add(customer);\n\n }\n\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n return customerList;\n }", "@Override\n\t@Transactional\n\tpublic List<AMOUNT> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<AMOUNT> theQuery = currentSession.createQuery(\"from Customer ORDER BY lastName\", AMOUNT.class);\n\n\t\t// execute query and get result list\n\t\tList<AMOUNT> customers = theQuery.getResultList();\n\n\t\t// return the results\n\t\treturn customers;\n\t}", "@RequestMapping(value = \"/customer-addres\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<CustomerAddres> getAllCustomerAddres() {\n log.debug(\"REST request to get all CustomerAddres\");\n List<CustomerAddres> customerAddres = customerAddresRepository.findAll();\n return customerAddres;\n }", "@Override\n\tpublic String toString() {\n\t\treturn \"Customer [id=\" + id + \", firstname=\" + firstname + \", lastname=\" + lastname + \", dob=\" + dob\n\t\t\t\t+ \", username=\" + username + \", password=\" + password + \"]\";\n\t}", "public static ArrayList<CustomerInfoBean> getCutomers_onInActive() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name ,a.appliance_status, a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE a.appliance_status=0\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "List<CustomerOrder> getAllCustomerOrder();", "public List<Customer> getAllCustomers() {\n Query query = em.createNamedQuery(\"Customer.findAll\");\r\n // return query result\r\n return query.getResultList();\r\n }", "List<Customer> loadAllCustomer();", "public static ArrayList<CustomerInfoBean> getDoCutomers(int districtId) {\r\n\t\tSystem.out.println(\"CustomerBAL.get_do_customers()\");\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status, familySize, state;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tConnection connection = Connect.getConnection();\r\n\t\ttry {\r\n\t\t\tif (connection != null) {\r\n\t\t\t\t// Begin Stored Procedure Calling -- Jetander\r\n\t\t\t\tCallableStatement prepareCall = connection\r\n\t\t\t\t\t\t.prepareCall(\"{call get_do_customers(?)}\");\r\n\t\t\t\tprepareCall.setInt(1, districtId);\r\n\t\t\t\tResultSet rs = prepareCall.executeQuery();\r\n\t\t\t\twhile (rs.next()) {\r\n\t\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\t\tstate = rs.getInt(8);\r\n\t\t\t\t\tsalesmanName = rs.getString(9);\r\n\t\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\t\tfamilySize = rs.getInt(14);\r\n\t\t\t\t\t// End Stored Procedure Calling -- Jetander\r\n\t\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\t\t\t\t\tbean.setApplianceStatus(state);\r\n\t\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\t\tbean.setStatus(status);\r\n\t\t\t\t\tbean.setFamilySize(familySize);\r\n\t\t\t\t\tcustomerList.add(bean);\r\n\t\t\t\t}\r\n\t\t\t\trs.close();\r\n\t\t\t\tconnection.close();\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "public Client[] getClients() {\r\n // Get all the contents from the table clients with columns as keys mapped\r\n // to an ArrayList of\r\n // ordered row values\r\n HashMap<String, ArrayList<String>> clientInfo = getAllTableContents(\"clients\");\r\n // Parse the clients into an ArrayList of Client objects\r\n ArrayList<Client> clients = parseClients(clientInfo);\r\n // Cast to an array of Client and return\r\n Client[] temp = new Client[clients.size()];\r\n return clients.toArray(temp);\r\n }", "@Override\n public List<Customer> listAll() {\n\n\n Customer c1 = new Customer();\n Customer c2 = new Customer();\n Customer c3 = new Customer();\n\n List<Customer> list = new ArrayList<>();\n list.add(c1);\n list.add(c2);\n list.add(c3);\n\n System.out.println(\"demo\");\n System.out.println(\"Entering test\");\n\n return list;\n }", "public static ObservableList<Customers> getAllCustomers() {\n return allCustomers;\n }", "ArrayList<EvCustomer> getEvCustomers ()\n {\n return evCustomers;\n }", "public static ArrayList<CustomerInfoBean> getCutomers_onWait() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE e.status=0;\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "private List<String> getCombo(boolean isCustomer){\n List<String> isi = new ArrayList<>();\n String[] daftar = new String[datas.size()];\n for (String data : datas) {\n daftar = data.split(\";\");\n if (isCustomer) isi.add(daftar[1]);\n else isi.add(daftar[0]);\n }\n return isi;\n}", "@Override\n\tpublic Collection<Customer> getAllCustomers() throws Exception {\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\n\t\tConnection con = pool.getConnection();\n\t\t\n\t\ttry {\n\t\t\tString getAllCustomers = \"select * from customer\";\n\t\t\tStatement st = con.createStatement();\n\t\t\tResultSet rs = st.executeQuery(getAllCustomers);\n\t\t\tint result = 0;\n\n\t\t\t\twhile (rs.next()) {\n\t\t\t\t\tCustomer cust = new Customer();\n\t\t\t\t\tcust.setId(rs.getLong(\"ID\"));\n\t\t\t\t\tcust.setCustName(rs.getString(\"Cust_Name\"));\n\t\t\t\t\tcust.setPassword(rs.getString(\"Password\"));\n\t\t\t\t\tcustomers.add(cust);\n\t\t\t\t\tresult++;\n\t\t\t\t}\n\t\t\t\tSystem.out.println(result + \" Customers were retrieved.\");\n \n\t\t} catch (SQLException e) {\n\t\t\tSystem.out.println(e.getMessage() + \" Could not retrieve data from DB.\");\n\t\t} finally {\n\t\t\ttry {\n\t\t\t\tConnectionPool.getInstance().returnConnection(con);\n\t\t\t} catch (Exception e) {\n\t\t\t\tSystem.out.println(e.getMessage() + \" Could not close the connection to the DB\");\n\t\t\t}\n\t\t}\n\t\treturn customers;\n\t}", "public static List<GroupCustomerItems> getGroupCustomer() {\n\n\t\tList<GroupCustomerItems> showCustomerItems = null;\n\n\t\ttry {\n\t\t\tshowCustomerItems = CustomerItemsDAO.showCustomerPurchase();\n\n\t\t} catch (SQLException | ClassNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn showCustomerItems;\n\t}", "@GetMapping()\n public List<AgentCustomerList> findAllAgentsCustomerList() {\n return agentRepo.findAllAgentCustomerListBy();\n }", "public String toString()\n\t{\n\t\tStringBuilder sb =new StringBuilder();\n\t\tsb.append(\"\\tCustomer ID: \"+ custID);\n\t\tsb.append(\"\\n\\tName: \" + name);\n\t\tsb.append(\"\\n\\tAddress: \"+ address);\n\t\tsb.append(\"\\n\\tCity: \" + city);\n\t\tsb.append(\"\\n\\tState: \" + state);\n\t\tsb.append(\"\\n\\tZip code\" + zip);\n\t\tsb.append(\"\\n\\tPhone #: \" + phone);\n\t\tsb.append(\"\\n\");\n\t\treturn sb.toString();\n\n\t}", "@Test\r\n\tpublic void retrieveAllCustomerTest() {\n\t\tassertNotNull(\"Test if there is valid Customer arraylist to retrieve item\", CustomerList);\r\n\t\t\r\n\t\t//test if the list of Customers retrieved from the SourceCentre is empty - boundary\r\n\t\tString allCustomer= CustomerMain.retrieveAllCustomer(CustomerList);\r\n\t\tString testOutput = \"\";\r\n\t\tassertEquals(\"Check that ViewAllCustomerlist\", testOutput, allCustomer);\r\n\t\t\r\n\t\t//Given an empty list, after adding 3 items, test if the size of the list is 3 - normal\r\n\t\tCustomerMain.addCustomer(CustomerList, cust1);\r\n\t\tCustomerMain.addCustomer(CustomerList, cust2);\r\n\t\tCustomerMain.addCustomer(CustomerList, cust3);\r\n\t\tassertEquals(\"Test that Customer arraylist size is 3\", 3, CustomerList.size());\r\n\t\t\r\n\t\t//test if the expected output string same as the list of Customers retrieved from the SourceCentre\t\r\n\t\tallCustomer= CustomerMain.retrieveAllCustomer(CustomerList);\r\n\t\ttestOutput = String.format(\"%-10s %-30s %-10s %-10s\\n\",1, \"Dian\", \"223 Woodlands Street 11\", \"dian@gmail.com\");\r\n\t\ttestOutput += String.format(\"%-10s %-30s %-10s %-10s\\n\",2,\"Li Ying\", \"550 Bedok View\", \"LiYing@hotmail.com\");\r\n\t\ttestOutput += String.format(\"%-10s %-30s %-10s %-10s\\n\",3, \"Pravin\", \"123 Jurong West\", \"pravin@yahoo.com\");\r\n\t\t\t\t\r\n\t\tassertEquals(\"Test that ViewAllCustomerlist\", testOutput, allCustomer);\r\n\t\t\r\n\t}", "public void listSubscribers()\n\t{\n\t\tString str = \"Name\\tSurname\\tMail\\tPassword\\tId\\n\";\n\n\t\tList<Customer> customers = this.company.getSubs();\n\n\t\tfor(int i=0; i<customers.length(); i++)\n\t\t{\n\t\t\tstr += customers.get(i).getName() + \"\\t\" + customers.get(i).getSurname() + \"\\t\" + customers.get(i).getMail() + \"\\t\" + customers.get(i).getPassword() + \"\\t\" + customers.get(i).getId() + \"\\n\";\n\n\t\t}\n\t\t\n\t\tSystem.out.println(str);\n\n\n\t}", "java.util.List<? extends com.google.cloud.channel.v1.CustomerOrBuilder> \n getCustomersOrBuilderList();", "public ArrayList<GroupCustomer> getGroupCustomerList(){\n\t\tSession session = HibernateUtils.getSessionFactory().openSession();\n\t\tArrayList<GroupCustomer> list = new ArrayList<GroupCustomer>();\n\t\ttry{\n\t\t\tCriteria cr = session.createCriteria(TblGroupCustomer.class);\n\t\t\tList<TblGroupCustomer> groupcustomers = cr.list();\n\t\t\tif (groupcustomers.size() > 0){\n\t\t\t\tfor (Iterator<TblGroupCustomer> iterator = groupcustomers.iterator(); iterator.hasNext();){\n\t\t\t\t\tTblGroupCustomer tblgroupcustomer = iterator.next();\n\t\t\t\t\tGroupCustomer groupcustomer = new GroupCustomer();\n\t\t\t\t\tgroupcustomer.convertFromTable(tblgroupcustomer);\n\t\t\t\t\tlist.add(groupcustomer);\n\t\t\t\t}\n\t\t\t}\n\t\t}catch(HibernateException e){\n\t\t\tSystem.err.println(\"ERROR IN LIST!!!!!!\");\n\t\t\te.printStackTrace();\n\t\t\tthrow new ExceptionInInitializerError(e);\n\t\t}finally{\n\t\t\tsession.close();\n\t\t}\n\t\treturn list;\n\t}" ]
[ "0.732899", "0.7197829", "0.7058879", "0.702398", "0.69767666", "0.67794514", "0.67134166", "0.66999894", "0.66029304", "0.660185", "0.65948206", "0.65915304", "0.6572483", "0.6569288", "0.6557319", "0.6537506", "0.6526263", "0.65244794", "0.65093213", "0.64809704", "0.6479496", "0.6461794", "0.64563036", "0.64495814", "0.64423555", "0.64303344", "0.6417052", "0.6411624", "0.6402741", "0.63846123", "0.6370969", "0.6363925", "0.6359007", "0.63406086", "0.6331803", "0.631093", "0.63097936", "0.63075155", "0.6300733", "0.62680346", "0.62605965", "0.62602293", "0.625895", "0.62514853", "0.62494963", "0.6228944", "0.61949885", "0.61719215", "0.6168701", "0.616689", "0.6160222", "0.6151536", "0.6148823", "0.6134976", "0.6133353", "0.6126697", "0.6114117", "0.61114633", "0.61062545", "0.61021763", "0.60920197", "0.60915726", "0.6085035", "0.6081707", "0.60623884", "0.6061463", "0.60476774", "0.5999923", "0.59977317", "0.599395", "0.5979491", "0.5976105", "0.5971832", "0.59705675", "0.596954", "0.5966721", "0.59533244", "0.595022", "0.59501857", "0.59418875", "0.59396684", "0.59330994", "0.5923345", "0.5908089", "0.59060717", "0.59056765", "0.58877325", "0.5885643", "0.5882281", "0.5882139", "0.5878337", "0.58755195", "0.58746195", "0.58727", "0.5869901", "0.58650154", "0.5862318", "0.58565706", "0.58560526", "0.58551985" ]
0.63627213
32
This method is used only for the searchField in the GUI. The method retrieves all customers, whose phone number matches the sequence of numbers in the search bar. And liveupdating the table, so the user has suggestions for customers based on the phone number.
public ArrayList<String[]> searchField(String phone) { ArrayList<Customer> customers = CustomerContainer.getInstance().getCustomers(); ArrayList<String[]> data = new ArrayList<>(); if (customers == null) { return data; } for (Customer customer : customers) { if (Integer.toString(customer.getPhone()).contains(phone)) { data.add(customer.tableFill()); } } return data; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Customer searchCustomerByPhone() {\r\n\t\t//Input customer phone.\r\n\t\tString phone = readString(\"Input the customer phone: \");\r\n\t\tCustomer f = my.findByPhone(phone);\r\n\t\treturn f;\r\n\t}", "private String populateContacts() {\n // fetch the additional information (currently phone numbers)\n Map<Integer, List<Pair<String, Integer>>> numberCache = getAdditionalInformation();\n\n Cursor cursor = mContentResolver.query(\n ContactsContract.Contacts.CONTENT_URI, QUERY_PROJECTION_CONTACT, null, null, QUERY_ORDERING_CONTACT);\n\n int idIndex = cursor.getColumnIndex(ContactsContract.Contacts._ID);\n int nameIndex = cursor.getColumnIndex(ContactsContract.Contacts.DISPLAY_NAME_PRIMARY);\n int hasNumberIndex = cursor.getColumnIndex(ContactsContract.Contacts.HAS_PHONE_NUMBER);\n\n StringBuilder concatList = new StringBuilder();\n\n // First thing we need to do is sanitize the queryString and split into tokens. One\n // important purpose of doing this is to verify if we truly have tokens to apply to a\n // search process. If we are left with an empty query, then we can simply return the\n // entire contact list. The way the algorithm logic flows, there must be at least one\n // query token in the list, even if a blank placeholder.\n ArrayList<String> sanitizedQueryTokens = new ArrayList<String>();\n if (mQueryString != null) {\n // split up the query string into tokens, based on whitespace and asterisks\n String[] queryTokens = mQueryString.trim().split(\"[\\\\*\\\\s]+\");\n // get rid of any empty string references\n for (String currentString : queryTokens) {\n if (!currentString.equals(\"\")) {\n sanitizedQueryTokens.add(currentString);\n }\n }\n // if the ArrayList is empty, then we assume match everything\n if (sanitizedQueryTokens.size() == 0) {\n mQueryString = null;\n }\n }\n\n // Now perform the search. If the queryString is null, then the search reduces\n // to a dump of all contacts\n if ( mQueryString == null) {\n // The search algorithm is designed to work without search criteria (reduction to\n // entire list dumped). However we need at least one query token to enter the main\n // search loop.\n sanitizedQueryTokens.add(\"\");\n }\n\n StringBuilder concatListMatches = new StringBuilder();\n int numMatches = 0;\n\n while (cursor.moveToNext()) {\n String currentName = cursor.getString(nameIndex);\n\n if (currentName != null && !currentName.isEmpty()) {\n // If we are not actually performing a search, we still need to enter this loop\n // once (hence why we added a blank term above).\n for (String currentString : sanitizedQueryTokens) {\n // Add this contact to the list if we are either not performing a search\n // or if the current search criteria (token) matches\n if (mQueryString == null || currentName.toLowerCase().contains(\n currentString.toLowerCase())) {\n\n concatListMatches.append(currentName).append(\"\\n\");\n\n // If this contact has phone number(s), display them\n if (cursor.getInt(hasNumberIndex) > 0) {\n // grab the number(s) from the phat cache\n List<Pair<String, Integer>> phNums;\n if ((phNums = numberCache.get(cursor.getInt(idIndex))) != null) {\n // Pair<Phone Number, Type of Number>\n for (Pair<String, Integer> phNum : phNums) {\n concatListMatches.append(\"\\t\").append(phNum.first);\n switch(phNum.second) {\n case ContactsContract.CommonDataKinds.Phone.TYPE_HOME:\n concatListMatches.append(\" [HOME]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_MOBILE:\n concatListMatches.append(\" [MOBILE]\");\n break;\n case ContactsContract.CommonDataKinds.Phone.TYPE_WORK:\n concatListMatches.append(\" [WORK]\");\n break;\n }\n concatListMatches.append(\"\\n\");\n }\n } else {\n // This should not happen. Means that there is a contact in which a\n // phone number is associated but yet no such number actually can\n // be found in the DB\n concatList.append(\"\\t<Phone number referenced, but not found>\\n\");\n }\n }\n\n ++numMatches;\n break;\n }\n }\n }\n }\n concatList.append(numMatches).append(\" Contacts Found\\n\\n\").append(concatListMatches);\n\n Log.d(\"populate contact list \",\"str \"+concatList.toString());\n return concatList.toString();\n }", "public List<Customer> getCustomerList() {\r\n\t\tList<Object> columnList = null;\r\n\t\tList<Object> valueList = null;\r\n\t\tList<Customer> customers = new ArrayList<Customer>();\r\n\r\n\t\tif (searchValue != null && !searchValue.trim().equals(\"\")) {\r\n\t\t\tcolumnList = new ArrayList<Object>();\r\n\t\t\tvalueList = new ArrayList<Object>();\r\n\t\t\tcolumnList.add(searchColumn);\r\n\t\t\tvalueList.add(searchValue);\r\n\t\t}\r\n\t\tcustomers = customerService.searchCustomer(columnList, valueList,\r\n\t\t\t\tfirst, pageSize);\r\n\t\t\r\n\r\n\t\treturn customers;\r\n\t}", "private List<ModelContacts> getContact(){\n String contenue_ecran = tableView.getText().toString().trim();\n List<ModelContacts> list = new ArrayList<>();\n if (!contenue_ecran.equals(\"\")) {\n Cursor cursor = this.getContentResolver().query(ContactsContract.CommonDataKinds.Phone.CONTENT_URI,\n null, null, null,\n ContactsContract.Contacts.DISPLAY_NAME + \" ASC\");\n assert cursor != null;\n cursor.moveToFirst();\n while (cursor.moveToNext()) {\n String phoneNumber = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n String name = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n String image = cursor.getString(cursor.getColumnIndex(ContactsContract.CommonDataKinds.Phone.PHOTO_ID));\n String formatPhoneNumber = \"<font color='#42A5F5'><b>\" + contenue_ecran + \"</b></font>\";\n String formatPhone = phoneNumber.replace(contenue_ecran, formatPhoneNumber);\n if (phoneNumber.contains(contenue_ecran)) {\n list.add(new ModelContacts(name, image, formatPhone));\n }\n }\n cursor.close();\n }\n return list;\n }", "public List<Customer> findAutoCompleteCustomers(String key) {\n\t\tTypedQuery<Customer> query = em.createQuery(\n\t\t\t\t\"select distinct c from Customer c \"\n\t\t\t\t\t\t+ \" where upper(concat(c.customerName1,' ', c.customerName2,' ', c.customerName3,' ', c.customerName4)) like :name\",\n\t\t\t\tCustomer.class);\n\t\tquery.setParameter(\"name\", \"%\" + key.toUpperCase() + \"%\");\n\t\tList<Customer> customers = query.setFirstResult(0).setMaxResults(10).getResultList();\n\n\t\treturn customers;\n\t}", "public static ObservableList<Customer> getAllCustomers() {\n\n try {\n String sql = \"SELECT * FROM customer;\";\n DBQuery.ExecutePreparedStatement(connection, sql);\n PreparedStatement ps = DBQuery.getPreparedStatement();\n\n ResultSet result = ps.getResultSet();\n Customer userResult;\n ObservableList<Customer> customers = FXCollections.observableArrayList();\n while (result.next()) {\n\n int customerId = result.getInt(\"customerId\");\n String customerName = result.getString(\"customerName\");\n int addressId = result.getInt(\"addressId\");\n int active = result.getInt(\"active\"); //this comes in as an integer 1 for true 0 for false\n if (active == 1) {\n isActive = true;\n } else {\n isActive = false;\n }\n String createDate = result.getString(\"createDate\");\n Calendar createDateCalendar = stringToCalendar(createDate);\n String createdBy = result.getString(\"createdBy\");\n String lastUpdate = result.getString(\"lastUpdate\");\n Calendar lastUpdateCalendar = stringToCalendar(lastUpdate);\n String lastUpdateBy = result.getString(\"lastUpdateBy\");\n\n userResult = new Customer(customerId, customerName, addressId, isActive, createDateCalendar, createdBy, lastUpdateCalendar, lastUpdateBy); //get the user info\n customers.add(userResult); //add everything to the table\n\n }\n\n return customers;\n\n } catch (Exception e) {\n System.out.println(e.getMessage());\n }\n\n return null;\n }", "private Task loadAllCustomers() {\n fullCustomerRowItemList = FXCollections.observableArrayList();\n Task task = new Task() {\n protected Integer call() throws Exception {\n\n try {\n long start = System.currentTimeMillis();\n fullCustomerList = SoapHandler.getDisplayCustomers();\n System.out.println(\"Request took \" + ((System.currentTimeMillis() - start)) + \" milliseconds\");\n // if (fullCustomerList == null || fullCustomerList.size() == 0) {\n // No customers! - set place holder for blank searches as well...\n Platform.runLater(() -> {\n Node node = new Label(\"Processing customers\");\n searchResultsTable.setPlaceholder(node);\n });\n\n Collections.sort(fullCustomerList, (a, b) -> {\n int d = a.getSurname().compareTo(b.getSurname());\n if (d == 0) {\n d = a.getForename().compareTo(b.getForename());\n }\n return d;\n });\n customerSet = new HashMap();\n\n Iterator<CustomerTO> i = fullCustomerList.iterator();\n while (i.hasNext()) {\n CustomerTO eachCustomer = i.next();\n SearchRowItem eachRow = new SearchRowItem(eachCustomer);\n fullCustomerRowItemList.add(eachRow);\n // populate customerSet Map, allows easy indexing as Soap TO objects don't override equals\n customerSet.put(eachRow.getId(), eachRow);\n }\n System.out.println(\"Populating list took \" + ((System.currentTimeMillis() - start)) + \" milliseconds\");\n // Now we can easily pull partner details\n new Thread() {\n public void run() {\n for (SearchRowItem eachCustomer : fullCustomerRowItemList) {\n if (eachCustomer.getPartnerId() != null && eachCustomer.getPartnerId() != 0) {\n CustomerTO partner = customerSet.get(eachCustomer.getPartnerId());\n eachCustomer.setPartnerProperty(new SimpleStringProperty(partner.getForename()));\n }\n }\n }\n }.start();\n //filteredList = searchRowItemList = fullCustomerRowItemList;\n filteredRowItemList = fullCustomerRowItemList;\n\n //if (fullCustomerList == null || fullCustomerList.size() == 0) {\n // No customers! - set place holder for blank searches as well...\n Platform.runLater(() -> {\n Node node = new Label(\"No customers found\");\n searchResultsTable.setPlaceholder(node);\n customerCountStatus.setText(Integer.toString(filteredRowItemList.size()));\n });\n //}\n } catch (Exception e) {\n // If no connection to server, we'll get a ConnectException\n Platform.runLater(() -> {\n Node node = new Label(\"Cannot contact server\");\n searchResultsTable.setPlaceholder(node);\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setHeaderText(\"Error contacting server\");\n alert.setContentText(\"Cannot connect to the database server. \\nPlease ensure the server is running and \\ntry again.\");\n alert.show();\n System.err.println(\"Error contacting server : \" + e.getMessage());\n });\n\n }\n //\n return 0;\n }\n };\n Thread th = new Thread(task);\n th.setDaemon(true);\n th.start();\n\n return task;\n }", "protected void lookForNumber(String searchString) {\n\t\tif(rdbtnExactMatch.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().equals(searchString.toLowerCase()))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].equals(searchString))\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\t\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name starting with searchString\r\n\t\telse if(rdbtnStartsWith.isSelected()) {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().startsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].startsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\t// Look for a name ending with searchString\r\n\t\telse {\r\n\t\t\tfor(int i = 0; i < phoneList.length; i++)\r\n\t\t\t\tif(chckbxIgnoreCase.isSelected()) {\r\n\t\t\t\t\tif(phoneList[i][0].toLowerCase().endsWith(searchString.toLowerCase())) {\r\n\t\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\telse if(phoneList[i][0].endsWith(searchString)) {\r\n\t\t\t\t\ttxtName.setText(phoneList[i][0]);\r\n\t\t\t\t\ttxtPhonenumber.setText(phoneList[i][1]);\r\n\t\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void searchByMobile() {\n\t\tcount = 0;\n\t\tif (UtilityClinic.patFile == null) {\n\t\t\ttry {\n\t\t\t\tutil.accessExistingPatJson();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.out.println(\"File not found\");\n\t\t\t\treturn;\n\t\t\t}\n\t\t}\n\t\tutil.readFromPatJson(UtilityClinic.patFile);\n\t\tSystem.out.println(\"Enter search.....\");\n\t\tString search = UtilityClinic.readString();\n\t\tSystem.out.println(\"Showing search result(s).......\");\n\t\tfor (int i = 0; i < UtilityClinic.patJson.size(); i++) {\n\t\t\tJSONObject jsnobj = (JSONObject) UtilityClinic.patJson.get(i);\n\t\t\tif (jsnobj.get(\"Mobile\").toString().equals(search)) {\n\t\t\t\tpMob = jsnobj.get(\"Mobile\").toString();\n\t\t\t\tpName = jsnobj.get(\"Patient's name\").toString();\n\t\t\t\tpId = jsnobj.get(\"Patient's ID\").toString();\n\t\t\t\tSystem.out.print(++count + \" Name:\" + pName + \" ID:\" + pId + \" Mobile:\" + pMob + \" Age:\"\n\t\t\t\t\t\t+ jsnobj.get(\"Age\") + \"\\n\\n\");\n\t\t\t}\n\t\t}\n\t\tif (count == 0) {\n\t\t\tSystem.out.println(\"No results found.....\");\n\t\t}\n\t\tSystem.out.println();\n\t}", "public void chekcAllPhoneNumbers() {\n\t\t\n\t\tif(remaining!=-9999999 && remaining!=0)\n\t\t{\n\t\t\tAlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(\n\t\t\t\t\tcon);\n\t \n\t\t\t\t\t// create alert dialog\n\t\t \t\t\talertDialog = alertDialogBuilder.setTitle(\"Please wait\")\n\t\t\t\t\t\t.setMessage(\"Already an update is going on.\")\n\t\t\t\t\t\t.setCancelable(false)\n\t\t\t\t\t\t.setPositiveButton(\"Ok.\",new DialogInterface.OnClickListener() {\n\t\t\t\t\t\t\tpublic void onClick(DialogInterface dialog,int id) {\n\t\t\t\t\t\t\t\talertDialog.dismiss();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t }).create();\n\t \n\t\t\t\t\t// show it\n\t\t\t\t\talertDialog.show();\n\t\t}\n\t\telse\n\t\t{\n\t\t\t\n\t\t\tUri uri = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n\t\t\tString[] projection = new String[] {ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME,\n\t\t\t ContactsContract.CommonDataKinds.Phone.NUMBER};\n\n\t\t\tCursor people = getContentResolver().query(uri, projection, null, null, null);\n\n\t\t\tint indexName = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME);\n\t\t\tint indexNumber = people.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER);\n\n\t\t\tint total_size = people.getCount();\n\t\t\tif(total_size<=0)\n\t\t\t{\n\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\tToast.makeText(con, \"No contacts found.\", Toast.LENGTH_SHORT).show();\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tpeople.moveToFirst();\n\t\t\t\tdo {\n\t\t\t\t\t String name = people.getString(indexName);\n\t\t\t\t\t String number = people.getString(indexNumber);\n\t\t\t\t\t number = (new To_international(con)).change_to_international(number);\n\t\t\t\t\t if(number!=null)\n\t\t\t\t\t {\n\t\t\t\t\t \tvalid_name.add(name);\n\t\t\t\t\t \tvalid_number.add(number);\n\t\t\t\t\t }\n\t\t\t\t} while (people.moveToNext());\n\t\t\t\t\n\t\t\t\tLog.d(\"size\", \"\"+valid_name.size());\n\t\t\t\t\n\t\t\t\tif(valid_name.size()>0)\n\t\t\t\t{\n\t\t\t\t\tif(valid_name.size()>10)\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tflag = valid_name.size();\n\t\t\t\t\t\tremaining = valid_name.size();\n\t\t\t\t\t\tindex = -1;\n\t\t\t\t\t\tfor(int i=0;i<valid_name.size();i++)\n\t\t\t\t\t\t{\n\t\t\t\t\t\t\tparse_phone_number_query();\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t{\n\t\t\t\t\tsetSupportProgressBarIndeterminateVisibility(false);\n\t\t\t\t\tToast.makeText(con, \"No friends found in contacts.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\n\t\t}\n\t\t\t\t\n\t}", "public static ObservableList<Customers> getAllCustomers() {\n\n ObservableList<Customers> clist = FXCollections.observableArrayList();\n\n try {\n String sql = \"SELECT * FROM customers\";\n\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n\n ResultSet rs = ps.executeQuery();\n\n while(rs.next()) {\n\n int customerID = rs.getInt(\"Customer_ID\");\n String customerName = rs.getString(\"Customer_Name\");\n String customerAddress = rs.getString(\"Address\");\n String customerPostalCode = rs.getString(\"Postal_Code\");\n String customerPhone = rs.getString(\"Phone\");\n Date customerCreateDate = rs.getDate(\"Create_Date\");\n String customerCreatedBy = rs.getString(\"Created_By\");\n Timestamp customerLastUpdate = rs.getTimestamp(\"Last_Update\");\n String customerLastUpdatedBy = rs.getString(\"Last_Updated_By\");\n int customerDivisionId = rs.getInt(\"Division_ID\");\n\n models.Customers C = new models.Customers(\n customerID,\n customerName,\n customerAddress,\n customerPostalCode,\n customerPhone,\n customerCreateDate,\n customerCreatedBy,\n customerLastUpdate,\n customerLastUpdatedBy,\n customerDivisionId\n );\n clist.add((Customers) C);\n }\n\n } catch (Exception throwables) {\n throwables.printStackTrace();\n }\n\n return clist;\n }", "public void listAllCustomers () {\r\n\t\t\r\n customersList = my.resturnCustomers();\r\n\t\t\r\n\t}", "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}", "public List<Customer> findByPhone(String p) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE phone = ?\");\n ppst.setString(1, p);\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "private void filterRecyvlerView() {\n String query = etSearch.getText().toString();\n String[] querySplited = query.split(\" \");\n\n if(query.equals(\"\")){\n rvPostalCodes.removeAllViews();\n adapter.setRealmResults(Realm.getDefaultInstance().where(Locations.class).findAll());\n }else{rvPostalCodes.removeAllViews();\n if(querySplited.length == 1) {\n adapter = new LocationsAdapter(fragment, Realm.getDefaultInstance(), Realm.getDefaultInstance().where(Locations.class)\n .contains(\"postalCode\", querySplited[0], Case.INSENSITIVE).or()\n .contains(\"name\", querySplited[0], Case.INSENSITIVE).findAll());\n rvPostalCodes.setAdapter(adapter);\n\n\n }else if(querySplited.length == 2){\n adapter = new LocationsAdapter(fragment, Realm.getDefaultInstance(), Realm.getDefaultInstance().where(Locations.class)\n .contains(\"postalCode\", querySplited[0], Case.INSENSITIVE).or()\n .contains(\"name\", querySplited[0],Case.INSENSITIVE)\n .contains(\"postalCode\", querySplited[1],Case.INSENSITIVE).or()\n .contains(\"name\", querySplited[1],Case.INSENSITIVE).or()\n .findAll());\n rvPostalCodes.setAdapter(adapter);\n }else if(querySplited.length == 3){\n adapter = new LocationsAdapter(getTargetFragment(), Realm.getDefaultInstance(), Realm.getDefaultInstance().where(Locations.class)\n .contains(\"postalCode\", querySplited[0], Case.INSENSITIVE).or()\n .contains(\"name\", querySplited[0],Case.INSENSITIVE)\n .contains(\"postalCode\", querySplited[1],Case.INSENSITIVE).or()\n .contains(\"name\", querySplited[1],Case.INSENSITIVE)\n .contains(\"postalCode\", querySplited[2],Case.INSENSITIVE).or()\n .contains(\"name\", querySplited[2],Case.INSENSITIVE).or()\n .findAll());\n rvPostalCodes.setAdapter(adapter);\n }\n }\n\n }", "public void searchPerson() {\r\n\r\n\t/*get values from text filed*/\r\n\tname = tfName.getText();\r\n\r\n\t/*clear contents of arraylist if there are any from previous search*/\r\n\tpersonsList.clear();\r\n\r\n // intialize recordNumber to zero\r\n\trecordNumber = 0;\r\n\r\n\tif(name.equals(\"\"))\r\n\t{\r\n\t\tJOptionPane.showMessageDialog(null,\"Please enter person name to search.\");\r\n\t}\r\n\telse\r\n\t{\r\n\t\t/*get an array list of searched persons using PersonDAO*/\r\n\t\tpersonsList = pDAO.searchPerson(name);\r\n\r\n\t\tif(personsList.size() == 0)\r\n\t\t{\r\n\t\t\tJOptionPane.showMessageDialog(null, \"No record found.\");\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\t/*downcast the object from array list to PersonInfo*/\r\n\t\t\tPersonInfo person = (PersonInfo) personsList.get(recordNumber);\r\n\r\n // displaying search record in text fields \r\n\t\t\ttfName.setText(person.getName());\r\n\t\t\ttfAddress.setText(person.getAddress());\r\n\t\t\ttfPhone.setText(\"\"+person.getPhone());\r\n\t\t\ttfEmail.setText(person.getEmail());\r\n\t\t}\r\n\t}\r\n\r\n }", "private void searchExec(){\r\n\t\tString key=jComboBox1.getSelectedItem().toString();\r\n\t\tkey=NameConverter.convertViewName2PhysicName(\"Discount\", key);\r\n\t\tString valueLike=searchTxtArea.getText();\r\n\t\tList<DiscountBean>searchResult=discountService.searchDiscountByKey(key, valueLike);\r\n\t\tjTable1.setModel(ViewUtil.transferBeanList2DefaultTableModel(searchResult,\"Discount\"));\r\n\t}", "@Override\n public void actionPerformed(ActionEvent e) {\n customer = guiControl.getController().getAccountControl().vecAcc.searchCustomer(Integer.parseInt(textField1.getText()));\n String valued = \"\";\n if (customer.getValued() == 1) {\n valued += \"Valued\";\n } else {\n valued += \"Regular\";\n }\n //Creates the table model so that a table can be dispalyed\n defaultTableModel = new DefaultTableModel();\n table1.setModel(defaultTableModel);\n //Sets the column names\n defaultTableModel.addColumn(\"Account Number\");\n defaultTableModel.addColumn(\"Name\");\n defaultTableModel.addColumn(\"Phone\");\n defaultTableModel.addColumn(\"Customer Type\");\n //Checks to see if a customer name exists or not. If it doeesnt exist then it shows N/A as the\n if (customer.getName().equals(\"\")) {\n defaultTableModel.addRow(new Object[]{\"N/A\", \"N/A\", \"N/A\", \"N/A\"});\n } else {\n //Otherwise gets the values from customer class, and adds them as the rows\n defaultTableModel.addRow(new Object[]{\n customer.getAccountNo(), customer.getName(), customer.getPhone(), valued\n });\n }\n }", "public static void searchCustomers(ArrayList<Customer> customerList) throws IOException\r\n\t{\r\n\t\tclearScreen();\r\n\t\t\r\n\t\t// Contains the list of customers to display to the user\r\n\t\tArrayList<Customer> printList = new ArrayList<Customer>();\r\n\t\t\r\n\t\tSystem.out.println(\"[CUSTOMER SEARCH]\\n\");\r\n\t\tSystem.out.println(\"Enter a name to search for.\");\r\n\t\t\r\n\t\t// Gets user search input\r\n\t\tString searchString = inputString(false);\r\n\t\t\r\n\t\t// If a customer's name contains searchString, add it to the list of customers to be printed\r\n\t\tfor(Customer c : customerList)\r\n\t\t\tif(c.getName().toLowerCase().contains(searchString.toLowerCase().subSequence(0, searchString.length())))\r\n\t\t\t\tprintList.add(c);\r\n\t\t\r\n\t\teditCustomers(printList);\r\n\t}", "@FXML\n void search(ActionEvent event) {\n if(idSearch.getText().isEmpty())\n \talert.reportError(\"Please fill in with clients id before searching!\");\n else {\n \tthis.list = resHandler.getReservation(idSearch.getText().toString(),list);\n reservationsTable.setItems(list);\n }\n\t}", "public void searchCliente(JTextField txt, TextAutoCompleter match){\n match.removeAllItems(); // Remover todos los elementos del Autocompletador. \n cl = clientes();//Inserta todos los clientes en el vector. \n cl.forEach(item -> { //Agrega al autocompletador nombre e ID de los clientes \n match.addItem(item.getNombreCliente()+ \" \" + item.getApellidoPaterno() + \" \" + String.valueOf(item.getID_Cliente()));\n match.addItem(String.valueOf(item.getID_Cliente()));\n });\n }", "public void getCustomerNames() throws SQLException {\n ResultSet rs; \n Statement st = dbConnection.dbConnect().createStatement();\n String recordQuery = (\"Select * from customer\");\n rs = st.executeQuery(recordQuery);\n while(rs.next()){\n customers.getItems().add(rs.getString(\"customerName\"));\n }\n }", "@Override\n\tpublic UserVO searchPhone(String phone) throws Exception {\n\t\treturn dao.searchPhone(phone);\n\t}", "public void listAllCustomers() {\n List<Customer> list = model.findAllCustomers();\n if(list != null){\n if(list.isEmpty())\n view.showMessage(not_found_error);\n else\n view.showTable(list);\n }\n else\n view.showMessage(retrieving_data_error); \n }", "public void searchFunction() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "public abstract List<CustomerType> findCustomerTypebyCustomerTypeNumber(String searchString);", "public void searchFunction1() {\n textField_Search.textProperty().addListener(new ChangeListener<String>() {\n @Override\n public void changed(ObservableValue<? extends String> observable, String oldValue, String newValue) {\n tableView_recylce.setPredicate(new Predicate<TreeItem<EntryProperty>>() {\n @Override\n public boolean test(TreeItem<EntryProperty> entryTreeItem) {\n Boolean flag = entryTreeItem.getValue().titleProperty().getValue().toLowerCase().contains(newValue.toLowerCase()) ||\n entryTreeItem.getValue().usernameProperty().getValue().toLowerCase().contains(newValue.toLowerCase());\n return flag;\n }\n });\n }\n });\n }", "List<CustomerInformation> queryListByCustomer(Integer page, Integer rows, CustomerInformation cust);", "@Override\n\tpublic List<CustomerAddressDto> queryConsignee(String mobilePhone) {\n\t\treturn null;\n\t}", "public static void search() {\n int userSelected = selectFromList(crudParamOptions);\n switch (userSelected){\n case 1:\n searchFirstName();\n break;\n case 2:\n searchLastName();\n break;\n case 3:\n searchPhone();\n break;\n case 4:\n searchEmail();\n break;\n default:\n break;\n }\n }", "Customer search(String login);", "private void searchQuery() {\n edit_search.addTextChangedListener(new TextWatcher() {\n @Override\n public void beforeTextChanged(CharSequence s, int start, int count, int after) {\n if (paletteComposition.getVisibility() == View.VISIBLE){\n paletteComposition.setVisibility(View.GONE);\n setComposer.setVisibility(View.VISIBLE);\n }\n }\n\n @Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n setContactThatNameContains(s.toString().trim());\n }\n\n @Override\n public void afterTextChanged(Editable s) {\n\n }\n });\n }", "public List<StaffPojo> staffSearchByPhoneNo(String sphone) {\n\t\treturn staffDao.staffSearchByPhoneNo(sphone);\n\t}", "public void searchProducts()\n {\n if(!searchBar1.getText().equals(\"\"))\n {\n if(searchBar1.getText().matches(\"[0-9]*\"))\n {\n int number = Integer.parseInt(searchBar1.getText());\n ObservableList<Product> newProductList = FXCollections.observableArrayList();\n Product product = Inventory.lookupProduct(number);\n newProductList.add(product);\n productTableView.setItems(newProductList);\n if(newProductList.contains(null)) {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"No Product with that Name or ID found.\");\n alert.show();\n }\n } else {\n ObservableList<Product> newProductList = FXCollections.observableArrayList();\n newProductList = Inventory.lookupProduct(searchBar1.getText());\n productTableView.setItems(newProductList);\n if(newProductList.isEmpty()) {\n alert.setAlertType(Alert.AlertType.ERROR);\n alert.setContentText(\"No Product with that Name or ID found.\");\n alert.show();\n }\n }\n } else {\n productTableView.setItems(Inventory.getAllProducts());\n }\n }", "@Override\n\t\t\tpublic void onTextChanged(CharSequence s, int start, int before,\n\t\t\t\t\tint count) {\n\t\t\t\tString searchString = mEditText.getText().toString();\n\t\t\t\tint textLength = searchString.length();\n\t\t\t\tsearchResults = new ArrayList<Contacts>();\n\n\t\t\t\t// clear the initial data set\n\t\t\t\tsearchResults.clear();\n\n\t\t\t\tfor (int i = 0; i < list.size(); i++) {\n\t\t\t\t\tString values = list.get(i).getName().toString();\n\n\t\t\t\t\tif (textLength <= values.length()) {\n\t\t\t\t\t\tif (searchString.equalsIgnoreCase(values.substring(0,\n\t\t\t\t\t\t\t\ttextLength)))\n\t\t\t\t\t\t\tsearchResults.add(list.get(i));\n\t\t\t\t\t\tobjAdapter = new AdapterContact(\n\t\t\t\t\t\t\t\tAskfreind2Activity.this, R.layout.item_contact,\n\t\t\t\t\t\t\t\tsearchResults);\n\t\t\t\t\t\tlistView.setAdapter(objAdapter);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}", "@Override\n\tpublic List<PersonTelInfo> findByPhone(String phone) {\n\t\treturn getSqlSession().selectList(getIbatisMapperNameSpace() + \".findByPhone\", phone);\t \n\t}", "private void searchSponsor() {\r\n String sponsorCode=null;\r\n try {\r\n CoeusSearch coeusSearch =\r\n new CoeusSearch(mdiForm, \"SPONSORSEARCH\",\r\n CoeusSearch.TWO_TABS_WITH_MULTIPLE_SELECTION );\r\n coeusSearch.showSearchWindow();\r\n javax.swing.JTable tblResultsTable = coeusSearch.getSearchResTable();\r\n if(tblResultsTable == null) return;\r\n int row = tblResultsTable.getSelectedRow();\r\n if(row!=-1){\r\n sponsorCode = (String)tblResultsTable.getValueAt(row, 0);\r\n sponsorCode = sponsorCode+\":\"+(String)tblResultsTable.getValueAt(row, 1);\r\n }else{\r\n CoeusOptionPane.showErrorDialog(\"Please select a Sponsor\");\r\n }\r\n } catch (Exception exception) {\r\n exception.printStackTrace();\r\n }\r\n int startRow = 0;\r\n TreePath root = new TreePath(sponsorHierarchyTree.getModel().getRoot());\r\n // Find the path (regardless of visibility) that matches the\r\n // specified sequence of names\r\n TreePath path = findByName(sponsorHierarchyTree, sponsorCode);\r\n if(path == null) {\r\n CoeusOptionPane.showInfoDialog(\"The sponsor:\"+sponsorCode.substring(0,sponsorCode.indexOf(\":\"))+\" is not found in this hierarchy.\");\r\n sponsorHierarchyTree.collapsePath(root);\r\n sponsorHierarchyTree.setSelectionPath(root);\r\n return;\r\n }\r\n sponsorHierarchyTree.expandPath(root);\r\n sponsorHierarchyTree.expandPath(path);\r\n sponsorHierarchyTree.setSelectionPath(path);\r\n sponsorHierarchyTree.scrollRowToVisible(sponsorHierarchyTree.getRowForPath(path));\r\n }", "public void findUsers(String query)\n { \n if(searchtf.getText()!= null){\n ArrayList<StockOutBean> users = ListUsers(query);\n model = new DefaultTableModel() {\n @Override\n public boolean isCellEditable(int rowIndex, int mColIndex) {\n return false;\n }\n };\n \n model.setColumnIdentifiers(new Object[]{\"Invoice No.\", \"ProductId\", \"Barcode\", \"Product Name\", \n \"Product Description\", \"Category\", \"Quantity\", \"SellPrice\", \n \"Total\", \"Date\"});\n \n Object[] row = new Object[11];\n \n for(int i = 0; i < users.size(); i++)\n { \n row[0] = users.get(i).getInvoice();\n row[1] = users.get(i).getProductId();\n row[2] = users.get(i).getBarcode();\n row[3] = users.get(i).getPname();\n row[4] = users.get(i).getPdesc();\n row[5] = users.get(i).getCat();\n row[6] = users.get(i).getQty();\n row[7] = users.get(i).getSellPrice(); \n row[8] = users.get(i).getTotal();\n row[9] = users.get(i).getDate();\n \n model.addRow(row);\n }\n stable.setModel(model);\n \n }\n total.setText(\"TOTAL: \" + model.getRowCount());\n }", "public static ObservableList<Customer> getCustomerList() throws SQLException{\r\n customerList.clear();\r\n Connection conn = DBConnection.getConnection();\r\n String selectStatement = \"SELECT * FROM customers;\";\r\n DBQuery.setPreparedStatement(conn, selectStatement);\r\n PreparedStatement ps = DBQuery.getPreparedStatement();\r\n ps.execute();\r\n ResultSet rs = ps.getResultSet();\r\n\r\n //creates customer and adds to list\r\n while(rs.next())\r\n {\r\n int customerID = rs.getInt(\"Customer_ID\");\r\n String customerName = rs.getString(\"Customer_Name\");\r\n String address = rs.getString(\"Address\");\r\n String state = getDivisionName(rs.getInt(\"Division_ID\"));\r\n String postalCode = rs.getString(\"Postal_Code\");\r\n String country = getCountryName(getCountryID(rs.getInt(\"Division_ID\")));\r\n String phoneNumber = rs.getString(\"Phone\");\r\n Customer customer = new Customer(customerID,customerName,address,state,postalCode,country,phoneNumber);\r\n customerList.add(customer);\r\n }\r\n return customerList;\r\n }", "public ArrayList<Customer> findCustomer(String searchText) {\r\n\t\tsearchText = searchText.toLowerCase();\r\n\t\tArrayList<Customer> customers = new ArrayList<Customer>();\r\n\t\ttry (ResultSet result = manager.performSql(\"SELECT id FROM Customer WHERE LOWER(first_name || ' ' || last_name) LIKE '%\" + searchText + \"%'\")) {\r\n\t\t\twhile (result.next()) {\r\n\t\t\t\tcustomers.add(manager.getCustomer(result.getInt(1)));\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customers;\r\n\t}", "public String searchCustomerOfPromotion() throws Exception {\n\t\tactionStartTime = new Date();\n\t\tif (promotionId == null || promotionId <= 0) {\n\t\t\tresult.put(\"rows\", new ArrayList<PromotionCustomerVO>());\n\t\t\tresult.put(\"total\", 0);\n\t\t\treturn JSON;\n\t\t}\n\t\ttry {\n\t\t\tPromotionCustomerFilter filter = new PromotionCustomerFilter();\n\t\t\tfilter.setPromotionId(promotionId);\n\t\t\tfilter.setCode(code);\n\t\t\tfilter.setName(name);\n\t\t\tfilter.setAddress(address);\n\t\t\tfilter.setIsCustomerOnly(false);\n\t\t\tif (shopId == null || shopId == 0) {\n\t\t\t\tfilter.setStrListShopId(getStrListShopId());\n\t\t\t} else {\n\t\t\t\tfilter.setShopId(shopId);\n\t\t\t}\n\t\t\tObjectVO<PromotionCustomerVO> obj = promotionProgramMgr.getCustomerInPromotionProgram(filter);\n\t\t\tList<PromotionCustomerVO> lst = obj.getLstObject();\n\n\t\t\tList<TreeGridNode<PromotionCustomerVO>> tree = new ArrayList<TreeGridNode<PromotionCustomerVO>>();\n\t\t\tif (lst == null || lst.size() == 0) {\n\t\t\t\tresult.put(\"rows\", tree);\n\t\t\t\treturn JSON;\n\t\t\t}\n\n\t\t\t// Tao cay\n\t\t\tint i, sz = lst.size();\n\t\t\tPromotionCustomerVO vo = null;\n\t\t\tLong shId = currentUser.getShopRoot().getShopId();\n\t\t\tfor (i = 0; i < sz; i++) {\n\t\t\t\tvo = lst.get(i);\n\t\t\t\tif (vo.getIsCustomer() == 0 && shId.equals(vo.getId())) {\n\t\t\t\t\ti++;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t\t//PromotionStaffVO vo = lst.get(0);\n\t\t\tTreeGridNode<PromotionCustomerVO> node = new TreeGridNode<PromotionCustomerVO>();\n\t\t\tnode.setNodeId(\"sh\" + vo.getId());\n\t\t\tnode.setAttr(vo);\n\t\t\tnode.setState(ConstantManager.JSTREE_STATE_OPEN);\n\t\t\tnode.setText(vo.getCustomerCode() + \" - \" + vo.getCustomerName());\n\t\t\tList<TreeGridNode<PromotionCustomerVO>> chidren = new ArrayList<TreeGridNode<PromotionCustomerVO>>();\n\t\t\tnode.setChildren(chidren);\n\t\t\ttree.add(node);\n\n\t\t\tTreeGridNode<PromotionCustomerVO> tmp;\n\t\t\tTreeGridNode<PromotionCustomerVO> tmp2;\n\t\t\tfor (; i < sz; i++) {\n\t\t\t\tvo = lst.get(i);\n\n\t\t\t\ttmp2 = getNodeFromTree(tree, \"sh\" + vo.getParentId());\n\t\t\t\tif (tmp2 != null) {\n\t\t\t\t\ttmp = new TreeGridNode<PromotionCustomerVO>();\n\t\t\t\t\ttmp.setAttr(vo);\n\t\t\t\t\tif (0 == vo.getIsCustomer()) {\n\t\t\t\t\t\ttmp.setNodeId(\"sh\" + vo.getId());\n\t\t\t\t\t\ttmp.setState(ConstantManager.JSTREE_STATE_OPEN);\n\t\t\t\t\t} else {\n\t\t\t\t\t\ttmp.setNodeId(\"st\" + vo.getId());\n\t\t\t\t\t\ttmp.setState(ConstantManager.JSTREE_STATE_LEAF);\n\t\t\t\t\t}\n\t\t\t\t\ttmp.setText(vo.getCustomerCode() + \" - \" + vo.getCustomerName());\n\n\t\t\t\t\tif (tmp2.getChildren() == null) {\n\t\t\t\t\t\ttmp2.setChildren(new ArrayList<TreeGridNode<PromotionCustomerVO>>());\n\t\t\t\t\t}\n\t\t\t\t\ttmp2.getChildren().add(tmp);\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tresult.put(\"rows\", tree);\n\t\t} catch (Exception ex) {\n\t\t\tLogUtility.logErrorStandard(ex, R.getResource(\"web.log.message.error\", \"vnm.web.action.program.PromotionCatalogAction.searchCustomerOfPromotion\"), createLogErrorStandard(actionStartTime));\n\t\t\tresult.put(\"errMsg\", ValidateUtil.getErrorMsg(ConstantManager.ERR_SYSTEM));\n\t\t\tresult.put(ERROR, true);\n\t\t}\n\t\treturn JSON;\n\t}", "public void findUsers() {\n if (txtSearch.getText().isEmpty()) {\n JOptionPane.showMessageDialog(null, \"Enter then name of the person you want to Search\");\n } else {\n ArrayList<Users> users = ListUsers(txtSearch.getText());\n DefaultTableModel model = new DefaultTableModel();\n model.setColumnIdentifiers(new Object[]{\"User id\", \"Username\", \"Name\", \"Email\"});\n Object[] row = new Object[4];\n\n for (int i = 0; i < users.size(); i++) {\n row[0] = users.get(i).user_id;\n row[1] = users.get(i).username;\n row[2] = ((users.get(i).firstname) + \" \" + (users.get(i).middlename) + \" \" + (users.get(i).lastname));\n row[3] = users.get(i).email;\n\n model.addRow(row);\n }\n tblUser.setModel(model);\n jScrollPane1.setViewportView(tblUser);\n tblUser.setEnabled(false);\n }\n }", "public void searchCustomerName(String str) {\n\n sendTextToElement(searchCustomerField,str);\n }", "@Override\n public void handle(Event event) {\n FXMLCustomerController controller = new FXMLCustomerController();\n controller = (FXMLCustomerController) controller.load();\n\n SearchRowItem whichCustomer = searchResultsTable.getSelectionModel().getSelectedItem();\n controller.setCustomerDetails(whichCustomer);\n\n controller.getStage().showAndWait();\n if (controller.isUpdated()) {\n // refresh Customer against server\n // CustomerTO updatedCustomer = SoapHandler.getCustomerByID(whichCustomer.getCustomerId());\n // whichCustomer.setCustomerTO(updatedCustomer);\n // if there's a partner, set the name\n CustomerTO updatedCustomer = controller.getCustomer();\n Integer partnerId = whichCustomer.getPartnerId();\n if (partnerId != null && partnerId != 0) {\n if (whichCustomer.getPartnerProperty() == null) {\n whichCustomer.setPartnerProperty(new SimpleStringProperty());\n }\n SimpleStringProperty partnerName = (SimpleStringProperty) whichCustomer.getPartnerProperty();\n SearchRowItem partner = customerSet.get(partnerId);\n partnerName.setValue(partner.getForename());\n if (partner.getPartnerProperty() != null) {\n partner.getPartnerProperty().setValue(whichCustomer.getForename());\n } else {\n partner.setPartnerProperty(new SimpleStringProperty(whichCustomer.getForename()));\n }\n } else if (whichCustomer.getPartnerProperty() != null) {\n whichCustomer.getPartnerProperty().setValue(\"\");\n }\n whichCustomer.setCustomer(updatedCustomer);\n whichCustomer.refresh(updatedCustomer);\n // SearchRowItem customer = customerSet.get(whichCustomer.getCustomerId());\n // customer.setCustomerTO(whichCustomer);\n\n searchResultsTable.refresh();\n }\n }", "public static StringBuilder displaySearchResults()\n\t{\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tfor (Customer customer : customerList)\n\t\t{\n\t\t\tfor (int i = 0; i < customerSearch.size(); ++i)\n\t\t\t{\n\t\t\t\tif (customerList.indexOf(customer) == customerSearch.get(i))\n\t\t\t\t{\n\t\t\t\t\tsb.append(String.format(\"%10sRECORD# %d%n\", \" \", (customerSearch.indexOf(i) + 1)));\n\t\t\t\t\tsb.append(customer.toString());\n\t\t\t\t\tsb.append('\\n');\n\n\t\t\t\t\tfor (Account account : customer.getAcctList())\n\t\t\t\t\t{\n\t\t\t\t\t\tsb.append(account.toString());\n\t\t\t\t\t\tsb.append('\\n');\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn sb;\n\t}", "@Override\n\tpublic List<Customer> searchCustomerByName(String name) throws BusinessException {\n\t\treturn customerViewAllDAO.searchCustomerByName(name);\n\t}", "public void search() {\n try {\n String searchKey = txt_SearchKey.getText();\n Search s = new Search();\n con = dc.connect();\n stmt1 = con.createStatement();\n\n\n String sql = s.getSQLQuery(\"tblUsers\", searchKey);\n\n vtdata_user = new Vector();\n ResultSet rsUser = stmt1.executeQuery(sql);\n while (rsUser.next()) {\n\n Vector temp = new Vector();\n\n temp.add(rsUser.getString(\"UserName\"));\n temp.add(rsUser.getString(\"U_Name\"));\n temp.add(rsUser.getString(\"Email\"));\n // temp.add(rsUser.getDate(\"BirthDate\"));\n\n temp.add(formatDate.format(rsUser.getDate(\"BirthDate\")));\n boolean gender = rsUser.getBoolean(\"Gender\");\n\n\n if (gender == true) {\n temp.add(\"Male\");\n }\n\n if (gender == false) {\n temp.add(\"Female\");\n }\n temp.add(rsUser.getString(\"Phone\"));\n vtdata_user.add(temp);\n }\n\n user_model = new DefaultTableModel(vtdata_user, vtcolumn_user) {\n\n @Override\n public boolean isCellEditable(int row, int column) {\n return false;\n }\n };\n\n tb_User.setModel(user_model);\n if (vtdata_user.size() == 0) {\n\n JOptionPane.showMessageDialog(this, \"No Search User! \");\n }\n dc.disconnect(rsUser);\n dc.disconnect(stmt1);\n dc.disconnect(con);\n } catch (SQLException ex) {\n Logger.getLogger(UserManagement.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "@Override\n\tpublic List<Customer> searchCustomers(String theSearchName) {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\n\t\tQuery theQuery = null;\n\t\t\n\t\t// only search by name if theSearchName is not empty\n\t\tif(theSearchName != null && theSearchName.trim().length() > 0) {\n\t\t\ttheQuery = currentSession.createQuery(\"from Customer where \"\n\t\t\t\t\t+ \"lower(firstName) like :theName or lower(lastName) \"\n\t\t\t\t\t+ \"like :theName\", Customer.class);\n\t\t\t\n\t\t\ttheQuery.setParameter(\"theName\", \"%\" + theSearchName.toLowerCase() + \"%\");\n\t\t}\n\t\telse {\n\t\t\t// theSearchName is empty, so get all the customers\n\t\t\ttheQuery=currentSession.createQuery(\"from Customer\", Customer.class);\n\t\t}\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\n\t\treturn customers;\n\t}", "private ArrayList<Contact> getContactList(Context context) {\n String[] selectCol = new String[] { ContactsContract.Contacts.DISPLAY_NAME,\n ContactsContract.Contacts.HAS_PHONE_NUMBER, ContactsContract.Contacts._ID };\n\n final int COL_NAME = 0;\n final int COL_HAS_PHONE = 1;\n final int COL_ID = 2;\n\n // the selected cols for phones of a user\n String[] selPhoneCols = new String[] { ContactsContract.CommonDataKinds.Phone.NUMBER,\n ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME, ContactsContract.CommonDataKinds.Phone.TYPE };\n\n final int COL_PHONE_NUMBER = 0;\n final int COL_PHONE_NAME = 1;\n final int COL_PHONE_TYPE = 2;\n\n String select = \"((\" + Contacts.DISPLAY_NAME + \" NOTNULL) AND (\" + Contacts.HAS_PHONE_NUMBER + \"=1) AND (\"\n + Contacts.DISPLAY_NAME + \" != '' ))\";\n\n ArrayList<Contact> list = new ArrayList<Contact>();\n Cursor cursor = context.getContentResolver().query(ContactsContract.Contacts.CONTENT_URI, selectCol, select,\n null, ContactsContract.Contacts.DISPLAY_NAME + \" COLLATE LOCALIZED ASC\");\n if (cursor == null) {\n return list;\n }\n if (cursor.getCount() == 0) {\n return list;\n }\n\n cursor.moveToFirst();\n while (!cursor.isAfterLast()) {\n int contactId;\n contactId = cursor.getInt(cursor.getColumnIndex(ContactsContract.Contacts._ID));\n if (cursor.getInt(COL_HAS_PHONE) > 0) {\n // the contact has numbers\n // 获得联系人的电话号码列表\n String displayName;\n displayName = cursor.getString(COL_NAME);\n Cursor phoneCursor = context.getContentResolver().query(\n ContactsContract.CommonDataKinds.Phone.CONTENT_URI, selPhoneCols,\n ContactsContract.CommonDataKinds.Phone.CONTACT_ID + \"=\" + contactId, null, null);\n if (phoneCursor.moveToFirst()) {\n do {\n // 遍历所有的联系人下面所有的电话号码\n String phoneNumber = phoneCursor.getString(COL_PHONE_NUMBER);\n Contact contact = new Contact(0, displayName);\n contact.phoneNumber = phoneNumber;\n list.add(contact);\n } while (phoneCursor.moveToNext());\n \n phoneCursor.close();\n }\n }\n cursor.moveToNext();\n }\n \n cursor.close();\n\n return list;\n }", "public static String searchCustomer(String filter)\n\t{\n\t\tfor (Customer customer : customerList)\n\t\t{\n\t\t\tif (customer.getFirstName().contains(filter))\n\t\t\t{\n\t\t\t\tcustomerSearch.add(customerList.indexOf(customer));\n\t\t\t}\n\t\t}\n\t\treturn String.format(\"Records found: %d\", customerSearch.size());\n\t}", "public ArrayList<AddressEntry> searchByPhoneNumber(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getPhoneNumber().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "@GetMapping(\"/search/results\")\n public String showClientsByNameAndLastName(Model model, @ModelAttribute(CUSTOMER) CustomerDTO customerDTO) {\n Customer customer = mapDTOCustomerToPersistent(customerDTO);\n model.addAttribute(CUSTOMERS, customerService.findByNameAndLastName(customer.getFirstName(), customer.getLastName()));\n return CUSTOMERS_INDEX;\n }", "public static ArrayList<CustomerInfoBean> getCutomers_suggested() {\r\n\t\tCustomerInfoBean bean = null;\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id, \\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" JOIN appliance a ON e.appliance_id =a.appliance_id \\n\"\r\n\t\t\t\t\t+ \" JOIN salesman s ON e.salesman_id =s.salesman_id \\n\"\r\n\t\t\t\t\t+ \" JOIN customer cs ON e.customer_id = cs.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN sold_to sld ON cs.customer_id=sld.customer_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" WHERE e.status=3\";\r\n\t\t\tPreparedStatement stmt = con.prepareStatement(query);\r\n\t\t\tResultSet rs = stmt.executeQuery();\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(11);\r\n\t\t\t\tsalesmanId = rs.getInt(12);\r\n\t\t\t\tapplianceName = rs.getString(13);\r\n\t\t\t\tstatus = rs.getInt(14);\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}", "@Override\n\tpublic List<Contact> search(String str) {\n\t\treturn null;\n\t}", "private void searchPatient() {\r\n String lName, fName;\r\n lName = search_lNameField.getText();\r\n fName = search_fNameField.getText();\r\n // find patients with the Last & First Name entered\r\n patientsFound = MainGUI.pimsSystem.search_patient(lName, fName);\r\n\r\n // more than one patient found\r\n if (patientsFound.size() > 1) {\r\n\r\n // create String ArrayList of patients: Last, First (DOB)\r\n ArrayList<String> foundList = new ArrayList<String>();\r\n String toAdd = \"\";\r\n // use patient data to make patient options to display\r\n for (patient p : patientsFound) {\r\n toAdd = p.getL_name() + \", \" + p.getF_name() + \" (\" + p.getDob() + \")\";\r\n foundList.add(toAdd);\r\n }\r\n int length;\r\n // clear combo box (in case this is a second search)\r\n while ((length = selectPatient_choosePatientCB.getItemCount()) > 0) {\r\n selectPatient_choosePatientCB.removeItemAt(length - 1);\r\n }\r\n // add Patient Options to combo box\r\n for (int i = 0; i < foundList.size(); i++) {\r\n selectPatient_choosePatientCB.addItem(foundList.get(i));\r\n }\r\n\r\n // display whether patients found or not\r\n JOptionPane.showMessageDialog(this, \"Found More than 1 Result for Last Name, First Name: \" + lName + \", \" + fName\r\n + \".\\nPress \\\"Ok\\\" to select a patient.\",\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n\r\n selectPatientDialog.setVisible(true);\r\n }\r\n\r\n // one patient found\r\n else if (patientsFound.size() == 1) {\r\n\r\n JOptionPane.showMessageDialog(this, \"Found one match for Last Name, First Name: \" + lName + \", \" + fName,\r\n \"Search Successful\", JOptionPane.DEFAULT_OPTION);\r\n // display patient data\r\n currentPatient = patientsFound.get(0);\r\n search_fillPatientFoundData(currentPatient);\r\n }\r\n // no patient found\r\n else {\r\n\r\n JOptionPane.showMessageDialog(this, \"No Results found for Last Name, First Name:\" + lName + \", \" + fName,\r\n \"Search Failed\", JOptionPane.ERROR_MESSAGE);\r\n }\r\n }", "private void customerDatas() {\n customers = new ArrayList<Customer>();\n customerListForArrayAdapter = new ArrayList<Customer>();\n Cursor cursor = database.rawQuery(\"SELECT * FROM CUSTOMER\", null);\n while (cursor.moveToNext()) {\n Customer customer = new Customer(\n cursor.getString(cursor.getColumnIndex(\"CUSTOMER_ID\"))\n , cursor.getString(cursor.getColumnIndex(\"CUSTOMER_NAME\"))\n , cursor.getString(cursor.getColumnIndex(\"CUSTOMER_TYPE_ID\"))\n , cursor.getString(cursor.getColumnIndex(\"CUSTOMER_TYPE_NAME\"))\n , cursor.getString(cursor.getColumnIndex(\"ADDRESS\"))\n , cursor.getString(cursor.getColumnIndex(\"PH\"))\n , cursor.getString(cursor.getColumnIndex(\"TOWNSHIP\"))\n , cursor.getString(cursor.getColumnIndex(\"CREDIT_TERM\"))\n , cursor.getDouble(cursor.getColumnIndex(\"CREDIT_LIMIT\"))\n , cursor.getDouble(cursor.getColumnIndex(\"CREDIT_AMT\"))\n , cursor.getDouble(cursor.getColumnIndex(\"DUE_AMT\"))\n , cursor.getDouble(cursor.getColumnIndex(\"PREPAID_AMT\"))\n , cursor.getString(cursor.getColumnIndex(\"PAYMENT_TYPE\"))\n , cursor.getString(cursor.getColumnIndex(\"IS_IN_ROUTE\"))\n , cursor.getDouble(cursor.getColumnIndex(\"LATITUDE\"))\n , cursor.getDouble(cursor.getColumnIndex(\"LONGITUDE\"))\n , cursor.getInt(cursor.getColumnIndex(\"VISIT_RECORD\")));\n customers.add(customer);\n customerListForArrayAdapter.add(customer);\n }\n\n customerListArrayAdapter = new CustomerListArrayAdapter(this);\n customersListView.setAdapter(customerListArrayAdapter);\n\n customersListView.setOnItemClickListener(new AdapterView.OnItemClickListener() {\n\n @Override\n public void onItemClick(AdapterView<?> parent, View view, int position,\n long id) {\n\n customer = customers.get(position);\n\n customerNameTextView.setText(customer.getCustomerName());\n phoneTextView.setText(customer.getPhone());\n addressTextView.setText(customer.getAddress());\n townshipTextView.setText(customer.getTownship());\n creditTermsTextView.setText(customer.getCreditTerms());\n creditLimitTextView.setText(customer.getCreditLimit() + \"\");\n creditAmountTextView.setText(customer.getCreditAmt() + \"\");\n dueAmountTextView.setText(customer.getDueAmt() + \"\");\n prepaidAmountTextView.setText(customer.getPrepaidAmt() + \"\");\n paymentTypeTextView.setText(customer.getPaymentType());\n latitude = customer.getLatitude();\n longitude = customer.getLongitude();\n visitRecord = customer.getVisitRecord();\n }\n });\n\n searchCustomersEditText.addTextChangedListener(new TextWatcher() {\n\n @Override\n public void onTextChanged(CharSequence characterSequence, int arg1, int arg2, int arg3) {\n\n customerListForArrayAdapter.clear();\n\n for (Customer customer : customers) {\n\n if (customer.getCustomerName().toLowerCase()\n .contains(characterSequence.toString().toLowerCase())) {\n\n customerListForArrayAdapter.add(customer);\n customerListArrayAdapter.notifyDataSetChanged();\n }\n }\n }\n\n @Override\n public void beforeTextChanged(CharSequence arg0, int arg1, int arg2,\n int arg3) {\n }\n\n @Override\n public void afterTextChanged(Editable arg0) {\n }\n });\n\n phoneTextView.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n if (didCustomerSelected()) {\n String phoneNo = phoneTextView.getText().toString();\n startActivity(new Intent(Intent.ACTION_DIAL, Uri.parse(\"tel:\" + phoneNo)));\n }\n }\n });\n }", "@FXML\r\n\tvoid search_btn_clicked(MouseEvent event) {\r\n\t\tObservableList<SalePattern> found_sales = FXCollections.observableArrayList();\r\n\t\ttry {\r\n\t\t\tif (!search_txt.getText().isEmpty()) {\r\n\t\t\t\tfor (SalePattern sale : sale_patterns_list) {\r\n\t\t\t\t\tInteger search = new Integer(search_txt.getText());\r\n\t\t\t\t\tif (search <= 0) {\r\n\t\t\t\t\t\tthrow new Exception();\r\n\t\t\t\t\t}\r\n\t\t\t\t\tif (sale.getGasStationTag().toString().startsWith(search.toString())) {\r\n\t\t\t\t\t\tfound_sales.add(sale);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tsales_table.setItems(FXCollections.observableArrayList());\r\n\t\t\t\tif (found_sales != null) {\r\n\t\t\t\t\tsales_table.getItems().addAll(found_sales);\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tsales_table.setItems(sale_patterns_list);\r\n\t\t\t}\r\n\t\t\tsearch_txt.setStyle(null);\r\n\t\t} catch (Exception e) {\r\n\t\t\tsearch_txt.setStyle(\"-fx-text-box-border: #FF0000; -fx-focus-color: #FF0000;\");\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setTitle(\"Invalid input\");\r\n\t\t\talert.setHeaderText(null);\r\n\t\t\talert.setContentText(\"Input entered is not valid please try again\");\r\n\t\t\talert.show();\r\n\t\t\treturn;\r\n\t\t}\r\n\t}", "public List<HashMap<String,String>> contacts() {\n final Uri uriContact = ContactsContract.CommonDataKinds.Phone.CONTENT_URI;\n ContentResolver cr = getActivity().getContentResolver();\n Cursor cur = cr.query(uriContact, null, null, null, null);\n\n List<HashMap<String,String>> contacts=new ArrayList<>();\n if (cur.getCount() > 0) {\n while (cur.moveToNext()) {\n String id = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone._ID));\n String name = cur.getString(\n cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.DISPLAY_NAME));\n\n\n String has_phone = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.HAS_PHONE_NUMBER));\n HashMap<String,String> contact=new HashMap();\n if(!has_phone.endsWith(\"0\"))\n {\n contact.put(\"name\", name);\n String phoneNumber = cur.getString(cur.getColumnIndex(ContactsContract.CommonDataKinds.Phone.NUMBER));\n contact.put(\"number\",phoneNumber);\n contacts.add(contact);\n }\n }\n }\n this.contacts_phone=contacts;\n contacts=filter_to_app(contacts);\n return contacts;\n }", "@Override\n\t@Transactional\n\tpublic List<IoMember> filterMemberByTelephone(String telephone) {\n\t\treturn memberDao.filterMemberByTelephone(telephone);\n\t}", "public List<Contact> searchContacts(Map<SearchTerm,String> criteria);", "public void llenarListaColocacion(){\n\n //capturar el texto y filtrar\n txtBuscar.textProperty().addListener((prop,old,text) ->{\n colocaciondata.setPredicate(colocacion ->{\n if (text==null || text.isEmpty()){\n return true;\n }\n String texto=text.toLowerCase();\n if(String.valueOf(colocacion.getIdColocacion()).toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getNombre().toLowerCase().contains(texto)){\n return true;\n }\n else if(colocacion.getEstado().toLowerCase().contains(texto)){\n return true;\n }\n\n return false;\n });\n });\n\n\n\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == RESULT_CODE_SEARCH) {\n if (resultCode == Activity.RESULT_OK) {\n String street_name;\n String street_number;\n String meter_number;\n try {\n street_name = data.getStringExtra(\"street_name\");\n street_number = data.getStringExtra(\"street_number\");\n meter_number = data.getStringExtra(\"meter_number\");\n } catch (Exception e) {\n e.printStackTrace();\n return;\n }\n\n ArrayList<model_pro_mr_route_rows> rows = new ArrayList<>();\n for (MeterReaderController.Keys rid : MeterReaderController.route_row_keys) {\n rows.add(\n DBHelper.pro_mr_route_rows.getRouteRow(rid.getInstNode_id(),\n rid.getMobnode_id(),\n rid.getCycle(),\n rid.getRoute_number(),\n rid.getMeter_id(),\n rid.getWalk_sequence()));\n }\n\n //We have a meter number, only on record will have the entry\n if (!meter_number.isEmpty()) {\n for (model_pro_mr_route_rows r : rows) {\n if ((r.getMeter_number().compareToIgnoreCase(meter_number) == 0)) {\n setCurrentFragmentView(\n new MeterReaderController.Keys(r.getCycle(),\n r.getInstNode_id(),\n r.getMeter_id(),\n r.getMobnode_id(),\n r.getRoute_number(),\n r.getWalk_sequence()));\n return;\n }\n }\n }\n\n //We have a complete address\n if (!street_name.isEmpty() & !street_number.isEmpty()) {\n for (model_pro_mr_route_rows r : rows) {\n if ((r.getAddress_name().compareToIgnoreCase(street_name) == 0) &\n (r.getStreet_number().compareToIgnoreCase(street_number) == 0)) {\n setCurrentFragmentView(\n new MeterReaderController.Keys(r.getCycle(),\n r.getInstNode_id(),\n r.getMeter_id(),\n r.getMobnode_id(),\n r.getRoute_number(),\n r.getWalk_sequence()));\n return;\n }\n }\n }\n\n //We have a street name but no number\n if (!street_name.isEmpty()) {\n for (model_pro_mr_route_rows r : rows) {\n if (r.getAddress_name().compareToIgnoreCase(street_name) == 0) {\n setCurrentFragmentView(\n new MeterReaderController.Keys(r.getCycle(),\n r.getInstNode_id(),\n r.getMeter_id(),\n r.getMobnode_id(),\n r.getRoute_number(),\n r.getWalk_sequence()));\n return;\n }\n }\n }\n\n //We have a street number but no nname\n if (!street_number.isEmpty()) {\n for (model_pro_mr_route_rows r : rows) {\n if (r.getStreet_number().compareToIgnoreCase(street_number) == 0) {\n setCurrentFragmentView(\n new MeterReaderController.Keys(r.getCycle(),\n r.getInstNode_id(),\n r.getMeter_id(),\n r.getMobnode_id(),\n r.getRoute_number(),\n r.getWalk_sequence()));\n }\n }\n }\n }\n }\n }", "public static void clearCustomerSearch()\n\t{\n\t\tcustomerSearch.clear();\n\t}", "public void pesquisa(){\n ObservableList<Medico> search = observableArrayList(medicoDAO.search(fieldSearch.getText()));\n medicoNome.setCellValueFactory(new PropertyValueFactory<>(\"nome\"));\n medicoCrm.setCellValueFactory(new PropertyValueFactory<>(\"crm\"));\n medicoEspecialidade.setCellValueFactory(new PropertyValueFactory<>(\"nomeEspecialidade\"));\n tabelaMedicos.setItems(FXCollections.observableArrayList(search));\n }", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\t\t\t\t\n\t\t// create a query ... sort by the lastname\n\t\tQuery<Customer> theQuery = \n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\",Customer.class);\n\t\t\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\t\t\t\t\n\t\t// return the results\t\t\n\t\treturn customers;\n\t}", "@Override\n public void onTextChanged(CharSequence s, int start, int before, int count) {\n String text = searchBar.getText().toString().toLowerCase();\n // voer displayArray uit\n filteredUsers.clear();\n int length = users.size();\n for (int i = 0; i < length; i++) {\n final String name = users.get(i).first.toLowerCase();\n if (name.startsWith(text)) {\n filteredUsers.add(users.get(i));\n }\n }\n displayArray(filteredUsers);\n //Log.d(TAG, \"text changed\");\n }", "public String list(){\n\t\tif(name == null) {\n\t\t\ttry {\n\t\t\t\tlist = customerBO.getAll();\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t} else {\n\t\t\tList<Customer> l = new ArrayList<Customer>();\n\t\t\ttry {\n\t\t\t\tl = customerBO.getAll();\n\t\t\t\tfor(Customer cus: l) {\n\t\t\t\t\tString CustomerName = cus.getFirstName() + \" \" + cus.getLastName();\n\t\t\t\t\tif(CustomerName.compareTo(name) == 0) {\n\t\t\t\t\t\tlist.add(cus);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint total = list.size();\n\t\t\t\tint div = total / STATIC_ROW_MAX;\n\t\t\t\tif(div * STATIC_ROW_MAX == total) {\n\t\t\t\t\ttotalPage = div;\n\t\t\t\t} else {\n\t\t\t\t\ttotalPage = div + 1;\n\t\t\t\t}\t\n\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t}\n\t\tint index = 0, begin = 0;\n\t\tbegin = (pageIndex - 1) * STATIC_ROW_MAX;\n\t\tif(pageIndex < totalPage) {\n\t\t\tindex = pageIndex * STATIC_ROW_MAX;\n\t\t} else {\n\t\t\tindex = list.size();\n\t\t}\n\t\tfor(int i = begin; i < index; i++) {\n\t\t\tlistCustomer.add(list.get(i));\t\t\t\t\n\t\t}\n\n\t\treturn \"list\";\n\t}", "@Override\n\tpublic List<Customer> retrieveAllCustomers() {\n\t\tlogger.info(\"A GET call retrieved all customers: retrieveAllCustomers()\");\n\t\treturn customers;\n\t}", "private void custComboActionPerformed(java.awt.event.ActionEvent evt) {\n String name = \"select * from Customer WHERE fname = ?\";\n String userName = custCombo.getSelectedItem().toString();\n\n long custNum = 0;\n try {\n prepState = run.connect().prepareStatement(name);\n prepState.setString(1, userName);\n resSet = prepState.executeQuery();\n\n while (resSet.next()) {\n if (userName.equals(resSet.getString(2))) {\n custTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n custNum = resSet.getLong(1);\n\n }\n }\n\n String rental = \"select * from Rental WHERE custNumber = ?\";\n prepState = run.connect().prepareStatement(rental);\n prepState.setLong(1, custNum);\n resSet = prepState.executeQuery();\n\n Object row[];\n while (resSet.next()) {\n if (custNum == resSet.getLong(2)) {\n custTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n DefaultTableModel cTable = (DefaultTableModel) custTable.getModel();\n\n row = new Object[4];\n row[0] = resSet.getLong(1);\n row[1] = resSet.getString(4);\n row[2] = resSet.getString(5);\n row[3] = resSet.getDouble(7);\n\n cTable.addRow(row);\n\n } else if (custNum != resSet.getLong(2)) {\n custTable.setModel(new DefaultTableModel(null, new Object[]{\"Rental Number\",\n \"Date of Rent\", \"Return Date\", \"Total Price\"}));\n }\n }\n } catch (SQLException ex) {\n System.out.println(\"SQLException: \" + ex.getMessage());\n }\n\n }", "public ArrayList<String> initSearchTable(String searchName, String displayName, long rawContactId,\n String phoneNumber, long version, String key, Context context) {\n if (TextUtils.isEmpty(searchName)) {\n return null;\n }\n\n /* pinyin4Char saves the Pinyin strings for each Chinese character in name.\n * Because we might have multiple pinyin strings for one Chinese char,\n * so use list here. */\n ArrayList<String> pinyin4Char = new ArrayList<String>();\n /* cachePyList saves the full Pinyin strings for Chinese name or original letters for English name. */\n ArrayList<String> cachePyList = new ArrayList<String>();\n\n int iLength = searchName.length();\n\n int multiPinyinCount = 0;\n for (int namePosition = 0; namePosition < iLength; namePosition++) {\n char ch = searchName.charAt(namePosition);\n int chCode = ch;\n pinyin4Char.clear();\n if (HanziUtil.isHanziCharCode(chCode)) {\n for (int count = 0; count < PINYIN_CANDIDATE_PER_CHAR; count++) {\n String pinyin = getHanziPinyinDataForCharCode(chCode, count);\n if (pinyin == null) {\n break;\n }\n pinyin4Char.add(pinyin);\n }\n int polyCount = pinyin4Char.size();\n if (polyCount == 0) {\n // can not find pinyin for this char, skip it.\n continue;\n }\n if (cachePyList.size() == 0) {\n cachePyList.addAll(pinyin4Char);\n } else {\n int prevCount = cachePyList.size();\n boolean handleMultiPinyin = true;\n\n if(polyCount > 1) {\n multiPinyinCount ++;\n }\n if (multiPinyinCount > MULTI_PINYIN_LIMIT) {\n handleMultiPinyin = false;\n polyCount = 1;\n }\n\n ArrayList<String> tempArray = new ArrayList<String>(prevCount * polyCount);\n for (String pinyinItem : cachePyList) {\n if (handleMultiPinyin) {\n for (String pinyin : pinyin4Char) {\n tempArray.add(pinyinItem + pinyin);\n }\n } else {\n tempArray.add(pinyinItem + pinyin4Char.get(0));\n }\n }\n cachePyList.clear();\n cachePyList.addAll(tempArray);\n }\n } else {\n String letter = Character.toString(ch);\n if (letter.length() == 0) {\n if (Build.TYPE.equals(Build.USER)) {\n Log.w(TAG, \"initSearchTable: got 0 length char code: \"+chCode+\" in name **** at \"+namePosition);\n } else {\n Log.w(TAG, \"initSearchTable: got 0 length char code: \"+chCode+\" in name \"+searchName+\" at \"+namePosition);\n }\n continue;\n } else if ((ch >= '2') && (ch <= '9')) {\n letter = Character.toString((char) (ch - 32));\n } else if ((ch >= 'a') && (ch <= 'z')) {\n letter = letter.toUpperCase(Locale.US);\n } else if (((ch >= 'A') && (ch <= 'Z')) || (ch == '0') || (ch == '1')) {\n // keep letter unchanged, but go through the code after the if-statement.\n } else {\n // not digits and letters, this can be symbols,\n // like '#', '%', etc.\n // ignore the characters that cannot map to pinyin or digits\n continue;\n }\n if (cachePyList.isEmpty()) {\n cachePyList.add(letter);\n } else {\n int prevCount = cachePyList.size();\n ArrayList<String> tempArray = new ArrayList<String>(prevCount);\n for (String pinyinItem : cachePyList) {\n tempArray.add(pinyinItem + letter);\n }\n cachePyList.clear();\n cachePyList.addAll(tempArray);\n }\n }\n\n }\n ArrayList<String> retArray = new ArrayList<String>();\n StringBuilder firstChar = new StringBuilder();\n StringBuilder t9Str = new StringBuilder();\n for (String cachePy : cachePyList) {\n t9Str.setLength(0);\n\n int strLettersLength = cachePy.length();\n boolean addedFirstChar = false;\n for (int i = 0; i < strLettersLength; i++) {\n char c = cachePy.charAt(i);\n if ((c >= 'a') && (c <= 'z')) {\n c = HanziUtil.Data_Letters_To_T9[c - 'a'];\n } else if ((c >= 'A') && (c <= 'Z')) {\n char temp = HanziUtil.Data_Letters_To_T9[c - 'A'];\n c = (char) (temp - 32);\n firstChar.append(c).append(i);\n addedFirstChar = true;\n /*} else if ((c >= '2') && (c <= '9')) {\n c -= 32;\n firstChar.append(c).append(i);\n addedFirstChar = true;\n useless code, no '2' to '9' will be left here. */\n } else {\n firstChar.append('\\u0001').append(i);\n addedFirstChar = true;\n }\n t9Str.append(c);\n }\n if (addedFirstChar) {\n firstChar.append(',');\n }\n\n retArray.add(t9Str.toString());\n }\n // If firstChar has contents, then it must end with ',',\n // we need to remove the ',' at tail.\n if (firstChar.length() > 0) {\n firstChar.deleteCharAt(firstChar.length() - 1);\n }\n ContactInMemory myContactInfo = getSearchTableShadow().get(key);\n if (myContactInfo == null) {\n myContactInfo = new ContactInMemory();\n getSearchTableShadow().put(key, myContactInfo);\n }\n\n Iterator<String> it = retArray.iterator();\n StringBuilder sb = new StringBuilder();\n while (it.hasNext()) {\n String element = it.next();\n sb.append(element);\n sb.append(',');\n }\n if (sb.length() != 0) {\n sb.setLength(sb.length() -1);\n }\n\n myContactInfo.pinyinData = sb.toString();\n myContactInfo.length = searchName.length();\n myContactInfo.version = version;\n myContactInfo.contactName = displayName;\n myContactInfo.phoneNumber = phoneNumber;\n myContactInfo.area = getArea(phoneNumber, context);\n\n if (myContactInfo.allFistCharacter == null) {\n myContactInfo.allFistCharacter = firstChar.toString();\n } else if (myContactInfo.allFistCharacter.length() > 0) {\n myContactInfo.allFistCharacter += \",\";\n myContactInfo.allFistCharacter += firstChar.toString();\n }\n myContactInfo.retArray = retArray;\n addToSearchMap(getSearchMapShadow(),retArray,key);\n return retArray;\n }", "public List<Customer> findByName(String n) {\n\n Connection conn = ConnectionFactory.getConnection();\n PreparedStatement ppst = null;\n ResultSet rest = null;\n List<Customer> customers = new ArrayList<>();\n\n try {\n ppst = conn.prepareStatement(\"SELECT * FROM customer WHERE LOWER(name) LIKE LOWER(?)\");\n ppst.setString(1, \"%\" + n + \"%\");\n rest = ppst.executeQuery();\n\n while (rest.next()) {\n Customer c = new Customer(\n rest.getInt(\"customer_key\"),\n rest.getString(\"name\"),\n rest.getString(\"id\"),\n rest.getString(\"phone\")\n );\n customers.add(c);\n }\n } catch (SQLException e) {\n throw new RuntimeException(\"Query error: \", e);\n } finally {\n ConnectionFactory.closeConnection(conn, ppst, rest);\n }\n return customers;\n }", "static void displayOrders() {\n\n String customerSearch;\n boolean customerFound = false;\n\n while(!customerFound){\n customerSearch = Validate.readString(ASK_CST_ORDER); // ask for customer to locate their order\n\n Customer temp; // new customer object\n\n for (Customer aCustomerList : customerList) { // loops through the customer list\n\n if (customerSearch.toUpperCase().equals(aCustomerList.getName().toUpperCase())) { // Scenario 1: name is found in the customer list\n\n customerFound = true; // set to true to stop loop\n\n temp = aCustomerList; // sets temp customer object to found object\n\n System.out.println(\"The orders for \" + temp.getName() + \" are: \\n\"); // prints out the name of customer\n\n temp.viewAll(); // prints all orders for that customer\n } else { // Scenario 2: name is not found in the customer list\n\n System.out.println(CST_NAME_ERROR); // print error saying cannot find customer\n }\n }\n }\n }", "public void showCustomers() {\r\n List<String> customerList = new ArrayList<>();\r\n for (int i = 0; i < customersTable.getItems().size(); i++) {\r\n Customer customer = customersTable.getItems().get(i);\r\n LocalDate date = LocalDate.parse(customer.getDate());\r\n if (date.plusMonths(1).isBefore(LocalDate.now())) {\r\n customerList.add(customer.getFirstName() + \" \" + customer.getLastName());\r\n }\r\n }\r\n String message = \"\";\r\n for (String customer : customerList) {\r\n message += customer + \"\\n\";\r\n }\r\n if (message.equals(\"\")) {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(\"No customers to be contacted today\");\r\n alert.showAndWait();\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\r\n alert.setTitle(\"The following customers need to be contacted this week\");\r\n alert.setHeaderText(null);\r\n alert.setContentText(message);\r\n alert.showAndWait();\r\n }\r\n }", "private void showSponsorSearch(){\r\n String sponsorCode;\r\n// boolean replaceInfo = false;\r\n try{\r\n edu.mit.coeus.search.gui.CoeusSearch coeusSearch =\r\n new edu.mit.coeus.search.gui.CoeusSearch(dlgWindow,\r\n \"sponsorSearch\",1);\r\n coeusSearch.showSearchWindow();\r\n edu.mit.coeus.search.gui.SearchResultWindow resWindow =\r\n coeusSearch.getResultWindow();\r\n if (!coeusSearch.getSelectedValue().equals(null) ){\r\n txtSponsorCode.setText(coeusSearch.getSelectedValue());\r\n txtSponsorCode.requestFocusInWindow();\r\n sponsorCode = txtSponsorCode.getText();\r\n getSponsorInfo(sponsorCode);\r\n }\r\n }catch(Exception e) {\r\n }\r\n }", "public ArrayList<Customer> getAllCustomers();", "public void actionPerformed(ActionEvent e) {\n\t\t\t\tPhone p = new Phone();\n\t\t\t\tp.setBatteryCapacity(0);\n\t\t\t\tp.setPrice(99);\n\t\t\t\tp.setOperatingSystem(\"Android\");\n\t\t\t\tp.setResolutionX(4);\n\n\t\t\t\tList<Phone> phones = sbr.searchPhones(p);\n\t\t\t\tif (phones == null) {\n\t\t\t\t\tJOptionPane.showMessageDialog(SearchForm.this, \"List of phones is null\",\n\t\t\t\t\t\t\t\"Table not working error\", JOptionPane.ERROR_MESSAGE);\n\t\t\t\t} else {\n\t\t\t\t\ttm.setPhonesList(phones);\n\t\t\t\t}\n\t\t\t}", "public void findContact(){\n EtecsaDB database = new EtecsaDB(this.getContext());\n if (!database.hasDatabase()){\n Toast.makeText(this.getContext(), R.string.no_database, Toast.LENGTH_SHORT).show();\n }\n else //buscar contacto\n new Search(this.getActivity()).execute(advancedSearch);\n }", "private void getCustomer() {\n final LoginGet loginget = new LoginGet();\n loginget.setLoginGetListener(new LoginGetListener() {\n\n @Override\n public void getMember(ArrayList<Customer> list) {\n\n }\n\n @Override\n public void getCustomer(ArrayList<Customer> list) {\n customerList = new ArrayList<Customer>();\n customerList.addAll(list);\n if (customerList.size() > 0) {\n defaultPage.setVisibility(View.GONE);\n ll.setVisibility(View.VISIBLE);\n myNewCustomersAdapter = new MyNewCustomersAdapter(\n NewFriendsActivity.this, customerList);\n listView.setAdapter(myNewCustomersAdapter);\n } else {\n tv2.setText(\"You haven't friends for a long time\");\n }\n\n }\n });\n loginget.CustomerRequest(NewFriendsActivity.this);\n\n }", "public void prepareContactData(long num) {\n\n //ASSIGN SELECTION VARIABLE WITH NUMBER FROM NUMPAD\n String[] selectionArgs = {String.valueOf(num) + \"%\"};\n\n List<Contact> contactList = new ArrayList<>();\n\n cAdapter = new ContactAdapter(contactList);\n recyclerView.setAdapter(cAdapter);\n\n //DISPLAY ALL\n if(num == 0) {\n cursor = database.query(DBContract.Contact.TABLE_NAME, projection, null, null, null, null, null, null);\n }\n //DISPLAY ONLY SELECTED DATA\n else {\n cursor = database.query(DBContract.Contact.TABLE_NAME, projection, selection, selectionArgs, null, null, null, null);\n }\n\n String name, phone, id;\n\n while(cursor.moveToNext()) {\n int index;\n\n index = cursor.getColumnIndexOrThrow(\"name\");\n name = cursor.getString(index);\n\n index = cursor.getColumnIndexOrThrow(\"phone\");\n phone = cursor.getString(index);\n\n index = cursor.getColumnIndexOrThrow(\"uid\");\n id = cursor.getString(index);\n\n contactList.add(new Contact(name, Long.valueOf(phone)));\n\n Log.d(\"TAG\", \"Name : \" + name);\n Log.d(\"TAG\", \"Phone : \" + phone);\n Log.d(\"TAG\", \"ID : \" + id);\n }\n\n //REFRESH ADAPTER LIST\n cAdapter.notifyDataSetChanged();\n }", "public void searchFlights();", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">//GEN-BEGIN:initComponents\n private void initComponents() {\n\n jPanel1 = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tableCekCustomer = new javax.swing.JTable();\n jLabel2 = new javax.swing.JLabel();\n tfSearch = new javax.swing.JTextField();\n jLabel7 = new javax.swing.JLabel();\n jLabel6 = new javax.swing.JLabel();\n\n setTitle(\"Daftar Customer\");\n\n jPanel1.setBackground(new java.awt.Color(0, 102, 153));\n jPanel1.setBorder(javax.swing.BorderFactory.createLineBorder(new java.awt.Color(0, 0, 0)));\n\n tableCekCustomer.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n\n },\n new String [] {\n \"ID Transaksi\", \"No. Identitas\", \"Jenis Identitas\", \"Nama Customer\", \"No. Hp\", \"Alamat\"\n }\n ) {\n boolean[] canEdit = new boolean [] {\n false, false, false, false, false, false\n };\n\n public boolean isCellEditable(int rowIndex, int columnIndex) {\n return canEdit [columnIndex];\n }\n });\n tableCekCustomer.addMouseListener(new java.awt.event.MouseAdapter() {\n public void mouseClicked(java.awt.event.MouseEvent evt) {\n tableCekCustomerMouseClicked(evt);\n }\n });\n jScrollPane1.setViewportView(tableCekCustomer);\n\n jLabel2.setForeground(new java.awt.Color(255, 255, 255));\n jLabel2.setText(\"Search\");\n\n tfSearch.addActionListener(new java.awt.event.ActionListener() {\n public void actionPerformed(java.awt.event.ActionEvent evt) {\n tfSearchActionPerformed(evt);\n }\n });\n tfSearch.addKeyListener(new java.awt.event.KeyAdapter() {\n public void keyPressed(java.awt.event.KeyEvent evt) {\n tfSearchKeyPressed(evt);\n }\n });\n\n jLabel7.setFont(new java.awt.Font(\"Tahoma\", 1, 24)); // NOI18N\n jLabel7.setForeground(new java.awt.Color(255, 255, 255));\n jLabel7.setText(\"Daftar Customer\");\n\n jLabel6.setIcon(new javax.swing.ImageIcon(getClass().getResource(\"/images/img/medium 130.png\"))); // NOI18N\n\n javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);\n jPanel1.setLayout(jPanel1Layout);\n jPanel1Layout.setHorizontalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel6)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, 395, Short.MAX_VALUE)\n .addComponent(jLabel2)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(tfSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 164, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addGap(9, 9, 9)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 664, Short.MAX_VALUE)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanel1Layout.createSequentialGroup()\n .addGap(70, 70, 70)\n .addComponent(jLabel7)\n .addGap(0, 0, Short.MAX_VALUE)))\n .addGap(9, 9, 9)))\n );\n jPanel1Layout.setVerticalGroup(\n jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(jLabel6)\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(tfSearch, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel2)))\n .addContainerGap(262, Short.MAX_VALUE))\n .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(jPanel1Layout.createSequentialGroup()\n .addContainerGap()\n .addComponent(jLabel7, javax.swing.GroupLayout.PREFERRED_SIZE, 30, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(40, 40, 40)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 241, Short.MAX_VALUE)\n .addContainerGap()))\n );\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jPanel1, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n );\n\n pack();\n }", "public void actionPerformed(ActionEvent e)\n\t\t\t{\n\t\t\t\tshowCustomerInvoices();\n\t\t\t\ttry {\n\t\t\t\t\t\n\t\t\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\t\t\tString s=\"select *from CustomerData where Customer_Name=?\";\n\t\t\t\t ps=con.prepareStatement(s);\n\t\t\t\t ps.setString(1,txtSearch.getText());\n\t\t\t\t rs=ps.executeQuery();\n\t\t\t\t if(rs.next())\n\t\t\t\t {\n\t\t\t\t \ttblCustomer.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\t }\n\t\t\t\t else\n\t\t\t\t {\n\t\t\t\t \tJOptionPane.showMessageDialog(null,\"Sorry! this Cutomer is not exist.\");\n\t\t\t\t }\n\t\t\t\t \n\t\t\t\t} catch (SQLException e3) {\n\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\te3.printStackTrace();\n\t\t\t\t}\n\n\t\t\t}", "public AddCustomer() {\n initComponents();\n loadAllToTable();\n\n tblCustomers.getSelectionModel().addListSelectionListener(new ListSelectionListener() {\n\n @Override\n public void valueChanged(ListSelectionEvent e) {\n if (tblCustomers.getSelectedRow() == -1) {\n return;\n }\n\n String cusId = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 0).toString();\n\n String cusName = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 1).toString();\n String contact = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 2).toString();\n String creditLimi = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 3).toString();\n String credidays = tblCustomers.getValueAt(tblCustomers.getSelectedRow(), 4).toString();\n\n txtCustId.setText(cusId);\n txtCustomerN.setText(cusName);\n\n txtContact.setText(contact);\n txtCreditLimit.setText(creditLimi);\n txtCreditDays.setText(credidays);\n\n }\n });\n }", "public static ObservableList<Contacts> getAllContacts() {\n try {\n Connection conn = DBConnection.getConnection();\n DBQuery.setStatement(conn);\n Statement statement = DBQuery.getStatement();\n String query = \"SELECT * FROM contacts\";\n ResultSet rs = statement.executeQuery(query);\n while(rs.next()) {\n\n Contacts newContact = new Contacts();\n newContact.setContact_ID(rs.getInt(\"Contact_ID\"));\n newContact.setContact_Name(rs.getString(\"Contact_Name\"));\n newContact.setEmail(rs.getString(\"Email\"));\n Contacts.addContacts(newContact); \n\n }\n statement.close();\n return contact;\n } catch (SQLException e) {\n System.out.println(\"SQLException: \" + e.getMessage());\n return null;\n }\n}", "List<Cemetery> search(String query);", "List<CustDataNotesResponseDTO> searchForCustDataNotes(CustDataNotesRequestDTO custDataNotesRequestDTO) throws Exception;", "private void searchFunction() {\n\t\t\r\n\t}", "public void showCustomerInvoices()\n\t{\n\t\ttry {\n\t\t\tcon=DriverManager.getConnection(\"jdbc:mysql://localhost:3306/MundheElectronics1\",\"root\",\"vishakha\");\n\t\t\tString sql=\"select * from CustomerData order by Customer_Name asc\";\n\t\t\tps=con.prepareStatement(sql);\n\t\t\trs=ps.executeQuery();\n\t\t\ttblCustomer.setModel(DbUtils.resultSetToTableModel(rs));\n\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void displayContacts(){\n customContactAdapter= new ContactContactDisplayAdapter(getApplicationContext(),R.layout.contact_list_view,contactList);\n contactListView.setAdapter(customContactAdapter);\n contactSearchView.setOnQueryTextListener(ContactDetailsActivity.this);\n /*contactSearchView.setIconifiedByDefault(false);\n contactSearchView.requestFocus();*/\n }", "@GetMapping(\"/search\")\r\n\tpublic String searchCustomers(@RequestParam(\"theSearchName\") String theSearchName,\r\n\t\t\t\t\t\t\t\t\tModel theModel) {\n\t\tList<Customer> theCustomers = customerService.searchCustomers(theSearchName);\r\n\t\t\t\t\r\n\t\t// add the customers to the model\r\n\t\ttheModel.addAttribute(\"customers\", theCustomers);\r\n\r\n\t\treturn \"list-customers\";\t\t\r\n\t}", "@Override\n\tpublic List<Customer> getCustomers() {\n\t\tSession currentSession = sessionFactory.getCurrentSession();\n\n\t\t// create a query\n\t\tQuery<Customer> theQuery =\n\t\t\t\tcurrentSession.createQuery(\"from Customer order by lastName\", Customer.class);\n\n\t\t// execute query and get result list\n\t\tList<Customer> customers = theQuery.getResultList();\n\n\t\treturn customers;\n\t}", "@RequestMapping(value = \"/_search/customerOrders/{query:.+}\",\n method = RequestMethod.GET,\n produces = MediaType.APPLICATION_JSON_VALUE)\n @Timed\n public List<CustomerOrder> searchCustomerOrders(@PathVariable String query) {\n log.debug(\"REST request to search CustomerOrders for query {}\", query);\n return StreamSupport\n .stream(customerOrderSearchRepository.search(queryStringQuery(query)).spliterator(), false)\n .collect(Collectors.toList());\n }", "public void numberLookup() {\n\t\tSystem.out.print(\"Number: \");\n\t\tint entryNumber = getInputForNumber();\n\t\tphoneList\n\t\t\t.stream()\n\t\t\t.filter(n -> n.getNumber() == entryNumber)\n\t\t\t.forEach(n -> System.out.println(\"This is the number of \" + n.getName()));\n\t}", "@SuppressWarnings(\"unchecked\")\n // <editor-fold defaultstate=\"collapsed\" desc=\"Generated Code\">\n private void initComponents() {\n\n pnlSearch = new javax.swing.JPanel();\n txtSearch = new javax.swing.JTextField();\n jLabel5 = new javax.swing.JLabel();\n cmbSearch = new javax.swing.JComboBox();\n btnSearch = new javax.swing.JButton();\n pnlFunction = new javax.swing.JPanel();\n btnAddContact = new javax.swing.JButton();\n btnEdite = new javax.swing.JButton();\n btnDelete = new javax.swing.JButton();\n pnlTable = new javax.swing.JPanel();\n jScrollPane1 = new javax.swing.JScrollPane();\n tblContacts = new javax.swing.JTable();\n tblContacts.setCellSelectionEnabled(true);\n btnPrevious = new javax.swing.JButton();\n javax.swing.JButton btnNext = new javax.swing.JButton();\n btnPrint = new javax.swing.JButton();\n jMenuBar1 = new javax.swing.JMenuBar();\n jMenu1 = new javax.swing.JMenu();\n jMenu2 = new javax.swing.JMenu();\n jMenu3 = new javax.swing.JMenu();\n\n setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);\n this.setResizable(false);\n\n pnlSearch.setBorder(javax.swing.BorderFactory.createTitledBorder(\" Search \"));\n\n \n\n jLabel5.setText(\"Search By\");\n\n cmbSearch.setModel(new javax.swing.DefaultComboBoxModel(new String[] { \"First Name\",\"Last Name\",\"Phone Nummber\",\"Email Address\" }));\n\n btnSearch.setText(\"Search\");\n\n javax.swing.GroupLayout gl_pnlSearch = new javax.swing.GroupLayout(pnlSearch);\n pnlSearch.setLayout(gl_pnlSearch);\n gl_pnlSearch.setHorizontalGroup(\n gl_pnlSearch.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlSearch.createSequentialGroup()\n .addGap(9, 9, 9)\n .addComponent(jLabel5)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(cmbSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(txtSearch, javax.swing.GroupLayout.DEFAULT_SIZE, 157, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap())\n );\n gl_pnlSearch.setVerticalGroup(\n gl_pnlSearch.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlSearch.createSequentialGroup()\n .addGroup(gl_pnlSearch.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(txtSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(cmbSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(jLabel5)\n .addComponent(btnSearch, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pnlFunction.setBorder(javax.swing.BorderFactory.createTitledBorder(\" Main Functions \"));\n\n btnAddContact.setText(\"Add Contact\");\n\n btnEdite.setText(\"Edit\");\n\n btnDelete.setText(\"Delete\");\n\n javax.swing.GroupLayout gl_pnlFunction = new javax.swing.GroupLayout(pnlFunction);\n pnlFunction.setLayout(gl_pnlFunction);\n gl_pnlFunction.setHorizontalGroup(\n gl_pnlFunction.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlFunction.createSequentialGroup()\n .addContainerGap()\n .addComponent(btnAddContact, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnEdite, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n gl_pnlFunction.setVerticalGroup(\n gl_pnlFunction.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(gl_pnlFunction.createSequentialGroup()\n .addGroup(gl_pnlFunction.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnAddContact, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnEdite, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnDelete, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))\n );\n\n pnlTable.setBorder(javax.swing.BorderFactory.createTitledBorder(\" E-mail \"));\n\n tblContacts.setModel(new javax.swing.table.DefaultTableModel(\n new Object [][] {\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null},\n {null, null, null, null}\n },\n new String [] {\n \"Frist Name\", \"Last Name\", \"Fax\",\"Mobile Nummber\", \"Email Address\",\"Details\"\n }\n ));\n jScrollPane1.setViewportView(tblContacts);\n\n javax.swing.GroupLayout gl_pnlTable = new javax.swing.GroupLayout(pnlTable);\n pnlTable.setLayout(gl_pnlTable);\n gl_pnlTable.setHorizontalGroup(\n gl_pnlTable.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addComponent(jScrollPane1)\n );\n gl_pnlTable.setVerticalGroup(\n gl_pnlTable.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, gl_pnlTable.createSequentialGroup()\n .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(jScrollPane1, javax.swing.GroupLayout.PREFERRED_SIZE, 275, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(160, 160, 160))\n );\n\n btnPrevious.setText(\"Previous\");\n\n btnNext.setText(\"Next\");\n\n btnPrint.setText(\"Print\");\n\n jMenu1.setText(\"File\");\n jMenuBar1.add(jMenu1);\n\n jMenu2.setText(\"Edit\");\n jMenuBar1.add(jMenu2);\n\n jMenu3.setText(\"Help\");\n jMenuBar1.add(jMenu3);\n\n setJMenuBar(jMenuBar1);\n\n javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());\n getContentPane().setLayout(layout);\n layout.setHorizontalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addContainerGap()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGap(0, 0, Short.MAX_VALUE)\n .addComponent(btnPrevious, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)\n .addComponent(btnNext, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(201, 201, 201)\n .addComponent(btnPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 110, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addGap(34, 34, 34))\n .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)\n .addComponent(pnlTable, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addGroup(layout.createSequentialGroup()\n .addComponent(pnlSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)\n .addComponent(pnlFunction, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))\n .addGap(22, 22, 22))))\n );\n layout.setVerticalGroup(\n layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)\n .addGroup(layout.createSequentialGroup()\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING, false)\n .addComponent(pnlSearch, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)\n .addComponent(pnlFunction, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addGap(18, 18, 18)\n .addComponent(pnlTable, javax.swing.GroupLayout.DEFAULT_SIZE, 330, Short.MAX_VALUE)\n .addGap(18, 18, 18)\n .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)\n .addComponent(btnNext, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPrevious, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE)\n .addComponent(btnPrint, javax.swing.GroupLayout.PREFERRED_SIZE, 35, javax.swing.GroupLayout.PREFERRED_SIZE))\n .addContainerGap())\n );\n\n pnlFunction.getAccessibleContext().setAccessibleName(\"name\");\n\n pack();\n }", "public static <Customers> ObservableList<Customers> getCustomerAppointments(int customerId) {\n\n ObservableList<Customers> appointmentList = FXCollections.observableArrayList();\n try {\n String sql = \"SELECT Customer_ID FROM customers\";\n PreparedStatement ps = DBConnection.getConnection().prepareStatement(sql);\n ResultSet rs = ps.executeQuery();\n\n while(rs.next()) {\n int customerID = rs.getInt(\"Customer_ID\");\n models.Customers A = new models.Customers(customerID);\n appointmentList.add((Customers) A);\n }\n } catch (Exception throwables) {\n throwables.printStackTrace();\n }\n return appointmentList;\n }", "public static ObservableList<Customers> getAllCustomers() {\n return allCustomers;\n }", "@Override\n public void start(Stage primaryStage) {\n TextArea taMyOutput = new TextArea();\n taMyOutput.setPrefHeight(100); // sets height of the TextArea to 400 pixels\n taMyOutput.setPrefWidth(100); // sets width of the TextArea to 300 pixels\n\n // Show total number of phones\n Button btnShowTotal = new Button(\"Show Phone\");\n TextField tfTotalNumberOfPhones = new TextField();\n \n tfTotalNumberOfPhones.setPromptText(\"0\");\n tfTotalNumberOfPhones.setEditable(false); // This box is not editable. Only displays result.\n \n btnShowTotal.setOnAction(e -> {\n tfTotalNumberOfPhones.setText(\"hELLO\");\n });\n\n // Add Phone\n\n Button btnAddPhone = new Button(\"Add Phone\");\n TextField tfPhoneID = new TextField();\n TextField tfPhoneModel = new TextField();\n TextField tfPhonePrice = new TextField();\n\n tfPhoneID.setPromptText(\"PhoneID\");\n tfPhoneModel.setPromptText(\"Phone Model\");\n tfPhonePrice.setPromptText(\"Phone Price\");\n\n\n btnAddPhone.setOnAction(e -> {\n if (tfPhoneID.getText().trim().equals(\"\")) { // If text field is empty \n taMyOutput.setText(\"Invalid\");\n } else {\n Phone phone = new Phone(tfPhoneID.getText(), tfPhoneModel.getText(), tfPhonePrice.getText());\n pm.addPhone(phone); // Add phone to list\n tfPhoneID.clear();\n tfPhoneModel.clear();\n tfPhonePrice.clear(); \n }\n });\n\n // Delete Phone\n TextField tfPhoneDel = new TextField();\n Button btnDelPhone = new Button(\"Delete Phone\");\n\n tfPhoneDel.setPromptText(\"Enter Phone ID\");\n\n btnDelPhone.setOnAction(e -> {\n\n pm.deletePhoneById(tfPhoneDel.getText());\n\n });\n\n // Search for phone by ID\n TextField tfPhoneSearch = new TextField();\n Button btnPhoneSearch = new Button(\"Search Phone By ID\");\n \n tfPhoneSearch.setPromptText(\"Search Phone ID\");\n btnPhoneSearch.setOnAction(e -> {\n\n Phone phoneObject = pm.searchForPhoneById(tfPhoneSearch.getText());\n taMyOutput.setText(phoneObject.getPhoneModel() + \" \" + phoneObject.getPhonePrice());\n\n });\n\n\n\n //Save to DB\n Button btnSaveDB = new Button (\"Save Phone to DB\");\n btnSaveDB.setOnAction(e -> {\n \n if (pm.findTotalPhones() > 0) {\n try {\n File phoneDB = new File(\"./resources/phoneDB.ser\");\n ObjectOutputStream out = new ObjectOutputStream(new FileOutputStream(phoneDB));\n out.writeObject(pm);\n out.close();\n taMyOutput.setText(\"Phone Database Saved\");\n } catch (Exception exception) {\n System.out.print(\"[Error] Cannont save DB. Cause: \");\n exception.printStackTrace();\n taMyOutput.setText(\"ERROR: Failed to save Phones DB!\");\n }\n } else {\n taMyOutput.setText(\"No Phones in List to save!\");\n }\n });\n\n // Load from DB\n Button btnLoadDB = new Button(\"Load Phones to DB\");\n TextField tfLoadPhones = new TextField();\n tfLoadPhones.setPromptText(\"Enter Path to DB\");\n\n btnLoadDB.setOnAction(e -> {\n\n try {\n File phoneDB = new File(\"./resources/phoneDB.ser\");\n ObjectInputStream in = new ObjectInputStream(new FileInputStream(phoneDB));\n pm = (PhoneManager) in.readObject();\n in.close();\n taMyOutput.setText(\"Phone Database Loaded\");\n\n } catch (Exception exception) {\n System.out.print(\"[Error] Cannont save DB. Cause: \");\n exception.printStackTrace();\n taMyOutput.setText(\"ERROR: Failed to save Phone DB!\");\n\n }\n });\n\n //Add Quit Button\n Button btnQuit= new Button(\"Quit\");\n btnQuit.setOnAction(e -> {\n Platform.exit();\n\n });\n\n\n \n\n // Adding and arranging all the nodes in the grid - add(node, column, row)\n GridPane gridPane1 = new GridPane();\n gridPane1.add(tfPhoneID, 0, 0);\n gridPane1.add(tfPhoneModel, 1, 0);\n gridPane1.add(tfPhonePrice, 2, 0);\n gridPane1.add(btnAddPhone, 3, 0); \n gridPane1.add(btnShowTotal, 0, 1);\n gridPane1.add(tfPhoneModel, 1, 1);\n gridPane1.add(tfPhoneDel, 0, 2);\n gridPane1.add(btnDelPhone, 1, 2);\n gridPane1.add(tfPhoneSearch, 0, 3);\n gridPane1.add(btnPhoneSearch, 1, 3);\n gridPane1.add(btnSaveDB, 0, 4);\n gridPane1.add(btnLoadDB, 0, 5);\n\t\tgridPane1.add(tfLoadPhones, 1, 5);\n gridPane1.add(taMyOutput, 0, 6, 2, 1);\n gridPane1.add(btnQuit, 0, 7);\n \n\n \n Scene scene1 = new Scene(gridPane1, 850, 550);\n \n\n if (getParameters().getRaw().size() == 0) {\n primaryStage.setTitle(\"Phone Manager Application\");\n } else {\n primaryStage.setTitle(getParameters().getRaw().get(0));\n }\n\n // Setting the scene to Stage\n primaryStage.setScene(scene1);\n // Displaying the stage\n primaryStage.show();\n }", "@FXML\n void onActChooseContact(ActionEvent event) {\n ObservableList<Appointment> filteredAppointments = allAppointments.filtered(a -> {\n if(contactList.getSelectionModel().getSelectedItem().equals(a.getContact()))\n return true;\n return false;\n\n });\n contactApptTbl.setItems(filteredAppointments);\n }", "cb.Careerbuilder.Company.PhoneNumber getPhone(int index);", "public static ArrayList<CustomerInfoBean> getCutomers_notinterested_Super() {\r\n\t\tCustomerInfoBean bean = null;\r\n\r\n\t\tArrayList<CustomerInfoBean> customerList = new ArrayList<CustomerInfoBean>();\r\n\t\tString monthlyIncome;\r\n\t\tint applianceId, customerId, salesmanId, status;\r\n\t\tString customerName, cnicNo, phoneNo, district, gsmNumber, salesmanName, applianceName;\r\n\t\tboolean state;\r\n\t\ttry {\r\n\t\t\tConnection con = connection.Connect.getConnection();\r\n\t\t\tString query = \"SELECT cs.customer_id ,cs.customer_name, cs.customer_cnic ,cs.customer_phone, c.city_name, cs.customer_monthly_income,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_GSMno, a.appliance_status, s.salesman_name , a.appliance_id, s.salesman_id,\\n\"\r\n\t\t\t\t\t+ \" a.appliance_name, cs.status FROM eligibility e\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN appliance a ON e.appliance_id =a.appliance_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN salesman s ON e.salesman_id =s.salesman_id\\n\"\r\n\t\t\t\t\t+ \" INNER JOIN customer cs ON e.customer_id = cs.customer_id \\n\"\r\n\t\t\t\t\t+ \" JOIN city c ON cs.customer_city=c.city_id\\n\"\r\n\t\t\t\t\t+ \" JOIN city_district cd ON cs.customer_city=cd.city_id\\n\"\r\n\t\t\t\t\t+\r\n\r\n\t\t\t\t\t\" INNER JOIN do_salesman ds ON s.salesman_id=ds.salesman_id WHERE e.status=3 GROUP BY cs.customer_id\\n\";\r\n\t\t\tStatement st = con.prepareStatement(query);\r\n\t\t\tResultSet rs = st.executeQuery(query);\r\n\t\t\tSystem.err.println(query);\r\n\t\t\twhile (rs.next()) {\r\n\t\t\t\tcustomerId = rs.getInt(1);\r\n\t\t\t\tcustomerName = rs.getString(2);\r\n\t\t\t\tcnicNo = rs.getString(3);\r\n\t\t\t\tphoneNo = rs.getString(4);\r\n\t\t\t\tdistrict = rs.getString(5);\r\n\t\t\t\tmonthlyIncome = rs.getString(6);\r\n\t\t\t\tgsmNumber = rs.getString(7);\r\n\t\t\t\tstate = rs.getBoolean(8);\r\n\t\t\t\tsalesmanName = rs.getString(9);\r\n\r\n\t\t\t\tapplianceId = rs.getInt(10);\r\n\t\t\t\tsalesmanId = rs.getInt(11);\r\n\t\t\t\tapplianceName = rs.getString(12);\r\n\t\t\t\tstatus = rs.getInt(13);\r\n\r\n\t\t\t\tbean = new CustomerInfoBean();\r\n\t\t\t\tbean.setCustomerName(customerName);\r\n\t\t\t\tbean.setCnicNo(cnicNo);\r\n\t\t\t\tbean.setDistrict(district);\r\n\t\t\t\tbean.setGsmNumber(gsmNumber);\r\n\t\t\t\tbean.setMonthlyIncome(monthlyIncome);\r\n\r\n\t\t\t\tbean.setState(state);\r\n\t\t\t\tbean.setSalesmanName(salesmanName);\r\n\t\t\t\tbean.setPhoneNo(phoneNo);\r\n\t\t\t\tbean.setSalesamanId(salesmanId);\r\n\t\t\t\tbean.setApplianceId(applianceId);\r\n\t\t\t\tbean.setCustomerId(customerId);\r\n\t\t\t\tbean.setApplianceName(applianceName);\r\n\t\t\t\tbean.setStatus(status);\r\n\r\n\t\t\t\tcustomerList.add(bean);\r\n\t\t\t}\r\n\t\t} catch (SQLException e) {\r\n\t\t\tlogger.error(\"\", e);\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\treturn customerList;\r\n\t}" ]
[ "0.6747557", "0.63139606", "0.62636954", "0.6173815", "0.6111147", "0.60803074", "0.60755485", "0.6061977", "0.60164154", "0.59436136", "0.5923177", "0.5904284", "0.58691096", "0.58651525", "0.5847185", "0.5842194", "0.582708", "0.5803102", "0.57387036", "0.57358235", "0.57263744", "0.572436", "0.56983566", "0.56979126", "0.569122", "0.56766766", "0.5669957", "0.5660526", "0.56558233", "0.5652863", "0.56289446", "0.561853", "0.56029046", "0.56019753", "0.55908585", "0.5561955", "0.5556063", "0.5538521", "0.5533542", "0.55299157", "0.5524421", "0.5509567", "0.5489729", "0.5489163", "0.54822135", "0.5468997", "0.54642487", "0.546046", "0.5452924", "0.5430361", "0.54236186", "0.5404917", "0.5402375", "0.539598", "0.5394926", "0.53934175", "0.53836554", "0.5378882", "0.53742117", "0.5363624", "0.5361739", "0.5361219", "0.5356516", "0.53493565", "0.53477496", "0.5341521", "0.53400475", "0.5316015", "0.5307953", "0.5307648", "0.5307125", "0.5306854", "0.53065056", "0.530552", "0.53008395", "0.5298963", "0.529614", "0.52949136", "0.5287216", "0.5284895", "0.5271925", "0.52671796", "0.52622825", "0.5256204", "0.5254257", "0.52499104", "0.5248026", "0.52468216", "0.52431494", "0.52391183", "0.5238664", "0.52351004", "0.5231543", "0.52305907", "0.52283067", "0.5223407", "0.52212065", "0.5212861", "0.52025723", "0.5200313" ]
0.6742474
1
This method is used to do error handling in the GUI we check if the inputs are correct, for the given type.
public boolean checkValues(String name, String value, boolean string) { if (string) { if ((name+"...").equals(value) || (value.equals(""))) { return false; } } else { if (name.equals("Phone")) { if (value.length() != 8 || value.charAt(0) == '0') { return false; } } try { int input = Integer.parseInt(value); if(input < 0) { return false; } return true; } catch(Exception e) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void msgTypeError() {\n Alert typeError; // message when incompatible types connection attempt\n typeError = new Alert(AlertType.INFORMATION);\n typeError.setTitle(\"Block editor\");\n typeError.setHeaderText(\"Type error\");\n typeError.setContentText(msgText);\n typeError.showAndWait().ifPresent(rs -> {\n if (rs == ButtonType.OK) {}\n });\n }", "abstract protected boolean checkType(String myType);", "public void alertTypeHeritageIncorrect(){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"Debe elegir solo un tipo de herencia para poder continuar.\");\n alert.showAndWait();\n }", "private void validateTypes() {\r\n\t\tfor (int i = 0; i < types.length; i++) {\r\n\t\t\tString type = types[i];\r\n\t\t\tif (!TypedItem.isValidType(type))\r\n\t\t\t\tthrow new IllegalArgumentException(String.format(\"The monster type %s is invalid\", type));\r\n\t\t\tfor (int j = i + 1; j < types.length; j++) {\r\n\t\t\t\tif (type.equals(types[j])) {\r\n\t\t\t\t\tthrow new IllegalArgumentException(\"The monster cant have two similar types..\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t}", "private boolean validateInputs(String iStart, String iEnd, String country, String type) {\n \thideErrors();\n \tint validStart;\n \tint validEnd;\n boolean valid = true;\n// \t//will not occur due to UI interface\n// if (isComboBoxEmpty(type)) {\n// \tvalid = false;\n// \tT3_type_error_Text.setVisible(true);\n// }\n if (isComboBoxEmpty(country)) {\n \tvalid = false;\n \tT3_country_error_Text.setVisible(true);\n }\n \t//checking if start year and end year are set\n if (isComboBoxEmpty(iStart)){\n //start is empty\n T3_start_year_error_Text.setVisible(true);\n valid = false;\n }\n if (isComboBoxEmpty(iEnd)){\n //end is empty\n T3_end_year_error_Text.setVisible(true);\n valid = false;\n }\n \tif (valid){\n //if years are not empty and valid perform further testing\n \t\t//fetch valid data range\n \tPair<String,String> validRange = DatasetHandler.getValidRange(type, country);\n \tvalidStart = Integer.parseInt(validRange.getKey());\n \tvalidEnd = Integer.parseInt(validRange.getValue());\n //check year range validity\n \t\tint start = Integer.parseInt(iStart);\n \t\tint end = Integer.parseInt(iEnd);\n \tif (start>=end) {\n \t\tT3_range_error_Text.setText(\"Start year should be < end year\");\n \t\tT3_range_error_Text.setVisible(true);\n \t\tvalid=false;\n \t}\n// \t//will not occur due to UI interface\n// \telse if (start<validStart) {\n// \t\tT3_range_error_Text.setText(\"Start year should be >= \" + Integer.toString(validStart));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}else if (end>validEnd) {\n// \t\tT3_range_error_Text.setText(\"End year should be <= \" + Integer.toString(validEnd));\n// \t\tT3_range_error_Text.setVisible(true);\n// \t\tvalid=false;\n// \t}\n \t}\n// \t//will not occur due to UI interface\n// \tif(isComboBoxEmpty(type)) {\n// \t\t//if type is not set\n// T3_type_error_Text.setVisible(true);\n// \t}\n \t\n if(isComboBoxEmpty(country)) {\n //if country is not set\n T3_country_error_Text.setVisible(true);\n }\n \treturn valid;\n }", "public void alertOfTypeIncorrect(){\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Error\");\n alert.setHeaderText(\"Solo los atributos compuestos pueden contener mas atributos.\");\n alert.showAndWait();\n }", "private boolean checkType() {\r\n if (CorrectAnswer.getText().equals(\"\") || typeQuestion.getValue() == null) {\r\n if (typeQuestion.getValue() == null)\r\n errorMsg += \"Which type of question do you want?\\n\";\r\n\r\n if (CorrectAnswer.getText().equals(\"\"))\r\n errorMsg += \"There is no Correct Answer\\n\";\r\n\r\n return false;\r\n } else {\r\n switch ((String) typeQuestion.getValue()) {\r\n\r\n // case TrueFalse : it must true or false\r\n case \"TrueFalse\" : {\r\n if(CorrectAnswer.getText().equalsIgnoreCase(\"true\") || CorrectAnswer.getText().equalsIgnoreCase(\"false\"))\r\n return true;\r\n\r\n errorMsg += \"The answer has to be True or False\\n\";\r\n return false;\r\n }\r\n\r\n // case MCQ : the answer has to be in the list of the different proposed answers\r\n case \"MCQ\" :\r\n // each answer is different from the others\r\n if(TextAnswer1.getText().equals(TextAnswer2.getText())\r\n || TextAnswer1.getText().equals(TextAnswer3.getText())\r\n || TextAnswer2.getText().equals(TextAnswer3.getText())) {\r\n errorMsg += \"You can not have multiple times the same answer !!!\\n\";\r\n return false;\r\n }\r\n\r\n if(CorrectAnswer.getText().equals(TextAnswer1.getText())\r\n || CorrectAnswer.getText().equals(TextAnswer2.getText())\r\n || CorrectAnswer.getText().equals(TextAnswer3.getText()))\r\n return true;\r\n\r\n errorMsg += \"There must be a Correct Answer !\\n\";\r\n return false;\r\n\r\n // case ShortAnswer : if there is an answer it is good\r\n default:\r\n return true;\r\n }\r\n }\r\n }", "void checkSameDataType(String datatype, String datatype1)\n {\n DefaultTableModel semanticerror = (DefaultTableModel)tblErrorSemantic.getModel();\n if(datatype.equals(datatype1))\n {\n\n }\n else if(datatype.equals(\"INT\") && datatype1.equals(\"FLOAT\"))\n {\n \n }\n else if(datatype.equals(\"FLOAT\") && datatype1.equals(\"INT\"))\n {\n \n }\n else if(datatype1 == null)\n {\n\n }\n else\n {\n semanticerror.addRow(new Object[] {tblLexeme.getModel().getValueAt(tokenPos-2, 0),\"Incompatible Types: \"+datatype1+\" Cannot be converted to \"+datatype, tblLexeme.getModel().getValueAt(tokenPos-2, 2)}); \n } \n datatype = null;\n }", "public void validateInputs(ActionEvent actionEvent) {\n //retrieve the inputs\n try {\n productNameInput = productNameField.getText();\n if (productNameInput.equals(\"\")) {\n throw new myExceptions(\"Product Name: Enter a string.\\n\");\n }\n }\n catch (myExceptions ex) {\n errorMessageContainer += ex.getMessage();\n isInputValid = false;\n }\n\n try {\n productPriceInput = Double.parseDouble(productPriceField.getText());\n if (productPriceField.getText().equals(\"\")) {\n throw new myExceptions(\"Price field: enter a value..\\n\");\n }\n if (productPriceInput <= 0) {\n throw new myExceptions(\"Price field: enter a value greater than 0.\\n\");\n }\n }\n catch (myExceptions priceValidation) {\n errorMessageContainer += priceValidation.getMessage();\n isInputValid = false;\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Price field: enter a positive number. Your input can contain decimals. \\n\";\n isInputValid = false;\n\n }\n\n try {\n maxInventoryLevelInput = Integer.parseInt(maxInventoryField.getText());\n minInventoryLevelInput = Integer.parseInt(minInventoryField.getText());\n if (maxInventoryField.getText().equals(\"\") || minInventoryField.getText().equals(\"\") || maxInventoryLevelInput <= 0 || minInventoryLevelInput <= 0) {\n throw new myExceptions(\"Min and Max fields: enter values for the minimum and maximum inventory fields.\\n\");\n }\n if (maxInventoryLevelInput < minInventoryLevelInput) {\n throw new myExceptions(\"Max inventory MUST be larger than the minimum inventory.\\n\");\n }\n\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Min and Max fields: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions minMaxValidation) {\n errorMessageContainer += minMaxValidation.getMessage();\n isInputValid = false;\n\n }\n\n try {\n productInventoryLevel = Integer.parseInt(inventoryLevelField.getText());\n if (inventoryLevelField.getText().equals(\"\")) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel <= 0) {\n throw new myExceptions(\"Inventory level: enter a number greater than 0.\\n\");\n }\n if (productInventoryLevel > maxInventoryLevelInput || productInventoryLevel < minInventoryLevelInput) {\n throw new myExceptions(\"Inventory level: value must be between max and min.\\n\");\n }\n }\n catch (NumberFormatException ex) {\n errorMessageContainer += \"Inventory level: enter a positive whole number.\\n\";\n isInputValid = false;\n\n }\n catch (myExceptions stockValidation) {\n errorMessageContainer += stockValidation.getMessage();\n isInputValid = false;\n\n }\n\n errorMessageLabel.setText(errorMessageContainer);\n errorMessageContainer = \"\";\n\n }", "@Override\n\tpublic boolean checkTypes() {\n\t\treturn false;\n\t}", "private boolean validateData() {\r\n TASKAggInfo agg = null;\r\n int index = aggList.getSelectedIndex();\r\n if (index != 0) {\r\n agg = (TASKAggInfo)aggregators.elementAt(aggList.getSelectedIndex()-1);\r\n }\r\n\r\n if (getArgument1() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 1 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getArgument2() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Argument 2 must be of type: \"+TASKTypes.TypeName[agg.getArgType()], \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n else if (getOperand() == BAD_ARGUMENT) {\r\n JOptionPane.showMessageDialog(this, \"Filter value must be of type integer\", \"Error\", JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "private boolean validateInput(){\n boolean operationOK = true;\n //perform input validation on the double values in the form\n String integrationTime = this.integrationTimeText.getText();\n String integrationFrequency = this.integrationFrequencyText.getText();\n \n if(!integrationTime.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationTime);\n integrationTimeText.setBackground(Color.WHITE);\n integrationTimeText.setToolTipText(\"Time in seconds (s)\");\n } catch (NumberFormatException ex) {\n integrationTimeText.setBackground(Color.RED);\n operationOK=false;\n integrationTimeText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(!integrationFrequency.equals(\"\")){\n try {\n Double itime = Double.parseDouble(integrationFrequency);\n integrationFrequencyText.setBackground(Color.WHITE);\n integrationFrequencyText.setToolTipText(\"Frequency in Hertz (Hz)\");\n \n } catch (NumberFormatException ex) {\n operationOK=false;\n integrationFrequencyText.setBackground(Color.RED);\n integrationFrequencyText.setToolTipText(\"This field has to be a valid double (eg. 1.5)\");\n }\n }\n if(currentStepOperationsPanel!=null){\n operationOK = this.currentStepOperationsPanel.validateInput();\n \n }\n return operationOK;\n }", "private boolean validateType(int type)\n {\n return type >=0 && type < TYPE_ENUM.length;\n }", "protected abstract boolean isInputValid();", "private boolean isInputValid() {\n\t\tString errorMessage = \"\";\n\t\t\n\t\tif (dateField.getText() == null || dateField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiges Datum!\\n\";\n\t\t} else {\n\t\t\tif (!DateUtil.validDate(dateField.getText())) {\n\t\t\t\terrorMessage += \"Kein gültiges Datum. Benutze das dd.mm.yyy Format!\\n\";\n\t\t\t}\n\t\t}\n\t\tString categoryFieldSelection = categoryField.getSelectionModel().getSelectedItem();\n\t\tif (categoryFieldSelection.isEmpty() || categoryFieldSelection.length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Kategorie!\\n\";\n\t\t}\n\t\tif (useField.getText() == null || useField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Verwendungszweck!\\n\";\n\t\t}\n\t\tif (amountField.getText() == null || amountField.getText().length() == 0) {\n\t\t\terrorMessage += \"Kein gültiger Betrag!\\n\";\n\t\t} \n\t\t/**else {\n\t\t\t// try to parse the amount into a double\n\t\t\ttry {\n\t\t\t\tDouble.parseDouble(amountField.getText());\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\terrorMessage += \"Kein zulässiger Betrag! (Nur Dezimalzahlen erlaubt)\\n\";\n\t\t\t}\n\t\t}**/\n\t\tif (distributionKindField.getText() == null || distributionKindField.getText().length() == 0) {\n\t\t\terrorMessage += \"Keine gültige Ausgabeart!\\n\";\n\t\t}\n\n\t\tif (errorMessage.length() == 0) {\n\t\t\treturn true;\n\t\t} else {\n\t\t\t// Show the error message.\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\n\t\t\talert.initOwner(dialogStage);\n\t\t\talert.setTitle(\"Ungültige Eingaben\");\n\t\t\talert.setHeaderText(\"Bitte korrigieren Sie die Fehler in den Feldern.\");\n\t\t\talert.setContentText(errorMessage);\n\t\t\talert.showAndWait();\n\t\t\treturn false;\n\t\t}\n\t}", "public void validateUIStatus() {\n\n boolean timeZoneCheck = false, timeFormatCheck = false, fetchTimeCheck = false, statusPathCheck = false;\n\n if (!timeZone.getText().isEmpty()) {\n timeZoneCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Time zone should not be Empty.\\n\");\n }\n if (!statusPath.getText().isEmpty()) {\n statusPathCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". Status File should not be empty.\\n\");\n }\n if (!fetchTime.getText().isEmpty()) {\n fetchTimeCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Refresh Time should not be empty.\\n\");\n }\n if (!timeFormat.getText().isEmpty()) {\n timeFormatCheck = true;\n } else {\n execptionData.append((++exceptionCount) + \". UI Date & Time format should not be Empty.\\n\");\n }\n\n if (timeFormatCheck == true && timeZoneCheck == true && fetchTimeCheck == true && statusPathCheck == true) {\n uiStatusCheck = true;\n } else {\n\n uiStatusCheck = false;\n timeZoneCheck = false;\n timeFormatCheck = false;\n fetchTimeCheck = false;\n statusPathCheck = false;\n }\n }", "private boolean checkInputValidity() {\n // if any of the input field is empty, return false directly\n if (name.getText().equals(\"\") || id.getText().equals(\"\") || fiber.getText().equals(\"\")\n || protein.getText().equals(\"\") || fat.getText().equals(\"\") || calories.getText().equals(\"\")\n || carbohydrate.getText().equals(\"\")) {\n String message = \"Make sure enter the value of all nutrient components, please try again!\";\n // display the warning windows with the assigned warning message\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close();// close the add food stage\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n // if any nutrition info input is not a number value or is negative, return false directly\n try {\n Double fibervalue = null;\n Double proteinvalue = null;\n Double fatvalue = null;\n Double caloriesvalue = null;\n Double carbohydratevalue = null;\n // trim the input to exact numeric value\n fibervalue = Double.valueOf(fiber.getText().trim());\n proteinvalue = Double.valueOf(protein.getText().trim());\n fatvalue = Double.valueOf(fat.getText().trim());\n caloriesvalue = Double.valueOf(calories.getText().trim());\n carbohydratevalue = Double.valueOf(carbohydrate.getText().trim());\n // nutrition input is suppose to be positive numbers\n // if any of the numbers is negative, return false diretcly\n if (fibervalue < 0.0 || proteinvalue < 0.0 || fatvalue < 0.0 || caloriesvalue < 0.0\n || carbohydratevalue < 0.0) {\n String message = \"The input of the nutrient can not be negative, please try again!\";\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close();\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n // if any input of the nutrition info is not a double value, catch the exception and return\n // false\n } catch (Exception e) {\n String message =\n \"At least one nutrition value input is invalid, please type a number in nutrient textbox!\";\n // display the warning windows with the assigned warning message\n Alert alert = new Alert(AlertType.INFORMATION, message);\n alert.getDialogPane().setMinHeight(Region.USE_PREF_SIZE);\n this.close(); // close the addfood stage\n // wait for response from ok button\n alert.showAndWait().filter(response -> response == ButtonType.OK);\n return false;\n }\n return true;\n }", "protected abstract boolean checkInput();", "public static int typeValidation(int type) {\n Scanner scanner = new Scanner(System.in);\n int attempt = type;\n while (attempt > 3 || attempt < 1)// Type 4 is supposed to be people who can make employees. Computer decides that, not the user\n {\n System.out.println(\"Invalid Choice\");\n System.out.print(\" > \");\n attempt = scanner.nextInt();\n }\n return attempt;\n\n }", "private void checkUserInput() {\n }", "void check()\n {\n checkUsedType(responseType);\n checkUsedType(requestType);\n }", "public abstract boolean isTypeCorrect();", "private boolean checkInput() {\n if (trackWindowSize.isSelected()) {\n inputSize = new int[] { 0, 0 };\n return true;\n }\n inputSize = null;\n int width, height;\n try {\n width = Integer.parseInt(widthInput.getText());\n }\n catch (NumberFormatException e) {\n error(I18n.tr(\"imagesizedialog.error.widthnotanumber\", widthInput.getText()));\n widthInput.selectAll();\n widthInput.requestFocus();\n return false;\n }\n try {\n height = Integer.parseInt(heightInput.getText());\n }\n catch (NumberFormatException e) {\n error(I18n.tr(\"imagesizedialog.error.heightnotanumber\", heightInput.getText())); \n heightInput.selectAll();\n heightInput.requestFocus();\n return false;\n }\n if (width < 10 || width > 5000) {\n error(I18n.tr(\"imagesizedialog.error.badwidth\", \"\"+width)); \n widthInput.selectAll();\n widthInput.requestFocus();\n return false;\n }\n else if (height < 10 || height > 5000) {\n error(I18n.tr(\"imagesizedialog.error.badheight\", \"\"+width)); \n heightInput.selectAll();\n heightInput.requestFocus();\n return false;\n }\n inputSize = new int[] { width, height };\n return true;\n }", "private boolean validate(){\n return EditorUtils.editTextValidator(generalnformation,etGeneralnformation,\"Type in information\") &&\n EditorUtils.editTextValidator(symptoms,etSymptoms, \"Type in symptoms\") &&\n EditorUtils.editTextValidator(management,etManagement, \"Type in management\");\n }", "protected int check(int type) {\n\t\tif (type < 0 || type > 127)\n\t\t\tthrow new IllegalArgumentException(\"invalid.ASTNode.type: \" + type);\n\t\treturn type;\n\t}", "public void checkText()\n\t{\n\t\ttry\n\t\t{\n\t\t\tqualityNum = Integer.parseInt(quality.getText());\n\t\t\tsidesNum = Integer.parseInt(sides.getText());\n\t\t\tlengthNum = Double.parseDouble(length.getText());\n\t\t\twidthNum = Double.parseDouble(width.getText());\n\t\t\theightNum = Double.parseDouble(height.getText());\n\t\t\tradiusNum = Double.parseDouble(radius.getText());\n\t\t\tradius2Num = Double.parseDouble(radius2.getText());\n\t\t\trollNum = Double.parseDouble(roll.getText());\n\t\t\tpitchNum = Double.parseDouble(pitch.getText());\n\t\t\tyawNum = Double.parseDouble(yaw.getText());\n\t\t}\n\t\tcatch(Exception ex)\n\t\t{\n\t\t}\n\t\t\n\t\tquality.setText(Integer.toString(qualityNum));\n\t\tsides.setText(Integer.toString(sidesNum));\n\t\tlength.setText(Double.toString(lengthNum));\n\t\twidth.setText(Double.toString(widthNum));\n\t\theight.setText(Double.toString(heightNum));\n\t\tradius.setText(Double.toString(radiusNum));\n\t\tradius2.setText(Double.toString(radius2Num));\n\t\troll.setText(Double.toString(rollNum));\n\t\tpitch.setText(Double.toString(pitchNum));\n\t\tyaw.setText(Double.toString(yawNum));\n\t}", "private void checkValid() {\n getSimType();\n getInitialConfig();\n getIsOutlined();\n getEdgePolicy();\n getNeighborPolicy();\n getCellShape();\n }", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify at least one component\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }", "public boolean validateForm() {\r\n\t\tint validNum;\r\n\t\tdouble validDouble;\r\n\t\tString lengthVal = lengthInput.getText();\r\n\t\tString widthVal = widthInput.getText();\r\n\t\tString minDurationVal = minDurationInput.getText();\r\n\t\tString maxDurationVal = maxDurationInput.getText();\r\n\t\tString evPercentVal = evPercentInput.getText();\r\n\t\tString disabilityPercentVal = disabilityPercentInput.getText();\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.1 - Ensure all inputs are numbers\r\n\t\t */\r\n\t\t\r\n\t\t// Try to parse length as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Length must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Width must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Min Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Max Duration must be an integer\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"EV % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t// Try to parse width as int\r\n\t\ttry {\r\n\t\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t } catch (NumberFormatException e) {\r\n\t \tsetErrorMessage(\"Disability % must be a number\");\r\n\t return false;\r\n\t }\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.2 - Ensure all needed inputs are non-zero\r\n\t\t */\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(lengthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Length must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(widthVal);\r\n\t\tif (validNum <= 0) {\r\n\t\t\tsetErrorMessage(\"Width must be greater than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(minDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Min Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidNum = Integer.parseInt(maxDurationVal);\r\n\t\tif (validNum < 10) {\r\n\t\t\tsetErrorMessage(\"Max Duration must be at least 10\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(evPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"EV % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tvalidDouble = Double.parseDouble(disabilityPercentVal);\r\n\t\tif (validDouble < 0) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be less than 0\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.3 - Ensure Max Duration can't be smaller than Min Duration\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > Integer.parseInt(maxDurationVal)) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be less than Min Duration\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\t/**\r\n\t\t * Step.4 - Ensure values aren't too large for the system to handle\r\n\t\t */\r\n\t\t\r\n\t\tif (Integer.parseInt(lengthVal) > 15) {\r\n\t\t\tsetErrorMessage(\"Carpark length can't be greater than 15 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif (Integer.parseInt(widthVal) > 25) {\r\n\t\t\tsetErrorMessage(\"Carpark width can't be greater than 25 spaces\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(maxDurationVal) > 300) {\r\n\t\t\tsetErrorMessage(\"Max Duration can't be greater than 300\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(evPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"EV % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Double.parseDouble(disabilityPercentVal) > 100) {\r\n\t\t\tsetErrorMessage(\"Disability % can't be greater than 100\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif (Integer.parseInt(minDurationVal) > 150) {\r\n\t\t\tsetErrorMessage(\"Min Duration can't be greater than 150\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\treturn true;\r\n\t}", "private void validateInputParameters(){\n\n }", "void checkTriangleType() {\n\n int x = triangle.x;\n int y = triangle.y;\n int z = triangle.z;\n\n if (x <= 0 || y <= 0 || z <= 0) triangle.triangleType = TriangleType.INVALID; // INVALID\n else if (x >= y + z || z >= x + y || y >= x + z) triangle.triangleType = TriangleType.INVALID; // INVALID\n else if (x == y && y == z) triangle.triangleType = TriangleType.EQUILATERAL; // EQUILATERAL Case\n else if (x == y || y == z || x == z) triangle.triangleType = TriangleType.ISOSCELES; // ISOSCELES Case\n else triangle.triangleType = TriangleType.SCALENE; // SCALENE Case\n }", "private boolean isInputValid() {\n return true;\n }", "public String checkFormat() {\r\n\t\t\r\n\t\tString msg = null;\r\n\t\t\r\n\t\ttry {\t\t\t\t\t\t\t\t\t\t\t//input is not a number\r\n\t\t\t\r\n\t\t\tDouble.parseDouble(price.getText());\r\n\t\t\tInteger.parseInt(quantity.getText());\r\n\t\t\t \r\n\t\t}\r\n\t\t\r\n\t\tcatch(Exception e) {\r\n\t\t\t\r\n\t\t\treturn msg = \"Data format is invalid\";\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\tif(name.getText().isEmpty() \t\t\t\t\t//wine name is empty\r\n\t\t\t\t|| name.getText().length() > 30\t\t\t//wine name is more than 30 letters\r\n\t\t\t\t\t|| quantity.getText().isEmpty()\t\t//quantity is empty\r\n\t\t\t\t\t\t||price.getText().isEmpty()\t\t//price is empty\r\n\t\t\t\t\t\t\t||((!(price.getText().length() - price.getText().indexOf('.') == 3))\t//price is not two decimal spaces \r\n\t\t\t\t\t\t\t\t\t&& price.getText().indexOf('.') != -1))\r\n\t\t{\r\n\t\t\t\r\n\t\t\tmsg = \"Data format is invalid\";\t\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\telse {\r\n\t\t\t\r\n\t\t\tmsg = null;\r\n\t\t\t\r\n\t\t}\r\n\t\t\r\n\t\treturn msg;\r\n\t\t\r\n\t}", "private boolean validateInputs() {\n if (Constants.NULL.equals(review)) {\n reviewET.setError(\"Must type a review!\");\n reviewET.requestFocus();\n return false;\n }\n if (Constants.NULL.equals(heading)) {\n headingET.setError(\"Heading cannot be empty\");\n headingET.requestFocus();\n return false;\n }\n return true;\n }", "private static boolean isValidHandicap(String type) {\n\t\tif(\"exit\".equals(type)) goodbye();\n\n\t\tString[] split = type.split(\":\");\n\n\t\tif(split.length != 3) {\n\t\t\tSystem.out.println(\"\\nTypes should have three elements, the boat identifier, the low handicap, and the high handicap\");\n\t\t\tSystem.out.println(\"All items should be separated by a colon.\\n\");\n\t\t\treturn false;\n\t\t}\n\n\t\ttry {\n\t\t\tDouble.parseDouble(split[1]);\n\t\t\tDouble.parseDouble(split[2]);\n\t\t\treturn true;\n\t\t} catch(NumberFormatException e) {\n\t\t\tSystem.out.println(\"One of the two handicaps are not numbers!\");\n\t\t\treturn false; \n\t\t}\n\t}", "private void check_displaysError() {\n onView(withId(R.id.title))\n .check(matches(withText(R.string.input_title_error)));\n onView(withId(R.id.subtitle))\n .check(matches(withText(R.string.input_subtitle_error)));\n\n // And the button to be labeled try again\n onView(withId(R.id.hint))\n .check(matches(isDisplayed()))\n .check(matches(withText(R.string.input_hint_error)));\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (ServiceName.getText() == null || ServiceName.getText().length() == 0) {\n errorMessage += \"No valid name!\\n\";\n }\n if (Serviceemail.getText() == null || Serviceemail.getText().length() == 0) {\n Pattern p = Pattern.compile(\"[_A-Za-z0-9][A-Za-z0-9._]*?@[_A-Za-z0-9]+([.][_A-Za-z]+)+\");\n Matcher m = p.matcher(Serviceemail.getText());\n if (m.find() && m.group().equals(Serviceemail.getText())) {\n errorMessage += \"No valid Mail Forment!\\n\";\n }\n }\n if (servicedescrip.getText() == null || servicedescrip.getText().length() == 0) {\n errorMessage += \"No valid description !\\n\";\n }\n if (f == null && s.getImage() == null) {\n errorMessage += \"No valid photo ( please upload a photo !)\\n\";\n }\n if (Serviceprice.getText() == null || Serviceprice.getText().length() == 0) {\n errorMessage += \"No valid prix !\\n\";\n } else {\n // try to parse the postal code into an int.\n try {\n Float.parseFloat(Serviceprice.getText());\n } catch (NumberFormatException e) {\n errorMessage += \"No valid prix (must be a Float)!\\n\";\n }\n }\n if ( !Weekly.isSelected() && !Daily.isSelected() && !Monthly.isSelected()) {\n errorMessage += \"No valid Etat ( select an item !)\\n\";\n }\n if (Servicesatet.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid etat ( select an item !)\\n\";\n }\n if (ServiceCity.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid City ( select an item !)\\n\";\n }\n if (servicetype.getSelectionModel().getSelectedIndex() == -1) {\n errorMessage += \"No valid Type ( select an item !)\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n alert.showAndWait();\n return false;\n }\n }", "private boolean checkInputFields(){\r\n\t\tString allertMsg = \"Invalid input: \" + System.getProperty(\"line.separator\");\r\n\t\t\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MCSTf.getText());\r\n\t\t\tif(testValue < 0 || testValue > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a MCS score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for relevance score weight and coherence score weight text fields\r\n\t\ttry{\r\n\t\t\tFloat relScoreW = Float.parseFloat(m_RelScoreTf.getText());\r\n\t\t\tFloat cohScoreW = Float.parseFloat(m_CohScoreTf.getText());\r\n\t\t\tif(relScoreW < 0 || relScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif(cohScoreW < 0 || cohScoreW > 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t\tif((relScoreW + cohScoreW) != 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a number between 0 and 1 as a weight for relevance and coherence score.\" + System.getProperty(\"line.separator\");\r\n\t\t\tallertMsg += \"Sum of the weights for relevance and coherence score must be 1.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for MCS text field\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_KeyTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as multiplier for keyword concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for category confidence weight\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_CatConfTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for the weight of the category confidence of concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for weight of repeated concepts\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_RepeatTf.getText());\r\n\t\t\tif(testValue < 0)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number as a weight for repeated concepts.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\t//Check input for number of output categories\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MaxCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the maximum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tInteger testValue = Integer.parseInt(m_MinCatsTf.getText());\r\n\t\t\tif(testValue < 1)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number for the minimum number of output categories.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\ttry{\r\n\t\t\tFloat testValue = Float.parseFloat(m_MinCatScoreTf.getText());\r\n\t\t\tif(testValue < 0.0f || testValue > 1.0f)\r\n\t\t\t\tthrow new NumberFormatException();\r\n\t\t}catch (NumberFormatException e){\r\n\t\t\tallertMsg += \"Please enter a positive number between 0 and 1 as minimum category score.\" + System.getProperty(\"line.separator\");\r\n\t\t}\r\n\t\tif(allertMsg.length() > 18){\r\n\t\t\tAlert alert = new Alert(AlertType.ERROR);\r\n\t\t\talert.setContentText(allertMsg);\r\n\t\t\talert.showAndWait();\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "private void alertDisplay(int alertType) {\r\n\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n\r\n switch (alertType) {\r\n case 1:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Error Adding Part\");\r\n alert.setContentText(\"Form contains blank fields or invalid values.\");\r\n alert.showAndWait();\r\n break;\r\n case 2:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Invalid value for Machine ID\");\r\n alert.setContentText(\"Machine ID may only contain numbers.\");\r\n alert.showAndWait();\r\n break;\r\n case 3:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Invalid value for Min\");\r\n alert.setContentText(\"Min must be a number greater than 0 and less than Max.\");\r\n alert.showAndWait();\r\n break;\r\n case 4:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Invalid value for Inventory\");\r\n alert.setContentText(\"Inventory must be a number equal to or between Min and Max.\");\r\n alert.showAndWait();\r\n break;\r\n case 5:\r\n alert.setTitle(\"Error\");\r\n alert.setHeaderText(\"Name Empty\");\r\n alert.setContentText(\"Name cannot be empty.\");\r\n alert.showAndWait();\r\n break;\r\n }\r\n }", "public void check()\n {\n typeDec.check();\n }", "@Override\n\tpublic boolean checkInput() {\n\t\treturn true;\n\t}", "private boolean isInputOkay() {\n // checks the text fields\n if (mBinding.date.getText() == null || mBinding.date.getText().toString().equals(\"\")) {\n snackBar(\"Please select the date.\");\n return false;\n }\n\n if (mBinding.time.getText() == null || mBinding.time.getText().toString().equals(\"\")) {\n snackBar(\"Please select the time.\");\n return false;\n }\n\n if (mBinding.stress.getText() == null || mBinding.stress.getText().toString().equals(\"\")) {\n snackBar(\"Please select the stress level.\");\n return false;\n }\n\n if (mBinding.tired.getText() == null || mBinding.tired.getText().toString().equals(\"\")) {\n snackBar(\"Please select the tiredness level.\");\n return false;\n }\n\n if (mBinding.mv0.getText() == null || mBinding.mv0.getText().toString().equals(\"\")) {\n snackBar(\"Please select at least the start glucose value.\");\n return false;\n }\n\n return true;\n }", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please type in the License Server\");\n else {\n \t//TODO add more checks\n \tok();\n }\n }", "private boolean validate(MessageType mt) {\n if (mt.getDesignation() == null) {\n DialogUtility\n .showMessageBox(this.shell, SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Designation\",\n \"Designation is a required field. Please select a Designation.\");\n return false;\n }\n\n /*\n * verify that an afos id has been set.\n */\n if (mt.getAfosid() == null || mt.getAfosid().isEmpty()) {\n DialogUtility\n .showMessageBox(this.shell, SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Message Type\",\n \"Message Type is a required field. Please enter a Message Type.\");\n return false;\n }\n\n /*\n * verify that a title has been set.\n */\n if (mt.getTitle() == null || mt.getTitle().isEmpty()) {\n DialogUtility.showMessageBox(this.shell, SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Title\",\n \"Title is a required field. Please enter a Title.\");\n return false;\n }\n\n /*\n * verify that the afos id is unique.\n */\n try {\n MessageType existingMessageType = this.mtdm.getMessageType(mt\n .getAfosid());\n if (existingMessageType != null) {\n DialogUtility\n .showMessageBox(\n this.shell,\n SWT.ICON_ERROR | SWT.OK,\n \"Message Type - Message Type\",\n \"Message Type \"\n + mt.getAfosid()\n + \" already exists. Please enter a unique Message Type.\");\n return false;\n }\n } catch (Exception e) {\n statusHandler.error(\n \"Failed to determine if Message Type \" + mt.getAfosid()\n + \" is unique.\", e);\n return false;\n }\n\n return true;\n }", "public void handleError(int type, int errorCode, Object errorString) {\n\t\t\n\t}", "private void validate(final FactorType factorType, final Factor factor)\n throws InvalidLabelException, WifInvalidInputException {\n String message = \"createfactor failed: factorType is null\";\n if (factorType == null) {\n LOGGER.error(message);\n throw new WifInvalidInputException(message);\n } else if (factorType.getLabel() == null) {\n message = \"createfactor failed: factorType label is null\";\n LOGGER.error(message);\n throw new InvalidLabelException(message);\n } else {\n message = \"createfactor failed: factorType label has already been used in this factor configuration\";\n final Set<FactorType> factorTypes = factor.getFactorTypes();\n for (final FactorType factorType2 : factorTypes) {\n if (factorType.getLabel().equals(factorType2.getLabel())\n && factorType2.getId() != null) {\n LOGGER.error(message);\n throw new InvalidLabelException(message);\n }\n }\n }\n\n }", "private static boolean checkType(String type) {\n ParameterHelpers.checkParameter(type, \"type\");\n\n if (type.equals(TYPE_REGISTERED)) {\n return true;\n } else if (type.equals(TYPE_UNREGISTERED)) {\n return false;\n } else {\n throw new IllegalArgumentException(\"type must be 'Registered' or 'Unregistered'\");\n }\n }", "private boolean validateInput() {\n\tboolean valid = false;\n\ttry {\n\t if (paymentText == null | paymentText.getValue() == \"\") {\n\t\tpaymentText.focus();\n\t\tthrow new NullPointerException(\"paymentText fehlt\");\n\t }\n\t if (paymentBetrag == null | paymentBetrag.getValue() == \"\") {\n\t\tpaymentBetrag.focus();\n\t\tthrow new NullPointerException(\"paymentBetrag fehlt\");\n\t }\n\t if (!paymentBetrag.isEmpty()) {\n\t\t@SuppressWarnings(\"unused\")\n\t\tdouble d = Double.parseDouble(paymentBetrag.getValue());\n\t }\n\t // seems that everything was OK\n\t valid = true;\n\t} catch (NullPointerException e) {\n\t System.out.println(\"PaymentWindow - \" + e);\n\t} catch (NumberFormatException e) {\n\t // entered value is no number\n\t paymentBetrag.focus();\n\t}\n\treturn valid;\n }", "private void checkFields() {\n if (month.getText().toString().isEmpty()) {\n month.setError(\"enter a month\");\n month.requestFocus();\n return;\n }\n if (day.getText().toString().isEmpty()) {\n day.setError(\"enter a day\");\n day.requestFocus();\n return;\n }\n if (year.getText().toString().isEmpty()) {\n year.setError(\"enter a year\");\n year.requestFocus();\n return;\n }\n if (hour.getText().toString().isEmpty()) {\n hour.setError(\"enter an hour\");\n hour.requestFocus();\n return;\n }\n if (minute.getText().toString().isEmpty()) {\n minute.setError(\"enter the minute\");\n minute.requestFocus();\n return;\n }\n if (AMorPM.getText().toString().isEmpty()) {\n AMorPM.setError(\"enter AM or PM\");\n AMorPM.requestFocus();\n return;\n }\n if (place.getText().toString().isEmpty()) {\n place.setError(\"enter the place\");\n place.requestFocus();\n return;\n }\n }", "public static void printInvalidTaskType() {\n botSpeak(Message.INVALID_TASK_TYPE_ERROR);\n }", "private boolean validateInput(){\n Window owner=root.getScene().getWindow();\n inputFileds.addAll(txtfn,txtln,txtsurname,txtDOB,txtResidence,txtMobile,txtID,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().isEmpty()){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n inputFileds.removeAll(txtDOB,txtMobile,username);\n for (TextField textField : inputFileds) {\n if(textField.getText().length()>30){\n //set css stroke\n Dialog.showMessageDialog(owner,\"Sorry the text you entered can not be greater that 30 characters\",\"Text too Long\",DialogIcon.WARNING);\n textField.requestFocus();\n return false;\n }\n }\n if(username.getText().length()>20 || username.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Username has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid input\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n if(pass.getText().isEmpty()){\n Dialog.showMessageDialog(owner,\"Missing Details\",\"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n if(pass.getText().length()>20 || pass.getText().length()<4){\n Dialog.showMessageDialog(owner, \"Sorry your Password has to be More than 3 Characters and can not Exceed 20 Charchaters\", \"Invalid Input\",DialogIcon.WARNING);\n pass.requestFocus();\n return false;\n }\n SimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat yearFormat = new SimpleDateFormat(\"yyyy\");\n try {\n date = dateFormat.parse(txtDOB.getText());\n Calendar cal=Calendar.getInstance();\n int year=Integer.parseInt(yearFormat.format(date));\n if (year <= 1900 || year>cal.get(Calendar.YEAR)) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n String initialEntry=txtDOB.getText();\n String parsedValue=dateFormat.format(date);\n if(!initialEntry.equals(parsedValue)){\n Dialog.showMessageDialog(owner, \"Note your Date of Birth has been corrected\", \"Date Corrected\",DialogIcon.INFORMATION);\n }\n txtDOB.setText(dateFormat.format(date));\n } catch (ParseException ex) {\n Dialog.showMessageDialog(owner,\"Invalid Date of Birth\", \"Invalid Input\",DialogIcon.WARNING);\n txtDOB.requestFocus();\n return false;\n }\n try {\n int mobile=Integer.parseInt(txtMobile.getText());\n } catch (NumberFormatException e) {\n Dialog.showMessageDialog(owner, \"Invalid Mobile Number\", \"Invalid data\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n if(txtMobile.getText().length() != 10){\n Dialog.showMessageDialog(owner, \"Sorry your Mobile Number is invalid\", \"Invalid input\",DialogIcon.WARNING);\n txtMobile.requestFocus();\n return false;\n }\n String sql=\"select Username,Password from users where Username=?\";\n try(PreparedStatement prstmt=con.prepareStatement(sql)) {\n prstmt.setString(1, username.getText());\n ResultSet rs=prstmt.executeQuery();\n if(rs.next()){\n Dialog.showMessageDialog(owner, \"Sorry Username already exists\\n Please change to different Username\", \"Username Exists\",DialogIcon.WARNING);\n username.requestFocus();\n return false;\n }\n rs.close();\n } catch (SQLException e) {\n System.err.println(e);\n }\n return true;\n }", "private boolean isValidInput() {\n\t\treturn true;\n\t}", "private boolean validateUserInputs() {\n ArrayList<String> errors = new ArrayList();\n \n if (this.view.getContent().equals(\"\")) {\n errors.add(\"\\t - Enter a comment\");\n }\n \n if (errors.size() > 0) {\n String errorMsg = \"Unable to save new Asset.\\nDetails:\";\n for (String error : errors) {\n errorMsg += \"\\n\" + error;\n }\n JOptionPane.showMessageDialog(this.view, errorMsg, \"Unable to Save\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n return true;\n }", "private void validatePage() {\n String error = null;\n String warning = null;\n\n // -- validate project\n if (getProject() == null) {\n error = \"Please select an Android project.\";\n }\n\n // -- validate filename\n if (error == null) {\n String fileName = getFileName();\n if (fileName == null || fileName.length() == 0) {\n error = \"A destination file name is required.\";\n } else if (!fileName.endsWith(AndroidConstants.DOT_XML)) {\n error = String.format(\"The filename must end with %1$s.\", AndroidConstants.DOT_XML);\n }\n }\n\n // -- validate type\n if (error == null) {\n TypeInfo type = getSelectedType();\n\n if (type == null) {\n error = \"One of the types must be selected (e.g. layout, values, etc.)\";\n }\n }\n\n // -- validate type API level\n if (error == null) {\n IAndroidTarget target = Sdk.getCurrent().getTarget(mProject);\n int currentApiLevel = 1;\n if (target != null) {\n currentApiLevel = target.getVersion().getApiLevel();\n }\n\n TypeInfo type = getSelectedType();\n\n if (type.getTargetApiLevel() > currentApiLevel) {\n error = \"The API level of the selected type (e.g. AppWidget, etc.) is not \" +\n \"compatible with the API level of the project.\";\n }\n }\n\n // -- validate folder configuration\n if (error == null) {\n ConfigurationState state = mConfigSelector.getState();\n if (state == ConfigurationState.INVALID_CONFIG) {\n ResourceQualifier qual = mConfigSelector.getInvalidQualifier();\n if (qual != null) {\n error = String.format(\"The qualifier '%1$s' is invalid in the folder configuration.\",\n qual.getName());\n }\n } else if (state == ConfigurationState.REGION_WITHOUT_LANGUAGE) {\n error = \"The Region qualifier requires the Language qualifier.\";\n }\n }\n\n // -- validate generated path\n if (error == null) {\n String wsFolderPath = getWsFolderPath();\n if (!wsFolderPath.startsWith(RES_FOLDER_ABS)) {\n error = String.format(\"Target folder must start with %1$s.\", RES_FOLDER_ABS);\n }\n }\n\n // -- validate destination file doesn't exist\n if (error == null) {\n IFile file = getDestinationFile();\n if (file != null && file.exists()) {\n warning = \"The destination file already exists\";\n }\n }\n\n // -- update UI & enable finish if there's no error\n setPageComplete(error == null);\n if (error != null) {\n setMessage(error, WizardPage.ERROR);\n } else if (warning != null) {\n setMessage(warning, WizardPage.WARNING);\n } else {\n setErrorMessage(null);\n setMessage(null);\n }\n }", "public abstract void showErrorBox(Throwable error);", "private boolean validInput()\n {\n boolean completeForm = true; //all textfields have been filled in\n boolean noExceptions = true; //all textfields (except name) have int\n boolean selectionMade = true; //user has selected a ship type\n\n if (shipNameInput.getText()==\"Ship name\" ||\n xcoordInput.getText()==\"Starting x coordinate\" ||\n ycoordInput.getText()==\"Starting y coordinate\")\n {\n System.out.println(\"ERROR: Please fill in all text fields before \"+\n \"adding your ship.\");\n completeForm = false;\n }\n try\n {\n xcoord = Integer.parseInt(xcoordInput.getText());\n ycoord = Integer.parseInt(ycoordInput.getText());\n }\n catch (NumberFormatException except)\n {\n System.out.println(\"ERROR: Ship coordinates and speed need to be \"+\n \"entered as integers.\");\n noExceptions = false;\n }\n if (directionInput.getResponse() == \"none\")\n {\n System.out.println(\"ERROR: Please choose a direction.\");\n selectionMade = false;\n }\n else\n {\n String d = directionInput.getResponse();\n if (d == \"N\") direction = 0;\n else if (d == \"NE\") direction = Ship.NE;\n else if (d == \"E\") direction = Ship.E;\n else if (d == \"SE\") direction = Ship.SE;\n else if (d == \"S\") direction = Ship.S;\n else if (d == \"SW\") direction = Ship.SW;\n else if (d == \"W\") direction = Ship.W;\n else if (d == \"NW\") direction = Ship.NW;\n }\n shipName = shipNameInput.getText();\n speed = speedSlider.getValue();\n\n return (completeForm && noExceptions && selectionMade);\n }", "public boolean validateInput(boolean showMessage) {\n\n boolean valid = true;\n\n valid = GuiUtilities.validateIntegerInput(this, peptideLengthLabel, minPepLengthTxt, \"minimum peptide length\", \"Peptide Length Error\", true, showMessage, valid);\n valid = GuiUtilities.validateIntegerInput(this, peptideLengthLabel, maxPepLengthTxt, \"minimum peptide length\", \"Peptide Length Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, precursorMassLabel, minPrecursorMassTxt, \"minimum precursor mass\", \"Precursor Mass Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, precursorMassLabel, maxPrecursorMassTxt, \"maximum precursor mass\", \"Precursor Mass Error\", true, showMessage, valid);\n\n if (!minPtmsPerPeptideTxt.getText().trim().isEmpty()) {\n valid = GuiUtilities.validateIntegerInput(this, variablePtmsPerPeptideLabel, minPtmsPerPeptideTxt, \"minimum number of variable PTMs\", \"Variable PTMs Error\", true, showMessage, valid);\n }\n \n if (!maxPtmsPerPeptideTxt.getText().trim().isEmpty()) {\n valid = GuiUtilities.validateIntegerInput(this, variablePtmsPerPeptideLabel, maxPtmsPerPeptideTxt, \"maximum number of variable PTMs\", \"Variable PTMs Error\", true, showMessage, valid);\n }\n\n valid = GuiUtilities.validateIntegerInput(this, maxVariablePtmsPerTypeLabel, maxVariablePtmsPerTypeTxt, \"maximum number of variable PTMs per type\", \"Variable PTMs Error\", true, showMessage, valid);\n valid = GuiUtilities.validateIntegerInput(this, decoySeedLabel, decoySeedTxt, \"decoy seed\", \"Decoy Seed Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, spectrumMzLabel, minSpectrumMzTxt, \"minimum spectrum mz\", \"Spectrum Mz Error\", true, showMessage, valid);\n if (!maxSpectrumMzTxt.getText().trim().isEmpty()) {\n valid = GuiUtilities.validateDoubleInput(this, spectrumMzLabel, maxSpectrumMzTxt, \"maximum spectrum mz\", \"Spectrum Mz Error\", true, showMessage, valid);\n }\n valid = GuiUtilities.validateIntegerInput(this, minPeaksLbl, minPeaksTxt, \"minimum number of peaks\", \"Spectrum Peaks Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, removePrecursorPeakLabel, removePrecursorPeakToleranceTxt, \"remove precursor peak tolerance\", \"Precursor Peak Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, mzBinWidthLabel, mzBinWidthTxt, \"mz bin width\", \"Mz Bin Width Error\", true, showMessage, valid);\n valid = GuiUtilities.validateDoubleInput(this, mzBinOffsetLabel, mzBinOffsetTxt, \"mz bin offset\", \"Mz Bin Offset Error\", true, showMessage, valid);\n valid = GuiUtilities.validateIntegerInput(this, numberMatchesLabel, numberMatchesTxt, \"number of spectrum matches\", \"Number of Spectrum Matches Error\", true, showMessage, valid);\n\n // peptide length: the low value should be lower than the high value\n try {\n double lowValue = Double.parseDouble(minPepLengthTxt.getText().trim());\n double highValue = Double.parseDouble(maxPepLengthTxt.getText().trim());\n\n if (lowValue > highValue) {\n if (showMessage && valid) {\n JOptionPane.showMessageDialog(this, \"The lower range value has to be smaller than the upper range value.\",\n \"Peptide Length Error\", JOptionPane.WARNING_MESSAGE);\n }\n valid = false;\n peptideLengthLabel.setForeground(Color.RED);\n peptideLengthLabel.setToolTipText(\"Please select a valid range (upper <= higher)\");\n }\n } catch (NumberFormatException e) {\n // ignore, handled above\n }\n\n // precursor mass range: the low value should be lower than the high value\n try {\n double lowValue = Double.parseDouble(minPrecursorMassTxt.getText().trim());\n double highValue = Double.parseDouble(maxPrecursorMassTxt.getText().trim());\n\n if (lowValue > highValue) {\n if (showMessage && valid) {\n JOptionPane.showMessageDialog(this, \"The lower range value has to be smaller than the upper range value.\",\n \"Precursor Mass Range Error\", JOptionPane.WARNING_MESSAGE);\n }\n valid = false;\n precursorMassLabel.setForeground(Color.RED);\n precursorMassLabel.setToolTipText(\"Please select a valid range (upper <= higher)\");\n }\n } catch (NumberFormatException e) {\n // ignore, handled above\n }\n\n // spectrum mz range: the low value should be lower than the high value\n try {\n double lowValue = Double.parseDouble(minSpectrumMzTxt.getText().trim());\n double highValue = Double.parseDouble(maxSpectrumMzTxt.getText().trim());\n\n if (lowValue > highValue) {\n if (showMessage && valid) {\n JOptionPane.showMessageDialog(this, \"The lower range value has to be smaller than the upper range value.\",\n \"Spectrum Mz Range Error\", JOptionPane.WARNING_MESSAGE);\n }\n valid = false;\n spectrumMzLabel.setForeground(Color.RED);\n spectrumMzLabel.setToolTipText(\"Please select a valid range (upper <= higher)\");\n }\n } catch (NumberFormatException e) {\n // ignore, handled above\n }\n\n okButton.setEnabled(valid);\n return valid;\n }", "private void validate() {\n\n if (this.clsname == null)\n throw new IllegalArgumentException();\n if (this.dimension < 0)\n throw new IllegalArgumentException();\n if (this.generics == null)\n throw new IllegalArgumentException();\n }", "@Override\n\tpublic void checkType(final String type) {\n\t\tHttpUtils.checkToken(type,\"Type '%s' is not a valid token\",type);\n\t}", "public void setListener(JFXTextField field, int type) {\n if (type == 1) {\n NumberValidator numValidator = new NumberValidator();\n santa_List.add(numValidator);\n field.getValidators().add(numValidator);\n numValidator.setMessage(\"Enter a number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 2) {\n RegexValidator regexValidator = new RegexValidator();\n santa_List.add(regexValidator);\n regexValidator.setRegexPattern(\"^[a-zA-Z]+(([',. -][a-zA-Z ])?[a-zA-Z]*)*$\");\n field.getValidators().add(regexValidator);\n regexValidator.setMessage(\"Enter your name!\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 3) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\".+\\\\@.+\\\\..+\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid email\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 4) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\D?(\\\\d{3})\\\\D?\\\\D?(\\\\d{3})\\\\D?(\\\\d{4})$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid phone number\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 5) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^\\\\d{2}$\");\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter the last two digits of the year\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 6) {\n RegexValidator validEmail = new RegexValidator();\n santa_List.add(validEmail);\n validEmail.setRegexPattern(\"^[0-9]+(\\\\.[0-9][0-9]*)?$\"); // Doesn't account for decimals\n field.getValidators().add(validEmail);\n validEmail.setMessage(\"Enter a valid pH\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n if (type == 7) {\n RegexValidator validRepId = new RegexValidator();\n santa_List.add(validRepId);\n validRepId.setRegexPattern(\"^[a-zA-Z0-9]{0,16}$\"); // Doesn't account for decimals\n field.getValidators().add(validRepId);\n validRepId.setMessage(\"Enter a valid rep id\");\n }\n if (type == 8) {\n RegexValidator validSerial = new RegexValidator();\n santa_List.add(validSerial);\n validSerial.setRegexPattern(\"^\\\\d{4}$\");\n field.getValidators().add(validSerial);\n validSerial.setMessage(\"The serial number must be at most four digits\");\n RequiredFieldValidator validator = new RequiredFieldValidator();\n field.getValidators().add(validator);\n validator.setMessage(\"* Required\");\n }\n\n field.focusedProperty().addListener(new ChangeListener<Boolean>() {\n @Override\n public void changed(ObservableValue<? extends Boolean> observable, Boolean oldValue, Boolean newValue) {\n if (!newValue) {\n field.validate();\n\n boolean t = true;\n for (ValidatorBase vb : santa_List) {\n t = t && !vb.getHasErrors();\n// System.out.println(vb.getHasErrors());\n }\n\n if (t) {\n// System.out.println(\"Fields has no errors\");\n SendApp.setOpacity(1);\n SendApp.setDisable(false);\n } else {\n// System.out.println(\"Fields has errors\");\n SendApp.setDisable(true);\n SendApp.setOpacity(0.5);\n\n }\n }\n }\n });\n }", "public void checkTypeValid(List<Object> types) {\n if(types.size() != inputs.size()) {\n throw new IllegalArgumentException(\"Not matched passed parameter count.\");\n }\n }", "private void catcher() {\n String text;\n\n if (getTextFromEditText(R.id.distanceEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_distance);\n } else if (getTextFromEditText(R.id.fuelEdit).equals(\"\")) {\n text = getResourceString(R.string.err_no_fuel);\n } else {\n text = getResourceString(R.string.err_wrong_vals);\n }\n\n makeToast(text);\n }", "public boolean checkEntryInputs() {\n\t\tboolean isValid = true;\n\t\tif(sampleNumberTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(materialDescriptionTF.getText().equals(\"\")) {\n\t\t\tisValid = false;\n\t\t}\n\t\t\n\t\tif(Double.valueOf(bacteroidesConcentrationTF.getText())==null) {\n\t\t\tisValid = false;\n\t\t}\n\t\treturn isValid;\n\t}", "@Override\n public boolean isValid() {\n if((eMultipleAnswerType == null && textAnswerIn.getText().toString().trim().isEmpty()) || (eMultipleAnswerType != null && !compoundButtonController.isChecked())){\n try {\n invalidText = getResources().getString(R.string.output_invalidField_questionAnswering_notAnswered);\n } catch (NullPointerException e){\n e.printStackTrace();\n }\n return false;\n }\n return true;\n }", "public String validateCurrencyType(){\n\n String currencyType = null;\n int option;\n boolean isBadOption = false;\n\n do{\n try {\n LOG.info(\"Input 1 for RON or input 2 for EUR: \");\n option = IOService.getInstance().readInteger();\n\n switch (option) {\n case 1:\n currencyType = \"RON\";\n isBadOption = true;\n break;\n case 2:\n currencyType = \"EUR\";\n isBadOption = true;\n break;\n default:\n LOG.warning(\"Not a valid option.\");\n break;\n }\n } catch (InputMismatchException e){\n LOG.warning( \"Incorrect entry. Please input 1 for RON or 2 for EUR.\" );\n }\n\n } while (!isBadOption);\n\n return currencyType;\n }", "private void validateType(Errors errors, MultiValueConstraints con, String answer) {\n validateMultiValueType(errors, con, answer);\n if (!con.getAllowOther() && !isEnumeratedValue(con, answer)) {\n rejectField(errors, \"constraints\", \"%s is not an enumerated value for this question\", answer);\n }\n }", "protected boolean validateInputs() {\n if (KEY_EMPTY.equals(firstName)) {\n etFirstName.setError(\"First Name cannot be empty\");\n etFirstName.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(lastName)) {\n etLastName.setError(\"Last Name cannot be empty\");\n etLastName.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(username)) {\n etUsername.setError(\"Username cannot be empty\");\n etUsername.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(email)) {\n etEmail.setError(\"Email cannot be empty\");\n etEmail.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(password)) {\n etPassword.setError(\"Password cannot be empty\");\n etPassword.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Confirm Password cannot be empty\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (!password.equals(confirmPassword)) {\n etConfirmPassword.setError(\"Password and Confirm Password does not match\");\n etConfirmPassword.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(major)) {\n etMajor.setError(\"Major cannot be empty\");\n etMajor.requestFocus();\n return false;\n }\n if (KEY_EMPTY.equals(university)) {\n etUniversity.setError(\"university cannot be empty\");\n etUniversity.requestFocus();\n return false;\n }\n\n\n\n if(!isStudent && !isTutor){\n //Show a toast or some kind of error\n Toast toast = Toast.makeText(this, \"message\", Toast.LENGTH_SHORT);\n toast.setText(\"please check the account type\");\n toast.setGravity(Gravity.CENTER, 0, 0);\n //other setters\n toast.show();\n return false;\n }\n\n\n return true;\n }", "protected abstract int isValidInput();", "private boolean validateInput() {\n boolean isValid = true;\n Alert errMsg = Util.getAlert(Alert.AlertType.ERROR);\n if (connectionsCB.getEditor().getText() == null || !Util.isValidAddress(connectionsCB.getEditor().getText())) {\n errMsg.setContentText(\"Invalid TRex Host Name or IP address\");\n isValid = false;\n } else if (!Util.isValidPort(rpcPort.getText())) {\n errMsg.setContentText(\"Invalid TRex Sync Port Number(\" + rpcPort.getText() + \")\");\n isValid = false;\n } else if (!Util.isValidPort(asyncPort.getText())) {\n errMsg.setContentText(\"Invalid Async Port Number(\" + asyncPort.getText() + \")\");\n isValid = false;\n } else if (Util.isNullOrEmpty(nameTF.getText())) {\n errMsg.setContentText(\"Name should not be empty\");\n isValid = false;\n }\n\n if (!isValid) {\n errMsg.show();\n }\n return isValid;\n }", "void validate() {\n assertNotNull(getType(), \"Must set repository type.\");\n assertFalse(getType().trim().isEmpty(), \"Must set repository type.\");\n }", "private boolean validateType(int type)\n {\n return PSSecurityProvider.isSupportedType(type);\n }", "public void showInputError() {\n\n resultLabel.setText(\"Choose another space!\");\n\n }", "protected void validateInput()\r\n\t{\r\n\t\tString errorMessage = null;\r\n\t\tif ( validator != null ) {\r\n\t\t\terrorMessage = validator.isValid(text.getText());\r\n\t\t}\r\n\t\t// Bug 16256: important not to treat \"\" (blank error) the same as null\r\n\t\t// (no error)\r\n\t\tsetErrorMessage(errorMessage);\r\n\t}", "private boolean isInputValid(){\n boolean isUserInfoValid = userInfoCheck();\n boolean isProductInfoValid = productInfoCheck();\n ImageView iv_error_user_info = findViewById(R.id.iv_error_user_info);\n ImageView iv_error_product_info = findViewById(R.id.iv_error_product_info);\n if(!isUserInfoValid){\n iv_error_user_info.setVisibility(View.VISIBLE);\n }else{\n iv_error_user_info.setVisibility(View.INVISIBLE);\n }\n if (!isProductInfoValid){\n iv_error_product_info.setVisibility(View.VISIBLE);\n }else{\n iv_error_product_info.setVisibility(View.INVISIBLE);\n }\n\n return isUserInfoValid && isProductInfoValid;\n }", "private boolean checkValidity() {\n if(txtSupplierCode.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Code!!\", \"EMPTY SUPPLIER CODE\", JOptionPane.ERROR_MESSAGE);\n txtSupplierCode.setBackground(Color.RED);\n return false;\n }\n if(txtSupplierName.getText().equals(\"\")) {\n JOptionPane.showMessageDialog(null, \"Please Enter the Supplier Name!!\", \"EMPTY SUPPLIER NAME\", JOptionPane.ERROR_MESSAGE);\n txtSupplierName.setBackground(Color.RED);\n return false;\n }\n return true;\n }", "private boolean isInt(TextField input){\r\n input.setStyle(\"-fx-border-color: green; -fx-border-radius: 15;-fx-background-radius: 20;\");\r\n try {\r\n int number = Integer.parseInt(input.getText());\r\n System.out.println(\"Input is\" + number );\r\n return true;\r\n } catch (Exception e) {\r\n input.setStyle(\"-fx-border-color: red;\");\r\n input.setText(null);\r\n input.setPromptText(\"Only digits/numbers must be filled\");\r\n return false;\r\n }\r\n }", "private void editAccountType() throws Exception, EditUserException {\n String userChange = userIDInput.getText();\n String accountTypeInput = accountTypeValueEdit;\n try {\n Admin.editAccountType(userChange, accountTypeInput);\n String msg = \"Change user \" + userChange + \" to \" + accountTypeInput + \" success!\";\n JOptionPane.showMessageDialog(null, msg);\n\n // Reset values\n userIDInput.setText(\"\");\n } catch (NullPointerException e) {\n String msg = \"Edit User Error: Empty values. Please try again.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new NullPointerException(msg);\n } catch (SQLException e) {\n String msg = \"Edit User SQL Error: Could not add to database.\";\n JOptionPane.showMessageDialog(null, msg);\n throw new Exception(msg);\n } catch (EditUserException e) {\n JOptionPane.showMessageDialog(null, e.getMessage());\n }\n }", "public boolean validateInputFields(){\n if(titleText.getText().isEmpty() || descriptionText.getText().isEmpty()){\n showError(true, \"All fields are required. Please complete.\");\n return false;\n }\n if(locationCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a location.\");\n return false;\n }\n if(contactCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a contact.\");\n return false;\n }\n if(typeCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select the type.\");\n return false;\n }\n if(customerCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a customer.\");\n return false;\n }\n if(userCombo.getSelectionModel().isEmpty()){\n showError(true, \"Please select a user.\");\n return false;\n }\n return true;\n }", "private void validator() throws Exception {\n if (getDBTable() == null) throw new Exception(\"getDBTable missing\");\n if (getColumnsString() == null) throw new Exception(\"getColumnsString missing\");\n if (getColumnsType() == null || getColumnsType().size() <= 0) throw new Exception(\"getColumnsType missing\");\n if (getDuplicateUpdateColumnString() == null) {\n if (getColumnsString().split(\",\").length != getColumnsType().size())\n throw new Exception(\"mismatch for type and columns\");\n\n } else {\n if (getColumnsString().split(\",\").length +\n getDuplicateUpdateColumnString().split(\",\").length != getColumnsType().size())\n throw new Exception(\"mismatch for type and columns\");\n }\n }", "@Override\n public boolean isTipoValido() {\n return true;\n }", "private static Object getInput(String message, Scanner sc, Class type) throws IllegalArgumentException {\n while (true) {\n System.out.println(message);\n String in = sc.nextLine();\n if (type.equals(Integer.class)) {\n try {\n return Integer.parseInt(in, 10);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Float.class)) {\n try {\n return Float.parseFloat(in);\n }\n catch (NumberFormatException ex) {\n System.out.println(\"Invalid input.\");\n }\n }\n else if (type.equals(Boolean.class)) {\n switch (in.toLowerCase()) {\n case \"y\":\n return true;\n case \"n\":\n return false;\n default:\n System.out.println(\"You responded '\" + in + \"' - invalid, defaulting to No\");\n return false;\n }\n }\n else {\n throw new IllegalArgumentException(\"Can't convert to type \" + type.toString());\n }\n }\n }", "protected <M> M validationError(Class<M> type) {\n Option<Object> err = actual.getValidationError(0);\n if (err.isEmpty()) {\n throwAssertionError(new BasicErrorMessageFactory(\"Expected a Result with validation errors, but instead was %s\",\n actualToString()));\n }\n return type.cast(err.get());\n }", "private void checkErrorListener(final EventType<? extends ConfigurationErrorEvent> type, final EventType<?> opType, final String key, final Object value) {\n final Throwable exception = listener.checkEvent(type, opType, key, value);\n assertInstanceOf(SQLException.class, exception);\n listener = null; // mark as checked\n }", "public boolean validation(){\n String Venuename= venuename.getText().toString();\n String Address= address.getText().toString();\n String Details= details.getText().toString();\n String Venueimage= venueimage.getText().toString();\n if(Venuename.isEmpty()){\n venuename.setError(\"Please enter the item name\");\n venuename.requestFocus();\n return false;\n }\n if(Address.isEmpty()){\n address.setError(\"Please enter the item name\");\n address.requestFocus();\n return false;\n }\n if(Details.isEmpty()){\n details.setError(\"Please enter the item name\");\n details.requestFocus();\n return false;\n }\n if(Venueimage.isEmpty()){\n venueimage.setError(\"Please Select the image first\");\n return false;\n }\n\n\n return true;\n }", "private void validate() throws BaseException\n {\n boolean okay = true;\n\n //TODO: check the bases in seq for validity\n // If the type is RNA, the base T is not allowed\n // If the type is DNA, the base U is not allowed\n // If a disallowed type is present, set okay to false.\n \n if (!okay)\n {\n throw new BaseException();\n }\n }", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (commentField.getText() == null || commentField.getText().length() == 0) {\n errorMessage += \"Не введен комментарий!\\n\";\n }\n if (timeField.getText() == null || timeField.getText().length() == 0) {\n errorMessage += \"Не введено время выполнения задачи!\\n\";\n }\n if (errorMessage.length() == 0) {\n return true;\n } if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.INFORMATION);\n alert.setTitle(\"Не введены все данные!\");\n alert.setHeaderText(null);\n alert.setContentText(\"Пожалуйста, введите все данные!\");\n alert.showAndWait();\n return false;\n }\n }", "public void checkInput(TextField number) {\r\n\t\ttry {\r\n\t\t\tlong num = Long.parseLong(number.getText());\r\n\t\t\tif (num < 0) \t\t\t\t\t// ako je negativan broj, pretvorit cemo ga u pozitivan\r\n\t\t\t\tnum = Math.abs(num);\r\n\t\t\tif (isValid(num)) \r\n\t\t\t\tscene2();\r\n\t\t}\r\n\t\tcatch (Exception e) {\t\t\t\t// hvatanje greske\r\n\t\t\talert(\"Wrong input, try again!\");\r\n\t\t}\r\n\t}", "@Override\n public void update(Observable arg0, Object arg1) {\n Object[] array = (Object[]) arg1;\n int type = (int) array[0];\n String message = (String) array[1];\n\n if (type == 0) {\n JOptionPane.showMessageDialog(this, message, \"Error!\",\n JOptionPane.ERROR_MESSAGE);\n } else if (type == 1) {\n JOptionPane.showMessageDialog(this, message, \"Success!\",\n JOptionPane.INFORMATION_MESSAGE);\n }\n\n }", "protected void validateType(StateVariable stateVariable, Class type) throws LocalServiceBindingException {\n/* 306 */ Datatype.Default expectedDefaultMapping = ModelUtil.isStringConvertibleType(getStringConvertibleTypes(), type) ? Datatype.Default.STRING : Datatype.Default.getByJavaType(type);\n/* */ \n/* 308 */ log.finer(\"Expecting '\" + stateVariable + \"' to match default mapping: \" + expectedDefaultMapping);\n/* */ \n/* 310 */ if (expectedDefaultMapping != null && \n/* 311 */ !stateVariable.getTypeDetails().getDatatype().isHandlingJavaType(expectedDefaultMapping.getJavaType()))\n/* */ {\n/* */ \n/* 314 */ throw new LocalServiceBindingException(\"State variable '\" + stateVariable + \"' datatype can't handle action \" + \"argument's Java type (change one): \" + expectedDefaultMapping\n/* */ \n/* 316 */ .getJavaType());\n/* */ }\n/* */ \n/* 319 */ if (expectedDefaultMapping == null && stateVariable.getTypeDetails().getDatatype().getBuiltin() != null) {\n/* 320 */ throw new LocalServiceBindingException(\"State variable '\" + stateVariable + \"' should be custom datatype \" + \"(action argument type is unknown Java type): \" + type\n/* */ \n/* 322 */ .getSimpleName());\n/* */ }\n/* */ \n/* */ \n/* 326 */ log.finer(\"State variable matches required argument datatype (or can't be validated because it is custom)\");\n/* */ }", "public boolean checkInput();", "private boolean isInputValid() {\n String errorMessage = \"\";\n\n if (gemNameField.getText() == null || gemNameField.getText().length() == 0) {\n errorMessage += \"No valid gem name!\\n\";\n }\n if (gemValueField.getText() == null || gemValueField.getText().length() == 0) {\n errorMessage += \"No valid gem value!\\n\";\n } else {\n // try to parse the gem value into an int.\n try {\n Integer.parseInt(gemValueField.getText());\n } catch (NumberFormatException e) {\n errorMessage += \"No valid gem value (must be an integer)!\\n\";\n }\n }\n if (gemDescripField.getText() == null || gemDescripField.getText().length() == 0) {\n errorMessage += \"No valid gem description!\\n\";\n }\n\n if (errorMessage.length() == 0) {\n return true;\n } else {\n // Show the error message.\n Alert alert = new Alert(Alert.AlertType.ERROR);\n alert.initOwner(dialogStage);\n alert.setTitle(\"Invalid Fields\");\n alert.setHeaderText(\"Please correct invalid fields\");\n alert.setContentText(errorMessage);\n\n alert.showAndWait();\n\n return false;\n }\n }", "private boolean checkForWrongInput(){\n if(this.studentCode.getText().isEmpty())\n return true;\n //Check for length\n if(this.studentCode.getText().length() != 3)\n return true;\n //Check for invalid characters\n for(char c: this.studentCode.getText().toCharArray())\n if(!Character.isDigit(c))\n return true;\n\n return false;\n }", "private boolean checkInputType(int inputType,int fieldId){\n if(fieldId>0){ //native\n if(inputType==1 || inputType==17 || inputType==65537)return true;\n }else{ //web\n if(inputType==161)return true;\n }\n return false;\n }", "private boolean checkRange() {\n String notInRange = \"\"; //used for displaying error message\n \n double a = Double.valueOf(ampBox.getText());\n int d = Integer.valueOf(durBox.getText());\n int f = Integer.valueOf(freqBox.getText());\n int ow = Integer.valueOf(owBox.getText());\n \n if(a>8.128 || a<0) notInRange += \"Amplitude not in range [0mA,8.128mA]\\n\";\n if(d>423 || d<0) notInRange += \"Pulse duration not in range [0uS,423uS]\\n\";\n if(f>100 || f<0) notInRange += \"Frequency not in range [0Hz,100Hz]\\n\";\n if(ow>60 || ow<0) notInRange += \"ON-WAVE duration not in range [0sec,60sec]\\n\";\n \n if(notInRange.length()>0) {\n notInRange += \"\\nInput within proper ranges and try again\";\n JOptionPane.showMessageDialog(null, \n notInRange, \n \"Error\", JOptionPane.INFORMATION_MESSAGE);\n return false;\n }\n else {\n return true;\n }\n }", "private static Boolean validateForm() {\n\t\t\tBoolean valid = true;\n\t\t\tSystem.out.println(\"Index: \"+portfolio.findByCode(pCode.getText()));\n\t\t\tif(pCode.getText().equals(\"\")) {\n\t\t\t\tmsgCode.setText(\"Project code is required\");\n\t\t\t\tvalid = false;\n\t\t\t} else if(portfolio.findByCode(pCode.getText()) >= 0) {\n\t\t\t\tmsgCode.setText(\"Project already exists!\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgCode.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif(pName.getText().equals(\"\")) {\n\t\t\t\tmsgName.setText(\"Project Name is required!\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgName.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif(pClient.getText().equals(\"\")) {\n\t\t\t\tmsgClient.setText(\"Client is required!\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgClient.setText(\"\");\n\t\t\t}\n\t\t\t\n\t\t\tif(pSDate.getText().equals(\"\")) {\n\t\t\t\tmsgSDate.setText(DATE_FORMAT + \" Start Date is required\");\n\t\t\t\tvalid = false;\n\t\t\t} else {\n\t\t\t\tmsgSDate.setText(DATE_FORMAT);\n\t\t\t}\n\t\t\t\n\t\t\tswitch(pType) {\n\t\t\tcase \"o\":\n\t\t\t\tif(pDeadline.getText().equals(\"\")) {\n\t\t\t\t\tmsgDeadline.setText(DATE_FORMAT + \" Deadline is required!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t} else {\n\t\t\t\t\tmsgDeadline.setText(DATE_FORMAT);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tDouble b = Double.parseDouble(pBudget.getText());\n\t\t\t\t\tif(b<0) {\n\t\t\t\t\t\tmsgBudget.setText(\"Must be a positive value\");\n\t\t\t\t\t\tvalid=false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsgBudget.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tmsgBudget.setText(\"Invalid number!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tint c = Integer.parseInt(pCompletion.getText());\n\t\t\t\t\tif(c<0 || c>100) {\n\t\t\t\t\t\tmsgCompletion.setText(\"Value must be between 0 and 100\");\n\t\t\t\t\t\tvalid = false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsgCompletion.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tmsgCompletion.setText(\"Invalid number!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase \"f\":\n\t\t\t\tif(pEndDate.getText().equals(\"\")) {\n\t\t\t\t\tmsgEndDate.setText(DATE_FORMAT + \" End date is required!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t} else {\n\t\t\t\t\tmsgEndDate.setText(DATE_FORMAT);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\ttry {\n\t\t\t\t\tDouble b = Double.parseDouble(pTotalCost.getText());\n\t\t\t\t\tif(b<0){\n\t\t\t\t\t\tmsgTotalCost.setText(\"Must be a positive number\");\n\t\t\t\t\t\tvalid=false;\n\t\t\t\t\t} else {\n\t\t\t\t\t\tmsgTotalCost.setText(\"\");\n\t\t\t\t\t}\n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tmsgTotalCost.setText(\"Invalid number!\");\n\t\t\t\t\tvalid = false;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\treturn valid;\n\t\t}", "private boolean isInputValid() {\r\n String errorMessage = \"\";\r\n\r\n if (nameField.getText() == null || nameField.getText().length() == 0) {\r\n errorMessage += \"请输入直播名!\\n\";\r\n }\r\n if (urlField.getText() == null || urlField.getText().length() == 0) {\r\n errorMessage += \"请输入直播流!\\n\";\r\n }\r\n\r\n if (errorMessage.length() == 0) {\r\n return true;\r\n } else {\r\n Alert alert = new Alert(Alert.AlertType.ERROR);\r\n alert.setTitle(\"输入错误\");\r\n alert.setContentText(errorMessage);\r\n return false;\r\n }\r\n }", "public boolean checkInput(){\n if(spelerIDField.getText().equals(\"\") || typeField.getText().equals(\"\") || codeField.getText().equals(\"\") || heeftBetaaldField.getText().equals(\"\")){\n return true;\n } else { return false; }\n }", "private int errorCheckingInt(String display) {\n\n\t\tint tempChoice;\n\t\tScanner input = new Scanner(System.in);\n\n\t\twhile (true) {\n\t\t\tSystem.out.print(\"\\n\" + display);\n\t\t\ttry {\n\t\t\t\ttempChoice = input.nextInt();\n\t\t\t\tif(display.equals(\"Enter number of kids: \")) { //only for kids\n\t\t\t\t\tif(tempChoice < 0)\n\t\t\t\t\t\tthrow new IllegalArgumentException(\"Error input\\n\");\n\t\t\t\t}\n\t\t\t\telse if (tempChoice < 1)\n\t\t\t\t\tthrow new IllegalArgumentException(\"Error input\\n\");\n\t\t\t\tbreak;\n\t\t\t} catch (InputMismatchException e) {\n\t\t\t\tSystem.out.println(\"Error input \\n\");\n\t\t\t\tinput.next();\n\t\t\t} catch (IllegalArgumentException e) {\n\t\t\t\tSystem.out.println(e);\n\t\t\t}\n\t\t}\n\n\t\tinput.nextLine();\n\n\t\treturn tempChoice;\n\t}", "private boolean validate() {\n if(edtMobileNumber.getText().toString().length() <= 0){\n edtMobileNumber.setFocusable(true);\n edtMobileNumber.setError(Constants.ERR_MSG_MOBILE);\n return false;\n }else if(edtFirstName.getText().toString().length() <= 0){\n edtFirstName.setFocusable(true);\n edtFirstName.setError(Constants.ERR_MSG_FIRST_NAME);\n return false;\n }else if(edtLastName.getText().toString().length() <= 0){\n edtLastName.setFocusable(true);\n edtLastName.setError(Constants.ERR_MSG_LAST_NAME);\n return false;\n }else if(edtDateOfBirth.getText().toString().length() <= 0){\n edtDateOfBirth.setFocusable(true);\n edtDateOfBirth.setError(Constants.ERR_MSG_DATE_OF_BIRTH);\n return false;\n }else if(edtEnterPin.getText().toString().length() <= 0){\n edtEnterPin.setFocusable(true);\n edtEnterPin.setError(Constants.ERR_MSG_PIN);\n return false;\n }else if(edtConfirmPin.getText().toString().length() <= 0){\n edtConfirmPin.setFocusable(true);\n edtConfirmPin.setError(Constants.ERR_MSG_CONFIRM_PIN);\n return false;\n }else if(spnStatus.getSelectedItemPosition() == 0){\n Toast.makeText(context, Constants.ERR_MSG_STATUS, Toast.LENGTH_SHORT).show();\n return false;\n }else if(spnBloodGroup.getSelectedItemPosition() == 0){\n Toast.makeText(context, Constants.ERR_MSG_BLOOD_GROUP, Toast.LENGTH_SHORT).show();\n return false;\n }else if(rgGender.getCheckedRadioButtonId() == -1){\n Toast.makeText(context,Constants.ERR_MSG_GENDER,Toast.LENGTH_SHORT).show();\n return false;\n }\n return true;\n }", "private boolean checkForInvalidInput(){\n String email = emailTextView.getText().toString();\n String password = passwordTextView.getText().toString();\n String name = usernameTextView.getText().toString();\n\n\n if(email.isEmpty() || password.isEmpty() || name.isEmpty()){\n Toast.makeText(getApplicationContext(),\"Please fill in all fields\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n\n if(!email.contains(\"@\")){\n Toast.makeText(getApplicationContext(),\"Please enter a valid email\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n if(!isStudent && !isTeacher){\n Toast.makeText(getApplicationContext(),\"Please select Student or Teacher\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n\n\n\n\n // add more checks?\n\n return true;\n\n }", "public void error(ValidationType type, String validationName, String content);" ]
[ "0.69666886", "0.6404323", "0.62956053", "0.62650275", "0.6230169", "0.6158111", "0.6088713", "0.6035542", "0.60248137", "0.60245633", "0.59798735", "0.5972584", "0.5968242", "0.5948236", "0.59207916", "0.5910215", "0.5894939", "0.58909327", "0.586811", "0.5857388", "0.5844334", "0.58429724", "0.58387864", "0.5831095", "0.5830181", "0.5794464", "0.5769149", "0.5728709", "0.5712962", "0.5708417", "0.570313", "0.5692144", "0.56880707", "0.5679774", "0.56694657", "0.5667752", "0.56634676", "0.56628746", "0.5662046", "0.5655139", "0.56458575", "0.564081", "0.5638207", "0.5635073", "0.5632764", "0.5630878", "0.5628794", "0.5624963", "0.5606092", "0.5603229", "0.55895436", "0.55867505", "0.5582716", "0.5577958", "0.55736595", "0.55707794", "0.5567836", "0.55592746", "0.5555685", "0.5550611", "0.55498695", "0.55467874", "0.55461794", "0.55461", "0.55362505", "0.5522943", "0.5520467", "0.5519953", "0.55036944", "0.54991597", "0.5490732", "0.54906476", "0.5483493", "0.5476359", "0.5470132", "0.5452318", "0.5448695", "0.54416734", "0.54225594", "0.54179525", "0.5415921", "0.5407837", "0.5404511", "0.53987986", "0.5398031", "0.53943306", "0.5393308", "0.5392045", "0.53885627", "0.53757304", "0.5369951", "0.53635925", "0.5362155", "0.5359711", "0.5352324", "0.5347679", "0.534587", "0.53428006", "0.5323524", "0.53235054", "0.53127956" ]
0.0
-1
discriminante su quale algoritmo applicare, viene modificato dai bottoni alg
public MainWindow(int N) { this.N = N; stato = 1; this.setSpacing(0); buildFinestra(); this.setOnKeyPressed((evento) -> { if (evento.getCode() == KeyCode.C) { pulisci(); } if (evento.getCode() == KeyCode.S) { effettuaStep(); } }); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void zatvoriAplikaciju() {\r\n\t\tint zatvori = JOptionPane.showConfirmDialog(teretanaGui.getContentPane(),\r\n\t\t\t\t\"Da li ste sigurni da zelite da izadjete iz programa?\", \"Izlazak iz programa\",\r\n\t\t\t\tJOptionPane.YES_NO_OPTION);\r\n\t\tif (zatvori == JOptionPane.YES_OPTION) {\r\n\t\t\tSystem.exit(0);\r\n\t\t}\r\n\t}", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public String prepareToAddApplication() {\r\n\t\tSystem.out.println(\"aaa\");\r\n\t\t// TODO Auto-generated method stub\r\n\t\ttry {\r\n\t\t\tuserRole = (Employee) request.getSession().getAttribute(\"user\");\r\n\t\t\tif(userRole.isApprover()){\r\n\t\t\t\tallapprover = ied.getApproversForApproveer(userRole.getEmpName());\r\n\t\t\t\talladmin = ied.getAllAdmins();\r\n\t\t\t\treturn \"prepare_approver_success\";\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tallapprover = ied.getAllApprovers();\r\n\t\t\talladmin = ied.getAllAdmins();\r\n\t\t return \"success\";\r\n\t\t\r\n\t\t} catch (Exception e) {\r\n\t\t\te.printStackTrace();\r\n\t\t\treturn \"error\";\r\n\t }\r\n\t}", "private void enviarRequisicaoAdicionar() {\n servidor.adicionarPalito(nomeJogador);\n atualizarPalitos();\n }", "@Override\n public void opcionEscogida(String app) {\n\n if(app.equals(\"camara\")){\n fotoCamara();\n eleccion=1;\n }else{\n //opcion galeria\n fotoGaleria();\n eleccion=2;\n }\n\n }", "public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }", "public void acaba() \n\t\t{\n\t\t\tsigo2 = false;\n\t\t}", "public boolean attivaPulsanteProsegui(){\n\t\tif(!model.isSonoInAggiornamentoIncasso()){\n\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getOrdinativo() && model.getGestioneOrdinativoStep1Model().getOrdinativo().isFlagCopertura() && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso()!= null && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso().size()>0){\n\t\t\t return true;\t\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "@Override\r\n\tpublic void action() {\n\t\tMessageTemplate mt=MessageTemplate.or(MessageTemplate.MatchContent(\"comida\"), MessageTemplate.MatchContent(\"bebida\"));\r\n ACLMessage msg = myAgent.receive(mt);\r\n if(msg!=null){\r\n \tif(msg.getContent().compareTo(\"comida\")==0){\r\n \t\tif(Comida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo hambre todavia\"); \r\n myAgent.send(reply);\r\n Comida=Comida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n \telse if(msg.getContent().compareTo(\"bebida\")==0){\r\n \t\tif(Bebida>=5){\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"Si\");\r\n System.out.println(myAgent.getLocalName()+\":Si, gracias tengo sed todavia\"); \r\n myAgent.send(reply);\r\n Bebida=Bebida-5;\r\n \t\t}\r\n \t\telse{\r\n \t\t\tACLMessage reply = msg.createReply();\r\n reply.setContent(\"No\");\r\n System.out.println(myAgent.getLocalName()+\":No gracias\"); \r\n myAgent.send(reply);\r\n \t\t} \r\n \t}\r\n }\r\n if (Comida==0 && Bebida==0){\r\n \tmyAgent.doDelete();\r\n }\r\n\t}", "public boolean es_programa() {\n\t\treturn tipo == Tipo_simbolo.PROGRAMA;\n\t}", "@Test\r\n public void CriterioTipoSiCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnoDeCadaTipoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoAprobado(criterio);\r\n \r\n assertTrue(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 4); \r\n }", "public void generarCuestionario() {\n \n try{\n ValidarOpcionSeleccionada.validar (radios);\n }catch (OpcionNoSeleccionadaException e) {\n etiquetaRespuesta.setText(\"Debes selecionar una opcion\");\n}\n \n\n //Con el modelo construido debemos representar nuestra pregunta\n //y mostrarala\n //Primero creamos las opciones\n Opcion op1 = new Opcion();\n op1.setTitulo(\"Inglaterra\");\n op1.setCorrecta(false);\n\n Opcion op2 = new Opcion();\n op2.setTitulo(\"México\");\n op2.setCorrecta(false);\n\n Opcion op3 = new Opcion();\n op3.setTitulo(\"Italia\");\n op3.setCorrecta(false);\n\n Opcion op4 = new Opcion();\n op4.setTitulo(\"Francia\");\n op4.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones = {op1, op2, op3, op4};\n Pregunta p1 = new Pregunta();\n p1.setTitulo(\"¿Que país tiene más Premios Nobel de Literatura?\");\n p1.setOpciones(opciones);\n\n \n //opciones de la pregunta 2\n Opcion op21 = new Opcion();\n op21.setTitulo(\"Ares\");\n op21.setCorrecta(false);\n\n Opcion op22 = new Opcion();\n op22.setTitulo(\"Prometeo\");\n op22.setCorrecta(false);\n\n Opcion op23 = new Opcion();\n op23.setTitulo(\"Poseidón\");\n op23.setCorrecta(true);\n\n Opcion op24 = new Opcion();\n op24.setTitulo(\"Hefesto\");\n op24.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones2 = {op21, op22, op23, op24};\n Pregunta p2 = new Pregunta();\n p2.setTitulo(\"¿Quién es el padre del cíclope Polifemo según la mitología griega?\");\n p2.setOpciones(opciones2);\n \n //opciones de la pregunta 3\n Opcion op31 = new Opcion();\n op31.setTitulo(\"J.K Rowling\");\n op31.setCorrecta(false);\n\n Opcion op32 = new Opcion();\n op32.setTitulo(\"Emily Bronte\");\n op32.setCorrecta(false);\n\n Opcion op33 = new Opcion();\n op33.setTitulo(\"Stephen King\");\n op33.setCorrecta(false);\n\n Opcion op34 = new Opcion();\n op34.setTitulo(\"Jane Austen\");\n op34.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones3 = {op31, op32, op33, op34};\n Pregunta p3 = new Pregunta();\n p3.setTitulo(\"¿Quien escribio el libro Orgullo y Prejuicio?\");\n p3.setOpciones(opciones3);\n \n //Opciones pregunta 4\n Opcion op41 = new Opcion();\n op41.setTitulo(\"El Cáliz de Fuego\");\n op41.setCorrecta(true);\n\n Opcion op42 = new Opcion();\n op42.setTitulo(\"Festin de Cuervos\");\n op42.setCorrecta(false);\n\n Opcion op43 = new Opcion();\n op43.setTitulo(\"El prisionero de Azkaban\");\n op43.setCorrecta(false);\n\n Opcion op44 = new Opcion();\n op44.setTitulo(\"Principe Mecánico\");\n op44.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones4 = {op41, op42, op43, op44};\n Pregunta p4 = new Pregunta();\n p4.setTitulo(\"¿Como se llama el cuarto libro de Harry Potter?\");\n p4.setOpciones(opciones4);\n \n //Opciones pregunta 5\n Opcion op51 = new Opcion();\n op51.setTitulo(\"Dunkirk\");\n op51.setCorrecta(false);\n\n Opcion op52 = new Opcion();\n op52.setTitulo(\"Los Miserables\");\n op52.setCorrecta(true);\n\n Opcion op53 = new Opcion();\n op53.setTitulo(\"Interestelar\");\n op53.setCorrecta(false);\n\n Opcion op54 = new Opcion();\n op54.setTitulo(\"Batman: El caballero de la noche\");\n op54.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones5= {op51, op52, op53, op54};\n Pregunta p5 = new Pregunta();\n p5.setTitulo(\"¿Que película NO dirigio Chistopher Nolan?\");\n p5.setOpciones(opciones5);\n \n //Opciones pregunta 6\n Opcion op61 = new Opcion();\n op61.setTitulo(\"Joe Greene\");\n op61.setCorrecta(false);\n\n Opcion op62 = new Opcion();\n op62.setTitulo(\"Tom Brady\");\n op62.setCorrecta(false);\n\n Opcion op63 = new Opcion();\n op63.setTitulo(\"Joe Montana\");\n op63.setCorrecta(false);\n\n Opcion op64 = new Opcion();\n op64.setTitulo(\"Peyton Manning\");\n op64.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones6 = {op61, op62, op63, op64};\n Pregunta p6 = new Pregunta();\n p6.setTitulo(\"¿Que jugador ha ganado más MVP en la NFL?\");\n p6.setOpciones(opciones6);\n \n //Opciones pregunta 7\n Opcion op71 = new Opcion();\n op71.setTitulo(\"Bayern Munich\");\n op71.setCorrecta(false);\n\n Opcion op72 = new Opcion();\n op72.setTitulo(\"Real Madrid\");\n op72.setCorrecta(true);\n\n Opcion op73 = new Opcion();\n op73.setTitulo(\"Barcelona\");\n op73.setCorrecta(false);\n\n Opcion op74 = new Opcion();\n op74.setTitulo(\"Manchester United\");\n op74.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones7 = {op71, op72, op73, op74};\n Pregunta p7 = new Pregunta();\n p7.setTitulo(\"¿Que equipo ha ganado más Champions League en la hsitoria?\");\n p7.setOpciones(opciones7);\n \n \n //Opciones pregunta 8\n \n Opcion op81 = new Opcion();\n op81.setTitulo(\"Tratado de Versalles\");\n op81.setCorrecta(true);\n\n Opcion op82 = new Opcion();\n op82.setTitulo(\"Tratado de Granada\");\n op82.setCorrecta(false);\n\n Opcion op83 = new Opcion();\n op83.setTitulo(\"Tratado de Lyon\");\n op83.setCorrecta(false);\n\n Opcion op84 = new Opcion();\n op84.setTitulo(\"Tratado de Londres\");\n op84.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones8 = {op81, op82, op83, op84};\n Pregunta p8 = new Pregunta();\n p8.setTitulo(\"¿Como se llamo el tratado con el que se le dio fin a la PGM?\");\n p8.setOpciones(opciones8);\n \n //opciones pregunta 9 \n \n Opcion op91 = new Opcion();\n op91.setTitulo(\"Hermanos Lumiere\");\n op91.setCorrecta(false);\n\n Opcion op92 = new Opcion();\n op92.setTitulo(\"Steven Spielberg\");\n op92.setCorrecta(false);\n\n Opcion op93 = new Opcion();\n op93.setTitulo(\"Thomas Harper\");\n op93.setCorrecta(false);\n\n Opcion op94 = new Opcion();\n op94.setTitulo(\"George Mellies\");\n op94.setCorrecta(true);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones9 = {op91, op92, op93, op94};\n Pregunta p9 = new Pregunta();\n p9.setTitulo(\"¿A quien se le considera como el mago del cine?\");\n p9.setOpciones(opciones9);\n \n //Opciones pregunta 10\n Opcion op101 = new Opcion();\n op101.setTitulo(\"Miguel Ángel\");\n op101.setCorrecta(false);\n\n Opcion op102 = new Opcion();\n op102.setTitulo(\"Rafael Sanzio\");\n op102.setCorrecta(false);\n\n Opcion op103 = new Opcion();\n op103.setTitulo(\"Leonardo Da Vinci\");\n op103.setCorrecta(true);\n\n Opcion op104 = new Opcion();\n op104.setTitulo(\"Bernini\");\n op104.setCorrecta(false);\n\n //Sigue el arreglo de opcion\n Opcion[] opciones10 = {op101, op102, op103, op104};\n Pregunta p10 = new Pregunta();\n p10.setTitulo(\"¿Que artífice NO participo en la construcción de la Basílica de San Pedro?\");\n p10.setOpciones(opciones10);\n \n \n \n //Pregunta p11 =new Pregunta();\n System.out.println(\"Fin de Cuestionario \");\n \n \n \n //Vamos a adaptar el cuestioanario a lo que ya teniamos\n Cuestionario c = new Cuestionario();\n //Creamos el list de preguntas\n \n \n \n //Se agrega a este list las preguntas que tenemos\n preguntas.add(p1);\n preguntas.add(p2);\n preguntas.add(p3);\n preguntas.add(p4);\n preguntas.add(p5);\n preguntas.add(p6);\n preguntas.add(p7);\n preguntas.add(p8);\n preguntas.add(p9);\n preguntas.add(p10);\n // preguntas.add(p11);\n //A este list le vamos a proporcionar el valor del correspondiente\n //cuestioanrio\n \n c.setPreguntas(preguntas);\n //Ajustamos el titulo de la primera pregunta\n mostrarPregunta (preguntaActual); \n//Primero ajustamos el titulo de la primer pregunta en la etiqueta de la pregunta\ntry{\n int opcion= Integer.parseInt (etiquetaRespuesta.getText());\n ValidarNumeroPreguntas.validar (opcion);\n }catch (NumberFormatException e) {\n \n}\n \n }", "private void mIesireActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_mIesireActionPerformed\n int response = JOptionPane.showConfirmDialog(this, \"Doriti sa parasiti aplicatia?\", \"Confirmare\", JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n if (response == JOptionPane.YES_OPTION) {\n System.exit(0);\n }\n }", "@Override\n\tpublic void chocoContraPared() {}", "private void miInregistrareActionPerformed(java.awt.event.ActionEvent evt) { \n try {\n int n = Integer.parseInt(JOptionPane.showInputDialog(rootPane, \"Introduceti codul de validare:\", \"Confirmare\", JOptionPane.QUESTION_MESSAGE));\n if (n == cod) {\n // In cazul introducerii codului de inregistrare corect, toate functionalitatile aplicatiei devin accesibile, altfel se genereaza exceptie\n lblReclama.setVisible(false);\n miDeschidere.setEnabled(true);\n miSalvare.setEnabled(true);\n miInregistrare.setEnabled(false);\n btnAdauga.setEnabled(true);\n btnModifica.setEnabled(true);\n btnSterge.setEnabled(true);\n lblCod.setVisible(false);\n cbFiltre.setEnabled(true);\n cbOrdonari.setEnabled(true);\n tfPersonalizat.setEditable(true);\n } else {\n throw new NumberFormatException();\n }\n } catch (NumberFormatException numberFormatException) {\n JOptionPane.showMessageDialog(null, \"Cod de validare eronat!\");\n }\n\n }", "@Override\n\tpublic boolean semelhante(Assemelhavel obj, int profundidade) {\n\t\treturn false;\n\t}", "@Test\r\n public void CriterioUnidadSiCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnaDeCadaUnidadCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoAprobado(criterio);\r\n \r\n assertTrue(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 4); \r\n }", "public static void menuPrincicipal() {\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| Elige una opcion |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 1-Modificar Orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 2-Eliminar orden |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 3-Ver todas las ordenes |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t\tSystem.out.println(\"| 0-Salir |\");\n\t\tSystem.out.println(\"+---------------------------+\");\n\t}", "private void enviarRequisicaoPalpite() {\n if (servidor.verificarPalpitar(nomeJogador)) {\n String palpite = NomeDialogo.nomeDialogo(null, \"Informe o seu palpite\", \"Digite o seu palpite:\", false);\n if (palpite != null && !servidor.palpitar(nomeJogador, Integer.parseInt(palpite))) {\n JanelaAlerta.janelaAlerta(null, \"Este palpite já foi dado!\", null);\n }\n }\n }", "@Override\r\n\t\tpublic void action() {\n MessageTemplate mt = MessageTemplate.MatchPerformative(ACLMessage.ACCEPT_PROPOSAL);\r\n MessageTemplate mt2 = MessageTemplate.MatchPerformative(ACLMessage.PROPOSE);\r\n ACLMessage msg = myAgent.receive(mt);\r\n //If it is a ACCEPT_PROPOSAL, the seller sell the book to the buyer (execpt if the book if not here anymore)\r\n if (msg != null) {\r\n // ACCEPT_PROPOSAL Message received. Process it\r\n title = msg.getContent();\r\n ACLMessage reply = msg.createReply();\r\n\r\n Integer price = (Integer) catalogue.remove(title);\r\n if (price != null) {\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(String.valueOf(price));\r\n System.out.println(title+\" sold to agent \"+msg.getSender().getName());\r\n }\r\n else {\r\n // The requested book has been sold to another buyer in the meanwhile .\r\n reply.setPerformative(ACLMessage.FAILURE);\r\n reply.setContent(\"not-available\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n //If it is a new PROPOSE, the buyer is trying to negociate.\r\n else {\r\n ACLMessage msg2 = myAgent.receive(mt2);\r\n if(msg2 != null){\r\n ACLMessage reply = msg2.createReply();\r\n //If the price of the buyer is OK for the seller according to his tolerance, the transaction is made\r\n if(((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) <= tolerance){\r\n System.out.println(myAgent.getLocalName() + \" say : OK, let's make a deal\");\r\n updateCatalogue(title, Integer.parseInt(msg2.getContent()));\r\n reply.setPerformative(ACLMessage.INFORM);\r\n reply.setContent(msg2.getContent());\r\n }\r\n //Else, the seller accept to negociate, he up his tolerance and ask the buyer to up his real price\r\n else{\r\n //Send a REQUEST Message to negociate with the buyer\r\n reply.setPerformative(ACLMessage.REQUEST);\r\n //Up the tolerance by *change*\r\n tolerance += change;\r\n reply.setContent(String.valueOf(change));\r\n System.out.println(myAgent.getLocalName() + \" say : Let's up your real price while I up my tolerance (\" + ((Integer) catalogue.get(title) - Integer.parseInt(msg2.getContent())) + \" < \" + tolerance + \")\");\r\n }\r\n myAgent.send(reply);\r\n }\r\n else{\r\n block();\r\n }\r\n }\r\n\t\t}", "public static void main(String[] arhg) {\n\n Conta p1 = new Conta();\n p1.setNumConta(1515);\n p1.abrirConta(\"cp\");\n p1.setDono(\"wesley\");\n p1.deposita(500);\n // p1.saca(700); -> irá gera um erro pois o valor de saque especificado é superior ao valor que tem na conta\n\n p1.estadoAtual();\n }", "public abstract void indicarRespuesta(CombinacionRespuesta combinacionAdversario);", "@Override\n public Proposition proposerUneCombinaison(IResultat resultat) {\n DemandeInfo demandeInfo = new DemandeInfo();\n return demandeInfo.demandecombinaisonMastermind();\n }", "private static void imprimirMensajeEnPantalla() {\n\tSystem.out.println(\"########### JUEGO EL AHORCADO ###########\");\n\timprimirAhorcado(intentosRestantes);\n\tSystem.out.println(\"\\nPALABRA ACTUAL: \" + getPalabraActualGuionBajo());\n\tSystem.out.println(\"INTENTOS RESTANTES: \" + intentosRestantes);\n\t}", "public boolean pregunta(){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea escribir otra palabra?\", \"¿Escribir?\", JOptionPane.YES_NO_OPTION);\n if (d == 0) {\n return true;\n }else if (d == 1) {\n return false;\n }\n return false;\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "@Test\r\n public void CriterioTipoNoCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnoDeCadaTipoCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoNoAprobado(criterio);\r\n \r\n assertFalse(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 0); \r\n }", "protected ACLMessage handleAcceptProposal(ACLMessage cfp, ACLMessage propose,ACLMessage accept) throws FailureException \r\n\t{\r\n\t\tACLMessage inform = accept.createReply();\r\n\t\tinform.setPerformative(ACLMessage.INFORM);\r\n\t\t//TODO: devrementer le nb de trajets disponibles suite a la vente\r\n\t\treturn inform;\r\n\t}", "private int obtenerMensajeDeConfirmacion() {\n String mess = \"¿Seguro que desea \";\n switch (opcionForm) {\n case FormEscOpcion.CREAR:\n mess += \" Guardar?\";\n break;\n case FormEscOpcion.MODIFICAR:\n mess += \" Modificar?\";\n break;\n case FormEscOpcion.ELIMINAR:\n mess += \" Eliminar?\";\n break;\n default:\n break;\n }\n // pedir confirmacion al usuario de la pantalla si desea enviar la informacion o no utilizando un showConfirmDialog\n int input = JOptionPane.showConfirmDialog(this, mess, \"\",\n JOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE);\n return input; // retornar la respuesta del usuario de la pantalla al utilizar el showConfirmDialog\n }", "public Principal() {\n initComponents();\n Desabilitar();\n ChoicePro.add(\"\");\n ChoicePro.add(\"Guerrero\");\n ChoicePro.add(\"Mago\");\n ChoicePro.add(\"Arquero\");\n Llenar();\n\n }", "public static void main(String[] args) {\n String matriz = \"ABCDEFGHIJLMNOPQRSTUVWXYZ\";\n Ejercicio1 c = new Ejercicio1();\n String retorno;\n String mensaje = JOptionPane.showInputDialog(\"Digite el mensaje\");\n// Convierte el mensaje a mayusculas\n mensaje = mensaje.toUpperCase();\n c.llenaMatriz(matriz);\n retorno = c.aTap(mensaje);\n JOptionPane.showMessageDialog(null, retorno);\n\n //Fin de la Primera parte del examen\n /*\n Inicio de la Segunda parte del examen\n */\n /*\n String[] lista = {\" auto \", \" pato \", \" palo \", \" poto \", \" amar \", \" amor \",\n \" loca \", \" loco \", \" polo \", \" poco \", \" poca \", \" rota \", \" roto \"};\n AdminPalabras admin = new AdminPalabras( lista );\n String[] letras = {\" escalopa \", \" automotor\", \" percatado\"};\n for(int i = 0; i < letras . length ; i ++) {\n int cont = admin .ContarPalabrasPosibles(letras [i ]);\n JOptionPane.showMessageDialog(null,letras [i] + \": \" + cont );\n }*/\n //Fin de la Segunda parte del Examen\n }", "public abstract Combinacion elegirCombinacionOculta();", "public static void main(String[] args) {\n\t\tPersoana p1=new Persoana(\"Andrei\", \"1990000000000\");\r\n\t\tBilet b1=new Bilet(\"Andrei\",\"1A\");\r\n\t\t\r\n\t\tif(p1.getNume().equals(b1.getNume())) {\r\n\t\t\tif(Politie.esteUrmarita(p1)) {\r\n\t\t\t\tif(BazaDeDateHuligani.esteInListaDeHuligani(p1)) {\r\n\t\t\t\t\tSystem.out.println(\"Intrati!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tPersoana p2=new Persoana(\"Maria\", \"1990000000000\");\r\n\t\tBilet b2=new Bilet(\"Maria\",\"2C\");\r\n\t\t\r\n\t\tif(Facade.sePermiteAccesulPeStadion(p2,b2)) {\r\n\t\t\tSystem.out.println(\"Poftiti!\");\r\n\t\t}else {\r\n\t\t\tSystem.out.println(\"Nu aveti voie!\");\r\n\t\t}\r\n\t}", "final void checkForComodification() {\n\t}", "public void verPruevaCandidato(Candidato actualcandidato, Prueba pruebaselect, Convocatoria convoselect, ArrayList rolesselect)\r\n\t{\r\n\t\tList preguntas = null;\r\n\t try \r\n\t {\r\n\t\t Conector conector = new Conector();\r\n\t\t conector.iniciarConexionBaseDatos();\r\n\t\t preguntas= PreguntaBD.listar(conector);\r\n\t\t conector.terminarConexionBaseDatos();\r\n\t } catch (Exception e){\r\n\t\t JOptionPane.showMessageDialog(this,\"Error al conectar con la Base de Datos.\",\"Error\", JOptionPane.ERROR_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/error.PNG\"));\r\n\t }\r\n\t if(preguntas != null)\r\n\t {\r\n\t \tif(actualcandidato != null)\r\n\t \t{\r\n\t \t\tif(pruebaselect != null)\r\n\t\t \t{\r\n\t \t\t\tpruevacandidato = new PruebaCandidatoI(this, actualcandidato, pruebaselect, convoselect, rolesselect);\r\n\t \t\t\tpruevacandidato.setVisible(true);\r\n\t\t \t}\r\n\t \t\telse\r\n\t\t\t\t{\r\n\t\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el tipo de prueba seleccionado.\",\"Presentar Prueba\", JOptionPane.WARNING_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/advertencia.PNG\"));\r\n\t\t\t\t}\r\n\t \t}\r\n\t \telse\r\n\t\t\t{\r\n\t\t\t\tJOptionPane.showMessageDialog(this,\"No se encontro el candidato para preentar la prueba.\",\"Presentar Prueba\", JOptionPane.WARNING_MESSAGE,new ImageIcon(\"./images/IconosInterfaz/advertencia.PNG\"));\r\n\t\t\t}\r\n\t }\r\n\t}", "public void productoAcabado(boolean a){\n if(a==true){\n JOptionPane.showMessageDialog(null,\"Retire Producto\");\n }else{System.out.println(\"....\");}\n }", "public boolean modificaAppuntamento(Appuntamento a) {\r\n\t\tboolean ret = false;\r\n\t\tStatement stmt;\r\n\t\tString query = \t\"UPDATE appuntamento SET nome='\" + a.getNome() + \r\n\t\t\t\t\t\t\"', cognome='\" + a.getCognome() + \r\n\t\t\t\t\t\t\"', data='\" + a.getData() +\r\n\t\t\t\t\t\t\"', ora='\" + a.getOra() + \r\n\t\t\t\t\t\t\"', descrizione='\" + a.getDescrizione() + \r\n\t\t\t\t\t\t\"', contatto='\" + a.getContatto() + \r\n\t\t\t\t\t\t\"', stato='\" + a.getStato() + \r\n\t\t\t\t\t\t\"' WHERE codice='\" + a.getCodice() + \"'\";\r\n\t\t\r\n\t\tif(!isConnected) {\r\n\t\t\tSystem.err.println(\"AppuntamentoManager.modificaAppuntamento() - nessuna connessione al db attiva!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\r\n\t\tif(a == null || a == APPUNTAMENTO_VUOTO || !verificaAppuntamento(a)) {\r\n\t\t\tSystem.err.println(\"AppuntamentoManager.modificaAppuntamento() - l'Appuntamento passato non � valido.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif((a.getCodice() < 0) || a.getCodice() > 999999) {\r\n\t\t\tSystem.err.println(\"AppuntamentoManager.modificaAppuntamento() - codice non valido: \\\"\" + a.getCodice() + \"\\\"\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tstmt.executeUpdate(query);\r\n\t\t\tret = true;\r\n\t\t}\r\n\t\tcatch(SQLException ex) {\r\n\t\t\tSystem.err.print(\"SQLException: \");\r\n\t\t\tSystem.err.println(ex.getMessage());\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public boolean is_appiered(String a){\n return this.appariement.equals(a);\n }", "public static void main(String[] args) {\n\n Poupanca poupanca = new Poupanca();\n\n Corrente corrente = new Corrente();\n\n poupanca.setNome(\"maria\");\n poupanca.setNumero(123);\n poupanca.setDiaAniversario(10);\n poupanca.depositar(100);\n\n\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.println(\"nome do cliente da poupança:\" + poupanca.getNome());\n\n boolean operacao = poupanca.sacar(50);\n\n if(operacao){\n System.out.println(\"saque realizado com sucesso\");\n }else {\n System.out.println(\"saldo insuficiente\");\n }\n\n System.out.println(\"saldo de \" + poupanca.getNome() + \": \" + poupanca.getSaldo());\n\n\n // para conta corrente\n corrente.setNumero(234);\n corrente.setNome(\"rafael\");\n corrente.depositar(1000);\n corrente.setLimite(500);\n\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.println(\"nome do cliente: \" + corrente.getNome());\n System.out.println(\"saldo atual: \" + corrente.getSaldo());\n\n operacao = corrente.sacar(500);\n\n if(operacao){\n System.out.println(\"saque realizado com sucesso\");\n }else {\n System.out.println(\"saldo insuficiente\");\n }\n\n System.out.println(\"saldo atual: \" + corrente.getSaldo());\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n\n Corrente corrente1 = new Corrente();\n corrente1.setSaldo(1000);\n\n GerenciarPatrimonioBanco gp = new GerenciarPatrimonioBanco();\n gp.adicionarConta(corrente);\n gp.adicionarConta(poupanca);\n gp.adicionarConta(corrente1);\n\n System.out.println();\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n System.out.println(\"total do dinheiro dos clientes no banco: \" );\n System.out.println(gp.getTotalPatrimonio());\n\n System.out.println(\"=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=-=\");\n\n }", "public void confirmarDuplicarFormulaProceso() {\n if (duplicarFormulaProceso.getProceso().getSecuencia() != null) {\n k++;\n l = BigInteger.valueOf(k);\n duplicarFormulaProceso.setSecuencia(l);\n listFormulasProcesos.add(duplicarFormulaProceso);\n listFormulasProcesosCrear.add(duplicarFormulaProceso);\n RequestContext context = RequestContext.getCurrentInstance();\n infoRegistro = \"Cantidad de registros : \" + listFormulasProcesos.size();\n context.update(\"form:informacionRegistro\");\n context.update(\"form:datosFormulaProceso\");\n context.execute(\"DuplicarRegistroFormulaProceso.hide()\");\n index = -1;\n secRegistro = null;\n if (guardado == true) {\n guardado = false;\n RequestContext.getCurrentInstance().update(\"form:ACEPTAR\");\n }\n if (bandera == 1) {\n altoTabla = \"310\";\n formulaProceso = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaProceso\");\n formulaProceso.setFilterStyle(\"display: none; visibility: hidden;\");\n\n formulaPeriodicidad = (Column) FacesContext.getCurrentInstance().getViewRoot().findComponent(\"form:datosFormulaProceso:formulaPeriodicidad\");\n formulaPeriodicidad.setFilterStyle(\"display: none; visibility: hidden;\");\n\n RequestContext.getCurrentInstance().update(\"form:datosFormulaProceso\");\n bandera = 0;\n filtrarListFormulasProcesos = null;\n tipoLista = 0;\n }\n duplicarFormulaProceso = new FormulasProcesos();\n } else {\n RequestContext.getCurrentInstance().execute(\"errorRegistroFP.show()\");\n }\n }", "public void aplicarDescuento();", "private void agregarDiccionario(Palabra palabra){\n if (!dic.contiene(palabra)) {\n boolean su = sugerencia(palabra);\n if(su){\n int d = JOptionPane.showConfirmDialog(null, \"¿Desea agregar: ´\"+palabra.getCadena()+\"´ al diccionario?\", \"Agregar!\", JOptionPane.YES_NO_OPTION);\n if (d == 0) \n dic.agrega(palabra);\n }\n }else {\n JOptionPane.showMessageDialog(null,\"--La palabra ya se encuentra en el diccionario.--\\n --\"+dic.busca(palabra).toString());\n }\n }", "public String admit() {\n\n Applicants applicants = new Applicants(\"Daniel\", \"Okoro\", 17, \"male\", 70);\n System.out.println(applicants.admitted());\n return applicants.admitted();\n }", "@Override\n\tpublic void initialisation_type_exercice() {\n\t\tthis.setEnnonce_exo(\"Ecrire un algorithme qui demande deux nombres à l’utilisateur et l’informe ensuite si le produit est négatif ou positif (on inclut cette fois le traitement du cas où le produit peut être nul). Attention toutefois, on ne doit pas calculer le produit !\");\n\n\t}", "public static void main(String args[]){\n ControlAcceso controlador = new ControlAcceso();\n\n //se asignan los comportamientos\n controlador.asignarComportamientoAcceso(new AccesoPassword());\n\n controlador.asignarComportamientoCifrado(new CifradoNormal());\n\n controlador.acceder();\n controlador.cifrar(\"texto\");\n\n //de forma dinamica cmbio el comportamiento\n controlador.asignarComportamientoCifrado(new CifradoNulo());\n controlador.cifrar(\"djad\");\n }", "@Test\r\n public void CriterioUnidadNoCumple()\r\n {\r\n CriterioDeCorreccion criterio = new UnaDeCadaUnidadCriterioDeCorreccion();\r\n ExamenCorregido corregido = generarExamenCorregidoNoAprobado(criterio);\r\n \r\n assertFalse(criterio.cumple(corregido.getNotasPregunta()));\r\n assertEquals(corregido.getNota(), 0);\r\n }", "public void realiserAcahatProduit() {\n\t\t\n\t}", "public void choicePersonage() {\n\t\tSystem.out.println(\"souhaitez-vous créer un guerrier ou un magicien ?\");\n\t\tchoice = sc.nextLine().toLowerCase();\t\t\t\n\t\tSystem.out.println(\"Vous avez saisi : \" + choice);\n\t\tif(!(choice.equals(MAGICIEN) || choice.equals(GUERRIER))) {\n\t\t\tchoicePersonage();\n\t\t}\n\t\tsaisieInfoPersonage(choice);\n\t}", "@Override\n\tpublic void procesar() throws WrongValuesException, ExcEntradaInconsistente {\n\n\t}", "private void verificaIdade() {\r\n\t\thasErroIdade(idade.getText());\r\n\t\tisCanSave();\r\n\t}", "public EnquirerAnimals() {\r\n database = new TreeMap<>();\r\n bc = new BaseConhecimento();\r\n bc.setScenario(\"animals\");\r\n String[] animais_aux = bc.listaNomes();\r\n \r\n perguntas = new ArrayList<>();\r\n animais = new ArrayList<>();\r\n \r\n animais.addAll(Arrays.asList(animais_aux));\r\n \r\n \r\n \r\n //Monta database com perguntas, animais e respectivas respostas\r\n for (String animal : animais) {\r\n obj = bc.recuperaObjeto(animal);\r\n database.put(animal, new TreeMap<String,Boolean>());\r\n \r\n for (IDeclaracao decl = obj.primeira(); decl != null; decl = obj.proxima()){\r\n \r\n String perguntaAtual = decl.getPropriedade(); // pega pergunta\r\n String resp = decl.getValor(); // Pega resposta da pergunta atual\r\n \r\n QuestionInfo atual = new QuestionInfo(perguntaAtual);\r\n if (!perguntas.contains(atual))\r\n perguntas.add(atual); //Cria QuestionInfo da pergutnta atual;\r\n \r\n if (resp.equalsIgnoreCase(\"sim\"))\r\n database.get(animal).put(perguntaAtual, true);\r\n else //Respondeu nao\r\n database.get(animal).put(perguntaAtual, false);\r\n }\r\n }\r\n \r\n \r\n for (QuestionInfo pergunta : perguntas)\r\n pergunta.novoEquilibrio();\r\n }", "public void toolAccepted()\n {\n printOut(cliToolsManager.simpleQuestionsMaker(\"Strumento accettato\", 40, true));\n }", "private void confirmarGuardarEmpleado() {\n String pregunta = \"Esto seguro de realizar guardar la categoria?\";\n new AlertDialog.Builder(this)\n .setTitle(getResources().getString(R.string.msj_confirmacion))\n .setMessage(pregunta)\n .setNegativeButton(android.R.string.cancel, null)//sin listener\n .setPositiveButton(getResources().getString(R.string.lbl_aceptar),\n new DialogInterface.OnClickListener() {//un listener que al pulsar, solicite el WS de Transsaccion\n @Override\n public void onClick(DialogInterface dialog, int which){\n guardarEmpleado();\n }\n })\n .show();\n }", "public void interactWhenApproaching() {\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tHamburger cheeseBurger = new Hamburger(\"CheeseBurger\");\r\n\t\tHamburger maxiBurger = new Hamburger(\"MaxiBurger\");\r\n\t\tAccompagnement accompagnement = new Accompagnement(\"Frites\");\r\n\t\tBoisson boissonCoca = new Boisson(\"Coca\");\r\n\t\tBoisson boissonOrange = new Boisson(\"Orange\");\r\n\r\n\t\t// Mise en place de l'environnement\r\n\t\tControlCreerProfil controlCreerProfil = new ControlCreerProfil();\r\n\t\tcontrolCreerProfil.creerProfil(ProfilUtilisateur.PERSONNEL, \"Dupond\", \"Jacques\", \"jdu\");\r\n\r\n\t\t// Connexion du cuisinier\r\n\t\tControlSIdentifier controlSIdentifier = new ControlSIdentifier();\r\n\t\tint numCuisinier = controlSIdentifier.sIdentifier(ProfilUtilisateur.PERSONNEL, \"Jacques.Dupond\", \"jdu\");\r\n\r\n\t\t// Initialisation controleur du cas & cas Inclus/etendu\r\n\t\tControlVerifierIdentification controlVerifierIdentification = new ControlVerifierIdentification();\r\n\t\tcontrolVerifierIdentification.verifierIdentification(ProfilUtilisateur.PERSONNEL, numCuisinier);\r\n\r\n\t\t// cas visualiser commande du jour\r\n\t\tControlVisualiserCommandeJour controlVisualiserCommandeJour = new ControlVisualiserCommandeJour(\r\n\t\t\t\tcontrolVerifierIdentification);\r\n\t\tBoundaryVisualiserCommandeJour boundaryVisualiserCommandeJour = new BoundaryVisualiserCommandeJour(\r\n\t\t\t\tcontrolVisualiserCommandeJour);\r\n\t\tboundaryVisualiserCommandeJour.visualiserCommandeJour(numCuisinier);\r\n\r\n\t\ttry {\r\n\t\t\tThread.sleep(1500);\r\n\t\t\tSystem.out.println(\"Ecriture des commandes dans le fichier\");\r\n\t\t} catch (InterruptedException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\t// extrait cas commander\r\n\t\tBDCommande bdCommande = BDCommande.getInstance();\r\n\t\tbdCommande.enregistrerCommande(1, cheeseBurger, accompagnement, boissonCoca);\r\n\t\tbdCommande.enregistrerCommande(1, maxiBurger, accompagnement, boissonOrange);\r\n\r\n\t\t// Ecriture des commandes dans le fichier\r\n\t\t// Commande n°1 : CheeseBurger, Frites, Coca\r\n\t\t// Commande n°2 : MaxiBurger, Frites, Orange\r\n\t}", "@Override\r\n\t\tpublic void action() {\n\t\t\t\r\n\t\t\tACLMessage request = new ACLMessage (ACLMessage.REQUEST);\r\n\t\t\trequest.setProtocol(FIPANames.InteractionProtocol.FIPA_REQUEST);\r\n\t\t\trequest.addReceiver(new AID(\"BOAgent\",AID.ISLOCALNAME));\r\n\t\t\trequest.setLanguage(new SLCodec().getName());\t\r\n\t\t\trequest.setOntology(RequestOntology.getInstance().getName());\r\n\t\t\tInformMessage imessage = new InformMessage();\r\n\t\t\timessage.setPrice(Integer.parseInt(price));\r\n\t\t\timessage.setVolume(Integer.parseInt(volume));\r\n\t\t\ttry {\r\n\t\t\t\tthis.agent.getContentManager().fillContent(request, imessage);\r\n\t\t\t} catch (CodecException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t} catch (OntologyException e) {\r\n\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\t\t\tthis.agent.addBehaviour(new AchieveREInitiator(this.agent, request)\r\n\t\t\t{\t\t\t\r\n\t\t\t/**\r\n\t\t\t\t * \r\n\t\t\t\t */\r\n\t\t\t\tprivate static final long serialVersionUID = -8866775600403413061L;\r\n\r\n\t\t\t\tprotected void handleInform(ACLMessage inform)\r\n\t\t\t\t{\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t});\r\n\t\t}", "@Before\n\tpublic void incoporacionDeCandidatosYProvinciasHabilitadasALaJuntaElectoral(){\n\t\tmendoza.agregarPartido(pro);\n\t\tbuenosaires.agregarPartido(pro);\n\t\trionegro.agregarPartido(pro);\n\t\tentrerios.agregarPartido(pro);\n\t\tmendoza.agregarPartido(renovador);\n\t\tbuenosaires.agregarPartido(renovador);\n\t\trionegro.agregarPartido(renovador);\n\t\tentrerios.agregarPartido(renovador);\n\t\tmendoza.agregarPartido(fpv);\n\t\tbuenosaires.agregarPartido(fpv);\n\t\trionegro.agregarPartido(fpv);\n\t\tentrerios.agregarPartido(fpv);\n\n\t\t//Incorporacion de los candidatos habilitados al centro de computos\n\t\tjuntaElectoral.agregarCandidato(macri);\t\t\n\t\tjuntaElectoral.agregarCandidato(massa);\t\t\n\t\tjuntaElectoral.agregarCandidato(scioli);\n\n\t\t//Incorporacion de las provincias habilitadas al centro de computos\n\t\tjuntaElectoral.agregarProvincia(mendoza);\n\t\tjuntaElectoral.agregarProvincia(buenosaires);\n\t\tjuntaElectoral.agregarProvincia(rionegro);\n\t\tjuntaElectoral.agregarProvincia(entrerios);\n\t}", "public static void main (String args []) {\n\t\t Automovel a = new Automovel ( \"Edurdo\",\"Palio\", \"JWO2125\", \n 2002);\n\t\t //troca de mensagens (chamada ao metodo imprimir())\n\t\t //a.getAno();\n\t\t a.imprimirInfo();\n\t\t System.out.println (\"***Transferencia de Proprietario***\");\n\t\t a.setNomeProprietario(\"Rosa\");\n\t\t a.imprimirInfo();\n\t\t Automovel b = new Automovel (\"Rodrigo\", \"Parati\", \n\t\t \"JSX6481\", 1999);\n\t\t b.imprimirInfo();\n\t\t System.out.println (\"***Mudanca de Placa***\");\n\t\t b.setPlaca(\"SDK2581\");\n\t\t b.imprimirInfo();\n\t\t }", "public static void main(String[] args) {\n\n\t Scanner entrada = new Scanner(System.in);\n\t int aleatorio =(int)(Math.random()*100);\n\t \n\t \n\t int numero= 0;\n\t int intentos= 0;\n\t \n\t while(numero !=aleatorio){\n\t\tintentos ++; \n\t\t System.out.println(\"introduce un numero, por favor\");\n\t\t numero = entrada.nextInt();\n\t\t \n\t if(numero < aleatorio) {\n\t\t\t \n\t\t\t System.out.println(\"mas alto\");\n\t\t\t \n\t\t }\n\t\t else if(numero>aleatorio ) {\n\t\t\t System.out.println(\"mas bajo\");\n\t\t\t \n\t\t\t \n\t\t }\n\t \n\t }\n\t \n\tSystem.out.println(\"correcto, acertaste en \"+intentos+ \" intentos\");\n\t \n\t}", "@Test\r\n public void testVerificaPossibilidade2() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "public boolean isOpen() {\r\n \r\n boolean open = false;\r\n\r\n List<String> permitidas = new ArrayList();\r\n List<String> prohibidas = new ArrayList();\r\n //PROCESANDO LO PERMITIDO.\r\n NodeIterator ni = license.model.listObjectsOfProperty( ModelFactory.createDefaultModel().createResource(license.getURI()), ODRL.PPERMISSION);\r\n while(ni.hasNext())\r\n {\r\n RDFNode n = ni.next();\r\n if(n.isResource())\r\n {\r\n Resource r = n.asResource();\r\n StmtIterator sit = r.listProperties(ODRL.PACTION);\r\n while(sit.hasNext())\r\n {\r\n Statement st=sit.next();\r\n RDFNode n2 = st.getObject();\r\n String s = n2.asResource().getLocalName();\r\n permitidas.add(s);\r\n }\r\n }\r\n }\r\n \r\n //PROCESANDO LO PROHIBIDO\r\n ni = license.model.listObjectsOfProperty( ModelFactory.createDefaultModel().createResource(license.getURI()), ODRL.PPROHIBITION);\r\n while(ni.hasNext())\r\n {\r\n RDFNode n = ni.next();\r\n if(n.isResource())\r\n {\r\n Resource r = n.asResource();\r\n StmtIterator sit = r.listProperties(ODRL.PACTION);\r\n while(sit.hasNext())\r\n {\r\n Statement st=sit.next();\r\n RDFNode n2 = st.getObject();\r\n String s = n2.asResource().getLocalName();\r\n prohibidas.add(s);\r\n }\r\n }\r\n } \r\n for(String s : permitidas)\r\n System.out.println(\"OK \" + s);\r\n for(String s : prohibidas)\r\n System.out.println(\"NOK \" + s);\r\n if (permitidas.contains(\"Distribution\") && permitidas.contains(\"DerivativeWorks\") && !prohibidas.contains(\"CommercialUse\"))\r\n open = true;\r\n return open;\r\n }", "public void estableceEquipoComputo() {\n\tsetDispositivo(JOptionPane.showInputDialog(\"Ingrese el nombre del dispositivo a adquirir\"));\n\tsetComercio(JOptionPane.showInputDialog(\"Ingrese el nombre del comercio donde lo comprara\"));\n}", "public Proceso atender() {\n\t\tProceso proceso = raiz.sig;\n\t\tif (proceso == this.raiz) {\n\t\t\tSystem.out.println(\"Cola Vacia\");\n\t\t\treturn null;\n\t\t}\n\t\tProceso sig = proceso.sig;\n\t\tProceso padre = raiz;\n\t\tpadre.sig = sig;\n\t\tsig.padre = padre;\n\t\tcabeza = sig;\n\t\tthis.numProcesos--;\n\t\tthis.calcularTiemposProcesos();\n\t\treturn proceso;\n\t}", "public void exibeMenu() {\n System.out.println(\"Digite o valor referente a operação desejada\");\r\n System.out.println(\"1. Busca Simples\");\r\n System.out.println(\"2. Busca Combinada\");\r\n System.out.println(\"3. Adicionar Personagem Manualmente\");\r\n System.out.println(\"4. Excluir Personagem\");\r\n System.out.println(\"5. Exibir Personagens\");\r\n int opcao = teclado.nextInt();\r\n if(opcao >= 7){\r\n do\r\n {\r\n System.out.println(\"Digite um numero valido\");\r\n opcao = teclado.nextInt();\r\n }while (opcao>=6);\r\n }\r\n ctrlPrincipal.opcaoMenu(opcao);\r\n }", "public static void main(String[] args) {\n\t\tScanner entrada=new Scanner(System.in);\r\n\t\t//Inicio del code\r\n\t\t\r\n\t\tBoolean ornah;\r\n\t\t\r\n\t\tString controller=JOptionPane.showInputDialog(\"Sos puto: \");\r\n\t\t\r\n\t\tif(controller.equals(\"yes\")) {\r\n\t\t\tornah=true;\r\n\t\t}\r\n\t\telse {\r\n\t\t\tornah=false;\r\n\t\t}\r\n\t\t\r\n\t\t//Boolean ornah=Boolean.parseBoolean(JOptionPane.showInputDialog(\"Ingresa True or False :\"));\r\n\t\t\t\t\r\n\t\tByte edad=Byte.parseByte(JOptionPane.showInputDialog(\"ingresar edad: \"));\r\n\t\t\t\t\r\n\t\tString name=JOptionPane.showInputDialog(\"Ingrese nombre: \");\r\n\t\t\r\n\t\tSystem.out.println(\"Su name is \"+name+\" La edad \"+edad+\" this is \"+ornah);\r\n\t\t\r\n\t\tif (edad>=20) {\r\n\t\t\tSystem.out.print(\"Tay viejo \"+name+\" ctmree, ya tenes: \"+edad);\r\n\t\t}\r\n\t\telse if(edad>25) {\r\n\t\t\tSystem.out.println(\"segunda opcion\");\r\n\t\t}\r\n\t\telse {\r\n\t\t\tSystem.out.println(\"Todavia estai bien zii\");\r\n\t\t}\r\n\t}", "public synchronized void abilitarAbordaje() {\n abordar = true;\r\n notifyAll();\r\n while(pedidoAbordaje != 0){//Mientras los pasajeros esten abordando\r\n try {\r\n wait();\r\n } catch (InterruptedException ex) {\r\n Logger.getLogger(Vuelo.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n }\r\n //Cuando los pasajeros hayan abordado el vuelo sale\r\n salio = true;\r\n System.out.println(\"El vuelo \" + nro + \" de \" + aerolinea + \" ha despegado\");\r\n }", "public contrustor(){\r\n\t}", "@Override\n\tpublic void dialogar() {\n\t\tSystem.out.println(\"Ofrece un Discurso \");\n\t\t\n\t}", "public static void main(String[] args) {\n // Se crea la clase mv utilizada como sistema de prints para el programa:\n ModuloVista mv = new ModuloVista();\n // Se crea la clase mr que actua como el objeto de radio para la ejecucion:\n ModuloRadio mr = new ModuloRadio();\n // Se entra en un loop infinito para controlar el programa:\n while(true){\n // Cada loop se hace un switch para saber que opcion desea realizar el usuario:\n switch (mv.seleccionarOpcionMI(mr.getestadoRadio(), mr.getemisoraRadio(), (mr.getemisoraRadio() ? mr.emisorasAM[mr.getEmisoraActual(true)] : mr.emisorasFM[mr.getEmisoraActual(false)]))) {\n case 1:\n /**\n * Case 1\n * Encaragado de encender la radio\n * en caso de ya estar encendido enviara notificacion de su estado\n */\n if(mr.getestadoRadio()){ mv.msgEstadoRadio(true); }\n else{ mv.msgEstadoRadio(false); mr.setestadoRadio(true);;}\n break;\n case 2:\n /**\n * Case 2\n * Se revisa que la radio este encendida, si lo esta,\n * este enviara a la clase radio la informacion de que se\n * desea alterar entre AM o FM sin requerir parametro\n */\n if(!mr.getestadoRadio()){ mv.msgERROREncenderRadio(); }\n else{ mr.setemisoraRadio(); mv.msgEmisoraRadio(mr.getemisoraRadio()); }\n break;\n case 3:\n /**\n * Case 3\n * Se revisa que la radio este encendida, si lo esta,\n * este tomara la frecuencia en la que se encuentra el\n * radio actualmente y agregara una posicion a su emisora\n */\n if(!mr.getestadoRadio()){ mv.msgERROREncenderRadio(); }\n else{\n mr.aumentarEmisoraActual(mr.getemisoraRadio());\n mv.msgCambioEmisora(mr.getemisoraRadio() ? mr.emisorasAM[mr.getEmisoraActual(true)] : mr.emisorasFM[mr.getEmisoraActual(false)]);\n }\n break;\n case 4:\n /**\n * Case 4\n * Se revisa que la radio este encendida, si lo esta,\n * revisara que aun hayan espacios disponibles (< 12)\n * verificado esto tomara la posicion que corresponde y\n * la emisora actual y seran guardadas en el HashMap de la\n * clase Radio \"emisorasGuardadas\"\n */\n if(!mr.getestadoRadio()){ mv.msgERROREncenderRadio(); }\n else{\n if(mr.emisorasGuardadas.size() == 12){\n mv.msgERRORSinEspacio();\n } else{\n mr.emisorasGuardadas.put((mr.emisorasGuardadas.size() + 1), mr.getemisoraRadio() ? mr.emisorasAM[mr.getEmisoraActual(true)] : mr.emisorasFM[mr.getEmisoraActual(false)]);\n mv.msgEmisoraGuardada(mr.emisorasGuardadas.size(), mr.emisorasGuardadas.get(mr.emisorasGuardadas.size()));\n }\n }\n break;\n case 5:\n /**\n * Case 5\n * Este requiere que el usuario ingrese el boton que desea retraer del HashMap\n * una vez retraida la info. del boton siendo su posicion y emisora el programa\n * reconoce si es una frecuancia AM o FM y se encarga de alternar la frecuencia\n * en caso de no ser la misma y colocar la posicion de la emisora en la correspondiente.\n */\n try {\n int botonElecto = mv.ingresarBotonEmisoraGuardada();\n String emisoraTEMP = mr.emisorasGuardadas.get(botonElecto);\n boolean esEmisoraAM = (emisoraTEMP.charAt(0) == '9') ? true : false;\n mr.setEmisoraRadioCambio(esEmisoraAM);\n if(esEmisoraAM){\n for(int i = 0; i < mr.emisorasAM.length; i++){\n if(emisoraTEMP.equals(mr.emisorasAM[i])){\n mr.establecerPuntoAM(i);\n mv.cambioExitosoEmisora(emisoraTEMP, true);\n }\n }\n }\n else{\n for(int i = 0; i < mr.emisorasFM.length; i++){\n if(emisoraTEMP.equals(mr.emisorasFM[i])){\n mr.establecerPuntoFM(i);\n mv.cambioExitosoEmisora(emisoraTEMP, false);\n }\n }\n }\n } catch (Exception e) {\n System.out.println(\" ! | Hubo un error al retraer tu emisora, porfavor intenta de nuevo..\");\n }\n break;\n /**\n * Caso 6\n * Apaga la radio\n */\n case 6:\n mr.setestadoRadio(false);\n System.out.println(\" ! | Radio apagado.\");\n break; \n }\n }\n }", "public String aceptar() {\n\t\tSystem.out.println(\"------- aceptar\");\n\n\n\t\tif (banderaModif.equals(\"false\")) {\n\t\t\tdao.insert(producto);\n\t\t} else {\n\t\t\tdao.update(producto);\n\t\t}\n\t\treturn \"listaProductos.xhtml?faces-redirect=true\";\n\t}", "@Override\n\tpublic boolean approveIt() {\n\t\treturn false;\n\t}", "@Override\n\t\t\t\tpublic void action() {\n\t\t\t\t\t\tRandom r = new Random();\n\t\t\t\t\t\tint Low = 1;\n\t\t\t\t\t\tint High = 999;\n\t\t\t\t\t\tint Result = r.nextInt(High-Low) + Low;\n\t\t\t\t\t\tACLMessage msg = new ACLMessage(ACLMessage.REQUEST);\n\t\t\t\t\t\tmsg.setOntology(\"AirConditioner\");\n\t\t\t\t\t\tmsg.addReceiver(new AID(\"da\", AID.ISLOCALNAME));\n//\t\t\t\t\t\tif (Result % 2 == 0){\n//\t\t\t\t\t\t\t//humid mode\n//\t\t\t\t\t\t\tmsg.setContent(\"humid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: humid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 3 == 0)) {\n//\t\t\t\t\t\t\t//mid\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: mid\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse if((Result % 5 == 0)) {\n//\t\t\t\t\t\t\t//high\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: high\" );\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\telse {\n//\t\t\t\t\t\t\t//low\n//\t\t\t\t\t\t\tmsg.setContent(\"mid\");\n//\t\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: low\" );\n//\t\t\t\t\t\t}\n\t\t\t\t\t\tmsg.setContent(Airconditioner_Agent.mode);\n\t\t\t\t\t\tSystem.out.println(\"Agent \"+ myAgent.getLocalName() + \": operating mode: \"+Airconditioner_Agent.mode );\n\t\t\t\t\t\tmyAgent.send(msg);\n\t\t\t\t\t}", "@Test\r\n public void testVerificaPossibilidade3() {\r\n usucapiao.setAnimusDomini(true);\r\n usucapiao.setPosseMansa(true);\r\n usucapiao.setPossePassifica(true);\r\n String result = usucapiao.verificaRequisitos();\r\n assertEquals(\"false\", result);\r\n }", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "public void guardarSolicitud() {\n Map<String, String> paramMap = getParametrosSesion();\n String cadenaFirmada;\n try {\n if (paramMap != null) {\n cadenaFirmada = paramMap.get(firmaFormHelper.FIRMA_DIGITAL);\n firmaFormHelper.setSelloDigital(paramMap.get(FirmaFormHelper.FIRMA_DIGITAL));\n\n SimpleDateFormat formato = new SimpleDateFormat(\"dd/MM/yyyy\");\n produccion.setFechProduccion(new Date());\n desperdiciosHelper.setFechaAcuse(formato.format(produccion.getFechProduccion()));\n\n if (cadenaFirmada.length() > 0) {\n guardarRangosFolios();\n Acuse acuse = new Acuse();\n acuse.setSerieAcuse(TipoAcuse.DESPERDICIO);\n acuse.setIdProveedor(produccionCigarrosHelper.getProveedor().getIdProveedor());\n acuse.setSelloDigital(firmaFormHelper.getSelloDigital());\n acuse.setCadenaOriginal(firmaFormHelper.getCadenaOriginal());\n acuse.setFecCaptura(new Date());\n desperdiciosHelper.setIdAcuseRecibo(commonService.crearAcuse(acuse));\n habilitarPnlAcuse();\n registroMovimientoBitacora(getSession(), IdentificadorProcesoEnum.CONTRIBUYENTE_TRAMITES, new Date(), new Date(), MovimientosBitacoraEnum.DESPERDICIOS_DESTRUCCION);\n } else {\n habilitarPnlPrincipal();\n }\n }\n } catch (CommonServiceException e) {\n LOGGER.error(e.getMessage(), e);\n addErrorMessage(ERROR, \"No se pudo generar el acuse\");\n } catch (Exception ex) {\n LOGGER.error(ex.getMessage());\n }\n }", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "public void verVacanteExclusivo(String convocatoriaselecconada, Candidato actualcandidat)\r\n\t{\r\n\t\texclusivo = new VacanteExclusivo(this, convocatoriaselecconada, actualcandidat);\r\n\t\texclusivo.setVisible(true);\r\n\t}", "public void viewApplicants() throws InterruptedException {\n\t\tdriver.findElement(By.xpath(dev_GSP_CLICKER)).click();\n\t\tdriver.findElement(By.xpath(dev_GSP_CONDITIONALLYAPPROVE)).click();\n\t\tThread.sleep(1000);\n\t\tWebElement promowz = driver.findElement(By.xpath(dev_GSP_CAPPROVEREASON));\n\t\tpromowz.sendKeys(\"c\");\n\t\tThread.sleep(1000);\n\t\tdriver.findElement(By.xpath(dev_GSP_CAPPROVEBUTTON)).click();\n\t\tAssert.assertTrue(\"Successfully conditionally approved!\", elementUtil.isElementAvailabe(dev_GSP_CAPPROVESUCCESS));\n\t\tlogger.info(\"Passed conditionally approved\");\n\t\t\n\t}", "public boolean avanti();", "public void principal() {\r\n int opciones = 0;\r\n do {\r\n opciones = op.capInt(\"CLINICA LA EVALUACIÓN\\n\\n\"\r\n + \"1. Gestionar Pacientes.\\n\"\r\n + \"2. Gestionar Médicos.\\n\"\r\n + \"3. Gestionar Historial Clínico.\\n\"\r\n + \"4. Salir\");\r\n switch (opciones) {\r\n case 1:\r\n gesPaciente();\r\n break;\r\n case 2:\r\n gesMedico();\r\n break;\r\n case 3:\r\n gesHistoria();\r\n break;\r\n case 4:\r\n op.mensaje(\"Hasta la proxima\");\r\n break;\r\n default:\r\n op.mensajeError(\"La opcione Ingresada no es valida\");\r\n break;\r\n }\r\n } while (opciones != 4);\r\n }", "public void accomplishGoal() {\r\n isAccomplished = true;\r\n }", "public boolean inserisciAppuntamento(Appuntamento a) {\r\n\t\tboolean ret = false;\r\n\t\tStatement stmt;\r\n\t\tString query = \"INSERT INTO appuntamento(\tnome, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"cognome, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"data, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"ora, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"descrizione, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"contatto, \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"stato) \" +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"VALUES (\t'\" + a.getNome() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getCognome() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getData() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getOra() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getDescrizione() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getContatto() +\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"', '\" + a.getStato() + \"')\";\r\n\t\t\r\n\t\tif(!isConnected) {\r\n\t\t\tSystem.err.println(\"AppuntamentoManager.inserisciAppuntamento() - nessuna connessione al db attiva!\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\tif(a == null || a == APPUNTAMENTO_VUOTO || !verificaAppuntamento(a)) {\r\n\t\t\tSystem.err.println(\"AppuntamentoManager.inserisciAppuntamento() - l'Appuntamento passato non � valido.\");\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\t\r\n\t\ttry {\r\n\t\t\tstmt = conn.createStatement();\r\n\t\t\tstmt.executeUpdate(query);\r\n\t\t\tret = true;\r\n\t\t}\r\n\t\tcatch(SQLException ex) {\r\n\t\t\tSystem.err.print(\"SQLException: \");\r\n\t\t\tSystem.err.println(ex.getMessage());\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "public void chocoContraBomba(Bomba bomba){}", "public abstract boolean comprobar(Articulo articulo);", "@Override\n\tpublic void Examinar() {\n\t\tSystem.out.println(\"\\nEsta preguiça emite o som tec tec tec ao ser examinada\\n\");\t\n\t}", "public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}", "@Override\n public void actionPerformed(ActionEvent ae) {\n String command = ae.getActionCommand();\n switch (command) {\n case \"Conferma\":\n if (convalidaCampi()) {\n salvaPrescrizione(creaPrescrizione());\n Utility.chiudiDialog(ae);\n }\n break;\n case \"Annulla\":\n Utility.chiudiDialog(ae);\n break;\n }\n }", "public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public boolean disattiva_account()\n {\n boolean d=true;//variabile per disattivare l'account\n //già messa a true in quanto l'account viene attualmente usato\n int scelta;\n \n System.out.println(\"--Vuoi disattivare l'account?\\n[1] si [0] no\");\n scelta=input.nextInt();\n \n if(scelta==1)\n { \n d=false;\n System.out.println(\"--Attenzione account disattivato--\");\n }\n \n else if(scelta==0)\n { \n System.out.println(\"--Puoi usare ancora il tuo account--\");\n }\n \n else \n System.out.println(\"Impossibile eseguire l'operazione scelta\");\n \n return d;\n }", "public boolean isActivo()\r\n/* 144: */ {\r\n/* 145:245 */ return this.activo;\r\n/* 146: */ }", "private boolean Verific() {\n\r\n\treturn true;\r\n\t}", "public void actionPerformed(ActionEvent e) {\n\t\tif (e.getSource() == corporativa){\n\t\t\tthis.convenios.setVisible(true);\n\t\t}\n\t\tif((e.getSource()==guardar)&&(this.normal.isSelected())){\n\t\t\tControladorSocios s = ControladorSocios.getInstancia();\n\t\t\ts.generarInscripcionNormal(Integer.parseInt(this.TEXTDNI.getText()),Integer.parseInt(String.valueOf(this.abonos.getSelectedItem())));\n\t\t\t\n\t\t}\n\t\tif((e.getSource() == guardar)&&(this.corporativa.isSelected())){\n\t\t\tControladorSocios s = ControladorSocios.getInstancia();\n\t\t\ts.generarInscripcionCorporativa(Integer.parseInt(this.TEXTDNI.getText()), \n\t\t\t\t\tInteger.parseInt(String.valueOf(this.abonos.getSelectedItem())), \n\t\t\t\t\tInteger.parseInt(String.valueOf(this.convenios.getSelectedItem())),\"\");\n\t\t}\n\t\tif(e.getSource() == this.salir){\n\t\t\tFrameSocio s = FrameSocio.getFrameSocio();\n\t\t\ts.setVisible(true);\n\t\t\tthis.setVisible(false);\n\t\t}\n\t}", "public void actionPerformed(ActionEvent ae) {\r\n //----Valida txt de Intentario---//\r\n validaTxt();\r\n //----Valida txt de Intentario---//\r\n int i = JOptionPane.showConfirmDialog(II, \"¿Seguro quiere modificar este producto?\");\r\n if (i == 0) {\r\n modificaDato();\r\n DTM.setRowCount(0);\r\n llenartabla();\r\n }\r\n }", "private void commitApuesta() {\n\t\tif(tipo != -1){\n\t\t\tmodelo.setDestLogin(ModeloApuestas.DEST_APOSTUBERRI);\n\t\t\tmodelo.setApuestaInProgress(apostado.get(), tipo);\n\t\t\tif(!myController.isScreenLoaded(\"login\")){\n\t\t\t\tmyController.loadScreen(ScreensFramework.Login, ScreensFramework.Login_FXML);\n\t\t\t}\n\t\t\tmyController.setScreenOverlay(\"login\");\n\t\t}\n\t\t\n\t\t\n\t}", "public void confirmacionVolverMenu(){\n AlertDialog.Builder builder = new AlertDialog.Builder(Postre.this);\n builder.setCancelable(false);\n builder.setMessage(\"¿Desea salir?\")\n .setPositiveButton(\"Aceptar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\t\t\t\t\t\tIntent intent = new Intent(Postre.this, HomeAdmin.class);\n\t\t\t\t\t\tintent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP | Intent.FLAG_ACTIVITY_FORWARD_RESULT);\n\t\t\t\t\t\tstartActivity(intent);\n\t\t\t\t\t\toverridePendingTransition(R.anim.left_in, R.anim.left_out);\t\n }\n })\n .setNegativeButton(\"Cancelar\", new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n }\n });\n \n builder.show();\n }", "public static boolean modif(Forma form, String tipo, String operador) {\n if(operador.equals(\"resta\")){\n String disp = \"\";\n String tabla = tipo;\n String query = \"\";\n \n switch (tipo) {\n case \"alumnoMaterial\":\n case \"profeMaterial\":\n tabla = \"material\";\n break;\n case \"profeEquipo\":\n case \"alumnoEquipo\":\n tabla = \"equipo\";\n break;\n case \"profeConsumible\":\n tabla = \"consumible\";\n break;\n case \"profeReactivo\":\n tabla = \"reactivo\";\n break;\n default:\n break;\n }\n try {\n Statement statement = connection.createStatement();\n query = \"SELECT Disponibilidad FROM \" + tabla +\n \" WHERE Nombre = '\" + form.getDesc() + \"'\";\n ResultSet result = statement.executeQuery(query);\n while (result.next()) {\n disp = result.getString(1);\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n //checo que haya suficientes\n int iDisp = Integer.parseInt(disp);\n int iCant = Integer.parseInt(form.getCant());\n iDisp = iDisp - iCant;\n //si no hay, regreso falso para fallar\n if(iDisp < 0) {\n return false;\n } else {\n //si si hay, inserto la nueva dipobilidad en el inventario\n try {\n query = \"UPDATE \" + tabla + \" SET Disponibilidad = ? WHERE Nombre = ?\";\n PreparedStatement preparedStmt = connection.prepareStatement(query);\n preparedStmt.setInt (1, iDisp);\n preparedStmt.setString(2, form.getDesc());\n preparedStmt.executeUpdate();\n \n if (preparedStmt.executeUpdate() == 1) {\n return true;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n }\n return false;\n } else {\n String disp = \"\";\n String tabla = tipo;\n String query = \"\";\n \n try {\n Statement statement = connection.createStatement();\n query = \"SELECT Disponibilidad FROM \" + tabla +\n \" WHERE Nombre = '\" + form.getDesc() + \"'\";\n ResultSet result = statement.executeQuery(query);\n while (result.next()) {\n disp = result.getString(1);\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n //checo que haya suficientes\n int iDisp = Integer.parseInt(disp);\n int iCant = Integer.parseInt(form.getCant());\n iDisp = iDisp + iCant;\n //si no hay, regreso falso para fallar\n \n //si si hay, inserto la nueva dipobilidad en el inventario\n try {\n query = \"UPDATE \" + tabla + \" SET Disponibilidad = ? WHERE Nombre = ?\";\n PreparedStatement preparedStmt = connection.prepareStatement(query);\n preparedStmt.setInt (1, iDisp);\n preparedStmt.setString(2, form.getDesc());\n preparedStmt.executeUpdate();\n \n if (preparedStmt.executeUpdate() == 1) {\n return true;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n return false;\n }\n }\n return false;\n }", "private void checkIntentInformation() {\n Bundle extras = getIntent().getExtras();\n Gson gson = new Gson();\n if (extras != null) {\n Curso aux;\n aux = (Curso) getIntent().getSerializableExtra(\"addCurso\");\n if (aux == null) {\n aux = (Curso) getIntent().getSerializableExtra(\"editCurso\");\n if (aux != null) {//Accion de actualizar\n //found an item that can be updated\n String cursoU = \"\";\n cursoU = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=updateC\" +\"&cursoU=\"+cursoU +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n } else {//Accion de agregar\n //found a new Curso Object\n String cursoA = \"\";\n cursoA = gson.toJson(aux);\n\n apiUrlTemp = apiUrlAcciones+\"acc=addC\" +\"&cursoA=\"+cursoA +\"&profesor_id=\"+aux.getProfesor().getCedula();\n MyAsyncTasksCursoOperaciones myAsyncTasksOp = new MyAsyncTasksCursoOperaciones();\n myAsyncTasksOp.execute();\n }\n }\n }", "public static void presentarMenuPrincipal() {\n\t\tSystem.out.println(\"Ingresa el numero de la opcion deseada y preciona enter\");\n\t\tSystem.out.println(\"1 - Registrar nuevo libro\");\n\t\tSystem.out.println(\"2 - Consultar libros\");\n\t\tSystem.out.println(\"3 - terminar\");\n\t}", "public abstract boolean confirm();", "public void confirmerAppel(List<Eleve> listeElevesAbsents, Seance s, Groupe g);" ]
[ "0.60136646", "0.59487957", "0.5848627", "0.5842086", "0.58381003", "0.5794412", "0.57327735", "0.5698525", "0.56284124", "0.56178755", "0.5610698", "0.5594997", "0.55777234", "0.5559604", "0.5541157", "0.5537358", "0.5524214", "0.55233806", "0.55068225", "0.55060756", "0.54782414", "0.546932", "0.5465876", "0.54641646", "0.5417061", "0.5408868", "0.53943664", "0.53833383", "0.5380832", "0.5367501", "0.53650916", "0.5359771", "0.53564566", "0.5353013", "0.53502995", "0.53472906", "0.5341125", "0.53348285", "0.53340477", "0.53251845", "0.53213537", "0.53182626", "0.5315138", "0.53106654", "0.531038", "0.5306626", "0.52969724", "0.5296093", "0.528523", "0.52776337", "0.5251439", "0.5251352", "0.52495486", "0.5243109", "0.52430254", "0.52379483", "0.5237178", "0.52342486", "0.52140975", "0.5211401", "0.52101177", "0.5205877", "0.52023953", "0.5193418", "0.5188428", "0.518832", "0.5187385", "0.51836205", "0.51768124", "0.5174891", "0.51743335", "0.5170428", "0.5169755", "0.51647556", "0.51635385", "0.51539856", "0.51535577", "0.51527506", "0.51492596", "0.51490706", "0.51411396", "0.5135689", "0.51328427", "0.51314974", "0.5129871", "0.51270765", "0.5123505", "0.5118691", "0.5118016", "0.51174885", "0.5116387", "0.5115671", "0.5113543", "0.5111826", "0.5107159", "0.51061195", "0.51039594", "0.510388", "0.5099148", "0.50966275", "0.5095752" ]
0.0
-1
Rende tutti i cerchi invisibili
public void pulisci() { Cella c; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { c = getElementAt(griglia, i, j); c.cerchio.setVisible(false); } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void tallennaTiedostoon() {\n viitearkisto.tallenna();\n }", "public static void proveraServisa() {\n\t\tSystem.out.println(\"Unesite redni broj vozila za koje racunate vreme sledeceg servisa:\");\n\t\tUtillMethod.izlistavanjeVozila();\n\t\tint redniBroj = UtillMethod.unesiteInt();\n\t\tif (redniBroj < Main.getVozilaAll().size()) {\n\t\t\tif (!Main.getVozilaAll().get(redniBroj).isVozObrisano()) {\n\t\t\t\tUtillMethod.proveraServisaVozila(Main.getVozilaAll().get(redniBroj));\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Ovo vozilo je obrisano i ne moze da se koristi!\");\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.out.println(\"Uneli ste pogresan redni broj!\");\n\t\t}\n\t}", "private void afficheSuiv(){\n\t\ttry{ // Essayer ceci\n\t\t\tif(numCourant <= rep.taille()){\n\t\t\t\tnumCourant ++;\n\t\t\t\tPersonne e = rep.recherchePersonne(numCourant); // Rechercher la personne en fonction du numCourant\n\t\t\t\tafficherPersonne(e);\n\t\t\t}else{\n\t\t\t\tafficherMessageErreur();\n\t\t\t}\n\t\t}catch(Exception e){ // Permet de voir s'il y a cette exception\n\t\t\tafficherMessageErreur();\n\t\t\tnumCourant --;\n\t\t}\n\t}", "private static void statACricri() {\n \tSession session = new Session();\n \tNSTimestamp dateRef = session.debutAnnee();\n \tNSArray listAffAnn = EOAffectationAnnuelle.findAffectationsAnnuelleInContext(session.ec(), null, null, dateRef);\n \tLRLog.log(\">> listAffAnn=\"+listAffAnn.count() + \" au \" + DateCtrlConges.dateToString(dateRef));\n \tlistAffAnn = LRSort.sortedArray(listAffAnn, \n \t\t\tEOAffectationAnnuelle.INDIVIDU_KEY + \".\" + EOIndividu.NOM_KEY);\n \t\n \tEOEditingContext ec = new EOEditingContext();\n \tCngUserInfo ui = new CngUserInfo(new CngDroitBus(ec), new CngPreferenceBus(ec), ec, new Integer(3065));\n \tStringBuffer sb = new StringBuffer();\n \tsb.append(\"service\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"agent\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"contractuel\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"travaillees\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"conges\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"dues\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \tsb.append(\"restant\");\n \tsb.append(ConstsPrint.CSV_NEW_LINE);\n \t\n \n \tfor (int i = 0; i < listAffAnn.count(); i++) {\n \t\tEOAffectationAnnuelle itemAffAnn = (EOAffectationAnnuelle) listAffAnn.objectAtIndex(i);\n \t\t//\n \t\tEOEditingContext edc = new EOEditingContext();\n \t\t//\n \t\tNSArray array = EOAffectationAnnuelle.findSortedAffectationsAnnuellesForOidsInContext(\n \t\t\t\tedc, new NSArray(itemAffAnn.oid()));\n \t\t// charger le planning pour forcer le calcul\n \t\tPlanning p = Planning.newPlanning((EOAffectationAnnuelle) array.objectAtIndex(0), ui, dateRef);\n \t\t// quel les contractuels\n \t\t//if (p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())) {\n \t\ttry {p.setType(\"R\");\n \t\tEOCalculAffectationAnnuelle calcul = p.affectationAnnuelle().calculAffAnn(\"R\");\n \t\tint minutesTravaillees3112 = calcul.minutesTravaillees3112().intValue();\n \t\tint minutesConges3112 = calcul.minutesConges3112().intValue();\n \t\t\n \t\t// calcul des minutes dues\n \t\tint minutesDues3112 = /*0*/ 514*60;\n \t\t/*\tNSArray periodes = p.affectationAnnuelle().periodes();\n \t\tfor (int j=0; j<periodes.count(); j++) {\n \t\t\tEOPeriodeAffectationAnnuelle periode = (EOPeriodeAffectationAnnuelle) periodes.objectAtIndex(j);\n \t\tminutesDues3112 += periode.valeurPonderee(p.affectationAnnuelle().minutesDues(), septembre01, decembre31);\n \t\t}*/\n \t\tsb.append(p.affectationAnnuelle().structure().libelleCourt()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().nomComplet()).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(p.affectationAnnuelle().individu().isContractuel(p.affectationAnnuelle())?\"O\":\"N\").append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesConges3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesDues3112)).append(ConstsPrint.CSV_COLUMN_SEPARATOR);\n \t\tsb.append(TimeCtrl.stringForMinutes(minutesTravaillees3112 - minutesConges3112 - minutesDues3112)).append(ConstsPrint.CSV_NEW_LINE);\n \t\tLRLog.log((i+1)+\"/\"+listAffAnn.count() + \" (\" + p.affectationAnnuelle().individu().nomComplet() + \")\");\n \t\t} catch (Throwable e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\tedc.dispose();\n \t\t//}\n \t}\n \t\n\t\tString fileName = \"/tmp/stat_000_\"+listAffAnn.count()+\".csv\";\n \ttry {\n\t\t\tBufferedWriter fichier = new BufferedWriter(new FileWriter(fileName));\n\t\t\tfichier.write(sb.toString());\n\t\t\tfichier.close();\n\t\t} catch (IOException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t} finally {\n\t\t\tLRLog.log(\"writing \" + fileName);\n\t\t}\n }", "public void sincronizza() {\n boolean abilita;\n\n super.sincronizza();\n\n try { // prova ad eseguire il codice\n\n /* abilitazione bottone Esegui */\n abilita = false;\n if (!Lib.Data.isVuota(this.getDataInizio())) {\n if (!Lib.Data.isVuota(this.getDataFine())) {\n if (Lib.Data.isSequenza(this.getDataInizio(), this.getDataFine())) {\n abilita = true;\n }// fine del blocco if\n }// fine del blocco if\n }// fine del blocco if\n this.getBottoneEsegui().setEnabled(abilita);\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "private static void statistique(){\n\t\tfor(int i = 0; i<7; i++){\n\t\t\tfor(int j = 0; j<7; j++){\n\t\t\t\tfor(int l=0; l<jeu.getJoueurs().length; l++){\n\t\t\t\t\tif(jeu.cases[i][j].getCouleurTapis() == jeu.getJoueurs()[l].getNumJoueur()){\n\t\t\t\t\t\tjeu.getJoueurs()[l].setTapis(jeu.getJoueurs()[l].getTapisRest()+1);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tJoueur j;\n\t\tSystem.out.println(\"// Fin de la partie //\");\n\t\tfor(int i=0; i<jeu.getJoueurs().length; i++) {\n\t\t\tj =jeu.getJoueurs()[i];\n\t\t\tSystem.out.println(\"Joueur \"+ (j.getNumJoueur()+1) + \" a obtenue \"+j.getTapisRest()+j.getMonnaie()+\" points\" );\n\t\t}\n\t}", "public void inativarMovimentacoes() {\n\n\t\ttry {\n\n\t\t\tif (((auxMovimentacao.getDataMovimentacao())\n\t\t\t\t\t.before(permitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao()))\n\t\t\t\t\t|| (auxMovimentacao.getDataMovimentacao()).equals(\n\t\t\t\t\t\t\tpermitirCadastrarMovimentacao(movimentacao.getAlunoTurma()).getDataMovimentacao())\n\t\t\t\t\t) {\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.MOVIMENTACOES_ANTERIORES);\n\t\t\t} else {\n\n\t\t\t\tDate dataFinal = auxMovimentacao.getDataMovimentacao();\n\t\t\t\tCalendar calendarData = Calendar.getInstance();\n\t\t\t\tcalendarData.setTime(dataFinal);\n\t\t\t\tcalendarData.add(Calendar.DATE, -1);\n\t\t\t\tDate dataInicial = calendarData.getTime();\n\n\t\t\t\tMovimentacao mov = new Movimentacao();\n\t\t\t\tmov = (Movimentacao) movimentacaoAlunoDAO.listarTodos(Movimentacao.class,\n\t\t\t\t\t\t\" a.dataMovimentacao = (select max(b.dataMovimentacao) \"\n\t\t\t\t\t\t\t\t+ \" from Movimentacao b where b.alunoTurma = a.alunoTurma) \"\n\t\t\t\t\t\t\t\t+ \" and a.status is true and a.alunoTurma.status = true and dataMovimentacaoFim = null and a.alunoTurma = \"\n\t\t\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId())\n\t\t\t\t\t\t.get(0);\n\n\t\t\t\tmov.setControle(false);\n\t\t\t\tmov.setDataMovimentacaoFim(dataInicial);\n\t\t\t\tmovimentacaoService.inserirAlterar(mov);\n\n\t\t\t\tAlunoTurma aluno = new AlunoTurma();\n\t\t\t\taluno = daoAlunoTurma.buscarPorId(AlunoTurma.class, movimentacao.getAlunoTurma().getId());\n\t\t\t\taluno.setControle(0);\n\t\t\t\t\n\n\t\t\t\tauxMovimentacao.setAlunoTurma(movimentacao.getAlunoTurma());\n\t\t\t\tauxMovimentacao.setStatus(true);\n\t\t\t\tauxMovimentacao.setControle(false);\n\n\t\t\t\tmovimentacaoService.inserirAlterar(auxMovimentacao);\n\t\t\t\t\n\t\t\t\tif(auxMovimentacao.getSituacao()==5){\n//\t\t\t\t\t\n//\t\t\t\t\tCurso cursoAluno = new Curso();\n//\t\t\t\t\tcursoAluno = daoCurso.buscarPorId(Curso.class, auxMovimentacao.getAlunoTurma().getTurma().getCurso().getId());\n\t\t\t\t\t\n\t\t\t\t\taluno.setSituacao(5);\n\t\t\t\t\taluno.setLiberado(false);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t\t\n\t\t\t\t\t//liberar para responder o questionário\n\t\t\t\t\tAluno alunoResponde = new Aluno(); \n\t\t\t\t\talunoResponde = daoAluno.buscarPorId(Aluno.class, aluno.getAluno().getId());\n\t\t\t\t\t \n\t\t\t\t // email.setCursos(auxMovimentacao.getAlunoTurma().getTurma().getCurso());\n\t\t\t\t\t//email.setTurma(auxMovimentacao.getAlunoTurma().getTurma());\n\t\t\t\t\temail.setEnviado(false);\n\t\t\t\t\temail.setStatus(true);\n\t\t\t\t\temail.setAlunoTurma(auxMovimentacao.getAlunoTurma());\n\t\t\t\t\t\n\t\t\t\t\t//email.setAluno(alunoResponde);\n\t\t\t\t\temailService.inserirAlterar(email);\n\t\t\t\t\t//enviar o email para responder \n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\taluno.setSituacao(0);\n\t\t\t\t\talunoTurmaService.inserirAlterar(aluno);\n\t\t\t\t}\n\t\t\t\taluno = new AlunoTurma();\n\t\t\t\temail = new Email();\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tFecharDialog.fecharDialogAlunoCursoEditar();\n\t\t\t\tFecharDialog.fecharDialogAlunoEditarCurso();\n\t\t\t\tFecharDialog.fecharDialogAlunoTrancamento();\n\t\t\t\talterar(movimentacao);\n\n\t\t\t\tExibirMensagem.exibirMensagem(Mensagem.SUCESSO);\n\t\t\t\tauxMovimentacao = new Movimentacao();\n\n\t\t\t\talunoTurmaService.update(\" AlunoTurma set permiteCadastroCertificado = 2 where id = \"\n\t\t\t\t\t\t+ movimentacao.getAlunoTurma().getId());\n\n\t\t\t\n\t\t\t\tcriarNovoObjetoAluno();\n\t\t\t\tatualizarListas();\n\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tExibirMensagem.exibirMensagem(Mensagem.ERRO);\n\t\t}\n\n\t}", "private void verificaUnicitaAccertamento() {\n\t\t\n\t\t//chiamo il servizio ricerca accertamento per chiave\n\t\tRicercaAccertamentoPerChiave request = model.creaRequestRicercaAccertamento();\n\t\tRicercaAccertamentoPerChiaveResponse response = movimentoGestioneService.ricercaAccertamentoPerChiave(request);\n\t\tlogServiceResponse(response);\n\t\t// Controllo gli errori\n\t\tif(response.hasErrori()) {\n\t\t\t//si sono verificati degli errori: esco.\n\t\t\taddErrori(response);\n\t\t} else {\n\t\t\t//non si sono verificatui errori, ma devo comunque controllare di aver trovato un accertamento su db\n\t\t\tcheckCondition(response.getAccertamento() != null, ErroreCore.ENTITA_NON_TROVATA.getErrore(\"Movimento Anno e numero\", \"L'impegno indicato\"));\n\t\t\tmodel.setAccertamento(response.getAccertamento());\n\t\t}\n\t}", "private void jogarIa() {\n\t\tia = new IA(this.mapa,false);\r\n\t\tia.inicio();\r\n\t\tthis.usouIa = true;\r\n\t\tatualizarBandeirasIa();//ATUALIZA AS BANDEIRAS PARA DEPOIS QUE ELA JOGOU\r\n\t\tatualizarNumeroBombas();//ATUALIZA O NUMERO DE BOMBAS PARA DPS QUE ELA JOGOU\r\n\t\tatualizarTela();\r\n\t\tif(ia.isTaTudoBem() == false)\r\n\t\t\tJOptionPane.showMessageDialog(this, \"IMPOSSIVEL PROSSEGUIR\", \"IMPOSSIVEL ENCONTRAR CASAS CONCLUSIVAS\", JOptionPane.INFORMATION_MESSAGE);\r\n\t}", "public abstract String dohvatiKontakt();", "public void estiloAcierto() {\r\n\t\t /**Bea y Jose**/\t\t\r\n \r\n\t}", "public void Pedircarnet() {\n\t\tSystem.out.println(\"solicitar carnet para verificar si es cliente de ese consultorio\");\r\n\t}", "private void remplirUtiliseData() {\n\t}", "private String elaboraAvvisoScrittura() {\n String testo = VUOTA;\n\n if (usaHeadNonScrivere) {\n testo += TAG_NON_SCRIVERE;\n testo += A_CAPO;\n }// end of if cycle\n\n return testo;\n }", "private String elaboraIncipit() {\n String testo = VUOTA;\n\n if (usaHeadIncipit) {\n testo += elaboraIncipitSpecifico();\n testo += A_CAPO;\n }// fine del blocco if\n\n return testo;\n }", "public void testAuta()\n\t{\n\t\tNakladak nakl = new Nakladak(Simulator.getCas());\n\t\tnakl.poloha[0] = this.poloha[0];\n\t\tnakl.poloha[1] = this.poloha[1];\n\t\t//cesta po prekladistich\n\t\tfor(int i=4001;i<4009;i++)\n\t\t{\n\t\t\tnakl.cesta.add(i);\n\t\t}\n\t\tnakl.kDispozici = false;\n\t\tnakl.jede = true;\n\t\tsim.addObserver(nakl);\n\t\t\n\t\tthis.vozy.add(nakl);\n\t\t\n\t}", "@Override\n\tpublic void Examinar() {\n\t\tSystem.out.println(\"\\nEsta preguiça emite o som tec tec tec ao ser examinada\\n\");\t\n\t}", "public void avvia() {\n /* variabili e costanti locali di lavoro */\n\n try { // prova ad eseguire il codice\n getModuloRisultati().avvia();\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n super.avvia();\n\n }", "private static void etapa3Urna() {\n\t\t\n\t\turna.contabilizarVotosPorCandidato(enderecoCandidatos);\n\t\t\n\t}", "@Override\n\tpublic void atirou() {\n\n\t\t\tatirou=true;\n\t\t\t\n\t\t\n\t}", "public void anazitisiSintagisVaseiGiatrou() {\n\t\tString doctorName = null;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tdoctorName = sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \"); // Zitaw apo ton xrhsth na mou dwsei to onoma tou giatrou pou exei grapsei thn sintagh pou epithumei\n\t\t\tfor(int i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\tif(doctorName.equals(prescription[i].getDoctorLname())) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou exei grapsei o giatros\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t// Emfanizw thn/tis sintagh/sintages pou exoun graftei apo ton sygkekrimeno giatro\n\t\t\t\t\tprescription[i].print();\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\ttmp_2++;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON IATRO ME EPWNYMO: \" + doctorName);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "Reserva Obtener();", "private void inizia() throws Exception {\n /* variabili e costanti locali di lavoro */\n Dati dati;\n\n try { // prova ad eseguire il codice\n\n this.setMessaggio(\"Analisi in corso\");\n this.setBreakAbilitato(true);\n\n /* recupera e registra i dati delle RMP da elaborare */\n dati = getDatiRMP();\n this.setDati(dati);\n\n /* regola il fondo scala dell'operazione */\n this.setMax(dati.getRowCount());\n\n } catch (Exception unErrore) { // intercetta l'errore\n Errore.crea(unErrore);\n }// fine del blocco try-catch\n\n }", "public void consultasSeguimiento() {\r\n try {\r\n switch (opcionMostrarAnalistaSeguim) {\r\n case \"Cita\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(2, mBsesion.codigoMiSesion());\r\n break;\r\n case \"Entrega\":\r\n ListSeguimientoRadicacionesConCita = Rad.ConsultasRadicacionYSeguimiento(3, mBsesion.codigoMiSesion());\r\n break;\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".consultasSeguimiento()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n\r\n }", "public void affiche() {\n System.out.println(\"le tapis porte \"+this.tapis.size()+\" caisse(s)\");\n for (Iterator it = this.tapis.iterator(); it.hasNext(); ) {\n System.out.println(it.next().toString());\n } \n }", "public void orina() {\n System.out.println(\"Que bien me quedé! Deposito vaciado.\");\n }", "@Test\n public void oppdater_informasjon_for_sted_scenario1()throws InterruptedException{\n legg_til_sikre_inst_for_varsel(mainActivity);\n\n at_appen_er_åpnet();\n brukeren_er_inne_på_hovedsiden();\n brukeren_trykker_på_oppdater_knappen();\n Thread.sleep(1000);\n skal_ny_værinformasjonen_framkomme(size);\n }", "public void AumentarVictorias() {\r\n\t\tthis.victorias_actuales++;\r\n\t\tif (this.victorias_actuales >= 9) {\r\n\t\t\tthis.TituloNobiliario = 3;\r\n\t\t} else if (this.victorias_actuales >= 6) {\r\n\t\t\tthis.TituloNobiliario = 2;\r\n\t\t} else if (this.victorias_actuales >= 3) {\r\n\t\t\tthis.TituloNobiliario = 1;\r\n\t\t} else {\r\n\t\t\tthis.TituloNobiliario = 0;\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic void exibir() {\n\t\t\r\n\t\tSystem.out.println(\"Condicoes atuais: \" + temp + \"°C e \" + umid + \"% de umidade \" \r\n\t\t\t\t+ pressao + \" pressao\");\r\n\t\t\r\n\t}", "private void getEncuestaSatisfaccions(){\n mEncuestaSatisfaccions = estudioAdapter.getEncuestaSatisfaccionSinEnviar();\n //ca.close();\n }", "private void inizia() throws Exception {\n this.setMessaggio(\"Addebiti in corso\");\n this.setBreakAbilitato(true);\n }", "public void acionarInadimplencia(CestaGarantiasDO cesta);", "public void presenta_Estudiante(){\r\n System.out.println(\"Universidad Técnica Particular de Loja\\nInforme Semestral\\nEstudiante: \"+nombre+\r\n \"\\nAsignatura: \"+nAsignatura+\"\\nNota 1 Bimestre: \"+nota1B+\"\\nNota 2 Bimestre: \"+nota2B+\r\n \"\\nPromedio: \"+promedio()+\"\\nEstado de la Materia: \"+estado());\r\n }", "@Test\n public void apiKundenViewGetInaktiveGetTest() throws ApiException {\n List<CmplxKunden> response = api.apiKundenViewGetInaktiveGet();\n\n // TODO: test validations\n }", "public void eisagwgiGiatrou() {\n\t\t// Elegxw o arithmos twn iatrwn na mhn ypervei ton megisto dynato\n\t\tif(numOfDoctors < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tdoctor[numOfDoctors] = new Iatros();\n\t\t\tdoctor[numOfDoctors].setFname(sir.readString(\"DWSTE TO ONOMA TOU GIATROU: \")); // Pairnei apo ton xristi to onoma tou giatrou\n\t\t\tdoctor[numOfDoctors].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU GIATROU: \")); // Pairnei apo ton xristi to epitheto tou giatrou\n\t\t\tdoctor[numOfDoctors].setAM(rnd.nextInt(1000000)); // To sistima dinei automata ton am tou giatrou\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t// Elegxos monadikotitas tou am tou giatrou\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfDoctors; i++)\n\t\t\t{\n\t\t\t\tif(doctor[i].getAM() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfDoctors++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS GIATROUS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "public static void pocetniMeni() {\r\n\t\tSystem.out\r\n\t\t\t\t.println(\"***********************************************\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 1 ako zelite vidjeti kalendar(za dati mjesec i godinu)\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 2 za pregled podsjetnika za dati mjesec i godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 3 da pregledate podsjetnik za datu godinu\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 4 ako zelite da pogledate sve podsjetnike!\\n\"\r\n\t\t\t\t\t\t+ \"Unesite 5 ako zelite da upisete neki podsjetnik!\\n\"\r\n\t\t\t\t\t\t+ \":::::::::::::::::::::::::::::::::::::::::::::::\");\r\n\t}", "private void ucitajTestPodatke() {\n\t\tList<Integer> l1 = new ArrayList<Integer>();\n\n\t\tRestoran r1 = new Restoran(\"Palazzo Bianco\", \"Bulevar Cara Dušana 21\", KategorijeRestorana.PICERIJA, l1, l1);\n\t\tRestoran r2 = new Restoran(\"Ananda\", \"Petra Drapšina 51\", KategorijeRestorana.DOMACA, l1, l1);\n\t\tRestoran r3 = new Restoran(\"Dizni\", \"Bulevar cara Lazara 92\", KategorijeRestorana.POSLASTICARNICA, l1, l1);\n\n\t\tdodajRestoran(r1);\n\t\tdodajRestoran(r2);\n\t\tdodajRestoran(r3);\n\t}", "public void asetaTeksti(){\n }", "@Test\r\n public void elCerdoNoSePuedeAtender() {\n }", "public void acutualizarInfo(){\n String pibId = String.valueOf(comentario.getId());\n labelId.setText(\"#\" + pibId);\n\n String autor = comentario.getAutor().toString();\n labelAutor.setText(autor);\n\n String fecha = comentario.getFechaCreacion().toString();\n labelFecha.setText(fecha);\n \n String contenido = comentario.getContenido();\n textAreaContenido.setText(contenido);\n \n String likes = ((Integer)comentario.totalLikes()).toString();\n labelLikes.setText(likes);\n \n Collection<Comentario> comments = socialNetwork.searchSubComentarios(comentario);\n panelSubComentarios.loadItems(comments, 15);\n \n if(comentario.isSubcomentario()){\n jButton4.setEnabled(true);\n }\n else{\n jButton4.setEnabled(false);\n }\n }", "public void annuler(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }", "public void riconnetti() {\n\t\tconnesso = true;\n\t}", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "public void atakuj() {\n\n System.out.println(\"to metoda atakuj z klasy Potwor \");\n\n }", "@Override\n\tpublic String dohvatiKontakt() {\n\t\treturn \"Naziv tvrtke: \" + naziv + \", mail: \" + getEmail() + \", tel: \" + getTelefon() + \", web: \" + web;\n\t}", "public void reestablecerInfo(){\n panelIngresoControlador.getPanelIngreso().reestablecerInfo();\n }", "public void PagarConsulta() {\n\t\tSystem.out.println(\"el patronato es gratiuto y no necesita pagar \");\r\n\t}", "void testeAcessos() {\n System.out.println(formaDeFalar);// acessa por herança\n System.out.println(todosSabem);\n }", "private void iniciarNovaVez() {\n this.terminouVez = false;\n }", "private void grabarIndividuoPCO(final ProyectoCarreraOferta proyectoCarreraOferta) {\r\n /**\r\n * PERIODO ACADEMICO ONTOLOGÍA\r\n */\r\n OfertaAcademica ofertaAcademica = ofertaAcademicaService.find(proyectoCarreraOferta.getOfertaAcademicaId());\r\n PeriodoAcademico periodoAcademico = ofertaAcademica.getPeriodoAcademicoId();\r\n PeriodoAcademicoOntDTO periodoAcademicoOntDTO = new PeriodoAcademicoOntDTO(periodoAcademico.getId(), \"S/N\",\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaInicio(), \"yyyy-MM-dd\"),\r\n cabeceraController.getUtilService().formatoFecha(periodoAcademico.getFechaFin(), \"yyyy-MM-dd\"));\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getPeriodoAcademicoOntService().write(periodoAcademicoOntDTO);\r\n /**\r\n * OFERTA ACADEMICA ONTOLOGÍA\r\n */\r\n OfertaAcademicaOntDTO ofertaAcademicaOntDTO = new OfertaAcademicaOntDTO(ofertaAcademica.getId(), ofertaAcademica.getNombre(),\r\n cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaInicio(),\r\n \"yyyy-MM-dd\"), cabeceraController.getUtilService().formatoFecha(ofertaAcademica.getFechaFin(), \"yyyy-MM-dd\"),\r\n periodoAcademicoOntDTO);\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getOfertaAcademicoOntService().write(ofertaAcademicaOntDTO);\r\n\r\n /**\r\n * NIVEL ACADEMICO ONTOLOGIA\r\n */\r\n Carrera carrera = carreraService.find(proyectoCarreraOferta.getCarreraId());\r\n Nivel nivel = carrera.getNivelId();\r\n NivelAcademicoOntDTO nivelAcademicoOntDTO = new NivelAcademicoOntDTO(nivel.getId(), nivel.getNombre(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"nivel_academico\"));\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getNivelAcademicoOntService().write(nivelAcademicoOntDTO);\r\n /**\r\n * AREA ACADEMICA ONTOLOGIA\r\n */\r\n AreaAcademicaOntDTO areaAcademicaOntDTO = new AreaAcademicaOntDTO(carrera.getAreaId().getId(), \"UNIVERSIDAD NACIONAL DE LOJA\",\r\n carrera.getAreaId().getNombre(), carrera.getAreaId().getSigla(),\r\n cabeceraController.getValueFromProperties(PropertiesFileEnum.URI, \"area_academica\"));\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getAreaAcademicaOntService().write(areaAcademicaOntDTO);\r\n /**\r\n * CARRERA ONTOLOGÍA\r\n */\r\n CarreraOntDTO carreraOntDTO = new CarreraOntDTO(carrera.getId(), carrera.getNombre(), carrera.getSigla(), nivelAcademicoOntDTO,\r\n areaAcademicaOntDTO);\r\n cabeceraController.getOntologyService().getCarreraOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getCarreraOntService().write(carreraOntDTO);\r\n /**\r\n * PROYECTO CARRERA OFERTA ONTOLOGY\r\n */\r\n \r\n ProyectoCarreraOfertaOntDTO proyectoCarreraOfertaOntDTO = new ProyectoCarreraOfertaOntDTO(proyectoCarreraOferta.getId(),\r\n ofertaAcademicaOntDTO, sessionProyecto.getProyectoOntDTO(), carreraOntDTO);\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().read(cabeceraController.getCabeceraWebSemantica());\r\n cabeceraController.getOntologyService().getProyectoCarreraOfertaOntService().write(proyectoCarreraOfertaOntDTO);\r\n }", "void realizarSolicitud(Cliente cliente);", "private void esqueceu() {\n\n //Declaração de Objetos\n Veterinario veterinario = new Veterinario();\n\n //Declaração de Variaveis\n int crmv;\n String senha;\n\n //Atribuição de Valores\n try {\n crmv = Integer.parseInt(TextCrmv.getText());\n senha = TextSenha.getText();\n \n //Atualizando no Banco\n veterinario.Vdao.atualizarAnimalSenhaPeloCrmv(senha, crmv);\n \n } catch (NumberFormatException ex) {\n JOptionPane.showMessageDialog(null, \"APENAS NUMEROS NO CRMV!\");\n }\n JOptionPane.showMessageDialog(null, \"SUCESSO AO ALTERAR SENHA!\");\n\n }", "private void suono(int idGioc) {\n\t\tpartita.effettoCasella(idGioc);\n\t}", "public void inicia() { \r\n\t\tventana=new VentanaMuestraServicios(this);\r\n\t\tventana.abre();\r\n\t}", "private void invia(Battuta battuta) {\n\t\tString nomePersonaggio = battuta.getNomePersonaggio();\n\t\tString nomeAttore = cast.getAttore(nomePersonaggio);\n\t\tString battuta_ = battuta.getBattuta();\n\t\tString messaggio = formattaBattuta(nomePersonaggio, nomeAttore,\n\t\t\t\tbattuta_);\n\t\tfor (int j = 0; j < visualizzatori.size(); j++) {\n\t\t\t// recupera il colore da associare alla battuta\n\t\t\tColoreMessaggio colore = mappaColori.get(j).getColore(\n\t\t\t\t\tnomePersonaggio);\n\t\t\t// carica il messaggio sul visualizzatore\n\t\t\tvisualizzatori.get(j).addMessaggio(\n\t\t\t\t\tnew Messaggio(colore, messaggio));\n\t\t}\n\t}", "private void getVisitas(){\n mVisitasTerreno = estudioAdapter.getListaVisitaTerrenosSinEnviar();\n //ca.close();\n }", "private static void cajas() {\n\t\t\n\t}", "public String recuperaCultivoByVariedadAsigCA(){\n\t\tlstVariedad = iDAO.recuperaVariedadByInicilizacionEsquema(idInicializacionEsquema, idCultivo);\n\t\treturn SUCCESS;\t\t\n\t}", "public void vlozNaUcet(int ciastka, TerminovanyUcet terminovanyUcet) {\r\n\t\tcislo += ciastka;\r\n\t\tterminovanyUcet.setVklad(ciastka);\r\n\t\tSporiaciUcet.super.setVyber(ciastka);\r\n\t}", "@Override\n\tpublic void naoAtirou() {\n\t\tatirou=false;\n\n\t}", "public void visKontingenthaandteringMenu ()\r\n {\r\n System.out.println(\"Du har valgt kontingent.\");\r\n System.out.println(\"Hvad oensker du at foretage dig?\");\r\n System.out.println(\"1: Se priser\");\r\n System.out.println(\"2: Se medlemmer i restance\");\r\n System.out.println(\"0: Afslut\");\r\n\r\n }", "public String recuperaCultivoByEstadoAsigCA(){\n\t\tlstCultivo = iDAO.recuperaCultivoByInicilizacionEsquema(idInicializacionEsquema,idEstado);\n\t\t\n\t\treturn SUCCESS;\t\t\n\t}", "public void niveauSuivant() {\n niveau = niveau.suivant();\n }", "protected boolean colaVacia() {\r\n return ini == -1;\r\n }", "public void inicjalizujRynek()\n\t{\n\t\tif (!Stale.cenyZGeneratora)\n\t\t{\n\t\t\tlistaCenWczytanaZPliku=loader.loadPrices();\n\t\t}\n\t}", "@Override\r\n\tpublic void hacerSonido() {\n\t\tSystem.out.print(\"miau,miau -- o depende\");\r\n\t\t\r\n\t}", "private static void Iptal(ArrayList<Oda> odalar,Kullanici kullanici)\n {\n Oda oda=odaSec(odalar);\n if(oda.getMisafir().equals(\"0\"))\n {\n System.out.print(\"Sectiginiz oda rezerve iptali icin musait degil.\");\n }\n else\n {\n System.out.print(oda.getOdaNo()+\" numarali odanin rezerve islemi iptal edilecek.\");\n oda.setMisafir(\"0\");\n dosyaYazici(kullanici.getAd()+\", \"+oda.getMisafir()+\" adina \"+oda.getOdaNo()+\" numarali odayi rezerve islemini iptal etti.\");\n }\n }", "public boolean voikoSulkea() {\n handleTallenna();\n return true;\n }", "public void anazitisiSintagisVaseiAstheni() {\n\t\tint amkaCode = 0;\n\t\ttmp_2 = 0;\n\t\tif(numOfPrescription != 0)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\" STOIXEIA SYNTAGWN\");\n\t\t\t// Emfanizw oles tis syntages\n\t\t\tfor(int j = 0; j < numOfPrescription; j++)\n\t\t\t{\n\t\t\t\tSystem.out.print(\"\\n \" + j + \". STOIXEIA SYNTAGHS: \");\n\t \t \tprescription[j].print();\n\t\t\t}\n\t\t\tamkaCode = sir.readPositiveInt(\"EISAGETAI TO AMKA TOU ASTHENH: \"); // Zitaw apo ton xrhsth na mou dwsei ton amka tou asthenh pou thelei\n\t\t\tfor(i = 0; i < numOfPrescription; i++)\n\t\t\t{\n\t\t\t\t\tif(amkaCode == prescription[i].getPatientAmka()) // An vre8ei kapoia antistoixeia emfanizw thn syntagh pou proorizetai gia ton sygkekrimeno asthenh\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\tSystem.out.println(\"VRETHIKE SYNTAGH!\");\n\t\t\t\t\t\tprescription[i].print(); // Emfanizw thn/tis sintagh/sintages oi opoies proorizontai gia ton sigkekrimeno asthenh\n\t\t\t\t\t\tSystem.out.println();\n\t\t\t\t\t\ttmp_2++;\n\t\t\t\t\t}\n\t\t\t}\n\t\t\tif(tmp_2 == 0)\n\t\t\t{\n\t\t\t\tSystem.out.println();\n\t\t\t\tSystem.out.println(\"DEN YPARXEI SYNTAGH POU NA PERILAMVANEI TON ASTHENH ME AMKA: \" + amkaCode);\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"DEN YPARXOUN DIATHESIMES SYNTAGES!\");\n\t\t\tSystem.out.println();\n\t\t}\n\t}", "private void gestionAlarmeTpsReel() {\r\n\t\tint cptCapteur = 0;\r\n\t\tboolean blAlert = false;\r\n\t\tboolean blTrouve = false;\r\n\t\tString strSql = \"\";\r\n\t\tResultSet result = null;\r\n\t\tint voieApi = -1;\r\n\r\n\t\t// Lecture de la table AlarmeEnCours\r\n\t\tstrSql = \"SELECT V2_AlarmeEnCours.*, Capteur.VoieApi AS CapteurVoieApi, Capteur.Alarme, Capteur.Description, Capteur.TypeCapteur, Capteur.Nom, Capteur.Inhibition, Capteur.idAlarmeService,\"\r\n\t\t\t + \" Equipement.NumeroInventaire \"\r\n\t\t\t + \" FROM (V2_AlarmeEnCours LEFT JOIN (Capteur LEFT JOIN Equipement ON Capteur.idEquipement = Equipement.idEquipement)\"\r\n\t\t\t + \" ON V2_AlarmeEnCours.idCapteur = Capteur.idCapteur)\"\r\n\t\t\t + \" WHERE Capteur.idAlarmeService = \" + EFS_Constantes.gestionUtilisateur.getIdAlarmeService();\r\n\t\tresult = ctn.lectureData(strSql);\r\n\t\ttry {\r\n\t\t\twhile(result.next()) {\r\n\t\t\t\tcptCapteur++;\r\n\t\t\t\t// voie traitée\r\n\t\t\t\tvoieApi = result.getInt(\"CapteurVoieApi\") - 1;\r\n\t\t\t\t// Regarder si déjà dans la liste\r\n\t\t\t\tblTrouve = false;\r\n\t\t\t\tfor(int i = 0; i < mdlTpsReelAlarme.getRowCount(); i++) {\r\n\t\t\t\t\tif(mdlTpsReelAlarme.getIdCapteur(i) == result.getInt(\"idCapteur\")) {\r\n\t\t\t\t\t\t// Mettre à jour la valeur\r\n\t\t\t\t\t\tif(result.getInt(\"TypeCapteur\") == CAPTEUR_ANALOGIQUE_ENTREE) {\r\n\t\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt((EFS_Client_Variable.tbValeurAI[voieApi] + EFS_Client_Variable.tbCalibrationAI[voieApi]) / 10, i, JTABLE_ALARME_VALEUR);\r\n\t\t\t\t\t\t} else {\r\n\t\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt((double)EFS_Client_Variable.tbValeurDI[voieApi], i, JTABLE_ALARME_VALEUR);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt(result.getDate(\"DateDisparition\"), i, JTABLE_ALARME_DISPARITION);\r\n\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt(result.getDate(\"DateApparition\"), i, JTABLE_ALARME_APPARITION);\r\n\t\t\t\t\t\tmdlTpsReelAlarme.setValueAt(result.getDate(\"DatePriseEnCompte\"), i, JTABLE_ALARME_PRISE_EN_COMPTE);\r\n\t\t\t\t\t\tblTrouve = true;\r\n\t\t\t\t\t} // Fin if\r\n\t\t\t\t} // Fin for i\r\n\t\t\t\tif(!blTrouve) {\r\n\t\t\t\t\tif(result.getInt(\"Alarme\") == ALARME_ALERT) {\r\n\t\t\t\t\t\tblAlert = true;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse {\r\n\t\t\t\t\t\tblAlert = false;\r\n\t\t\t\t\t}\r\n//\t\t\t\t\tif ((result.getInt(\"Inhibition\") != ALARME_INHIBITION) && (result.getInt(\"blTempo\") == ALARME_TEMPO_DEPASSEE)) {\r\n\t\t\t\t\t\tmdlTpsReelAlarme.addAlarme(new TpsReelAlarme(result.getInt(\"idCapteur\"), result.getString(\"Nom\")\r\n\t\t\t\t\t\t\t\t, result.getString(\"Description\"), result.getString(\"NumeroInventaire\"), result.getDate(\"DateApparition\"),\r\n\t\t\t\t\t\t\t\tresult.getDate(\"DatePriseEnCompte\"), result.getString(\"DescriptionAlarme\")\r\n\t\t\t\t\t\t\t\t, result.getInt(\"VoieApi\"), blAlert, result.getDate(\"DateDisparition\"), result.getInt(\"Alarme\")));\r\n//\t\t\t\t\t} // fin mise en tableau\r\n\t\t\t\t} // fin blTrouve\r\n\t\t\t} // fin while\r\n\t\t} \r\n\t\tcatch (SQLException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tctn.closeLectureData();\r\n\t\ttry {\r\n\t\t\tresult.close();\r\n\t\t\tresult = null;\r\n\t\t} catch (SQLException e) {\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tif (mdlTpsReelAlarme.getRowCount() != cptCapteur) {\r\n\t\t\tmdlTpsReelAlarme.removeAllAlarme();\r\n\t\t\tgestionAlarmeTpsReel();\r\n\t\t}\r\n\t}", "protected void caricaListaContoTesoreria() throws WebServiceInvocationFailureException {\n\t\tList<ContoTesoreria> listaInSessione = sessionHandler.getParametro(BilSessionParameter.LISTA_CONTO_TESORERIA);\n\t\tif(listaInSessione == null) {\n\t\t\tLeggiContiTesoreria request = model.creaRequestLeggiContiTesoreria();\n\t\t\tlogServiceRequest(request);\n\t\t\tLeggiContiTesoreriaResponse response = preDocumentoSpesaService.leggiContiTesoreria(request);\n\t\t\tlogServiceResponse(response);\n\t\t\t\n\t\t\t// Controllo gli errori\n\t\t\tif(response.hasErrori()) {\n\t\t\t\t//si sono verificati degli errori: esco.\n\t\t\t\taddErrori(response);\n\t\t\t\tthrow new WebServiceInvocationFailureException(\"caricaListaContoTesoreria\");\n\t\t\t}\n\t\t\t\n\t\t\tlistaInSessione = response.getContiTesoreria();\n\t\t\tsessionHandler.setParametro(BilSessionParameter.LISTA_CONTO_TESORERIA, listaInSessione);\n\t\t}\n\t\t\n\t\tmodel.setListaContoTesoreria(listaInSessione);\n\t}", "private void inizia() throws Exception {\n this.setNomeChiave(CHIAVE_NAV);\n this.setUsaNuovo(false);\n this.setUsaElimina(false);\n this.setUsaRicerca(true);\n this.setUsaSelezione(true);\n this.setUsaStampaLista(false);\n this.setUsaProietta(false);\n this.setAggiornamentoTotaliContinuo(true);\n }", "private void inizia() throws Exception {\n this.setAllineamento(Layout.ALLINEA_CENTRO);\n this.creaBordo(\"Coperti serviti\");\n\n campoPranzo=CampoFactory.intero(\"a pranzo\");\n campoPranzo.setLarghezza(60);\n campoPranzo.setModificabile(false);\n campoCena=CampoFactory.intero(\"a cena\");\n campoCena.setLarghezza(60);\n campoCena.setModificabile(false);\n campoTotale=CampoFactory.intero(\"Totale\");\n campoTotale.setLarghezza(60); \n campoTotale.setModificabile(false);\n\n this.add(campoPranzo);\n this.add(campoCena);\n this.add(campoTotale);\n }", "public void esperarRecogidaIngrediente(){\n enter();\n if ( ingredienteact != -1 )\n estanquero.await();\n leave();\n }", "private void juego(){\r\n boolean ind=false,ind2=true;\r\n System.out.println(\"Comencemos\");\r\n initReloj();\r\n System.out.println(\"Cada Carta esta\");\r\n while(ind==false && this.ind==true){\r\n visualizarm();\r\n usuario();\r\n System.out.println(\"\");\r\n System.out.println(\"\");\r\n if(comprobar()==true){\r\n ind=true;\r\n this.ind=true;\r\n }\r\n }\r\n if(this.ind==true){\r\n ResultadoR res = new ResultadoR();\r\n res.resultado(\"Jugador Gana\",pj);\r\n }\r\n else{\r\n ResultadoR res= new ResultadoR();\r\n res.resultado(\"Jugador Pierde\", pj);\r\n }\r\n }", "public void ispisiNapomeneZaDatiMjesecIgodinu(int godina, int mjesec) {\r\n\t\tint i = 0;// redni broj napomene\r\n\r\n\t\t// prolazimo kroc cjeli podsjetnik\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\t\t\t// ako unesena god- i mjese isti kao neki u listi, ispisujem\r\n\t\t\tif (godina == podsjetnik.getGodina()\r\n\t\t\t\t\t&& mjesec == podsjetnik.getMjesec()) {\r\n\t\t\t\ti++;\r\n\t\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\t// ako nema ni jedne napomene za dati mjesec i godinu\r\n\t\tif (i == 0) {\r\n\t\t\tSystem.out.println(\"Nema napomena za dati mjesec i godinu\");\r\n\t\t}\r\n\r\n\t}", "private void inToTrinh(HttpServletRequest request, ApplicationContext appConText, GiaHanForm giaHanForm, HttpServletResponse reponse) throws Exception {\r\n\t\tCuocTtktService service = new CuocTtktService();\r\n\t\tString cuocTtktId=giaHanForm.getIdCuocTtKt();\r\n\t\tSystem.out.println(\"Id cuoc ttkt : \"+cuocTtktId );\r\n\t\tif(!Formater.isNull(cuocTtktId))\r\n\t\t{\r\n\t\t\tif(\"4\".equals(service.getDonVerionTtkt(appConText, cuocTtktId)))\r\n\t\t\t{\r\n\t\t\t\tinToTrinhv4(request, reponse, giaHanForm, appConText);\r\n\t\t\t}\r\n\t\t\telse inToTrinhv3(request, reponse, giaHanForm, appConText);\r\n\t\t}\r\n\t\telse \r\n\t\t{\r\n\t\t\tif(\"4\".equals(Constants.APP_DEP_VERSION))\r\n\t\t\t\tinToTrinhv4(request, reponse, giaHanForm, appConText);\r\n\t\t\telse inToTrinhv3(request, reponse, giaHanForm, appConText);\r\n\t\t}\r\n\t}", "private CapitoloUscitaGestione ricercaCapitoloUscitaGestione() {\n\t\tRicercaPuntualeCapitoloUGest ricercaPuntualeCapitoloUGest = new RicercaPuntualeCapitoloUGest();\n\t\tricercaPuntualeCapitoloUGest.setAnnoEsercizio(req.getCapitoloUPrev().getAnnoCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setAnnoCapitolo(req.getCapitoloUPrev().getAnnoCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroCapitolo(req.getCapitoloUPrev().getNumeroCapitolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroArticolo(req.getCapitoloUPrev().getNumeroArticolo());\n\t\tricercaPuntualeCapitoloUGest.setNumeroUEB(req.getCapitoloUPrev().getNumeroUEB());\n\t\tricercaPuntualeCapitoloUGest.setStatoOperativoElementoDiBilancio(req.getCapitoloUPrev().getStatoOperativoElementoDiBilancio());\n\n\t\tRicercaPuntualeCapitoloUscitaGestione ricercaPuntualeCapitoloUscitaGestione = new RicercaPuntualeCapitoloUscitaGestione();\n\t\tricercaPuntualeCapitoloUscitaGestione.setEnte(req.getEnte());\n\t\tricercaPuntualeCapitoloUscitaGestione.setRichiedente(req.getRichiedente());\n\t\tricercaPuntualeCapitoloUscitaGestione.setRicercaPuntualeCapitoloUGest(ricercaPuntualeCapitoloUGest);\n\t\tricercaPuntualeCapitoloUscitaGestione.setDataOra(new Date());\n\t\t\t\t\t\n\t\tRicercaPuntualeCapitoloUscitaGestioneResponse ricercaPuntualeCapitoloUscitaGestioneResponse = executeExternalService(ricercaPuntualeCapitoloUscitaGestioneService,ricercaPuntualeCapitoloUscitaGestione);\n\t\treturn ricercaPuntualeCapitoloUscitaGestioneResponse.getCapitoloUscitaGestione();\n\t}", "public void bienvenida(){\n System.out.println(\"Bienvenid@ a nuestro programa de administracion de parqueos\");\n }", "String getInter_contestable();", "private static boolean poserTapis(){\n\t\tSystem.out.println(\"Choisisser une premiere case pour poser la premiere partie du tapis\");\n\t\tint premiereCaseTapis = console.obtenirDirection();\n\t\tint direction = premiereCaseTapis;\n\t\tint posXTapis = 0, posYTapis = 0;\n\n\t\t//Pose du premier carre de tapis\n\t\ttry{\n\t\t\tif(premiereCaseTapis == 1){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-2][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-2;\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 2){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()][jeu.getAssam().getYPion()-1].setCouleurTapis(tour);\n\t\t\t\tposXTapis = jeu.getAssam().getXPion();\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-1;\n\t\t\t}\n\n\t\t\telse if(premiereCaseTapis == 3){\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()-2].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion()-2;\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t\telse {\n\t\t\t\tjeu.cases[jeu.getAssam().getXPion()-1][jeu.getAssam().getYPion()].setCouleurTapis(tour);\n\t\t\t\tposYTapis = jeu.getAssam().getYPion();\n\t\t\t\tposXTapis = jeu.getAssam().getXPion()-1;\n\t\t\t}\n\n\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\treturn false;\n\t\t}\n\n\n\n\n\t\tconsole.afficherJeu();\n\t\tSystem.out.println(\"Choisissez la deuxieme case\");\n\n\t\t//Pose du second petit carre de tapis\n\t\twhile(true){\n\t\t\tint d = console.obtenirDirection();\n\t\t\t//pour ne pas faire de demi tour ou erreur de d\n\t\t\tif(direction == 1 && d == 2 || direction == 2 && d == 1 || direction == 3 && d == 4 || direction == 4 && d == 3 || d<1 || d>4){\n\t\t\t\tconsole.afficherImpossibleChoisirDirection();\n\t\t\t} else {\n\t\t\t\ttry{\n\t\t\t\t\tif(d == 1){\n\t\t\t\t\t\tjeu.cases[posXTapis-1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 2){\n\t\t\t\t\t\tjeu.cases[posXTapis+1][posYTapis].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse if(d == 3){\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis-1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\n\t\t\t\t\telse {\n\t\t\t\t\t\tjeu.cases[posXTapis][posYTapis+1].setCouleurTapis(tour);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t} catch (ArrayIndexOutOfBoundsException e){\n\t\t\t\t\tconsole.afficherImpossiblePoserTapis();\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t}\n\t\tjeu.getJoueurs()[tour-1].useTapis();\n\t\treturn true;\n\n\n\t}", "private void mostrarEstadoObjetosUsados() {\n Beneficiario beneficiario = null;\n FichaSocial fichaSocial = null;\n SolicitudBeneficio solicitudBeneficio = null;\n AspectoHabitacional aspectoHabitacional = null;\n AspectoEconomico aspectoEconomico = null;\n\n // CAMBIAR: Obtener datos del Request y asignarlos a los textField\n if (this.getRequestBean1().getObjetoABM() != null) {\n fichaSocial = (FichaSocial) this.getRequestBean1().getObjetoABM();\n aspectoHabitacional = (AspectoHabitacional) fichaSocial.getAspectoHabitacional();\n aspectoEconomico = (AspectoEconomico) fichaSocial.getAspectoEconomico();\n this.getElementoPila().getObjetos().set(0, fichaSocial);\n this.getElementoPila().getObjetos().set(1, aspectoHabitacional);\n this.getElementoPila().getObjetos().set(2, aspectoEconomico);\n }\n\n int ind = 0;\n fichaSocial = (FichaSocial) this.obtenerObjetoDelElementoPila(ind++, FichaSocial.class);\n aspectoHabitacional = (AspectoHabitacional) this.obtenerObjetoDelElementoPila(ind++, AspectoHabitacional.class);\n aspectoEconomico = (AspectoEconomico) this.obtenerObjetoDelElementoPila(ind++, AspectoEconomico.class);\n\n\n this.getTfCodigo().setText(fichaSocial.getNumero());\n this.getTfFecha().setText(Conversor.getStringDeFechaCorta(fichaSocial.getFecha()));\n ////\n //Beneficiarios:\n if (fichaSocial.getTitular() != null) {\n this.getTfTitular().setText(fichaSocial.toString());\n }\n\n this.setListaDelCommunication(new ArrayList(fichaSocial.getGrupoFamiliar()));\n this.getObjectListDataProvider().setList(new ArrayList(fichaSocial.getGrupoFamiliar()));\n\n //Aspecto habitacional:\n if (aspectoHabitacional.getNumeroPersonas() != null) {\n this.getTfNroPersonas().setText(aspectoHabitacional.getNumeroPersonas().toString());\n }\n this.getTfVivienda().setText(aspectoHabitacional.getVivienda());\n this.getTfTenencia().setText(aspectoHabitacional.getTenencia());\n this.getTfNroCamas().setText(aspectoHabitacional.getNumeroCamas());\n this.getTfNroAmbientes().setText(aspectoHabitacional.getNumeroAmbientes());\n this.getCbBanioCompleto().setValue(new Boolean(aspectoHabitacional.isBanioCompleto()));\n this.getCbBanioInterno().setValue(new Boolean(aspectoHabitacional.isBanioInterno()));\n this.getCbAgua().setValue(new Boolean(aspectoHabitacional.isAgua()));\n this.getCbLuz().setValue(new Boolean(aspectoHabitacional.isLuz()));\n this.getCbCloaca().setValue(new Boolean(aspectoHabitacional.isCloaca()));\n this.getCbGasNatural().setValue(new Boolean(aspectoHabitacional.isGasNatural()));\n\n //Aspecto Economico:\n this.getTfNroCasas().setText(aspectoEconomico.getNumeroCasas());\n this.getTfNroTerrenos().setText(aspectoEconomico.getNumeroTerrenos());\n this.getTfNroCampos().setText(aspectoEconomico.getNumeroCampos());\n this.getTfVehiculo().setText(aspectoEconomico.getVehiculo());\n this.getTfIndustria().setText(aspectoEconomico.getIndustria());\n this.getTfActividadLaboral().setText(aspectoEconomico.getActividadLaboral());\n this.getTfComercio().setText(aspectoEconomico.getComercio());\n\n //Solicitud Beneficio\n this.setListaDelCommunication2(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n this.getObjectListDataProvider2().setList(new ArrayList(fichaSocial.getListaSolicitudBeneficio()));\n }", "public void rechercheEtudiantInscripEcheanceParMatricule(){\r\n try { \r\n setViewEtudiantInscripEcheance(viewEtudiantInscripEcheanceFacadeL.findByMatricule(getViewEtudiantInscripEcheance().getMatricule())); \r\n \r\n //initialisation des echeances\r\n// viewEtudiantInscripEcheance.setVers1(0); \r\n// viewEtudiantInscripEcheance.setVers2(0); \r\n// viewEtudiantInscripEcheance.setVers3(0); \r\n// viewEtudiantInscripEcheance.setVers4(0); \r\n// viewEtudiantInscripEcheance.setVers5(0); \r\n// viewEtudiantInscripEcheance.setVers6(0); \r\n } catch (Exception e) {\r\n FacesMessage message = new FacesMessage(\"Accun étudiant n'a été trouvé! \");\r\n message.setSeverity(FacesMessage.SEVERITY_WARN);\r\n FacesContext.getCurrentInstance().addMessage(null, message); \r\n \r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n } \r\n }", "public void eisagwgiAstheni() {\n\t\t// Elegxw o arithmos twn asthenwn na mhn ypervei ton megisto dynato\n\t\tif(numOfPatient < 100)\n\t\t{\n\t\t\tSystem.out.println();\n\t\t\tpatient[numOfPatient] = new Asthenis();\n\t\t\tpatient[numOfPatient].setFname(sir.readString(\"DWSTE TO ONOMA TOU ASTHENH: \")); // Pairnei to onoma tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setLname(sir.readString(\"DWSTE TO EPWNYMO TOU ASTHENH: \")); // Pairnei to epitheto tou asthenh apo ton xrhsth\n\t\t\tpatient[numOfPatient].setAMKA(rnd.nextInt(1000000)); // To sistima dinei automata ton amka tou asthenous\n\t\t\tSystem.out.println();\n\t\t\t\n\t\t\t//Elegxos monadikotitas tou amka tou astheni\n\t\t\th = rnd.nextInt(1000000);\n\t\t\tfor(int i = 0; i < numOfPatient; i++)\n\t\t\t{\n\t\t\t\tif(patient[i].getAMKA() == h)\n\t\t\t\t{\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t\tSystem.out.println(\"O KWDIKOS AUTOS YPARXEI HDH!\");\n\t\t\t\t\th = rnd.nextInt(1000000);\n\t\t\t\t\tSystem.out.println();\n\t\t\t\t}\n\t\t\t}\n\t\t\tnumOfPatient++;\n\t\t}\n\t\telse\n\t\t{\n\t\t\tSystem.out.println(\"DEN MPOREITE NA EISAGETE ALLOUS ASTHENEIS!\");\n\t\t\tSystem.out.println(\"EXEI SYMPLHRWTHEI O PROVLEPOMENOS ARITHMOS!\");\n\t\t}\n\t}", "private void pokupiIzPoljaIKreirajServisera() {\n\t\tServiser noviServiser;\n\t\tif(izmena == false) {\n\t\t\tString ime = rssv.getTfIme().getText();\n\t\t\tString prezime = rssv.getTfPrezime().getText();\n\t\t\tString JMBG = rssv.getTfJMBG().getText();\n\t\t\tPol pol = rssv.getPolBox().getSelectionModel().getSelectedItem();\n\t\t\tString adresa = rssv.getTfAdresa().getText();\n\t\t\tString brojTelefona = rssv.getTfBrojTelefona().getText();\n\t\t\tString korisnickoIme = rssv.getTfKorisnickoIme().getText();\n\t\t\tString lozinka = rssv.getTfLozinka().getText();\n\t\t\tSpecijalizacija specijalizacija = rssv.getSpecijalizacijaBox().getSelectionModel().getSelectedItem();\n\t\t\t\t\n\t\t\ttry {\n\t\t\t\tdouble plata = Double.valueOf(rssv.getTfPlata().getText());\n\t\t\t\tnoviServiser = new Serviser(ime, prezime, JMBG, pol, adresa, brojTelefona, korisnickoIme, lozinka, specijalizacija, plata);\n\t\t\t\trssv.getTabela().getItems().add(noviServiser);\n\t\t\t\tServiserController.upisiServiseraUFajl(noviServiser);\n\t\t\t\trssv.resetujPolja();\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\trssv.izbaciPorukuOGresci(e.getMessage());\n\t\t\t} catch (Exception e) {\n\t\t\t\trssv.izbaciPorukuOGresci(e.getMessage());\n\t\t\t}\n\t\t\t\n\t\t} else {\n\t\t\tString ime = rssv.getTfIme().getText();\n\t\t\tString prezime = rssv.getTfPrezime().getText();\n\t\t\tString JMBG = rssv.getTfJMBG().getText();\n\t\t\tPol pol = rssv.getPolBox().getSelectionModel().getSelectedItem();\n\t\t\tString adresa = rssv.getTfAdresa().getText();\n\t\t\tString brojTelefona = rssv.getTfBrojTelefona().getText();\n\t\t\tString korisnickoIme = rssv.getTfKorisnickoIme().getText();\n\t\t\tString lozinka = rssv.getTfLozinka().getText();\n\t\t\tSpecijalizacija specijalizacija = rssv.getSpecijalizacijaBox().getSelectionModel().getSelectedItem();\n\t\t\t\n\t\t\ttry {\n\t\t\t\tdouble plata = Double.valueOf(rssv.getTfPlata().getText());\n\t\t\t\tnoviServiser = new Serviser(tempServiser.getOznaka(), ime, prezime, JMBG, pol, adresa, brojTelefona, korisnickoIme, lozinka, false, specijalizacija, plata);\n\t\t\t\tServiserController.izbrisiIzUcitanihServiseraSaOznakom(tempServiser.getOznaka());\n\t\t\t\trssv.getTabela().getItems().add(noviServiser);\n\t\t\t\tServiserController.upisiServiseraUFajl(noviServiser);\n\t\t\t\trssv.getTabela().getItems().remove(tempServiser);\n\t\t\t\tServiserController.sacuvajIzmeneUFajl();\n\t\t\t\trssv.resetujPolja();\n\t\t\t\t\n\t\t\t\tizmena = false;\n\t\t\t\ttempServiser = null;\n\t\t\t\t\n\t\t\t} catch (NumberFormatException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void leerPacientes (int id_nutricionista);", "public String recuperaVariedadByCultivoEdoAsigCA(){\n\t\tlstVariedad = iDAO.recuperaVariedadByInicilizacionEsquema(idInicializacionEsquema, idCultivo, idEstado);\n\t\treturn SUCCESS;\t\t\n\t}", "@Override\n\tpublic void iniciar() {\n\t\t\n\t}", "public void ejecutarMaquinaTuring() {\n\n\t\tString cadenaEntrada;\n\t\tArrayList<String> cadenaCinta = new ArrayList<>();\n\t\tsetEstadoActual(getEstadoInicial());\n\t\tSystem.out.println(\"Inserte la cadena a probar:\");\n\t\tScanner imputUsuario = new Scanner(System.in);\n\t\tcadenaEntrada = imputUsuario.nextLine();\n\t\tfor (int i = 0; i < cadenaEntrada.length(); i++) {\n\t\t\tcadenaCinta.add(String.valueOf(cadenaEntrada.charAt(i)));\n\t\t}\n\n\t\tcinta = new Cinta(cadenaCinta, new CabezaLE());// inicializamos la cinta\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// con la cadena del\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// usuario\n\t\t/*\n\t\t * Evaluamos\n\t\t */\n\t\tboolean noTransiciones = false;\n\n\t\twhile (noTransiciones == false) {// para cuando no hayan transiciones\n\n\t\t\tnoTransiciones = true;// suponemos, a priori, que no hay\n\t\t\t\t\t\t\t\t\t// transiciones\n\n\t\t\tfor (int j = 0; j < conjuntoTransiciones.size(); j++) {\n\n\t\t\t\tString estadoSiguiente = cinta.getCabezaLE().transitar(estadoActual, cinta.getCadenaCinta(),\n\t\t\t\t\t\tconjuntoTransiciones.get(j));\n\n\t\t\t\tif (estadoSiguiente != null) {// si encontro un estado al que\n\t\t\t\t\t\t\t\t\t\t\t\t// transitar...\n\n\t\t\t\t\testadoActual = estadoSiguiente; // transita\n\t\t\t\t\tnoTransiciones = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END FOR\n\t\t} // END WHILE (NO QUEDAN TRANSICIONES)\n\t\tgetCinta().mostrarCinta();\n\t\tcadenaEsAceptada();\n\t}", "public static void main(String[] args) {\n\n // Pitamo korisnika za ime fajla koji korisitmo\n String imeFajla = Svetovid.in.readLine(\"Unesite ime fajla:\");\n\n // Poziv prvog nacina ispisivanja\n citajSveRedove(imeFajla);\n\n // Moramo zatvoriti fajl da bi ga opet citali ispocetka\n Svetovid.in(imeFajla).close();\n\n // Poziv drugog nacina ispisivanja\n citajSveRedoveAlt(imeFajla);\n\n }", "public void ispisiSveNapomene() {\r\n\t\tint i = 0;// redni broj napomene\r\n\t\tint brojac = 0;\r\n\t\tfor (Podsjetnik podsjetnik : lista) {\r\n\r\n\t\t\ti++;\r\n\t\t\tSystem.out.println(i + \")\" + podsjetnik);\r\n\t\t\tbrojac = i;\r\n\t\t}\r\n\t\tif (brojac == 0) {\r\n\t\t\tSystem.out.println(\"Nema unesenih napomena!!\");\r\n\t\t}\r\n\r\n\t}", "public void notificaAlgiocatore(int azione, Giocatore g) {\n\r\n }", "public void nouveau(){\r\n try {\r\n viewEtudiantInscripEcheance = new ViewEtudiantInscriptionEcheance();\r\n echeance_etudiant = new EcoEcheanceEtudiant(); \r\n \r\n } catch (Exception e) {\r\n System.err.println(\"Erreur capturée : \"+e);\r\n }\r\n }", "@Test\n public void testGetDetailPasien() throws Exception {\n System.out.println(\"getDetailPasien\");\n String idPasien = \"PS001\";\n setHostPort();\n AntrianController instance = new AntrianController(client);\n\n Pasien expResult = instance.getDetailPasien(idPasien);\n Pasien result = instance.getDetailPasien(idPasien);\n assertEquals(expResult, result);\n\n // TODO review the generated test code and remove the default call to fail.\n }", "@Override\n\tpublic void maasHesapla() {\n\t\tSystem.out.println(\"isciler icin maas 5000 tl \");\n \t\t\n\t}", "public static void atacar(){\n int aleatorio; //variables locales a utilizar\n Random numeroAleatorio = new Random(); //declarando variables tipo random para aleatoriedad\n int ataqueJugador;\n //acciones de la funcion atacar sobre vida del enemigo\n aleatorio = (numeroAleatorio.nextInt(20-10+1)+10);\n ataqueJugador= ((nivel+1)*10)+aleatorio;\n puntosDeVidaEnemigo= puntosDeVidaEnemigo-ataqueJugador;\n \n }", "public void comenzarDiaLaboral() {\n\t\tSystem.out.println(\"AEROPUERTO: Inicio del dia laboral, se abren los puestos de informe, atención y freeshops al público, el conductor del tren llega a tiempo como siempre\");\n\t\tthis.turnoPuestoDeInforme.release();\n\t\t}", "public void verwerkRijVoorKassa() {\r\n while(kassarij.erIsEenRij()) {\r\n Persoon staatBijKassa = kassarij.eerstePersoonInRij();\r\n kassa.rekenAf(staatBijKassa);\r\n }\r\n }", "public void cambioEstadAvaluo() {\r\n try {\r\n if (\"\".equals(mBRadicacion.Radi.getObservacionAvaluo()) || \"\".equals(mBRadicacion.Radi.getEstadoAvaluo())) {\r\n mbTodero.setMens(\"Falta informacion por Llenar\");\r\n mbTodero.warn();\r\n } else {\r\n mBRadicacion.Radi.CambioEstRad(mBsesion.codigoMiSesion());\r\n mbTodero.setMens(\"La informacion ha sido guardada correctamente\");\r\n mbTodero.info();\r\n mbTodero.resetTable(\"FRMSeguimiento:SeguimientoTable\");\r\n RequestContext.getCurrentInstance().execute(\"PF('DlgEstAvaluo').hide()\");\r\n ListSeguimiento = Seg.ConsulSeguimAvaluos(mBsesion.codigoMiSesion());//VARIABLES DE SESION\r\n }\r\n } catch (Exception e) {\r\n mbTodero.setMens(\"Error en el metodo '\" + this.getClass() + \".cambioEstadAvaluo()' causado por: \" + e.getMessage());\r\n mbTodero.error();\r\n }\r\n }", "public void aumentarAciertos() {\r\n this.aciertos += 1;\r\n this.intentos += 1; \r\n }", "private void getDatosVisitasTerreno(){\n mDatosVisitasTerreno = estudioAdapter.getListaDatosVisitaTerrenosSinEnviar();\n //ca.close();\n }" ]
[ "0.6678305", "0.63782465", "0.63768876", "0.62759596", "0.62349594", "0.623202", "0.61774313", "0.6171685", "0.6142808", "0.61362725", "0.61321735", "0.61221683", "0.6117705", "0.607513", "0.60178995", "0.6006391", "0.59915096", "0.5977509", "0.5973203", "0.596901", "0.5955127", "0.59471494", "0.5943427", "0.5939813", "0.59264606", "0.5918912", "0.59081906", "0.5906574", "0.5903975", "0.5901088", "0.5884764", "0.588189", "0.58812386", "0.58745766", "0.5871254", "0.58698446", "0.5862685", "0.5859768", "0.58421403", "0.58404773", "0.58308893", "0.5829152", "0.58269465", "0.58266234", "0.5822104", "0.5811682", "0.5807048", "0.5801658", "0.5789105", "0.5788915", "0.5776923", "0.57730854", "0.5767679", "0.5764752", "0.57527304", "0.5751661", "0.5751446", "0.57382995", "0.5735983", "0.5734579", "0.5734114", "0.5731012", "0.5726399", "0.5721814", "0.5719533", "0.5711918", "0.57042664", "0.5704221", "0.5702597", "0.56997764", "0.5697526", "0.5695082", "0.5689878", "0.5688049", "0.5687208", "0.5684158", "0.56839216", "0.5674994", "0.56728935", "0.5666398", "0.5662553", "0.5659949", "0.56592894", "0.5654536", "0.5653354", "0.5651849", "0.565128", "0.5650935", "0.56497675", "0.5647866", "0.56468606", "0.56451684", "0.564418", "0.5641298", "0.5640263", "0.5640002", "0.5639134", "0.5634238", "0.5632875", "0.5625799", "0.56230646" ]
0.0
-1
Stampa la matrice di occupazione, con buildGriglia(GridPane g)
public void stampa() { GridPane matrice = new GridPane(); buildGriglia(matrice); Text scritta; for (int i = 0; i < N; i++) { for (int j = 0; j < N; j++) { if (getElementAt(griglia, i, j).cerchio.isVisible()) { scritta = new Text("1"); } else { scritta = new Text("0"); } matrice.add(scritta, j, i); } } Scene scene3 = new Scene(matrice, N * 100, N * 100); Stage stage3 = new Stage(); stage3.setTitle("Matrice di occupazione:"); stage3.setScene(scene3); stage3.show(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "private void createGraphics() {\n\t\toppStatGrid = new GridPane();\n\t\toppStatGrid.setHgap(5);\n\t\tColumnConstraints columnOpp1 = new ColumnConstraints();\n\t\tcolumnOpp1.setMinWidth(gameScene.getWidth()*0.3);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnOpp2 = new ColumnConstraints();\n\t\tcolumnOpp2.setMinWidth(gameScene.getWidth()*0.3);\n\t\toppStatGrid.getColumnConstraints().addAll(columnOpp1,columnOpp2);\n\t\tRowConstraints rowOpp = new RowConstraints();\n\t\trowOpp.setMinHeight(gameScene.getHeight()*0.1);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\t\toppStatGrid.getRowConstraints().add(rowOpp);\n\n\t\tlocStatGrid = new GridPane();\n\t\tlocStatGrid.setHgap(5);\n\t\tColumnConstraints columnLoc1 = new ColumnConstraints();\n\t\tcolumnLoc1.setMinWidth(gameScene.getWidth()*0.1);\n\t\t//column1.setPrefWidth(gameScene.getWidth()*0.3);\n\t\tColumnConstraints columnLoc2 = new ColumnConstraints();\n\t\tcolumnLoc2.setMinWidth(gameScene.getWidth()*0.3);\n\t\tlocStatGrid.getColumnConstraints().addAll(columnLoc1,columnLoc2);\n\t\tRowConstraints rowLoc2 = new RowConstraints();\n\t\trowLoc2.setMinHeight(gameScene.getHeight()*0.1);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\t\tlocStatGrid.getRowConstraints().add(rowLoc2);\n\n\t\topponentName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\tlocalName.setFont(Font.font(defaultFont, FontWeight.BOLD, 16));\n\t\topponentLevel.setFont(Font.font(defaultFont, 14));\n\t\tlocalLevel.setFont(Font.font(defaultFont, 14));\n\t\topponentHealth.setFont(Font.font(defaultFont, 14));\n\t\tlocalHealth.setFont(Font.font(defaultFont, 14));\n\n\t\topponentName.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localName, HPos.RIGHT);\n\t\topponentLevel.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalLevel.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localLevel, HPos.RIGHT);\n\t\topponentHealth.setAlignment(Pos.CENTER_RIGHT);\n\t\tlocalHealth.setAlignment(Pos.CENTER_LEFT);\n\t\tGridPane.setHalignment(localHealth, HPos.RIGHT);\n\n\t\topponentHealthBar = new Rectangle();\n\t\tlocalHealthBar = new Rectangle();\n\t\topponentHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\tlocalHealthBar.setWidth(gameScene.getWidth()*0.3);\n\t\topponentHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\tlocalHealthBar.setHeight(gameScene.getHeight()*0.1);\n\t\topponentHealthBar.setArcWidth(5);\n\t\topponentHealthBar.setArcHeight(5);\n\t\tlocalHealthBar.setArcWidth(5);\n\t\tlocalHealthBar.setArcHeight(5);\n\t\t/*NumberBinding oppHealthBind = gameScene.property\n\t\topponentHealthBar.prop*/\n\n\t\topponentHealthBar.setEffect(new Lighting());\n\t\tlocalHealthBar.setEffect(new Lighting());\n\n\t\topponentHealthBar.setFill(Color.DARKRED);\n\t\tlocalHealthBar.setFill(Color.DARKRED);\n\n\t\toppStatGrid.add(opponentName, 0, 0);\n\t\toppStatGrid.add(opponentLevel, 1, 0);\n\t\toppStatGrid.add(opponentHealthBar, 0, 1);\n\t\toppStatGrid.add(opponentHealth, 1, 1);\n\n\t\tlocStatGrid.add(localLevel, 0, 0);\n\t\tlocStatGrid.add(localName, 1, 0);\n\t\tlocStatGrid.add(localHealthBar, 1, 1);\n\t\tlocStatGrid.add(localHealth, 0, 1);\n\n\t\tAnchorPane.setTopAnchor(oppStatGrid, 10.0);\n\t\tAnchorPane.setLeftAnchor(oppStatGrid, 10.0);\n\n\t\tAnchorPane.setBottomAnchor(locStatGrid, 10.0);\n\t\tAnchorPane.setRightAnchor(locStatGrid, 10.0);\n\n\t\tthis.getChildren().addAll(oppStatGrid,locStatGrid);\n\t\t\n\t\toppPane = new Pane();\n\t\toppPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\toppPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tlocPane = new Pane();\n\t\tlocPane.setMinWidth(gameScene.getWidth()*0.5);\n\t\tlocPane.setMinHeight(gameScene.getHeight()*0.5);\n\t\t\n\t\tAnchorPane.setBottomAnchor(locPane, 10.0);\n\t\tAnchorPane.setLeftAnchor(locPane, 10.0);\n\t\t\n\t\tAnchorPane.setTopAnchor(oppPane, 10.0);\n\t\tAnchorPane.setRightAnchor(oppPane, 10.0);\n\t\t\n\t\tthis.getChildren().addAll(locPane,oppPane);\n\t\t\n\n\t}", "public Grid(FourInARow fur) {\n System.out.println(\"grid créer\");\n this.grid = new GridPane();\n this.p4 = fur;\n this.matrice = new Matrice(7, 7, this.p4);\n\n// File imgEm = new File(\"./img/tokenE.png\");\n// File imgEmptyD = new File(\"./img/tokenEDark.png\");\n// File imgRed = new File(\"./img/tokenR.png\");\n// File imgRedD = new File(\"./img/tokenRDark.png\");\n// File imgYellow = new File(\"./img/tokenY.png\");\n// File imgYellowD = new File(\"./img/tokenYDark.png\");\n\n this.placerImage();\n this.majAffichage();\n //this.greyColumn(0,false);\n }", "public GridPane initializeGridPane() {\n\t\tGridPane world = new GridPane();\n\t\t\n\t\tfor (int x = 0; x < this.columns; x++) {\n\t\t\tfor (int y = 0; y < this.rows; y++) {\n\t\t\t\tRectangle cellGUI = new Rectangle(this.widthOfCells - 1, this.heightOfCells - 1);\n\t\t\t\tcellGUI.setFill(Color.web(\"#FFFFFF\"));\t\t// White cell background color\n cellGUI.setStroke(Color.web(\"#C0C0C0\")); \t// Grey cell border color\n cellGUI.setStrokeWidth(1); \t\t\t\t\t// Width of the border\n\n world.add(cellGUI, x, y);\n this.cellGUIArray[x][y] = cellGUI;\n\n cellGUI.setOnMouseClicked((event) -> {\n \tthis.currentGeneration = this.simulation.getCurrentGeneration();\n for (int i = 0; i < columns; i++) {\n for (int j = 0; j < rows; j++) {\n if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 0) {\n this.currentGeneration[i][j] = 1;\n } else if (this.cellGUIArray[i][j].equals(cellGUI) && this.currentGeneration[i][j] == 1) {\n this.currentGeneration[i][j] = 0;\n }\n }\n }\n this.simulation.setCurrentGeneration(this.currentGeneration);\n });\n\t\t\t}\n\t\t}\n\t\treturn world;\n\t}", "private void initGrille() {\n this.setLayout(new GridLayout(8, 8));\n Color backgroundColor = Color.WHITE;\n for (int i = 7; i >= 0; i--) {\n for (int j = 0; j < 8; j++) {\n CaseJeu c = new CaseJeu(j, i, backgroundColor, fenetre);\n if (j != 7) {\n backgroundColor = (backgroundColor.equals(Color.GRAY)) ? Color.WHITE : Color.GRAY;\n }\n this.add(c);\n }\n }\n }", "public BuildGrid()\n {\n System.out.print(\"Creating a new grid: \");\n\n m_grid = new double[1][5];\n setDimX(1);\n setDimY(5);\n\n this.fillWith(0);\n System.out.println(\"Done\");\n }", "public static void drawMap(Graphics g, int[][] grid){\n for(int i = 0; i < 480; i++)\n {\n for(int j = 0; j < 840; j++)\n {\n Color gray = new Color(grid[i][j] / 17, grid[i][j] / 17, grid[i][j] / 17);\n g.setColor(gray);\n \n g.drawRect(j, i, 1, 1);\n }\n }\n }", "public SameGnomeFrame() {\n\t\tsetSize(DEFUALT_WIDTH,DEFUALT_WIDTH);\n\t\tintializeGridBall();\n\t\tgrid = new GridComponent(gridBall);\n\t\tadd(grid);\n\t\t\n\t}", "public void createGrid() {\r\n generator.generate();\r\n }", "private void setGrid() {\r\n maxRows = (FORM_HEIGHT - FORM_HEIGHT_ADJUST) / SQUARE_SIZE;\r\n maxColumns = (FORM_WIDTH - FORM_WIDTH_ADJUST) / SQUARE_SIZE; \r\n grid = new JLabel[maxRows][maxColumns];\r\n int y = (FORM_HEIGHT - (maxRows * SQUARE_SIZE)) / 2;\r\n for (int row = 0; row < maxRows; row++) {\r\n int x = (FORM_WIDTH - (maxColumns * SQUARE_SIZE)) / 2;\r\n for (int column = 0; column < maxColumns; column++) {\r\n createSquare(x,y,row,column);\r\n x += SQUARE_SIZE;\r\n }\r\n y += SQUARE_SIZE;\r\n } \r\n }", "protected abstract void paintGrid(Graphics2D g);", "private JPanel getPAbmGrupos() {\r\n if (pAbmGrupos == null) {\r\n lInfo = new JLabel();\r\n lInfo.setBounds(new Rectangle(0, 240, 370, 30));\r\n lInfo.setHorizontalAlignment(SwingConstants.CENTER);\r\n lInfo.setHorizontalTextPosition(SwingConstants.CENTER);\r\n \r\n lInfo.setText(\"\");\r\n lId = new JLabel();\r\n lId.setBounds(new Rectangle(10, 20, 90, 20));\r\n lId.setText(\"Id Grupo\");\r\n lNombre = new JLabel();\r\n lNombre.setBounds(new Rectangle(10, 45, 90, 20));\r\n lNombre.setText(\"Nombre\");\r\n pAbmGrupos = new JPanel();\r\n pAbmGrupos.setLayout(null);\r\n pAbmGrupos.add(lNombre);\r\n pAbmGrupos.add(getTNombre());\r\n pAbmGrupos.add(getBGuardar());\r\n pAbmGrupos.add(getBCancelar());\r\n pAbmGrupos.add(getBEliminar());\r\n pAbmGrupos.add(getPGrupos());\r\n pAbmGrupos.add(getTBuscar());\r\n pAbmGrupos.add(getBBuscar());\r\n pAbmGrupos.add(getBNuevo(), null);\r\n pAbmGrupos.add(lId, null);\r\n pAbmGrupos.add(getTId(), null);\r\n pAbmGrupos.add(lInfo, null);\r\n \r\n }\r\n return pAbmGrupos;\r\n }", "private static void drawGrid(int[][] grid) {\n BufferStrategy buf = canvas.getBufferStrategy();\n Graphics g = buf.getDrawGraphics();\n\n g.clearRect(0, 0, (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_X), (2 * WINDOW_MARGINS) + (CELL_SIZE * SIZE_Y));\n\n for (int i = 0; i < grid.length; i++) {\n for (int j = 0; j < grid[0].length; j++) {\n g.setColor(pallette[grid[i][j]]);\n g.fillRect(WINDOW_MARGINS + (CELL_SIZE * i), WINDOW_MARGINS + (CELL_SIZE * j), CELL_SIZE, CELL_SIZE);\n }\n }\n\n if (!buf.contentsLost()) buf.show();\n g.dispose();\n }", "public Guillotine() {\n initComponents();\n }", "public JPanel getRepresentacionGrafica();", "private void construireGrilleParDefaut() {\r\n\t\tthis.m_builder = new BuilderHerbe();\r\n\t\tCircuit.getInstance().clearElements();\r\n\t\t\r\n\t\tfor(int x=0;x<this.m_nbLignes;x++) {\r\n\t\t\tfor(int y=0;y<this.m_nbColonnes;y++) {\r\n\t\t\t\tthis.m_builder.creerElement(this,x+\"_\"+y);\r\n\t\t\t\tthis.m_builder.getElement().setBorderElement(new PointillerBorder(Color.GRAY,1));\r\n\t\t\t\tthis.m_panelGrid.add((Element)this.m_builder.getElement());\r\n\t\t\t\t\r\n\t\t\t\tCircuit.getInstance().addElement(this.m_builder.getElement());\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "public gui obtenerGrafica();", "public static void makeGlider() {\n\t\tfor (int i = 0; i < Width; i++) {\n\t\t\tfor (int j = 0; j < Height; j++) {\n\t\t\t\tgrid[i][j] = 0;\n\t\t\t}\n\t\t}\n\t\tgrid[15][10] = 1;\n\t\tgrid[16][10] = 1;\n\t\tgrid[17][10] = 1;\n\t\tgrid[17][9] = 1;\n\t\tgrid[16][8] = 1;\n\t}", "public GridPane getGrid(){\n\t\treturn myGrid;\n\t}", "public RegularGrid() {\r\n }", "private void setGrid(GridPane g2) {\n\t\tg2.setPadding(new Insets(buttonSize, buttonSize, buttonSize, buttonSize));\r\n\t\tg2.setAlignment(Pos.CENTER);\r\n\t\tb = new Button[heigth][width];\r\n\t\t// randMines(); // adding random mines to the grid\r\n\t\tfor (int i = 0; i < heigth; i++) { // creating buttons in the grid\r\n\t\t\tfor (int j = 0; j < width; j++) {\r\n\t\t\t\tb[i][j] = new Button();\r\n\t\t\t\tb[i][j].setPrefSize(buttonSize, buttonSize);\r\n\t\t\t\tb[i][j].setMinSize(buttonSize, buttonSize);\r\n\t\t\t\tb[i][j].setMaxSize(buttonSize, buttonSize);\r\n\t\t\t\tb[i][j].setFont(new Font(\"Ariel\", 15));\r\n\t\t\t\tg2.add(b[i][j], i, j);\r\n\t\t\t\tb[i][j].setStyle(\"-fx-background-radius: 0;\");\r\n\t\t\t\tb[i][j].setOnMouseClicked(new ClickedButton(i, j)); // creating eventhandlers for each button\r\n\t\t\t\tb[i][j].setOnMouseDragEntered(new ClickeAndHovereddButton(i, j));\r\n\t\t\t}\r\n\t\t}\r\n\t\tg2.setMinSize((double) (buttonSize * (heigth) + 20), (double) (buttonSize * (width) + 20));\r\n\t\tg2.setPrefSize(Double.MAX_VALUE, Double.MAX_VALUE);\r\n\t\tg = new Graph(heigth, width);\r\n\t}", "public void buildDisplay() {\n ColorMap map = new ColorMap();\n\n for (int i = 1; i <= maxGrassPerCell; i++) {\n map.mapColor(i, new Color(0, Math.max(256 - i * 12, 50), 0));\n }\n map.mapColor(0, Color.white);\n\n Value2DDisplay displayMoney =\n new Value2DDisplay(space.getCurrentGrassSpace(), map);\n\n Object2DDisplay displayRabbits = new Object2DDisplay(space.getCurrentRabbitSpace());\n displayRabbits.setObjectList(rabbitList);\n\n displaySurf.addDisplayableProbeable(displayMoney, \"Grass\");\n displaySurf.addDisplayableProbeable(displayRabbits, \"Rabbits\");\n\n populationPlot.addSequence(\"Number of Rabbits\", new rabbitCount(), Color.BLUE);\n populationPlot.addSequence(\"Number of Grass\", new grassCount(), new Color(0, 150, 0));\n }", "private GridPane inicializarPanelGrid() {\n GridPane gridPane = new GridPane();\n\n // Position the pane at the center of the screen, both vertically and horizontally\n gridPane.setAlignment(Pos.CENTER);\n\n // Set a padding of 20px on each side\n gridPane.setPadding(new Insets(40, 40, 40, 40));\n\n // Set the horizontal gap between columns\n gridPane.setHgap(10);\n\n // Set the vertical gap between rows\n gridPane.setVgap(10);\n\n // Add Column Constraints\n // columnOneConstraints will be applied to all the nodes placed in column one.\n ColumnConstraints columnOneConstraints = new ColumnConstraints(100, 100, Double.MAX_VALUE);\n columnOneConstraints.setHalignment(HPos.RIGHT);\n\n // columnTwoConstraints will be applied to all the nodes placed in column two.\n ColumnConstraints columnTwoConstrains = new ColumnConstraints(200, 200, Double.MAX_VALUE);\n columnTwoConstrains.setHgrow(Priority.ALWAYS);\n\n gridPane.getColumnConstraints().addAll(columnOneConstraints, columnTwoConstrains);\n\n return gridPane;\n }", "public void paintComponent(Graphics g){\n\t\ttry \n\t\t{\n\t\t\tImage[] img = new Image[3];\n\t\t\tfor(int y = 0; y<3; y++)\n\t\t\t\timg[y] = ImageIO.read(new File(\"Images/case\"+y+\".png\"));\n\t\t\tImage IMGgagne = ImageIO.read(new File(\"Images/gagne.png\"));\n\t\t\tImage IMGperdu = ImageIO.read(new File(\"Images/perdu.png\"));\n\t\t\t\n\t\t\tImage[] numerotation = new Image[11];\n\t\t\tfor(int n = 0; n<11; n++)\n\t\t\t\tnumerotation[n] = ImageIO.read(new File(\"Images/\"+n+\".png\"));\n\t\t\tfor(int z = 0; z <= grille.length; z++)\n\t\t\t\tg.drawImage(numerotation[z], 32*z, 0, this);\n\t\t\tfor(int p = 1; p <= grille[0].length; p++)\n\t\t\t\tg.drawImage(numerotation[p], 0, 32*p, this);\n\t\t\t\n\t\t\tfor(int i = 0; i < grille.length; i++)\n\t\t\t{\n\t\t\t\tfor(int j = 0; j < grille[0].length; j++)\n\t\t\t\t{\n\t\t\t\t\tg.drawImage(img[grille[i][j]], 32*i+32, 32*j+32, this);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(gagne)\n\t\t\t{\n\t\t\t\tg.drawImage(IMGgagne, 32, 32, this);\n\t\t\t}\n\t\t\t\n\t\t\tif(perdu)\n\t\t\t{\n\t\t\t\tg.drawImage(IMGperdu, 32, 32, this);\n\t\t\t}\n\t\t\t\n\t\t} \n\t\tcatch (IOException e) \n\t\t{\n\t\t\te.printStackTrace();\n\t\t} \n\t}", "private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }", "@Override\n public void paintComponent(Graphics g) {\n super.paintComponent(g);\n // Clear the board\n g.clearRect(0, 0, getWidth(), getHeight());\n // Draw the grid\n int rectWidth = getWidth() / NUM_COLS;\n int rectHeight = getHeight() / NUM_ROWS;\n\n for (int i = 0; i < NUM_ROWS; i++) {\n for (int j = 0; j < NUM_COLS; j++) {\n // Upper left corner of this terrain rect\n int x = i * rectWidth;\n int y = j * rectHeight;\n Color terrainColor = terrainGrid[i][j];\n g.setColor(terrainColor);\n g.fillRect(x, y, rectWidth, rectHeight);\n }\n }\n }", "public PuzzleGrid( PuzzleGrid pg )\n\t{\n\t\t// Set object parameters using pg's parameters.\n\t\twidth = pg.getWidth();\n\t\theight = pg.getHeight();\n\t\tgrid = new int[width][height];\n\t\t\n\t\t// For each x / y coordinate, copy contents of pg's grid to this grid.\n\t\tfor ( int y = 0; y < height; y++ )\n\t\t{\n\t\t\tfor ( int x = 0; x < width; x++ )\n\t\t\t{\n\t\t\t\tgrid[x][y] = pg.getRawGrid()[x][y];\n\t\t\t}\n\t\t}\n\t\t\n\t\t// Also copy coordinates of empty tile.\n\t\tx0 = pg.getEmptyX();\n\t\ty0 = pg.getEmptyY();\n\t}", "public MiniMap(Grid grid) {\n\t\tcurrent = this;\n\t\timg = new PImage(grid.cols, grid.rows);\n\t\tint x = Rogue.stage.width - WIDTH;\n\t\tthis.grid = grid;\n\t\tthis.pos = new Int2D(x, 0);\n\t\tbg = createBG();\n\t\tupdate();\n\t\tignoreDiscovered = Registry.getBoolean(\"game.clear_minimap\");\n\t}", "public void drawGrid(Graphics g) \n {\n int wide = getWidth();\n int tall = getHeight();\n // go into Graphics2D for all the fine art, more options\n // optional, here I just get variable Stroke sizes\n Graphics2D g2 = (Graphics2D)g;\n g.setColor(Color.GRAY);\n int w = wide / 20;\n int h = tall / 20;\n g2.setColor(Color.BLACK);\n g2.setStroke(new BasicStroke(1));\n // Draw Grid lines\n for (int i = 1; i < 20; i++) {\n // Verticals\n g2.drawLine(i * w, 0, i * w, tall);\n // Horizontals\n g2.drawLine(0, i * h, wide, i * h);\n }\n }", "public void drawGrid() {\r\n\t\tsetLayout(new GridLayout(getSize_w(), getSize_h()));\r\n\t\tfor (int i = 0; i < getSize_h(); i++) {\r\n\t\t\tfor (int j = 0; j < getSize_w(); j++) {\r\n\t\t\t\tcity_squares[i][j] = new Gridpanel(j, i);\r\n\t\t\t\tadd(city_squares[i][j]);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private GridPane setInfoVindu(){\r\n GridPane grid = new GridPane();\r\n grid.setPadding(new Insets(13, 13, 13,13));\r\n grid.setHgap(15);\r\n grid.setVgap(5);\r\n\r\n nyeTall = new TextField();\r\n settInnTall = new Button(\"Sett inn\");\r\n leggInnTilfeldigeTall = new Button(\"Legg inn 10 tilfeldige tall\");\r\n slettTre = new Button(\"Slett tre\");\r\n nodeFarge = new ColorPicker();\r\n nodeFarge.setValue(Color.LIGHTGREEN);\r\n\r\n grid.add(nyeTall, 0,0);\r\n grid.add(settInnTall, 1, 0);\r\n grid.add(leggInnTilfeldigeTall, 2, 0);\r\n grid.add(slettTre, 3, 0);\r\n grid.add(nodeFarge, 4, 0);\r\n\r\n return grid;\r\n }", "protected abstract void narisi(Graphics2D g, double wPlatno, double hPlatno);", "void gui(JPanel quadro,\n ActionListener listener,\n JLabel rotulo) {\n quadro.setLayout(new BorderLayout()); //ou\n //quadro.setLayout(new BorderLayout(5,5)); //hgap x vgap\n //... espacamento de hgap na horizontal e de vgap na vertical.\n\n JPanel q;\n\n q = new JPanel();\n q.setLayout(new FlowLayout(FlowLayout.LEFT));\n quadro.add(q,BorderLayout.NORTH);\n q.add(rotulo);\n cfg_rotulo(rotulo);\n\n q = new JPanel();\n quadro.add(q,BorderLayout.SOUTH);\n //layout para as teclas ...\n q.setLayout(new GridLayout(2,4,8,8)); // linhas X colunas ...\n //... + espacamento de 8pt tanto na horizontal quanto na vertical.\n \n mk_grupoContagem(q, listener); //1ra linha\n mk_grupoMemorizacao(q, listener); //2da linha\n }", "public Grid()\n {\n dest = new GridReference[2];\n dest[0] = new GridReference(Game.GRID_WIDTH-(int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.2));\n dest[1] = new GridReference(Game.GRID_WIDTH-(int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.8));\n //dest[2] = new GridReference(5,50);\n defaultStart = new GridReference((int)((double)Game.GRID_WIDTH*0.05),\n Game.GRID_HEIGHT-(int)((double)Game.GRID_HEIGHT*0.5));\n defaultWalker = Walkers.WEIGHTED2;\n \n createField();\n \n walkers = new ArrayList<>();\n //addUnits(randDest(), randDest());\n /*for (int i = 0; i < grassPatches.length; i++)\n {\n System.out.println(i + \":\" + grassPatches[i]);\n }*/\n }", "void draw(Graphics g)\n {\n int aliveCount = 0, deadCount = 0;\n\n boolean[][] gridArray = grid.getGrid();\n for(int row = 0; row < gridArray.length; row++){\n for(int col = 0; col < gridArray[row].length; col++){\n if(gridArray[row][col]){\n if(grid.isInverted()) {\n g.setColor(Color.white);\n } else {\n g.setColor(Color.black);\n }\n aliveCount++;\n } else {\n if(grid.isInverted()) {\n g.setColor(Color.black);\n } else {\n g.setColor(Color.white);\n }\n deadCount++;\n }\n g.fillRect(col * (grid.getCellSize() + grid.getCellInnerGap()) + grid.getCellOuterGap() , row * (grid.getCellSize() + grid.getCellInnerGap()) + grid.getCellOuterGap(), grid.getCellSize(), grid.getCellSize());\n }\n }\n\n UserInterface.infoLabel.setText(\"<html><center>Generation: \" + grid.getGeneration() + \"</center>Alive: \" + aliveCount + \" ; Dead: \" + deadCount + \"</html>\");\n }", "public Node createGrid() {\n\t\tGroup gridGroup = new Group();\n\t\tgridGroup.getChildren().addAll(buildXYPlane());\n\t\t/*\n\t\t * XXX extend the grid\n\t\t * \n\t\t * here it would be possible to extend the grid, e.g. with a graph\n\t\t * or another plane with a grid (XZ, YZ, ...).\n\t\t * \n\t\t * it would look like this:\n\t\t * gridGroup.getChildren().addAll(buildGraph());\n\t\t */\n\t\treturn gridGroup;\n\t}", "public Grilla(DisplayDelTablero display) {\n\t\t\tsetTitle(\"Batalla naval!\");\n\t\t\tsetSize(WIDTH, HEIGHT);\n\t\t\tsetDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\tsetResizable(false);\n\t\t\tsetLocationRelativeTo(null);\n\t\t\tsetVisible(true);\n\t\t\tsetLayout(null);\n\t\t\tfor (int i = 0; i < COLUMNAS; i++) {\n\t\t\t\tfor (int j = 0; j < FILAS; j++) {\n\t\t\t\t\tCasilla casilla = new Casilla((10 + sizeCasilla * i), (10 + sizeCasilla * j), sizeCasilla,\n\t\t\t\t\t\t\tsizeCasilla, 1, display);\n\t\t\t\t\tcasilla.setPosicion(10 + sizeCasilla * i, 10 + sizeCasilla * j);\n\t\t\t\t\tString codigoCasilla = (10 + sizeCasilla * i) + \"\" + (10 + sizeCasilla * j);\n\t\t\t\t\tcasillas.put(codigoCasilla, casilla);\n\t\t\t\t\tadd(casilla);\n\t\t\t\t}\n\t\t\t}\n\t\t\tfor (int i = 0; i < COLUMNAS; i++) {\n\t\t\t\tfor (int j = 0; j < FILAS; j++) {\n\t\t\t\t\tCasilla casilla = new Casilla((10 + sizeCasilla * i), (520 + sizeCasilla * j), sizeCasilla,\n\t\t\t\t\t\t\tsizeCasilla, 0, display);\n\t\t\t\t\tcasilla.setPosicion(10 + sizeCasilla * i, 520 + sizeCasilla * j);\n\t\t\t\t\tString codigoCasilla = (10 + sizeCasilla * i) + \"\" + (520 + sizeCasilla * j);\n\t\t\t\t\tcasillas.put(codigoCasilla, casilla);\n\t\t\t\t\tadd(casilla);\n\t\t\t\t}\n\t\t\t}\n\n\t\t}", "public CrearGrupos() throws SQLException {\n initComponents();\n setTitle(\"Crear Grupos\");\n setSize(643, 450);\n setLocationRelativeTo(this);\n cargarModelo();\n }", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "void setGruppo(Gruppo gruppo);", "public Grid grid() { return grid; }", "public Gomoku() {\n initComponents();\n MenuAwal.setVisible(true);\n PilihRoom.setVisible(false);\n MasukRoom.setVisible(false);\n Gameplay.setVisible(false);\n GagalBuatRoom.setVisible(false);\n GagalBuatRoom1.setVisible(false);\n GagalMasukRoom.setVisible(false);\n GagalLogin1.setVisible(false);\n GagalLogin2.setVisible(false);\n GameplayCover.setVisible(false);\n ResultPanel.setVisible(false);\n for (int i = 0; i < 20; i++){\n for (int j = 0; j < 20; j++){\n Board[i][j] = 0;\n }\n }\n }", "public void updateGridX();", "@Override\n public void paintComponent(Graphics g){\n super.paintComponent(g);\n this.g2d = (Graphics2D) g;\n for (Casilla casilla : casillas) {\n if(casilla instanceof CasillaCentro){\n (new GCasillaCentro(casilla, numCasillasAspa)).dibujar(g2d);\n }else if(casilla instanceof CasillaSemicirculo){\n (new GCasillaSemicirculo(casilla, numCasillasAspa)).dibujar(g2d);\n }else if(casilla instanceof CasillaTriangulo){\n (new GCasillaTriangulo(casilla, numCasillasAspa)).dibujar(g2d);\n }else if(casilla instanceof CasillaPropia){\n (new GCasillaPropia(casilla, numCasillasAspa)).dibujar(g2d);\n }else{\n (new GCasillaNormal(casilla, numCasillasAspa)).dibujar(g2d);\n }\n }\n }", "public void buildGrid(GridPane myRoot) {\n\t\tfor (int i = 0; i < rowBounds; i++) {\n\t\t\tRowConstraints rowConstraint = new RowConstraints();\n\t\t\trowConstraint.setPercentHeight(100);\n\t\t\tmyGrid.getRowConstraints().add(rowConstraint);\n\t\t}\n\t\tfor (int i = 0; i < colBounds; i++) {\n\t\t\tColumnConstraints colConstraint = new ColumnConstraints();\n\t\t\tcolConstraint.setPercentWidth(100);\n\t\t\tmyGrid.getColumnConstraints().add(colConstraint);\n\t\t}\n\t\tGridPane.setHalignment(myGrid, HPos.CENTER);\n\t\tGridPane.setValignment(myGrid, VPos.CENTER);\n\t\tGridPane.setConstraints(myGrid, 0, 1);\n\t\tGridPane.setRowSpan(myGrid, 2);\n\t\tmyRoot.getChildren().add(myGrid);\n\t}", "public void mostrarGrafo() {\n\t\tmatriz.mostrarMatriz();\n\t}", "private Grid makeGrid()\n\t{\n\t\tGrid grid = Grid.grid().\n\t\t\t\tBus(\"1\").\n\t\t\t\tSlackSource(\"Slack\", BASE_VOLTAGE, 0, 0, 0).\n\t\t\t\tLine(\"1-2\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\tBus(\"2\").\n\t\t\t\t\t\tControllableDemand(\"S\").\n\t\t\t\t\t\tLine(\"2-3\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\t\tBus(\"3\").\n\t\t\t\t\t\t\t\tLoad(\"L\").\n\t\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tterminate().\n\t\t\t\t\t\tLine(\"2-4\", 1, 0.06*BASE_IMPEDANCE, 0.03*BASE_IMPEDANCE).\n\t\t\t\t\t\tBus(\"4\").\n\t\t\t\t\t\t\tDistributedSource(\"DG\").\n\t\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\t\tterminate().\n\t\t\t\tterminate().\n\t\t\tterminate().\n\t\tgrid();\n\t\t\n\t\t// x_0:\n\t\tLoad load = grid.getLoad(\"L\");\n\t\tControllableDemand storage = grid.getControllableDemand(\"S\");\n\t\tDistributedSource dg = grid.getDistributedSource(\"DG\");\n\t\tsetupUnits(load, storage, dg);\n\t\t\n\t\treturn grid;\n\t}", "public void initGrid(Game game) {\n\t\t\t\n\t\t\tint size = game.getBoard().size();\n\t\t\tcellLabels = new Matrix<JLabel>(size);\n\t\t\t\n\t\t\t\n\t\t\tleftPanel.removeAll();\n\t\t\tleftPanel.setLayout(new GridLayout(size,size));\n\t\t\t\n\t\t\tBorder border = BorderFactory.createLineBorder(Color.black,1);\n\t\t\tfor(int i = 0 ; i < cellLabels.size(); ++i) {\n\t\t\t\tfor(int j = 0 ; j < cellLabels.size() ; ++j) {\n\t\t\t\t\tJLabel curr_l = new JLabel(\"\");\n\t\t\t\t\t\n\t\t\t\t\tcurr_l.setBorder(border);\n\t\t\t\t\tcurr_l.setHorizontalAlignment(JLabel.CENTER);\n\t\t\t\t\tcellLabels.set(j, i, curr_l);\n\t\t\t\t\t\n\t\t\t\t\tJLabel label = cellLabels.get(j, i);\n\t\t\t\t\tlabel.setOpaque(true);\n\t\t\t\t\t\n\t\t\t\t\tleftPanel.add(label);\n\t\t\t\t\tCell curr = game.getBoard().get(j, i);\n\t\t\t\t\t\n\t\t\t\t\tlabel.setBackground(curr.color());\n\t\t\t\t\t\n\t\t\t\t\tif(curr.color() == Color.blue) {\n\t\t\t\t\t\tlabel.setText(curr.toString());\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t// We can't place a hunter on a corner because he could be blocked\n\t\t\t\t\tif((j == 1 && i == 1) || (j == cellLabels.size()-2 && i == 1) || (j == cellLabels.size()-2 && i == cellLabels.size()-2) ||(j == 1 && i == cellLabels.size()-2)) {\n\t\t\t\t\t\tcontinue;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tfinal int i_inner = i;\n\t\t\t\t\tfinal int j_inner = j;\n\t\t\t\t\t\n\t\t\t\t\t// Set the listener to place hunters by clicking\n\t\t\t\t\tif(curr.color() == Color.blue || curr.color() == Color.gray) {\n\t\t\t\t\t\tlabel.addMouseListener(new MouseAdapter() {\n\t\t\t\t\t\t\tpublic void mouseClicked(MouseEvent e) {\n\t\t\t\t\t\t\t\tcontroller.addHunter(j_inner, i_inner);\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\n\t\t\t\n\t\t\tleftPanel.repaint();\n\t\t\tleftPanel.revalidate();\n\t\t\tthis.gridIsInit = true;\n\t\t\t\n\t\t\tframe.setEnable(\"play\",true);\n\t\t\tframe.setEnable(\"save\",true);\n\t\t\tframe.setEnable(\"round\",true);\n\t\t\tframe.setEnable(\"replay\",true);\n\n\t\t\tinitDataPanel(game);\n\t\t\t\n\t\t}", "@Override\n public void resetGrids() {\n view.clearGrid(false);\n\n // then remove non-given numbers\n for (int row = 0; row < 9; row++) {\n for (int col = 0; col < 9; col++) {\n if (!grid.isGiven(row, col)) {\n grid.unsetNumber(row, col);\n }\n }\n }\n\n // finally, display the givens on the view\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n if (grid.isGiven(i, j)) {\n view.setGiven(i, j, grid.getNumber(i, j));\n }\n }\n }\n }", "private Grid<Movimiento> createGrid() {\n\t\tgrid = new Grid<>();\n\t\tgrid.addThemeVariants(GridVariant.LUMO_NO_BORDER,GridVariant.LUMO_ROW_STRIPES);\n\t\t\n\t\tSimpleDateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy\");\n\t\t\n\t\tgrid.addComponentColumn(c -> new IconoMovimientoTarjeta(c))\n\t\t.setWidth(\"100px\").setHeader(\"Tarjeta\").setFlexGrow(1);\n\t\tgrid.addColumn(c -> c.getCantidad()+\" €\").setHeader(\"Cantidad\").setFlexGrow(1);\n grid.addColumn(c -> c.getConcepto()).setHeader(\"Concepto\").setFlexGrow(1);\n grid.addColumn(c -> dateFormat.format(c.getFecha())).setHeader(\"Fecha\").setWidth(\"125px\").setFlexGrow(0);\n \n return grid;\n\t}", "public SlanjePoruke(Grupa g) {\n initComponents();\n setIcon();\n setLocationRelativeTo(null);\n setTitle(\"E-mail\");\n grupa = g;\n\n DefaultListModel<Polaznik> m = new DefaultListModel<>();\n for (Polaznik p : grupa.getPolaznici()) {\n m.addElement(p);\n }\n\n primatelji.setModel(m);\n\n editor = new HTMLEditorPane();\n editor.setSize(editorKontejner.getSize());\n editorKontejner.add(editor);\n\n }", "public JPanel graficarMem (){\r\n\t\tJPanel panel = new JPanel(){\r\n\t\t\t@Override\r\n\t\t\tpublic void paint(Graphics g) {\r\n\t\t\t\t// dibujo la memoria\r\n\t\t\t\tint xpoints[] = { 20, 20, 140, 140};\r\n\t\t\t\tint ypoints[] = { 0, 15 * tamaņo,15 * tamaņo, 0 };\r\n\t\t\t\tint npoints = 4;\r\n\t\t\t\tg.drawPolygon(xpoints, ypoints, npoints);\r\n\t\t\t\t\r\n\t\t\t\t// dibujo las lineas de separacion de los espacios de la memoria\r\n\t\t\t\tint altura = 0;\r\n\t\t\t\tint sumaEspacios = 0;\r\n\t\t\t\tg.drawString(sumaEspacios + \"\", 0, 15);\r\n\t\t\t\tfor(int i = 0; i < numEspacios; i++){\r\n\t\t\t\t\taltura += espacios[i].getTamaņo() * 15;\r\n\t\t\t\t\tsumaEspacios += espacios[i].getTamaņo();\r\n\t\t\t\t\tg.drawString(sumaEspacios + \"\", 0, altura);\r\n\t\t\t\t\tg.drawString(espacios[i].getTamaņo() + \"\", 140, altura - (espacios[i].getTamaņo() * 15) / 2);\r\n\t\t\t\t\tg.drawLine(20, altura, 140, altura);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\t// dibujo las variables de los espacios\r\n\t\t\t\tint altura1 = 0;\r\n\t\t\t\tBasicStroke Bs = new BasicStroke(2f);\r\n\t\t\t\tGraphics2D g2D = (Graphics2D) g;\r\n\t\t\t\tg2D.setStroke(Bs);\r\n\t\t\t\tfor (int i = 0; i < numEspacios; i++) {\r\n\t\t\t\t\tint tamV = 0;\r\n\t\t\t\t\tint tamE = espacios[i].getTamaņo() * 15;\r\n\t\t\t\t\tint alturaV = altura1; \r\n\t\t\t\t\tfor (int j = 0; j < espacios[i].getVarEnMem().size(); j++) {\r\n\t\t\t\t\t\ttamV = espacios[i].getVarEnMem().get(j).getTamaņo() * 15;\r\n\t\t\t\t\t\tint puntosY[] = { alturaV, alturaV + tamV, alturaV + tamV, alturaV};\r\n\t\t\t\t\t\tg2D.setColor(espacios[i].getVarEnMem().get(j).getColor());\r\n\t\t\t\t\t\tif (espacios[i].getVarEnMem().get(j).getTamaņo() > 1) {\r\n\t\t\t\t\t\t\tg2D.drawString(espacios[i].getVarEnMem().get(j).getNombre() + \" \" + espacios[i].getVarEnMem().get(j).getTamaņo() + \"M\", 90, alturaV + (tamV / 2));\r\n\t\t\t\t\t\t}else {\r\n\t\t\t\t\t\t\tg2D.drawString(espacios[i].getVarEnMem().get(j).getNombre() + \" \" + espacios[i].getVarEnMem().get(j).getTamaņo() + \"M\", 90, alturaV + tamV);\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\tg2D.drawPolygon(xpoints, puntosY, npoints);\r\n\t\t\t\t\t\talturaV += tamV; \r\n\t\t\t\t\t}\r\n\t\t\t\t\taltura1 += tamE;\r\n\t\t\t\t}\r\n\t\t\t\tg2D.setColor(Color.BLACK);\r\n\t\t\t}\r\n\t\t};\r\n\t\t\r\n\t\tpanel.setPreferredSize(new Dimension(160, 15*this.getTamaņo() + 10));\r\n\t\t\r\n\t\treturn panel;\r\n\t}", "private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }", "private void createGrid() {\n Platform.runLater(() -> {\n\n // Update UI here\n //createGrid(numRows); // E.g. let's create a 20 x 20 grid\n createGrid(20);\n });\n }", "private void addElementsGridPane(GridPane infosPane, Label toDrawLbl, \n Label wordLbl, Label avgPropsTitleLbl, \n Label avgPropsLbl) {\n infosPane.add(super.getGameStatusTitleLbl(), 0, 0);\n infosPane.add(super.getGameStatusLbl(), 0, 1);\n infosPane.add(toDrawLbl, 0, 5);\n infosPane.add(wordLbl, 0, 6);\n infosPane.add(avgPropsTitleLbl, 0, 8);\n infosPane.add(avgPropsLbl, 0, 9);\n infosPane.add(super.getHistoryLbl(), 0, 11);\n infosPane.add(super.getPropositionHist(), 0, 12);\n infosPane.add(super.getHistoryBtn(), 0, 18);\n infosPane.add(super.getQuitBtn(), 0, 20);\n }", "com.ctrip.ferriswheel.proto.v1.Grid getGrid();", "public void crearGloboAmarillo(int tiempo){ \n GloboAmarillo globoa = new GloboAmarillo();\n globoslista.add(globoa);\n double posicionx = generarPosicionX();\n globoa.fijarPosicion(posicionx);\n gpane.getChildren().addAll(globoa);\n MoverGlobo mv = new MoverGlobo(globoa,tiempo);\n mov= new Thread(mv);\n mov.start(); \n }", "public void draw() {\n PImage grid = loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/tile.png\");\n for(int i = 0 ; i < 10 ; i++){\n for(int j = 0 ; j < 6 ; j++){\n image(grid, i*grid.width, j*grid.height);\n if(gridPlane.get(List.of(i, j)).getOwner() != null){\n if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Red\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red3.png\"), i*grid.width, j*grid.height);\n }\n }else if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Green\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green3.png\"), i*grid.width, j*grid.height);\n }\n }\n }\n }\n }\n if(this.finish == true){\n System.exit(0);\n }\n }", "public void fillGamePanel() {\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n for (int row = 0; row < world.getRowCount(); row++) {\n for (int col = 0; col < world.getColumnCount(); col++) {\n gridPanel.add(world.getCellAt(row, col));\n world.getCellAt(row, col).setBorder(\n BorderFactory.createMatteBorder(\n 1, 1, 0, 0, Color.BLACK));\n }\n }\n }", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }", "private void addPieces() {\n gridPane.getChildren().clear();\n Map<Piece, Position> pieces = controller.getAllActivePiecesPositions();\n /* Add the tiles */\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n Tile tile = new TileView(new Position(row, col));\n gridPane.add(tile.getRootNode(),\n 1 + tile.getPosition().getCol(),\n 1 + tile.getPosition().getRow());\n GridPane.setHgrow(tile.getRootNode(), Priority.ALWAYS);\n GridPane.setVgrow(tile.getRootNode(), Priority.ALWAYS);\n getTiles()[row][col] = tile;\n tile.getRootNode().setOnMouseClicked(\n tileListener(tile));\n tile.clear();\n tile.setSymbol(\"\");\n }\n }\n /* Add the pieces */\n for (Piece p : pieces.keySet()) {\n Position placeAt = pieces.get(p);\n getTileAt(placeAt).setSymbol(p.getType().getSymbol(p.getSide()));\n }\n /* Add the coordinates around the perimeter */\n for (int i = 1; i <= 8; i++) {\n Text coord1 = new Text((char) (64 + i) + \"\");\n coord1.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord1.setFill(Color.WHITE);\n GridPane.setHalignment(coord1, HPos.CENTER);\n gridPane.add(coord1, i, 0);\n\n Text coord2 = new Text((char) (64 + i) + \"\");\n coord2.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord2.setFill(Color.WHITE);\n GridPane.setHalignment(coord2, HPos.CENTER);\n gridPane.add(coord2, i, 9);\n\n Text coord3 = new Text(\" \" + (9 - i) + \" \");\n coord3.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord3.setFill(Color.WHITE);\n GridPane.setHalignment(coord3, HPos.CENTER);\n gridPane.add(coord3, 0, i);\n\n Text coord4 = new Text(\" \" + (9 - i) + \" \");\n coord4.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord4.setFill(Color.WHITE);\n GridPane.setHalignment(coord4, HPos.CENTER);\n gridPane.add(coord4, 9, i);\n }\n }", "public void reactToNewGrid(Grid grid)\n {\n theGrid = grid;\n }", "public void majAffichage() {\n this.grid.getChildren().clear(); // vide tout le gridpane\n for (int i = 0; i < this.matrice.getNbLigne(); i++) {\n for (int j = 0; j < this.matrice.getNbColonne(); j++) {\n Node n = this.matrice.getCell(i, j); // recupère les imgViews de la matrice\n this.grid.setHalignment(n, HPos.CENTER); // place les labels au centre des cases\n this.grid.add(this.matrice.getCell(i, j), j, i);\n }\n }\n }", "public Main() {\n grafo = new MultiGraph(\"Mapa\", false, true);\n initComponents();\n\n }", "public void crearGloboRojo(int tiempo){ \n GloboRojo globor = new GloboRojo();\n double posicionx = generarPosicionX();\n globor.fijarPosicion(posicionx);\n globoslista.add(globor);\n gpane.getChildren().addAll(globor); \n MoverGlobo mv = new MoverGlobo(globor,tiempo);\n mov= new Thread(mv);\n mov.start(); \n }", "public void pulisci() {\n Cella c;\n for (int i = 0; i < N; i++) {\n for (int j = 0; j < N; j++) {\n c = getElementAt(griglia, i, j);\n c.cerchio.setVisible(false);\n }\n }\n }", "@Override\n\tpublic void dibujar(Graphics2D g) {\n\n\t\tif (contadorJugador == 0) {\n\t\t\tenemigos.add(enemigo1);\n\t\t\tenemigos.add(enemigo2);\n\t\t\t// Se volverian a generar los objetos\n\t\t\tConstantes.volverTodoCero();\n\t\t\tcontadorJugador++;\n\t\t}\n\t\tg.scale(Constantes.ESCALAX, Constantes.ESCALAY);\n\t\t\n\t\t// Importante\n\t\tmapa.dibujar(g);\n\t\tdibujarArmas(g);\n\t\t//\n\t\tjugador.dibujar(g);\n\t\tenemigo1.dibujar(g);\n\t\tenemigo2.dibujar(g);\n\t\tcasa1.dibujar(g);\n\t\tcasa2.dibujar(g);\n\t\tcasa3.dibujar(g);\n\t\tcasa4.dibujar(g);\n\t\tcasa5.dibujar(g);\n\t\tcasa6.dibujar(g);\n\n\t\ttry {\n\t\t\t// Esto sirve para que no dispare seguido es el contador que va aumentado hasta\n\t\t\t// el tiempo que tenga cada arma\n\t\t\tif (Tecla.esperarArma != ((Armas) Tecla.objetoElegido).esperaDisparo) {\n\t\t\t\tTecla.esperarArma++;\n\t\t\t}\n\t\t} catch (NullPointerException | ClassCastException e) {\n\t\t\t// TODO: handle exception\n\t\t}\n\n\t\t// System.out.println(Tecla.esperarArma);\n\n\t\tMapa.paredAbajo = new Rectangle(Mapa.rectanguloAbx, Mapa.rectanguloAby, Constantes.ANCHOMAPA, 3);\n\t\tMapa.paredIzquierda = new Rectangle(Mapa.rectanguloIx, Mapa.rectanguloIy, 3, Constantes.ALTOMAPA);\n\t\tMapa.paredArriba = new Rectangle(Mapa.rectanguloAx, Mapa.rectanguloAy, Constantes.ANCHOMAPA, 3);\n\t\tMapa.paredDerecha = new Rectangle(Mapa.rectanguloDx, Mapa.rectanguloDy, 3, Constantes.ALTOMAPA);\n\t\t// ---\n\t\t// Prueba\n\t\t// ---\n\n\t\trecorrerArrayBalaMover(g);\n\n\t\tg.drawRect(Mapa.rectanguloAbx, Mapa.rectanguloAby, Constantes.ANCHOMAPA, 3);\n\t\tg.drawRect(Mapa.rectanguloAx, Mapa.rectanguloAy, 3, Constantes.ALTOMAPA);\n\t\tg.drawRect(Mapa.rectanguloDx, Mapa.rectanguloDy, 3, Constantes.ALTOMAPA);\n\t\tg.drawRect(Mapa.rectanguloIx, Mapa.rectanguloIy, Constantes.ANCHOMAPA, 3);\n\n\t}", "public MapGrid(){\n\t\tthis.cell = 25;\n\t\tthis.map = new Node[this.width][this.height];\n\t}", "private void drawComponents () {\n // Xoa het nhung gi duoc ve truoc do\n mMap.clear();\n // Ve danh sach vi tri cac thanh vien\n drawMembersLocation();\n // Ve danh sach cac marker\n drawMarkers();\n // Ve danh sach cac tuyen duong\n drawRoutes();\n }", "public displayGurps() {\n initComponents();\n }", "public void crearGloboMalo(int tiempo){\n GloboMalo globom = new GloboMalo();\n globoslista.add(globom); \n double posicionx = generarPosicionX();\n globom.fijarPosicion(posicionx);\n gpane.getChildren().addAll(globom);\n MoverGlobo mv = new MoverGlobo(globom,tiempo);\n mov= new Thread(mv);\n mov.start();\n }", "private GridLayout buildGridData() {\n\t\tgridData = new GridLayout();\r\n\t\tgridData.setImmediate(false);\r\n\t\tgridData.setWidth(\"-1px\");\r\n\t\tgridData.setHeight(\"100.0%\");\r\n\t\tgridData.setMargin(false);\r\n\t\tgridData.setSpacing(true);\r\n\t\tgridData.setColumns(2);\r\n\t\tgridData.setRows(2);\r\n\t\t\r\n\t\t// labelA\r\n\t\tlabelA = new Label();\r\n\t\tlabelA.setImmediate(false);\r\n\t\tlabelA.setWidth(\"-1px\");\r\n\t\tlabelA.setHeight(\"-1px\");\r\n\t\tlabelA.setValue(\"<b>Autor:</b>\");\r\n\t\tlabelA.setContentMode(3);\r\n\t\tgridData.addComponent(labelA, 0, 0);\r\n\t\t\r\n\t\t// labelAuthor\r\n\t\tlabelAuthor = new Label();\r\n\t\tlabelAuthor.setImmediate(false);\r\n\t\tlabelAuthor.setWidth(\"-1px\");\r\n\t\tlabelAuthor.setHeight(\"-1px\");\r\n\t\tlabelAuthor.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelAuthor, 1, 0);\r\n\t\t\r\n\t\t// labelB\r\n\t\tlabelB = new Label();\r\n\t\tlabelB.setImmediate(false);\r\n\t\tlabelB.setWidth(\"-1px\");\r\n\t\tlabelB.setHeight(\"-1px\");\r\n\t\tlabelB.setValue(\"<b>Editorial:</b>\");\r\n\t\tlabelB.setContentMode(3);\r\n\t\tgridData.addComponent(labelB, 0, 1);\r\n\t\t\r\n\t\t// labelPublisher\r\n\t\tlabelPublisher = new Label();\r\n\t\tlabelPublisher.setImmediate(false);\r\n\t\tlabelPublisher.setWidth(\"-1px\");\r\n\t\tlabelPublisher.setHeight(\"-1px\");\r\n\t\tlabelPublisher.setValue(\"Label\");\r\n\t\tgridData.addComponent(labelPublisher, 1, 1);\r\n\t\t\r\n\t\treturn gridData;\r\n\t}", "private void luoKomponentit(Container pane) {\n GridBagLayout gbl = new GridBagLayout();\n GridBagConstraints c = new GridBagConstraints();\n \n pane.setLayout(gbl);\n \n JPanel peliPanel = new JPanel();\n JPanel pelaajatPanel = new JPanel();\n \n c.fill = GridBagConstraints.BOTH;\n \n c.weighty = 0.5;\n c.weightx = 1;\n c.gridx = 0;\n c.gridy = 0;\n pane.add(peliPanel,c,1);\n \n c.weightx = 0.4;\n c.ipadx = 50;\n c.gridx = 1;\n pane.add(pelaajatPanel,c,1);\n pelaajatPanel.setBorder(new LineBorder(Color.LIGHT_GRAY, 2));\n \n luoPeliKomponentit(peliPanel);\n luoPelaajaKomponentit(pelaajatPanel);\n }", "public GridMapPanel() {\n super();\n initialize();\n }", "private void initializeGrid() {\n // 50 pixel first row for banner\n addPercentRows(root, 5);\n // second row takes up 100% of the remaining space\n addPercentRows(root, 95);\n // One column at 100% width\n addPercentColumns(root, 100);\n\n Label title = new Label(\"Mission Control\");\n title.setFont(new Font(\"Arial\", 22));\n title.setTextFill(Color.WHITE);\n\n GridPane contentGrid = new GridPane();\n // Only need one row as content will fill the entire vertical space\n addPercentRows(contentGrid, 100);\n\n // Need three columns, 1/6 column for nav, 2/3 for main content, 1/6 for warnings\n double sidePanelPercent = (1d / 6d) * 100d;\n double centerPanelPercent = (2d / 3d) * 100d;\n addPercentColumns(contentGrid, sidePanelPercent, centerPanelPercent, sidePanelPercent);\n\n\n addNodeToGrid(title, root, 0, 0, Pos.CENTER, Colours.PRIMARY_COLOUR, Insets.EMPTY);\n // NOTE:: This assumes that it is the only child added to root by this point to set ID.\n // If this is changed DynamicGuiTests will break.\n root.getChildren().get(0).setId(\"pnBanner\");\n\n addNodeToGrid(contentGrid, root, 1, 0);\n\n setupCenterPanel(contentGrid);\n setupRightHandSidePanel(contentGrid);\n setupLeftHandSidePanel(contentGrid);\n\n // Assert they are created - mainly to bypass Spot bugs issues.\n assert this.navigationView != null;\n assert this.graphView != null;\n assert this.informationView != null;\n }", "@Override\n protected void drawGrid(Graphics2D g2, int startPos, int rightEdgePos, int bottomEdgePos, int start,\n int nrows1, int ncols1, int gridOffset) {}", "public Regras()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1100, 457, 1); \n prepare();\n if(MenuPrincipal.mundo == 1) //se o mundo anterior tiver sido MenuPrincipal\n som1 = MenuPrincipal.som2; //a música ficar com a mesma opção do mundo Menu Principal (a tocar ou sem som)}\n else if(MenuPrincipal.mundo == 3) //se o mundo anterior tiver sido MundoJogo\n som1 = MundoJogo.som3; //a música ficar com a mesma opção do mundo MundoJogo (a tocar ou sem som)\n imgsom2 = MenuPrincipal.imgsom1; //atualiza a imagem da coluna para ser igual à do mundo MenuPrincipal (mute/unmute)\n MenuPrincipal.mundo = 2; //atualizar 'mundo' para indicar que o mundo atual é o mundo Regras\n }", "public void dibujar(Graphics g){\n\t\tg2.setColor(Color.WHITE);\n\t\tfor ( int x =0; x < game.getAmountPersonajes() ;x++){\n\t\t\tRectangle2D.Double personaje =game.getPersonaje(x).getshape(); \n\t\t\t\n\t\t\ttemporal = game.getPersonaje(x).getImage().getImage();\n\t\t\tg.drawImage(temporal, (int)personaje.getX(), (int)(personaje.getY()), this);\n\t\t}\n\t\tfor ( int x =0; x < game.getAmountObjetivos() ;x++){\n\t\t\tRectangle2D.Double objetivo =game.getObjetivo(x).getShape(); \n\t\t\ttemporal = game.getObjetivo(x).getImage().getImage();\n\t\t\tg.drawImage(temporal, (int)objetivo.getX(), (int)(objetivo.getY()), this);\n\t\t}\n\t\tif (game.getCurrentSorpresa()!=null){\n\t\t\tRectangle2D.Double s =game.getCurrentSorpresa().getShape(); \n\t\t\ttemporal = game.getCurrentSorpresa().getImage().getImage();\n\t\t\tg.drawImage(temporal, (int)s.getX(), (int)(s.getY()), this);\t\t\t\n\t\t}\n\t\tif(game.getBloque().isActive() ){\n\t\t\tRectangle2D.Double s =game.getBloque().getShape(); \n\t\t\ttemporal = game.getBloque().getImage().getImage();\n\t\t\tg.drawImage(temporal, (int)s.getX(), (int)(s.getY()), this);\n\t\t}\n\t\t\n\t\tg2.setColor(new Color(100,221,23));\n\t\tg2.fill(game.getShapePelota(0));\n\t\n\t\n\t}", "public GridPane getGrid() {\n return grid;\n }", "public static void loadGrid(Window owner) {\n File file = GridLoaderSaver.fileChooser.showOpenDialog(owner);\n\n if (file != null) {\n String[] game = null;\n\n try (BufferedReader bufferedReader = Files.newBufferedReader(file.toPath())) {\n game = bufferedReader.readLine().split(\" \");\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n if (game != null) {\n int rows = Integer.parseInt(game[0]);\n int columns = Integer.parseInt(game[1]);\n int width = Integer.parseInt(game[2]);\n int height = Integer.parseInt(game[3]);\n int maxNumberOfStarts = Integer.parseInt(game[4]);\n int maxNumberOfEnds = Integer.parseInt(game[5]);\n int ends = 0;\n\n MouseGestures mouseGestures = new MouseGestures(game[6].equals(\"true\"));\n HashSet<Cell> starts = new HashSet<>();\n\n Grid grid = new Grid(starts, rows, columns, width, height, ends, maxNumberOfStarts, maxNumberOfEnds, mouseGestures, file);\n\n String[] stringCells = game[7].split(\"\");\n\n for (int i = 0, r = 0; r < rows; r++) {\n for (int c = 0; c < columns; c++, i++) {\n Point type = Point.values()[Integer.parseInt(stringCells[i])];\n\n grid.getCells()[r][c].setPoint(type);\n\n if (type != Point.EMPTY)\n grid.getCells()[r][c].getStyleClass().add(type.name().toLowerCase() + \"-cell\");\n\n if (type == Point.END)\n ends++;\n\n else if (type == Point.START)\n starts.add(grid.getCells()[r][c]);\n }\n }\n\n grid.setEnds(ends);\n\n Tab tab = new Tab(file.getName(), grid);\n\n ((TabPane) owner.getScene().getRoot()).getTabs().add(tab);\n\n\n }\n }\n }", "@Override\n public void start(Stage teater){\n GridPane brettGP = new GridPane();\n boolean hvittFelt = false;\n for(int y = 0; y < 10; y ++){\n for(int x = 0; x < 10; x++){\n if(x == 0 || x == 9){\n if(y == 0 || y == 9){\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE / 2,\n Settinger.RUTE_BREDDE / 2);\n r.setFill(Color.DARKGREY);\n brettGP.add(r, x, y);\n }\n else{\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE / 2,\n Settinger.RUTE_BREDDE);\n r.setFill(Color.DARKGREY);\n StackPane stack = new StackPane();\n stack.getChildren().add(r);\n Text tekst = new Text(Integer.toString(9 - y));\n tekst.setFont(new Font(12));\n tekst.setTextAlignment(TextAlignment.CENTER);\n stack.getChildren().add(tekst);\n brettGP.add(stack, x, y);\n }\n }\n else{\n if(y == 0 || y == 9){\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE / 2);\n r.setFill(Color.DARKGREY);\n StackPane stack = new StackPane();\n stack.getChildren().add(r);\n Text tekst = new Text(Character.toString((char)(x + 64)));\n tekst.setFont(new Font(12));\n tekst.setTextAlignment(TextAlignment.CENTER);\n stack.getChildren().add(tekst);\n brettGP.add(stack, x, y);\n }\n else{\n Rectangle varselFargeR = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE);\n varselFargeR.setFill(Color.RED);\n Rectangle r = new Rectangle(Settinger.RUTE_BREDDE,\n Settinger.RUTE_BREDDE);\n if(hvittFelt){ r.setFill(Color.WHITE); }\n else{ r.setFill(Color.GREY); }\n StackPane stack = new StackPane();\n feltene[x - 1][8 - y] = stack;\n stack.getChildren().add(varselFargeR);\n stack.getChildren().add(r);\n brettGP.add(stack, x, y);\n hvittFelt = !hvittFelt;\n }\n\n }\n }\n hvittFelt = !hvittFelt;\n }\n\n statusFelt = new Text(\"Tekstfeltet\");\n statusFelt.setWrappingWidth(Settinger.BRETT_BREDDE + Settinger.RUTE_BREDDE);\n //statusFelt.setY(Settinger.BRETT_BREDDE + 100);\n statusFelt.setFont(new Font(16));\n statusFelt.setTextAlignment(TextAlignment.CENTER);\n\n hoyreTekstFelt = new Text(\"Høyre\");\n hoyreTekstFelt.setWrappingWidth(Settinger.RUTE_BREDDE * 12);\n hoyreTekstFelt.setFont(new Font(10));\n\n\n\n\n Pane hovedKulisse = new Pane();\n GridPane layoutGP = new GridPane();\n layoutGP.add(brettGP, 0, 0);\n layoutGP.add(hoyreTekstFelt, 1, 0);\n layoutGP.add(statusFelt, 0, 1);\n\n hovedKulisse.getChildren().add(layoutGP);\n\n\n Scene scene = new Scene(hovedKulisse);\n teater.setScene(scene);\n teater.setTitle(\"Java-sjakk\");\n teater.show();\n\n // STARTER OPP SJAKK LOGIKK:\n administrator = new Administrator(this);\n partiet = administrator.hentParti();\n stilling = administrator.hentStilling();\n hoyreTekstFelt.setText(stilling.toString());\n //hoyreTekstFelt.setText(stilling.hentEvalStreng());\n // OPPSETT FERDIG, STARTER AUTOSJAKK:\n if(partiet.hentAutomatisk(0)){ autoTrekk(); }\n\n }", "protected void paintComponent(Graphics g) {\r\n\t\tsuper.paintComponent(g);\r\n\r\n\t\t\r\n\t\tInsets ins = this.getInsets();\r\n\t\tint varX = ins.left+5;\r\n\t\tint varY = ins.top+5;\r\n\r\n\t\tif ( pozicijaIgraca.equals(\"gore\")){\t\t\t\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()+5;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 120, varY + 100);\r\n\t\t} else {\r\n\t\t\tfor(Card karta : karte){\r\n\t\t\t\tkarta.moveTo(varX, varY);\r\n\t\t\t\tkarta.draw(g, this);\r\n\t\t\t\tvarX = varX + karta.getWidth()/2;\r\n\t\t\t\tvarY = varY + karta.getHeight()/10;\r\n\t\t\t}\r\n\t\t\tg.setColor(Color.RED);\r\n\t\t\tg.drawString(imeIgraca, varX - 100 , varY + 90);\r\n\t\t}\r\n\t\t\r\n\r\n\t}", "private void makeGrid(JLabel moves, JLabel remainingBombs) {\r\n this.grid = new Tile[gridSize][gridSize]; \r\n for (int r = 0; r < gridSize; r++) {\r\n for (int c = 0; c < gridSize; c++) {\r\n if (solution[r][c] == 1) {\r\n grid[r][c] = new Tile(r, c, true);\r\n } else {\r\n grid[r][c] = new Tile(r, c, false);\r\n }\r\n final Tile t = grid[r][c];\r\n t.repaint();\r\n handleClicksAndMoves(t, moves, remainingBombs); \r\n }\r\n }\r\n }", "public RandomGrid() {\n random = new Random(System.currentTimeMillis());\n /*\n indexes = new LinkedList<>();\n for (int i = 0; i < 81; i++) {\n indexes.add(i);\n }\n numbers = new ArrayList<>(9);\n for (int i = 1; i <= 9; i++) {\n numbers.add(i);\n }\n Collections.shuffle(indexes, random);\n */\n grid = new int[9][9];\n for (int i = 0; i < 9; i++) {\n for (int j = 0; j < 9; j++) {\n grid[i][j] = 0;\n }\n }\n subGrid = new SubGrid[3][3];\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n subGrid[i][j] = new SubGrid();\n }\n }\n }", "private Grid(Grid oldGrid) {\n\n grid = new String[Main.Y_SIZE][Main.X_SIZE][Main.Z_SIZE];\n this.gateDatabase = oldGrid.gateDatabase;\n this.netDatabase = oldGrid.netDatabase;\n\n for (int i = 0; i < Main.Z_SIZE; i++) {\n for (int k = 0; k < Main.X_SIZE; k++) {\n for (int n = 0; n < Main.Y_SIZE; n++) {\n grid[n][k][i] = oldGrid.grid[n][k][i];\n }\n }\n }\n }", "public Grid() { //Constructs a new grid and fills it with Blank game objects.\r\n\t\tthis.grid = new GameObject[10][10];\r\n\t\tthis.aliveShips = new Ships[4];\r\n\t\tfor (int i = 0; i < this.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.grid[i].length; j++) {\r\n\t\t\t\tthis.grid[i][j] = new Blank(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "GridPane getRootGridPaneRecherche();", "PlateauGauffre(int largeur, int hauteur)\n {\n this(new Boolean[largeur][hauteur]);\n for (int x = 0; x < getLargeur(); x++)\n {\n for (int y = 0; y < getHauteur(); y++)\n {\n setAt(x, y, true);\n }\n }\n }", "public void setGrid(GridAlg grid) {\n\t\tthis.grid = grid;\n\t}", "private TilePane createGrid() {\n\t\tTilePane board = new TilePane();\n\t\tboard.setPrefRows(9);\n\t\tboard.setPrefColumns(9);\n\t\tboard.setPadding(new Insets(3,3,3,3));\n\t\tboard.setHgap(3); //Horisontal gap between tiles\n\t\tboard.setVgap(3); //Vertical gap between tiles\n\t\t\n\t\t//Creates and colors tiles\n\t\tfor(int i = 0; i < 9; i++){\n\t\t\tfor(int k = 0; k < 9; k++){\n\t\t\t\tLetterTextField text = new LetterTextField();\n\t\t\t\ttext.setPrefColumnCount(1);\n\t\t\t\t\n\t\t\t\tif(!(i/3 == 1 || k/3 == 1) || (i/3 == 1 && k/3 == 1)){\n\t\t\t\t\ttext.setStyle(\"-fx-background-color: #daa520;\");\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\tfield[i][k] = text;\n\t\t\t\tboard.getChildren().add(text);\n\t\t\t}\n\t\t}\t\t\n\t\treturn board;\n\t}", "public void updateMapGrid() {\n char[][] map = controller.getPopulatedMap();\n\t if (mapGrid == null) {\n mapGrid = new MapGrid(map.length, map[0].length, ICON_SIZE);\n }\n mapGrid.insertCharMap(map);\n }", "Gruppo getGruppo();", "public void addPanelForResult(GridPane gridPane) {\n\t\tint nbrCols = gridPane.getColumnCount(); \n\t\tint nbrRows = gridPane.getRowCount();\n\t\tfor(int i =0; i<nbrRows; i++) {\n\t\t\tPane pane = new Pane(); \n\t\t\tpane.setStyle(\"-fx-background-color: #FFFFFF;\"); \n\n\t\t\tLabel label = new Label(\"C\"+(i+1)); \n\t\t\tgridPane.add(pane,0, i);\n\t\t\tgridPane.add(label, 0,i);\n\t\t\tGridPane.setHalignment(label, HPos.CENTER);\n\n\t\t}\n\n\t\t// Ajout d'un panel aux autres cellules \n\t\tfor(int i=1; i<=nbrCols; i++) {\n\t\t\tfor(int j=0; j<=nbrRows; j++) {\n\t\t\t\tPane pane = new Pane(); \n\t\t\t\tpane.setStyle(\"-fx-border-color: black; -fx-border-width: 1 1 0 0;\");\n\n\t\t\t\tgridPane.add(pane, i, j);\n\t\t\t}\n\t\t}\n\t}", "public GridPane gpCenter() {\r\n\r\n //Used to see lines for GridPane rows/colums for troubleshooting\r\n //gpSorts.setGridLinesVisible(true);\r\n GridPane gpEntries = new GridPane(); //Create GridPane instance\r\n\r\n //SetId\r\n gpEntries.setId(\"gp\");\r\n\r\n //Set the gaps and padding\r\n gpEntries.setHgap(5);\r\n gpEntries.setVgap(5);\r\n\r\n /**\r\n * Note the following when adding to GridPane\r\n * GridPane.setConstraints(node, columnIndex, rowIndex, columnspan,\r\n * rowspan); gpSorts.add(node, columnIndex, rowIndex);\r\n *\r\n * Add Label and TextField for name and age to top of\r\n * bpCenterLeft(BorderPane)\r\n */\r\n gpEntries.add(lblUserName, 0, 0);\r\n GridPane.setConstraints(lblUserName, 0, 0, 1, 1);\r\n\r\n gpEntries.add(txtUserName, 1, 0);\r\n GridPane.setConstraints(txtUserName, 1, 0, 1, 1);\r\n\r\n gpEntries.add(lblEmail, 0, 1);\r\n GridPane.setConstraints(lblEmail, 0, 1, 1, 1);\r\n\r\n gpEntries.add(txtEmail, 1, 1);\r\n GridPane.setConstraints(txtEmail, 1, 1, 1, 1);\r\n\r\n gpEntries.add(lblFirstName, 0, 2);\r\n GridPane.setConstraints(lblFirstName, 0, 2, 1, 1);\r\n\r\n gpEntries.add(txtFirstName, 1, 2);\r\n GridPane.setConstraints(txtFirstName, 1, 2, 1, 1);\r\n\r\n gpEntries.add(lblLastName, 0, 3);\r\n GridPane.setConstraints(lblLastName, 0, 3, 1, 1);\r\n\r\n gpEntries.add(txtLastName, 1, 3);\r\n GridPane.setConstraints(txtLastName, 1, 3, 1, 1);\r\n\r\n gpEntries.add(lblPassword, 0, 4);\r\n GridPane.setConstraints(lblPassword, 0, 4, 1, 1);\r\n\r\n gpEntries.add(txtPassword, 1, 4);\r\n GridPane.setConstraints(txtPassword, 1, 4, 1, 1);\r\n\r\n //Set last label to good width for all labels in GridPane (0, #)\r\n lblPassword.setPrefWidth(75);\r\n\r\n return gpEntries;\r\n\r\n }", "public UTL_JFrame_VentanaGraficas() {\n \n initComponents();\n }", "@FXML\r\n private void crearTriangulo(ActionEvent event) {\n \r\n double x[] = {100, 150, 50};\r\n double y[] = {100, 210, 210, 50};\r\n \r\n g.setFill(Color.GOLD);\r\n g.fillPolygon(x, y, 3);\r\n }", "private Pane getGridPane ()\r\n {\r\n GridPane gridPane = new GridPane();\r\n \r\n int i = 0;\r\n for(Button b : this.buttons)\r\n {\r\n gridPane.add( b, i*(i+(int)b.getWidth()), 0);\r\n i++;\r\n }\r\n \r\n return gridPane;\r\n }", "public GridAlg getGrid() {\n\t\treturn grid;\n\t}", "private void dibujarReina(Graphics g) {\n\t\tint x = (fila - 1) * 50 + 10;\r\n\t\tint y = (columna - 1) * 50 + 40;\r\n\t\tg.drawLine(x + 5, y + 45, x + 45, y + 45);\r\n\t\tg.drawLine(x + 5, y + 45, x + 5, y + 5);\r\n\t\tg.drawLine(x + 45, y + 45, x + 45, y + 5);\r\n\t\tg.drawLine(x + 5, y + 35, x + 45, y + 35);\r\n\t\tg.drawLine(x + 5, y + 5, x + 15, y + 20);\r\n\t\tg.drawLine(x + 15, y + 20, x + 25, y + 5);\r\n\t\tg.drawLine(x + 25, y + 5, x + 35, y + 20);\r\n\t\tg.drawLine(x + 35, y + 20, x + 45, y + 5);\r\n\t\tg.drawOval(x + 20, y + 20, 10, 10);\r\n\t}" ]
[ "0.6388905", "0.6367315", "0.63580394", "0.63109016", "0.6111077", "0.6091805", "0.60735047", "0.6047896", "0.59655267", "0.594962", "0.5902637", "0.588504", "0.5874385", "0.5855119", "0.5851772", "0.5838308", "0.5833197", "0.583216", "0.5790368", "0.5783787", "0.57532996", "0.5725178", "0.5723326", "0.57143664", "0.57128", "0.5707716", "0.56934345", "0.5686615", "0.5671084", "0.5664247", "0.566306", "0.5632242", "0.5620104", "0.56054264", "0.56025195", "0.56009156", "0.5599173", "0.5591509", "0.5583498", "0.5579599", "0.5572215", "0.55642676", "0.5561535", "0.5547003", "0.5539596", "0.55333287", "0.55231774", "0.5520996", "0.55198544", "0.5515789", "0.55132306", "0.54941213", "0.5491921", "0.54912215", "0.5483378", "0.54785544", "0.54773986", "0.54678434", "0.54576117", "0.5453138", "0.5452013", "0.5447798", "0.5440431", "0.54356235", "0.5432955", "0.54255986", "0.54252934", "0.5424171", "0.5420859", "0.54150367", "0.5409916", "0.5406415", "0.5401395", "0.54001725", "0.5390668", "0.5388726", "0.5382818", "0.53823125", "0.5380588", "0.53805023", "0.53796816", "0.5376834", "0.53753245", "0.53741795", "0.53712606", "0.53700906", "0.535752", "0.5354435", "0.5349554", "0.5349016", "0.53488934", "0.5340182", "0.53310376", "0.53106225", "0.530254", "0.52989024", "0.529754", "0.5296209", "0.5294725", "0.5291351" ]
0.7055153
0
TODO Autogenerated method stub
public static void main(String[] args) { System.out.println(bb("{{}")); System.out.println(bb("[[]")); System.out.println(bb("({}[])")); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Make available the underlying (wrapped) Axis's Call object for things that are not supported by AxisCall class, such as registering serializers.
public Call getCall() { return call; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@JsonTypeInfo(use = JsonTypeInfo.Id.NAME, include = As.PROPERTY, property = \"__class\", defaultImpl = com.zetapush.core.visio.Call$Impl.class)\n@JsonSubTypes({\n\t@Type(value = com.zetapush.core.visio.Call$Impl.class, name = \"com.zetapush.core.visio.Call\") })\npublic interface Call {\n\n\t/** Getter for field id\n\t * ID of the call\n\t */\n\tString getId();\n\n\t/** Setter for field id */\n\tvoid setId(String id);\n\n\t/** Getter for field state\n\t * State of the call\n\t */\n\tString getState();\n\n\t/** Setter for field state */\n\tvoid setState(String state);\n\n\t/** Getter for field caller\n\t * userKey of the user that create this call\n\t */\n\tString getCaller();\n\n\t/** Setter for field caller */\n\tvoid setCaller(String caller);\n\n\t/** Getter for field called\n\t * ID of the group that receive this call\n\t */\n\tString getCalled();\n\n\t/** Setter for field called */\n\tvoid setCalled(String called);\n\n\t/** Getter for field context\n\t * Generic call context\n\t */\n\tMap<String, Object> getContext();\n\n\t/** Setter for field context */\n\tvoid setContext(Map<String, Object> context);\n}", "public Call createCall() throws ServiceException {\n\t\treturn null;\n\t}", "@Override\n public CallContext getCallContext() {\n return this.context;\n }", "public Call getCurrentCall();", "public Call createCall(QName arg0) throws ServiceException {\n\t\treturn null;\n\t}", "public void SetInboundCall(XMSCall in){\n FunctionLogger logger=new FunctionLogger(\"SetInboundCall\",this,myLogger);\n logger.args(in);\n myInboundCall = in;\n myInboundCall.EnableAllEvents(this);\n }", "public Call createCall(QName arg0, QName arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public Call createCall(QName arg0, String arg1) throws ServiceException {\n\t\treturn null;\n\t}", "public void makeCall() {\n\n }", "@Override\n public boolean onCall() {\n return true;\n }", "public void SetOutboundCall(XMSCall out){\n FunctionLogger logger=new FunctionLogger(\"SetOutboundCall\",this,myLogger);\n logger.args(out);\n myOutboundCall = out;\n myOutboundCall.EnableAllEvents(this);\n }", "public void handleCall(Call c) {\n\t}", "@Deprecated\n public void transferCall(Call call, String referTo);", "public void setCallAlias(String callAlias) {\n\n\t}", "protected abstract void beforeCall();", "@Deprecated\n public void acceptCall(Call call);", "public void setCallReturn(Object obj) {\n\n\t}", "com.google.ads.googleads.v6.resources.CallView getCallView();", "private CallResponse() {\n initFields();\n }", "public abstract void retrain(Call serviceCall, Response serviceResponse, CallContext messageContext);", "public void setCallName(String callName) {\n\n\t}", "public boolean inCall();", "public CallOrigin callOrigin() {\n return callOrigin;\n }", "@Deprecated\n public void deferCallUpdate(Call call);", "public Set getCalls() { return calls; }", "public void dispatchCall(Call call) {\n\t\t/*\n\t\t * Try to route call to an employee with minimal rank\n\t\t */\n\t\tEmployee emp = getHandlerForCall(call);\n\t\tif(emp != null) {\n\t\t\temp.receiveCall(call);\n\t\t\tcall.setHandler(emp);\n\t\t}else {\n\t\t\t/*\n\t\t\t * Place the call into corresponding call\n\t\t\t * queue according to it's rank\n\t\t\t */\n\t\t\tcall.reply(\"Please wait for free employee to reply\");\n\t\t\tcallQueues.get(call.getRank().getValue()).add(call);\n\t\t}\n\t}", "private InCallPresenter() {\n }", "public AppCall createBaseAppCall() {\r\n return new AppCall(getRequestCode());\r\n }", "public void visit(Call call) {}", "public void setCallLeg(String callLeg) {\n this.callLeg = callLeg;\n }", "@Override\n\tpublic void call() {\n\t\t\n\t}", "public interface CallService {\n Call call(String source, String destination);\n Call get(Long id);\n Call update(Call call);\n}", "@Override\n public void setCallContext(CallContext context) {\n this.context = context;\n //repository map depends on the context\n this.eloCmisRepositoryMap = EloCmisRepository.createEloCmisRepositoryMap(this, (ExtensionsData) null);\n }", "com.google.ads.googleads.v6.resources.CallViewOrBuilder getCallViewOrBuilder();", "public CallInfo() {\n\t}", "protected void invokeInternal(XTeeMessage<Document> request, XTeeMessage<Element> response) throws Exception {\n throw new IllegalStateException(\"You must override either the 'invokeInternal' or the 'invokeInternalEx' method!\");\n }", "public List<Call> addCall(Call call, String cid) throws CustomerNotFoundException {\r\n \treturn null;\r\n }", "public CallService() {\n super(\"My\");\n }", "public Object getCallInput() {\n\t\treturn null;\n\t}", "@Override\n\tpublic void receiveCall(Call call) {\n\t\tthis.call = call;\n\t\tcall.attend();\n\t}", "@Override\n protected CallStatusCode placeCallInternal(Intent intent) {\n if (DBG) log(\"placeCallInternal()... intent = \" + intent);\n int sub = intent.getIntExtra(SUBSCRIPTION_KEY, mApp.getVoiceSubscription());\n\n PhoneUtils.setActiveSubscription(sub);\n return super.placeCallInternal(intent);\n }", "@NonNull\n @MainThread\n protected abstract LiveData<ApiResponse<RequestType>> createCall();", "public T caseImplicitOperationCallCS(ImplicitOperationCallCS object) {\r\n return null;\r\n }", "public interface OnCallingListener {\n void onCallEnd();\n}", "OperationCallExp createOperationCallExp();", "@Override\n public void onCallInformationRequestRequest(CallInformationRequestRequest arg0) {\n\n }", "public CallParams createCallParams(Call call);", "public void addPendingCallToProxy(IBinder iBinder) {\n HiLog.info(LOG_LABEL, \"addPendingCallToProxy\", new Object[0]);\n this.mRemote = iBinder;\n processLiveCallWhenServiceConnected();\n CallAudioState callAudioState = this.mPendingCallAudioState;\n if (callAudioState != null) {\n HiLog.info(LOG_LABEL, \"addPendingCallToProxy:onCallAudioStateChanged %{public}s\", new Object[]{callAudioState.toString()});\n onCallAudioStateChanged(this.mPendingCallAudioState);\n this.mPendingCallAudioState = null;\n }\n Boolean bool = this.mPendingCanAddCall;\n if (bool != null) {\n HiLog.info(LOG_LABEL, \"addPendingCallToProxy:onCanAddCallChanged %{public}s\", new Object[]{bool.toString()});\n onCanAddCallChanged(this.mPendingCanAddCall.booleanValue());\n this.mPendingCanAddCall = null;\n }\n }", "public void processCall() {\n\t\tif (call == null)\n\t\t\treturn;\n\n\t\tString msg = new StringBuffer(\"Call processed on: \").append(new Date()).append(\" by: \")\n\t\t\t\t.append(CallCenterWorker.this.name).append(\" call length: \")\n\t\t\t\t.append(CallCenterWorker.this.call.getLenght()).toString();\n\t\tSystem.out.println(msg);\n\t\tCallCenterWorker.this.call = null;\n\t}", "@Override\n public Collection<PhoneCall> getPhoneCalls() {\n return this.calls;\n }", "public static com.autodesk.ws.avro.Call.Builder newBuilder(com.autodesk.ws.avro.Call other) {\n return new com.autodesk.ws.avro.Call.Builder(other);\n }", "public T caseOperationCallBaseExpCS(OperationCallBaseExpCS object) {\r\n return null;\r\n }", "private static void addCall(Call call, ArrayList<Call> calls)\n {\n synchronized(calls)\n {\n if(call.getCallGroup() == null)\n calls.add(call);\n }\n }", "public T caseCallDef(CallDef object) {\n\t\treturn null;\n\t}", "public abstract void call();", "public T caseImplicitPropertyCallCS(ImplicitPropertyCallCS object) {\r\n return null;\r\n }", "public void setStuckCall(){\n this.stuckCall = true;\n }", "private Builder(com.autodesk.ws.avro.Call other) {\n super(com.autodesk.ws.avro.Call.SCHEMA$);\n if (isValidValue(fields()[0], other.responding_product_id)) {\n this.responding_product_id = (java.lang.CharSequence) data().deepCopy(fields()[0].schema(), other.responding_product_id);\n fieldSetFlags()[0] = true;\n }\n if (isValidValue(fields()[1], other.requesting_product_id)) {\n this.requesting_product_id = (java.lang.CharSequence) data().deepCopy(fields()[1].schema(), other.requesting_product_id);\n fieldSetFlags()[1] = true;\n }\n if (isValidValue(fields()[2], other.module)) {\n this.module = (java.lang.CharSequence) data().deepCopy(fields()[2].schema(), other.module);\n fieldSetFlags()[2] = true;\n }\n if (isValidValue(fields()[3], other.operation)) {\n this.operation = (java.lang.CharSequence) data().deepCopy(fields()[3].schema(), other.operation);\n fieldSetFlags()[3] = true;\n }\n if (isValidValue(fields()[4], other.suboperation)) {\n this.suboperation = (java.lang.CharSequence) data().deepCopy(fields()[4].schema(), other.suboperation);\n fieldSetFlags()[4] = true;\n }\n if (isValidValue(fields()[5], other.target_object_uri)) {\n this.target_object_uri = (java.lang.CharSequence) data().deepCopy(fields()[5].schema(), other.target_object_uri);\n fieldSetFlags()[5] = true;\n }\n if (isValidValue(fields()[6], other.object_size)) {\n this.object_size = (java.lang.Long) data().deepCopy(fields()[6].schema(), other.object_size);\n fieldSetFlags()[6] = true;\n }\n if (isValidValue(fields()[7], other.execution_time)) {\n this.execution_time = (java.lang.Integer) data().deepCopy(fields()[7].schema(), other.execution_time);\n fieldSetFlags()[7] = true;\n }\n if (isValidValue(fields()[8], other.status)) {\n this.status = (java.lang.CharSequence) data().deepCopy(fields()[8].schema(), other.status);\n fieldSetFlags()[8] = true;\n }\n }", "private void ConnectCalls(){\n FunctionLogger logger=new FunctionLogger(\"SetOutboundCallState\",this,myLogger);\n \n //I think if we want to support the Transaction logging we need to throw them in the conf here\n // for now lets just join them\n if(PlayRingbackFlag){\n myInboundCall.Stop();\n } \n SetInboundCallState(InboundCallStates.JOINED);\n SetOutboundCallState(OutboundCallStates.JOINED);\n SetGatewayState(GatewayStates.CONNECTED);\n myInboundCall.Join(myOutboundCall);\n \n }", "public void setCanCallService(boolean canCallService) {\n //log.trace(\"setCanCallService: {}\", canCallService);\n this.canCallService = canCallService;\n }", "void onResponse(Call<T> call, T response);", "public String getCallLeg() {\n return this.callLeg;\n }", "@Override\n public void onCallInformationReportRequest(CallInformationReportRequest arg0) {\n\n }", "public T casePropertyCallBaseExpCS(PropertyCallBaseExpCS object) {\r\n return null;\r\n }", "public void onCallAdded(android.telecom.Call call) {\n // Since a call has been added we are no longer waiting for Telecom to send us a\n // call.\n setBoundAndWaitingForOutgoingCall(false, null);\n call.registerCallback(mCallCallback);\n }", "final protected void callActivated( String callId ) {\n callActivated( getNativeObject(), callId );\n }", "boolean hasCallView();", "public void setProcessCallProperties(ProcessCallProperties processCallProperties)\n {\n this.processCallProperties = processCallProperties;\n }", "@Override\n public Object invoke(Object proxy, Method method, Object[] args)\n throws Throwable {\n if (method.getDeclaringClass() == Object.class) {\n return method.invoke(this, args);\n }\n ServiceMethod<Object, Object> serviceMethod =\n (ServiceMethod<Object, Object>) loadServiceMethod(method);\n ServiceCall<Object> serviceCall = new ServiceCall<>(serviceMethod, args);\n return serviceMethod.adapt(serviceCall, args);\n }", "@Override\n\tpublic void assemble(final OperationCall operationCall) {\n\t\tfinal DeployedOperation caller = operationCall.getParent() != null ? operationCall.getParent().getOperation() : null; // NOCS (declarative)\n\t\tfinal DeployedOperation callee = operationCall.getOperation();\n\n\t\tthis.addExecution(caller, callee);\n\t}", "public void prepareCallObject(){\n\n SipAudioCall.Listener listener = new SipAudioCall.Listener(){\n\n\n @Override\n public void onCallEstablished(SipAudioCall call) {\n// call.startAudio();\n// call.setSpeakerMode(true);\n Log.i(\"sip-->\", \"onCallEstablished\");\n\n\n if (mTotalTime == 0L){\n mPointTime = System.currentTimeMillis();\n mHandler.removeCallbacks(mUpdateTimeTask);\n mHandler.postDelayed(mUpdateTimeTask, 100);\n }\n }\n\n\n @Override\n public void onCallEnded(SipAudioCall call) {\n\n mHandler.removeCallbacks(mUpdateTimeTask);\n finish();\n\n// endCall();\n\n }\n\n };\n try {\n call = manager.takeAudioCall(IncomingCallService_new.incomingIntent, listener);\n\n sipNameIncome = call.getPeerProfile().getUserName();\n// updateStatus(\"Odebrano od \" + sipNameIncome);\n caller_name.setText(sipNameIncome);\n } catch (SipException e) {\n e.printStackTrace();\n }\n\n\n }", "public static com.autodesk.ws.avro.Call.Builder newBuilder() {\n return new com.autodesk.ws.avro.Call.Builder();\n }", "private CallResponse(com.google.protobuf.GeneratedMessageV3.Builder<?> builder) {\n super(builder);\n }", "public Call[] getCalls();", "public interface ICallBAck {\n void getCallback();\n }", "public interface AdditionalOrderInforCaller {\n\t/*\n\t * Command define from Order Confirmation API Guide\n\t * JSON and XML format\n\t */\n\t@Headers({\"Accept: application/json\",\"Content-Type: application/json\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestJSON(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\t\n\t@Headers({\"Accept: application/xml\",\"Content-Type: application/xml\"})\n\t@RequestLine(\"POST /ordermgmt/order/addorderinfo?sellerid={sellerid}\")\n\tGetAdditionalOrderInformationResponse sendAdditionalOrderInforRequestXML(@Param(\"sellerid\") String sellerID, GetAdditionalOrderInformationRequest body);\n\n\t// Implement default method of interface class that according to Variables.MediaType to run at JSON or XML request.\n\tdefault GetAdditionalOrderInformationResponse sendAdditionalOrderInforRequest(GetAdditionalOrderInformationRequest body) {\n\t\tswitch(Variables.MediaType) {\n\t\tcase JSON:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestJSON(Content.SellerID, body);\n\t\t\t\n\t\tcase XML:\t\t\t\n\t\t\treturn sendAdditionalOrderInforRequestXML(Content.SellerID, body);\t\n\t\t\t\n\t\tdefault:\n\t\t\tthrow new RuntimeException(\"Never Happened!\");\n\t\t}\n\t\t\t\t\n\t}\n\t\n\tstatic AdditionalOrderInforCaller buildJSON() {\n\t\tVariables.MediaType = MEDIA_TYPE.JSON;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.jsonBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\n\tstatic AdditionalOrderInforCaller buildXML() {\n\t\tVariables.MediaType = MEDIA_TYPE.XML;\n\t\t\n\t\treturn new CallerFactory<AdditionalOrderInforCaller>()\n\t\t\t.xmlBuild(AdditionalOrderInforCaller.class, Variables.LogLevel, Variables.Retryer, OrderClient.genClient());\t\t\n\t}\n\t\n}", "public Object getCallOutput() {\n\t\treturn null;\n\t}", "public Response internalInvocation(HttpRequest request, HttpResponse response, Object entity)\n {\n ResteasyProviderFactory.addContextDataLevel();\n boolean pushedBody = false;\n try\n {\n MessageBodyParameterInjector.pushBody(entity);\n pushedBody = true;\n ResourceInvoker invoker = getInvoker(request);\n if (invoker != null)\n {\n pushContextObjects(request, response);\n return getResponse(request, response, invoker);\n }\n \n // this should never happen, since getInvoker should throw an exception\n // if invoker is null\n return null;\n }\n finally\n {\n ResteasyProviderFactory.removeContextDataLevel();\n if (pushedBody)\n {\n MessageBodyParameterInjector.popBody();\n }\n }\n }", "@Deprecated\n public void updateCall(Call call, CallParams params);", "@SuppressWarnings(\"deprecation\")\n @Override\n public void onAttach(Activity activity) {\n super.onAttach(activity);\n callEvents = (MesiboVideoCallFragment.OnCallEvents) activity;\n }", "@Test\n public void getCalleeNeedsToBeImplemented(){\n PhoneCall call = new PhoneCall(\"503-449-7833\", \"345-876-3456\", \"01/01/2020\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCallee(), not(nullValue()));\n }", "public T caseOperationCallExpCS(OperationCallExpCS object) {\r\n return null;\r\n }", "public Object call() throws Exception {\n return this.call();\n }", "@Override\n public void onInitiateCallAttemptRequest(InitiateCallAttemptRequest initiateCallAttemptRequest) {\n\n }", "public interface PaintService {\n\n @GET(\"x858r\")\n Call<PaintContainer> getPaints();\n}", "private Call getCallToShow(CallList callList) {\n if (callList == null) {\n return null;\n }\n Call call = callList.getIncomingCall();\n if (call == null) {\n call = callList.getOutgoingCall();\n }\n if (call == null) {\n call = callList.getVideoUpgradeRequestCall();\n }\n if (call == null) {\n call = callList.getActiveOrBackgroundCall();\n }\n return call;\n }", "@Override\n\tpublic String onCall(String name, String user, String[] args) {\n\t\t// Does the object macro exist?\n\t\tObjectMacro macro = this.handlers.get(name);\n\t\tif (macro == null) {\n\t\t\treturn \"[ERR: Object Not Found]\";\n\t\t}\n\n\t\t// Call it!\n\t\treturn macro.call(this.parent, args);\n\t}", "public void setCallsManager(MXCallsManager callsManager) {\n checkIfAlive();\n mCallsManager = callsManager;\n }", "@Override\n\tvoid receiveCall() {\n\n\t}", "public boolean addCall(Call call) {\n if (call == null) {\n HiLog.error(LOG_LABEL, \"addCall fail, no call.\", new Object[0]);\n return false;\n } else if (this.mRemote == null) {\n HiLog.error(LOG_LABEL, \"addCall fail, no remote.\", new Object[0]);\n return false;\n } else {\n Parcel obtain = Parcel.obtain();\n Parcel obtain2 = Parcel.obtain();\n boolean z = true;\n try {\n obtain.writeInterfaceToken(DistributedCallUtils.DISTRIBUTED_CALL_ABILITY_DESCRIPTOR);\n this.mRemote.transact(2, CallSerializationUtils.writeCallToParcel(obtain, call, getIdByCall(call).intValue()), obtain2, 0);\n try {\n HiLog.info(LOG_LABEL, \"addCall: %{public}s\", new Object[]{call.toString()});\n } catch (RemoteException unused) {\n }\n } catch (RemoteException unused2) {\n z = false;\n try {\n HiLog.error(LOG_LABEL, \"addCall got RemoteException.\", new Object[0]);\n obtain2.recycle();\n obtain.recycle();\n return z;\n } catch (Throwable th) {\n obtain2.recycle();\n obtain.recycle();\n throw th;\n }\n }\n obtain2.recycle();\n obtain.recycle();\n return z;\n }\n }", "public interface RestCall {\n\n String query();\n\n String delete();\n\n String put();\n\n String get();\n\n String keys();\n\n}", "public CallMessage() {\n\t}", "public interface ApiInterface {\n @GET(\"/contacts\")\n Call<Details> getAllContacts();\n}", "@Override\n public void addPhoneCall(PhoneCall phoneCall) {\n this.calls.add(phoneCall);\n }", "public interface ApiCall {\n\n @GET(\"news_feeds\")\n Call<NewsFeedResponse> getNewsFeed(@Query(\"city\") String city, @Query(\"page\") String page);\n\n @GET(\"news\")\n Call<FeedContent> getSingleNewsArticle(@Query(\"city\") String city, @Query(\"news_id\") String newsId);\n\n @GET(\"get_latest_app\")\n Call<FeedHeaderContentResponse> getFeedHeaderResponse(@Query(\"app_name\") String appName, @Query(\"installed_version\") String installedVersion);\n\n @GET(\"jokes\")\n Call<List<JokesResponse>> getAllJokes(@Query(\"page\") String page);\n\n @GET(\"single_joke\")\n Call<SingleJokeResponse> getSingleJoke(@Query(\"joke_id\") String jokeId);\n}", "public void addCallToCallMap(Call call) {\n if (call != null && getIdByCall(call) == INVALID_KEY_SET_IN_MAP) {\n HiLog.info(LOG_LABEL, \"add call to map.\", new Object[0]);\n this.mCallMapById.put(Integer.valueOf(sCallId), call);\n sCallId++;\n }\n }", "public void outgoingCallCreated(CallEvent event)\n {\n CallShortcut.addCall(event.getSourceCall(), this.answeredCalls);\n }", "@Test\n public void getCallerNeedsToBeImplemented(){\n PhoneCall call = new PhoneCall(\"503-449-7833\", \"345-876-3456\", \"01/01/2020\", \"1:00 am\", \"01/01/2020\", \"1:00 am\");\n assertThat(call.getCaller(), not(nullValue()));\n }", "@Override\n public void onFailure(Call<Business> call, Throwable t) {\n\n }", "protected Connection createConnectionFigure() {\r\n\t\treturn new ImplicitCallFigure();\r\n\t}" ]
[ "0.59253246", "0.5766739", "0.57008386", "0.5640235", "0.562232", "0.5566224", "0.55222666", "0.542723", "0.5399689", "0.5349252", "0.53164214", "0.5286537", "0.5210446", "0.52055115", "0.52031934", "0.5184315", "0.5172471", "0.5134281", "0.5121376", "0.5117506", "0.5105168", "0.5104008", "0.5088631", "0.5078564", "0.50427514", "0.50379527", "0.50154763", "0.50119406", "0.49988583", "0.49941942", "0.49929506", "0.49921888", "0.49620733", "0.49093723", "0.48998782", "0.48864263", "0.48850733", "0.48813516", "0.4880395", "0.48757482", "0.48746926", "0.48502302", "0.48486587", "0.48293683", "0.48280028", "0.48271766", "0.4819918", "0.4808416", "0.47927344", "0.47924745", "0.47853175", "0.47851878", "0.47791415", "0.47677413", "0.47619656", "0.4758289", "0.4750099", "0.474515", "0.4723153", "0.47207952", "0.47201997", "0.47196627", "0.47179306", "0.47159123", "0.468785", "0.46801242", "0.46658263", "0.46609032", "0.46575838", "0.46550936", "0.46525827", "0.4638985", "0.46367756", "0.46346357", "0.46304962", "0.46291637", "0.46130082", "0.46099183", "0.4606641", "0.4605876", "0.46049923", "0.45988846", "0.4584287", "0.4581541", "0.45789716", "0.45783678", "0.4578005", "0.45667663", "0.45657003", "0.45644206", "0.45643798", "0.4559962", "0.45595813", "0.45567393", "0.45537668", "0.4552725", "0.45506796", "0.4546824", "0.45453805", "0.45438203" ]
0.5542447
6
Enable/disable profiling of calls.
public void setProfiling (boolean enable) { profiling = enable; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean profilerEnabled();", "void disableStatistics();", "void setStatisticsEnabled(boolean statsEnabled);", "public static void performanceCountDisable() { }", "public void enableCtxRecording();", "void enableSampledStatistics();", "public static void traceOff() {\r\n\t\ttraceOn = false;\r\n\r\n\t}", "public static void traceOn() {\r\n\t\ttraceOn = true;\r\n\t}", "public void beginProfiling(String name, boolean subProfile){\r\n\t\tif(subProfile){\r\n\t\t\tworld.profiler.startSection(name);\r\n\t\t}else{\r\n\t\t\tworld.profiler.endStartSection(name);\r\n\t\t}\r\n\t}", "void enable();", "public void pauseAllCalls();", "public void setProfile(Boolean profile)\n {\n this.profile = profile;\n }", "public void enable();", "private void optimiseEVProfile()\n\t{\n\t}", "public static void setTrace(boolean traceOn) {\r\n\t\ttrace = traceOn;\r\n\t}", "public void disableCtxRecording();", "public void enableDebug() {\n this.debug = true;\n }", "void enableFilter(boolean enable);", "public void enableLimit(boolean flag) {\n jniEnableLimit(addr, flag);\n}", "@DSGenerator(tool_name = \"Doppelganger\", tool_version = \"2.0\", generated_on = \"2014-03-25 14:39:04.360 -0400\", hash_original_method = \"43D61D7324B728BB328C9BAEC9DE09DD\", hash_generated_method = \"0799008F617B5F3041A89AAF0A445C69\")\n \n public static boolean setSuspendOptimizationsCommand(boolean enabled){\n \tdouble taintDouble = 0;\n \ttaintDouble += ((enabled) ? 1 : 0);\n \n \treturn ((taintDouble) == 1);\n }", "public void setDoTiming(boolean doTiming) {\n\t\tthis.doTiming = doTiming;\n\t}", "public static void performanceCountEnable(int event) { }", "native void nativeSetMetricsTime(boolean is_enable);", "@Trace(excludeFromTransactionTrace = true, leaf = true, rollupMetricName = { \"Dude\", \"Man\" })\n private void fastMethod(boolean call) {\n AgentBridge.getAgent().getTracedMethod().nameTransaction(TransactionNamePriority.FRAMEWORK_HIGH);\n\n // and use the public api to access the current method\n NewRelic.getAgent().getTracedMethod().setMetricName(\n NewRelic.getAgent().getTracedMethod().getMetricName() + \"Dude\");\n\n // since this is a leaf, child calls should be ignored. Verify that with our counts\n if (call) {\n fastMethod(false);\n }\n }", "boolean disableMonitoring();", "public static void getProfilingLevelSettings(Instruction inst){\r\n Map<String, Integer> levelMap = inst.getProfilingLevelMap();\r\n Instruction.printInstruction(inst);\r\n\r\n for(String s: levelMap.keySet()){\r\n if(s.equals(\"method\")){\r\n ProfilingThread.methodProfiling = true;\r\n }\r\n if(s.endsWith(\"memory\") && levelMap.get(s) != 0){\r\n ProfilingThread.memoryProfiling = true;\r\n ProfilingThread.MEMORY_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"cpu\") && levelMap.get(s) != 0){\r\n ProfilingThread.cpuProfiling = true;\r\n ProfilingThread.CPU_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"thread\") && levelMap.get(s) != 0){\r\n ProfilingThread.threadProfiling = true;\r\n ProfilingThread.THREAD_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"class\") && levelMap.get(s) != 0){\r\n ProfilingThread.classProfiling = true;\r\n ProfilingThread.CLASS_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n }\r\n\r\n System.out.println(\"Meth: \" + ProfilingThread.methodProfiling + \", MEM: \" + ProfilingThread.memoryProfiling + \", CPU: \" + ProfilingThread.cpuProfiling + \", CLASS: \" + ProfilingThread.classProfiling + \", THREAD: \" + ProfilingThread.threadProfiling);\r\n\r\n }", "public static void enableDebugging(){\n DEBUG = true;\n }", "public void enableSmartImprovement() { this.exec = this.exec.withProperty(\"sm.improve\", true); }", "public void setTracing(int traceFlag) {\n if (traceFlag == 0)\n Trace.setMask(Trace.MASK_NONE);\n else\n Trace.setMask(Trace.MASK_ALL);\n }", "public void toggleDebug() {\n\t\tdebug = debug ? false : true;\n\t}", "public void addProfiledMethod(String name, DynamicMethod method) {\n if (!config.isProfiling()) return;\n if (method.isUndefined()) return;\n if (method.getSerialNumber() > MAX_PROFILE_METHODS) return;\n \n int index = (int)method.getSerialNumber();\n if (profiledMethods.length <= index) {\n int newSize = Math.min((int)index * 2 + 1, MAX_PROFILE_METHODS);\n String[] newProfiledNames = new String[newSize];\n System.arraycopy(profiledNames, 0, newProfiledNames, 0, profiledNames.length);\n profiledNames = newProfiledNames;\n DynamicMethod[] newProfiledMethods = new DynamicMethod[newSize];\n System.arraycopy(profiledMethods, 0, newProfiledMethods, 0, profiledMethods.length);\n profiledMethods = newProfiledMethods;\n }\n profiledNames[index] = name;\n profiledMethods[index] = method;\n }", "void enable(final Op op);", "public static void setEnabledProfile(int profile) {\n if (enabledMenuItem != null) {\n enabledMenuItem.disableProfile();\n }\n\n // Also allow the signer tab to disable the signer\n if (profile == 0) {\n enabledMenuItem.disableProfile();\n enabledMenuItem = null;\n } else {\n\n // I don't want to keep a map of all the profiles. Just iterate through them until we find the right one\n for (MasherySignerMenuItem menuItem : menuItems) {\n if (menuItem.getProfileNumber() == profile) {\n menuItem.enableProfile();\n enabledMenuItem = menuItem;\n }\n }\n }\n }", "@Test\n public void mustNotEnableMoreThanOnce() throws RemoteException {\n mHbmController.enable(mOnEnabled);\n\n // Should set the appropriate refresh rate for UDFPS and notify the caller.\n verify(mDisplayCallback).onHbmEnabled(eq(DISPLAY_ID));\n verify(mOnEnabled).run();\n\n // Second request to enable the UDFPS mode, while it's still enabled.\n mHbmController.enable(mOnEnabled);\n\n // Should ignore the second request.\n verifyNoMoreInteractions(mDisplayCallback);\n verifyNoMoreInteractions(mOnEnabled);\n }", "public void enableLogging();", "public void enableParceler(boolean enable) {\n usesParcelerOption = enable;\n }", "public void addPerformance (String methodName, long startTime) {\n if (!isPerformance) {\n return;\n }\n theBrowserMgr.addPerformance(methodName, startTime);\n }", "void updateMetrics(boolean isSuspended);", "public static void logPrivacyOptInPreferenceChange(boolean enabled) {\n RecordHistogram.recordBooleanHistogram(\n \"Search.ContextualSearchPrivacyOptInPreferenceStateChange\", enabled);\n }", "public void testPerformance() {\n \t}", "public void doClickOnUseProfilingCBox() {\n\t\tuseProfilingCondCBox.doClick();\n\t}", "public void markBench () {\r\n\t\tif (Properties.interactDebug)\r\n\t\t\tif (bench != null)\r\n\t\t\t\tbench.mark();\r\n\t}", "public void toggleDebugMode() {\r\n DEBUG = !DEBUG;\r\n }", "void disable();", "void disable();", "public void enableAdaptiveRateControl(boolean enabled);", "@Deprecated\n public void setEnable(boolean enable) {\n this.skip = !enable;\n }", "public void SetCallRecording(boolean option){\n FunctionLogger logger=new FunctionLogger(\"SetCallRecording\",this,myLogger);\n logger.args(option);\n PlayRingbackFlag=option;\n }", "private void initializeWithForcedInstrumentation(Map<String, String> settings) {\n if (!hasJDKEvents(settings)) {\n return;\n }\n JVM jvm = JVM.getJVM();\n try {\n jvm.setForceInstrumentation(true);\n FlightRecorder.getFlightRecorder();\n } finally {\n jvm.setForceInstrumentation(false);\n }\n }", "@Test\n public void mustNotDisableMoreThanOnce() throws RemoteException {\n mHbmController.enable(mOnEnabled);\n\n // Should set the appropriate refresh rate for UDFPS and notify the caller.\n verify(mDisplayCallback).onHbmEnabled(eq(DISPLAY_ID));\n verify(mOnEnabled).run();\n\n // First request to disable the UDFPS mode.\n mHbmController.disable(mOnDisabled);\n\n // Should unset the refresh rate and notify the caller.\n verify(mOnDisabled).run();\n verify(mDisplayCallback).onHbmDisabled(eq(DISPLAY_ID));\n\n // Second request to disable the UDFPS mode, when it's already disabled.\n mHbmController.disable(mOnDisabled);\n\n // Should ignore the second request.\n verifyNoMoreInteractions(mOnDisabled);\n verifyNoMoreInteractions(mDisplayCallback);\n }", "void enableMod();", "public static void normalDebug(){\n enableVerbos = false;\n }", "public interface ProfilerService {\n\n void onedotone(String param);\n\n void onedottwo(String param);\n}", "public void startBatch() {\n\trunTimer.setVerbose(detailedMetrics);\n\trunTimer.start();\n }", "public void disableDebug() {\n this.debug = false;\n }", "public void startProfiles() {\n int currentUserId = getCurrentUserId();\n if (ActivityManagerDebugConfig.DEBUG_MU) {\n Slog.i(\"ActivityManager\", \"startProfilesLocked\");\n }\n List<UserInfo> profiles = this.mInjector.getUserManager().getProfiles(currentUserId, false);\n List<UserInfo> profilesToStart = new ArrayList<>(profiles.size());\n for (UserInfo user : profiles) {\n if ((user.flags & 16) == 16 && user.id != currentUserId && !user.isQuietModeEnabled()) {\n profilesToStart.add(user);\n } else if (user.id != currentUserId && user.isClonedProfile()) {\n Slog.i(\"ActivityManager\", \"startProfilesLocked clone profile: \" + user);\n profilesToStart.add(user);\n }\n }\n int profilesToStartSize = profilesToStart.size();\n int i = 0;\n while (i < profilesToStartSize) {\n startUser(profilesToStart.get(i).id, false);\n i++;\n }\n if (i < profilesToStartSize) {\n Slog.w(\"ActivityManager\", \"More profiles than MAX_RUNNING_USERS\");\n }\n }", "@Override\n protected boolean isDebugEnable() {\n return false;\n }", "public static void setProfileOutOfSync(boolean profileOutOfSync) {\n Login.profileOutOfSync = profileOutOfSync;\n }", "public interface ProfilingService {\n String PROFILES = \"profiles\";\n\n /**\n * Get the profile factory for a given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return a ProfileFactory that accepts the reference (or null if it doesn't exist)\n */\n ProfileFactory getProfileFactory( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Return a boolean indicating whether a ProfileFactory exists for the given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return true iff there is a ProfileFactory that accepts the reference\n */\n boolean accepts( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Creates a profile from the ProfileConfiguration and returns its initial status\n *\n * @param profileConfiguration the profile configuration\n * @return a ProfileStatusManager for the created profile\n * @throws ProfileCreationException if there is an error during profile creation\n */\n ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException;\n\n /**\n * Returns a list of the currently active profiles\n *\n * @return a list of the currently active profiles\n */\n List<ProfileStatusReader> getActiveProfiles();\n\n /**\n * Returns the profile for a given profileId\n *\n * @param profileId the profileId\n * @return the Profile\n */\n Profile getProfile( String profileId );\n\n /**\n * Returns the a ProfileStatusReader for the given profileId\n *\n * @param profileId the profileId\n * @return the ProfileStatusReader\n */\n ProfileStatusReader getProfileUpdate( String profileId );\n\n /**\n * Stops the profile with the given id\n *\n * @param profileId the profileId to stop\n */\n void stop( String profileId );\n\n /**\n * Stops all the running profiles\n */\n void stopAll();\n\n /**\n * Returns a boolean indicating whether a profile is running\n *\n * @param profileId the profileId to check\n * @return a boolean indicating whether a profile is running\n */\n boolean isRunning( String profileId );\n\n /**\n * Discards the profile with the given id\n *\n * @param profileId the profileId to discard\n */\n void discardProfile( String profileId );\n\n /**\n * Discards all profiles\n */\n void discardProfiles();\n}", "public static void disableDebugging(){\n DEBUG = false;\n }", "public boolean isTracing();", "private static void setTraceONOFF(String traceONOFF) {\n if (traceONOFF.matches(\"off\")){\n System.out.println(\"Trace is now off\");\n dvm.setTraceONOFF(false);\n }\n else{\n System.out.println(\"Trace is now on\");\n dvm.setTraceONOFF(true);\n }\n }", "void setDebugEnabled(boolean value) {\r\n debug_enabled = value;\r\n }", "public JABAExecProfiling(Analysis parent, String execDirPath) {\r\n\t\tprofiling = new ExecProfiling(parent, execDirPath);\r\n\t}", "public static void enablePeriodicalRun(Context context) {\n\t}", "void disable() {\n }", "public void enableTimeStamp(boolean enable) {\r\n timeStamp = enable;\r\n }", "public void enable ( ) {\r\n\t\tenabled = true;\r\n\t}", "public void enable()\r\n\t{\r\n\t\tenabled = true;\r\n\t}", "public static void printProfilingMethodList(){\r\n for(Map.Entry entry: Instrumentations.profiledMethodMap.entrySet()){\r\n for(String s: (ArrayList<String>)entry.getValue()){\r\n System.out.println(\"Class: \" + entry.getKey() + \", method: \" + s);\r\n }\r\n }\r\n }", "public void setPerf(Perf perf) {\n\t\tthis.perf = perf;\n\t}", "@SuppressWarnings(\"SleepWhileInLoop\")\n private StateChange profilingServerStatus() {\n LOGGER.log(Level.FINE,\n \"Profiling mode status hack for {0}\",\n new Object[]{instance.getName()});\n // Save process to be able to stop process waiting for profiler\n // to attach.\n support.setLocalStartProcess(instance.getProcess());\n // Try to sync the states after the profiler attaches.\n NODE_REFRESHER.post(new Runnable() {\n @Override\n public void run() {\n while (!PayaraState.isOnline(instance)) {\n try {\n Thread.sleep(200);\n } catch (InterruptedException ex) {\n }\n }\n SwingUtilities.invokeLater(new Runnable() {\n @Override\n public void run() {\n support.refresh();\n }\n });\n }\n });\n return new StateChange(this, TaskState.COMPLETED,\n TaskEvent.CMD_COMPLETED,\n \"MSG_SERVER_STARTED\", instanceName);\n }", "@Override\n\tpublic boolean isEnableMetricsCapture() {\n\t\treturn false;\n\t}", "public boolean interceptSetEnabledFunctions(String functions) {\n return false;\n }", "public synchronized void setDebugTraceEnabled(TrcDbgTrace tracer, boolean enabled)\n {\n debugTracer = enabled ? tracer : null;\n }", "public void enable() {\r\n m_enabled = true;\r\n }", "public void disable() {\r\n m_enabled = false;\r\n useOutput(0, 0);\r\n }", "InstrumentablePerformanceExecutor<T> warmup();", "public void disable() {\n\t\tm_enabled = false;\n\t\tuseOutput(0);\n\t}", "public void startStopwatch() {\n startingTime = System.nanoTime();\n currentNanoTime = () -> System.nanoTime() - startingTime;\n }", "public void setDebugging(boolean on)\n\t{\n\t\t_options.setDebugging(on);\n\t}", "public interface TaskManagerProfiler {\n\n\t/**\n\t * Registers an {@link ExecutionListener} object for profiling.\n\t * \n\t * @param id\n\t * the {@link ExecutionVertexID} of the task\n\t * @param jobConfiguration\n\t * the job configuration sent with the task\n\t * @param environment\n\t * the {@link Environment} object to register the listener for\n\t */\n\tvoid registerExecutionListener(ExecutionVertexID id, Configuration jobConfiguration, Environment environment);\n\n\t/**\n\t * Registers a {@link InputGateListener} object for the given input gate.\n\t * \n\t * @param id\n\t * the ID of the vertex the given input gate belongs to\n\t * @param jobConfiguration\n\t * the configuration of the job the vertex belongs to\n\t * @param inputGate\n\t * the input gate to register a {@link InputGateListener} object for\n\t */\n\tvoid registerInputGateListener(ExecutionVertexID id, Configuration jobConfiguration,\n\t\t\tInputGate<? extends Record> inputGate);\n\n\t/**\n\t * Registers a {@link OutputGateListener} object for the given output gate.\n\t * \n\t * @param id\n\t * the ID of the vertex the given output gate belongs to\n\t * @param jobConfiguration\n\t * the configuration of the job the vertex belongs to\n\t * @param outputGate\n\t * the output gate to register a {@link InputGateListener} object for\n\t */\n\tvoid registerOutputGateListener(ExecutionVertexID id, Configuration jobConfiguration,\n\t\t\tOutputGate<? extends Record> outputGate);\n\n\t/**\n\t * Unregisters all previously register {@link ExecutionListener} objects for\n\t * the vertex identified by the given ID.\n\t * \n\t * @param id\n\t * the ID of the vertex to unregister the {@link ExecutionListener} objects for\n\t */\n\tvoid unregisterExecutionListener(ExecutionVertexID id);\n\n\t/**\n\t * Unregisters all previously register {@link InputGateListener} objects for\n\t * the vertex identified by the given ID.\n\t * \n\t * @param id\n\t * the ID of the vertex to unregister the {@link InputGateListener} objects for\n\t */\n\tvoid unregisterInputGateListeners(ExecutionVertexID id);\n\n\t/**\n\t * Unregisters all previously register {@link OutputGateListener} objects for\n\t * the vertex identified by the given ID.\n\t * \n\t * @param id\n\t * the ID of the vertex to unregister the {@link OutputGateListener} objects for\n\t */\n\tvoid unregisterOutputGateListeners(ExecutionVertexID id);\n\n\t/**\n\t * Shuts done the task manager's profiling component\n\t * and stops all its internal processes.\n\t */\n\tvoid shutdown();\n}", "public void toggleVerbose() {\n\t\tverbose = !verbose;\n\t}", "public void setEnable(Boolean enable) {\n this.enable = enable;\n }", "public static void resumeTiming() {\n SimulatorJNI.resumeTiming();\n }", "@SuppressWarnings(\"unused\")\n private void setTrafficEnabled(final JSONArray args, final CallbackContext callbackContext) throws JSONException {\n Boolean isEnabled = args.getBoolean(1);\n map.setTrafficEnabled(isEnabled);\n this.sendNoResult(callbackContext);\n }", "public void startTiming() {\n elapsedTime = 0;\n startTime = System.currentTimeMillis();\n }", "public void endProfiling(){\r\n\t\tworld.profiler.endSection();\r\n\t}", "public void enableEchoLimiter(boolean val);", "public void startMeasuring() {\n\tsuper.startMeasuring();\n}", "public void enable() {\n\t\tm_controller.reset();\n\t\tm_runner.enable();\n\t}", "protected abstract void enable();", "public void disableLogging();", "public void disable();", "default void onEnable() {}", "@Override\n public boolean isStatisticsEnabled() {\n return counter != null && counter.isStatisticsEnabled();\n }", "public void enableVideoCapture(boolean enable);", "void incUsage() {\n incUsage(1);\n }", "public boolean setEnabled(boolean enable);", "void startTracking();" ]
[ "0.72587216", "0.58835155", "0.58167875", "0.5726272", "0.5724333", "0.56738204", "0.5673461", "0.56422853", "0.5579936", "0.5513372", "0.5502582", "0.5485653", "0.5400988", "0.5333433", "0.53181994", "0.52790177", "0.52736694", "0.52320606", "0.5215072", "0.5202856", "0.5140161", "0.5139972", "0.513141", "0.510258", "0.5089095", "0.5042587", "0.50402355", "0.49992493", "0.49988836", "0.4994553", "0.49766597", "0.49739134", "0.49585077", "0.49264634", "0.49252197", "0.49182165", "0.4902695", "0.48876733", "0.48800763", "0.48768637", "0.48724842", "0.4862406", "0.48580635", "0.4856478", "0.4856478", "0.4853838", "0.48496476", "0.483493", "0.48265985", "0.48259926", "0.48224664", "0.48187512", "0.4811318", "0.48106217", "0.48028204", "0.4797229", "0.4795993", "0.47879922", "0.47857818", "0.47819522", "0.4778788", "0.47762907", "0.47725722", "0.47587296", "0.475606", "0.4748853", "0.474296", "0.47294328", "0.47228342", "0.47222987", "0.47005826", "0.47004214", "0.46954146", "0.46945155", "0.4692647", "0.4683471", "0.46827787", "0.46810254", "0.46785244", "0.467739", "0.4670979", "0.46681324", "0.465724", "0.46555555", "0.46537685", "0.46529603", "0.46503085", "0.46446335", "0.4640362", "0.46374595", "0.46316406", "0.46267766", "0.46236426", "0.46177772", "0.45964557", "0.45956135", "0.458582", "0.45807913", "0.4580762", "0.45741853" ]
0.7596841
0
Return sofar collected profiling information,
public String getProfile() { if (profileBuf.length() > 0) { profileBuf.append ("\n"); // should be replaced by java.util.Formatter from Java 1.5 profileBuf.append (profilingTotal); profileBuf.append ("\t"); profileBuf.append ("TOTAL\n"); // profileBuf.append (Printf.format ("%7d\t%s\n", // new String[] {"" + profilingTotal, "TOTAL"})); return new String (profileBuf); } else { return ""; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void dumpStats() {\n long wallTimeNanos = totalStopwatch.elapsed(TimeUnit.NANOSECONDS);\n long dbtime = 0;\n for (String name : methodCalls.keySet()) {\n long calls = methodCalls.get(name);\n long time = methodTotalTime.get(name);\n dbtime += time;\n long average = time / calls;\n double proportion = (time + 0.0) / (wallTimeNanos + 0.0);\n log.info(name + \" c:\" + calls + \" r:\" + time + \" a:\" + average + \" p:\" + String.format(\"%.2f\", proportion));\n }\n double dbproportion = (dbtime + 0.0) / (wallTimeNanos + 0.0);\n double hitrate = (hit + 0.0) / (hit + miss + 0.0);\n log.info(\"Cache size:\" + utxoCache.size() + \" hit:\" + hit + \" miss:\" + miss + \" rate:\"\n + String.format(\"%.2f\", hitrate));\n bloom.printStat();\n log.info(\"hasTxOut call:\" + hasCall + \" True:\" + hasTrue + \" False:\" + hasFalse);\n log.info(\"Wall:\" + totalStopwatch + \" percent:\" + String.format(\"%.2f\", dbproportion));\n String stats = db.getProperty(\"leveldb.stats\");\n System.out.println(stats);\n\n }", "@Override\n\tpublic WeakHashMap<String, double[]> getCurrentProfiles()\n\t{\n\t\tWeakHashMap<String, double[]> returnMap = new WeakHashMap<String, double[]>();\n\t\treturnMap.put(\"HeatPump\", this.optimisedSetPointProfile);\n\t\treturnMap.put(\"WaterHeat\", this.waterHeatDemandProfile);\n\t\treturn returnMap;\n\t}", "Map<String, Object> getStats();", "private static void collectProfilingData() throws ClassNotFoundException, IOException{\r\n\r\n //TODO - clean lists in each iteration (when data packet is received)\r\n List<MemoryMeasurement> memoryData;\r\n List<CPUmeasurement> cpuData;\r\n List<ThreadMeasurement> threadData;\r\n List<ClassMeasurement> classData;\r\n Map<String, TimeMeasurement> methodRunList;\r\n String message = null;\r\n\r\n do{\r\n message = (String)serverObjectInputStream.readObject();\r\n\r\n if(message.equals(\"DATA\")){\r\n System.out.println(\"Server: packet received: \" + message);\r\n\r\n ProfilingPacketType.deserializePacket();\r\n memoryData = ProfilingPacketType.memoryUsageList;\r\n //System.out.println(\"MemoryData: \" + memoryData);\r\n ProfilingMemoryPage.prepareMemoryData(memoryData);\r\n cpuData = ProfilingPacketType.cpuUsageList;\r\n ProfilingCPUPage.prepareData(cpuData);\r\n //printCpuData(cpuData);\r\n threadData = ProfilingPacketType.threadList;\r\n ProfilingThreadsPage.prepareData(threadData);\r\n //System.out.println(\"Received thread data: \" + threadData.size());\r\n classData = ProfilingPacketType.classUsageList;\r\n ProfilingClassesPage.prepareData(classData);\r\n //System.out.println(classData.size());\r\n methodRunList = ProfilingPacketType.methodTimeList;\r\n ProfilingMethodsPage.prepareData(methodRunList);\r\n //printMethodRuns(methodRunList);\r\n\r\n ProfilingOverviewPage.getProfilingData();\r\n ProfilingVMSummaryPage.collectVMData();\r\n\r\n }\r\n\r\n }while (!message.equals(Attributes.PROFILING_PACKET_MESSAGE_TERMINATE));\r\n throw new EOFException(\"Agent has finished it's job.\");\r\n }", "@Override\n\tpublic ProfileInfo getProfileInfo() {\n\t\treturn (ProfileInfo)map.get(PROFILE_INFO);\n\t}", "boolean profilerEnabled();", "void statistics();", "public static final kelondroProfile profileStats(String filename) {\n kelondroFlexTable theFlexTable = (kelondroFlexTable) tableTracker.get(filename);\r\n return theFlexTable.profile();\r\n }", "public String getCurrentThreadTimeInfo() {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isCurrentThreadCpuTimeSupported())\n\t\t\treturn timeInfo;\n\t\tlong userTime = bean.getCurrentThreadUserTime();\n\t\tlong cpuTime = bean.getCurrentThreadCpuTime();\n\n\t\tsb.append(userTime).append(\"#\").append(cpuTime);\n\t\ttimeInfo = sb.toString();\n//\t\tSystem.out.println(\"lib: \" + timeInfo);\n\t\treturn timeInfo;\n\t}", "java.util.List<org.tensorflow.proto.profiler.XStat> \n getStatsList();", "public static void printProfilingMethodList(){\r\n for(Map.Entry entry: Instrumentations.profiledMethodMap.entrySet()){\r\n for(String s: (ArrayList<String>)entry.getValue()){\r\n System.out.println(\"Class: \" + entry.getKey() + \", method: \" + s);\r\n }\r\n }\r\n }", "public String getStats() {\n String stats = \"Total running time: \" + runtime + \"\\\\\\\\\";\n int totalit = 0;\n int largestit = 0;\n int averageit = 0;\n for (Integer i : recGraphs) {\n totalit += i;\n averageit += i;\n if (i > largestit) {\n largestit = i;\n }\n }\n averageit /= recGraphs.size();\n double totalhit = 0;\n double longesthit = 0;\n double averagehit = 0;\n for (Double i : recHitTimes) {\n totalhit += i;\n averagehit += i / recHitTimes.size();\n if (i > longesthit) {\n longesthit = i;\n }\n }\n stats += \"Total iterations in step 3: \" + totalit + \"\\\\\\\\\";\n stats += \"Largest set of iterations in step 3: \" + largestit + \"\\\\\\\\\";\n stats += \"Average iterations set in step 3: \" + averageit + \"\\\\\\\\\";\n stats += \"Total hitting sets calculation time: \" + totalhit + \"\\\\\\\\\";\n stats += \"Average hitting set calculation time: \" + averagehit + \"\\\\\\\\\";\n stats += \"Longest hitting set calculation time: \" + longesthit + \"\\\\\\\\\";\n return stats;\n }", "public String stats()\n\t{\n\t\tString algo = null;//set up algo return null if error\n\t\tswitch (sortingAlgorithm) {\n\t\tcase SelectionSort:\n\t\t\talgo = \"SelectionSort\";\n\t\t\tbreak;\n\t\tcase InsertionSort:\n\t\t\talgo = \"InsertionSort\";\n\t\t\tbreak;\n\t\tcase MergeSort:\n\t\t\talgo = \"MergeSort\";\n\t\t\tbreak;\n\t\tcase QuickSort:\n\t\t\talgo = \"QuickSort\";\n\t\t\tbreak;\n\t\t}\n\t\treturn algo + \"\\t\" + points.length + \"\\t\" + scanTime; \n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/IR/Module.cpp\", line = 518,\n FQN=\"llvm::Module::getProfileSummary\", NM=\"_ZN4llvm6Module17getProfileSummaryEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.ir/llvmToClangType ${LLVM_SRC}/llvm/lib/IR/Module.cpp -nm=_ZN4llvm6Module17getProfileSummaryEv\")\n //</editor-fold>\n public Metadata /*P*/ getProfileSummary() {\n return getModuleFlag(new StringRef(/*KEEP_STR*/\"ProfileSummary\"));\n }", "public static void _generateStatistics() {\n\t\ttry {\n\t\t\t// Setup info\n\t\t\tPrintStream stats = new PrintStream(new File (_statLogFileName + \".txt\"));\n\n\t\t\tScanner scan = new Scanner(new File(_logFileName+\".txt\"));\n\t\t\twhile (scan.hasNext(SETUP.toString())) {\n\t\t\t\t// Append setup info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tstats.append(\"\\n\");\n\n\t\t\twhile (scan.hasNext(DETAILS.toString()) || scan.hasNext(RUN.toString())) {\n\t\t\t\t// Throw detailed info away\n\t\t\t\tscan.nextLine();\n\t\t\t}\n\n\t\t\twhile (scan.hasNext()) {\n\t\t\t\t// Append post-run info\n\t\t\t\tstats.append(scan.nextLine()+\"\\n\");\n\t\t\t}\n\t\t\tscan.close();\n\t\t\tstats.append(\"\\n\");\n\n\t\t\t// Perf4J info\n\t\t\tReader reader = new FileReader(_logFileName+\".txt\");\n\t\t\tLogParser parser = new LogParser(reader, stats, null, 10800000, true, new GroupedTimingStatisticsTextFormatter());\n\t\t\tparser.parseLog();\n\t\t\tstats.close();\n\t\t}\n\t\tcatch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void getProfilingLevelSettings(Instruction inst){\r\n Map<String, Integer> levelMap = inst.getProfilingLevelMap();\r\n Instruction.printInstruction(inst);\r\n\r\n for(String s: levelMap.keySet()){\r\n if(s.equals(\"method\")){\r\n ProfilingThread.methodProfiling = true;\r\n }\r\n if(s.endsWith(\"memory\") && levelMap.get(s) != 0){\r\n ProfilingThread.memoryProfiling = true;\r\n ProfilingThread.MEMORY_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"cpu\") && levelMap.get(s) != 0){\r\n ProfilingThread.cpuProfiling = true;\r\n ProfilingThread.CPU_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"thread\") && levelMap.get(s) != 0){\r\n ProfilingThread.threadProfiling = true;\r\n ProfilingThread.THREAD_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n if(s.endsWith(\"class\") && levelMap.get(s) != 0){\r\n ProfilingThread.classProfiling = true;\r\n ProfilingThread.CLASS_PROFILING_INTERVAL = levelMap.get(s);\r\n }\r\n }\r\n\r\n System.out.println(\"Meth: \" + ProfilingThread.methodProfiling + \", MEM: \" + ProfilingThread.memoryProfiling + \", CPU: \" + ProfilingThread.cpuProfiling + \", CLASS: \" + ProfilingThread.classProfiling + \", THREAD: \" + ProfilingThread.threadProfiling);\r\n\r\n }", "protected abstract String getStatistics();", "public String stats()\n\t{\n\t\tString a = \"\"; //initialize string\n\t\t\n\t\tString size1 = points.length + \"\"; //put size into string\n\t\t\n\t\twhile(size1.length() < 12) //go until string is 12 long\n\t\t{\n\t\t\tsize1 += \" \"; //add a new blank space\n\t\t}\n\t\ta = a + algorithm + \" \" + size1 + time; //put string together \n\t\treturn a; \n\t}", "@gw.internal.gosu.parser.ExtendedProperty\n public gw.lang.Blob getProfilerData() {\n return (gw.lang.Blob)__getInternalInterface().getFieldValue(PROFILERDATA_PROP.get());\n }", "public ThreadingProfile getThreadingProfile()\n {\n return threadingProfile;\n }", "H getProfile();", "public void reportStats() {\n System.out.println(\"Number of requests: \" + (requestCount - warmUpRequests));\n System.out.println(\"Number of hits: \" + hitCount);\n System.out.println(\"hit ratio: \" + (double) hitCount / (requestCount - warmUpRequests));\n System.out.println(\"Average hit cost: \" + (double) hitCost / hitCount);\n }", "public void statistics(){\n\t\tSystem.out.println(\"heads: \"+ heads+\"\\ttails: \"+tails);\n\t\t\n\t}", "HumanProfile getUserProfile();", "public static void getCpuUsage(){\r\n CPUmeasurement currentCpuUsage = new CPUmeasurement();\r\n cpuUsageList.add(currentCpuUsage);\r\n //CPUmeasurement.printCpuUsage(currentCpuUsage);\r\n }", "public ProfileSummary( String name, ProfileCollectorTask.NodeProfile profile) { this.name = name; this.profile= profile; }", "java.util.Map<java.lang.Long, org.tensorflow.proto.profiler.XStatMetadata>\n getStatMetadataMap();", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/Analysis/ProfileSummaryInfo.cpp\", line = 57,\n FQN=\"llvm::ProfileSummaryInfo::computeSummary\", NM=\"_ZN4llvm18ProfileSummaryInfo14computeSummaryEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM_SRC}/llvm/lib/Analysis/ProfileSummaryInfo.cpp -nm=_ZN4llvm18ProfileSummaryInfo14computeSummaryEv\")\n //</editor-fold>\n private void computeSummary() {\n if (Summary.$bool()) {\n return;\n }\n Metadata /*P*/ SummaryMD = M.getProfileSummary();\n if (!(SummaryMD != null)) {\n return;\n }\n Summary.reset(ProfileSummary.getFromMD(SummaryMD));\n }", "private void optimiseEVProfile()\n\t{\n\t}", "public String getProfesionTI() {\n return this.profesionTI;\n }", "public String stats() { \r\n String stats; \r\n stats = getWins() + \" wins, \" + getLosses() + \" losses, \" \r\n + getSaves() + \" saves, \" + getEra() + \" ERA\"; \r\n return stats;\r\n }", "public native ProfileInfo getIptcProfile() throws MagickException;", "@gw.internal.gosu.parser.ExtendedProperty\n public gw.lang.Blob getProfilerData() {\n return (gw.lang.Blob)__getInternalInterface().getFieldValue(PROFILERDATA_PROP.get());\n }", "public String getRunInfo(){\n return runner.getRunInfo();\n }", "public interface ProfilingService {\n String PROFILES = \"profiles\";\n\n /**\n * Get the profile factory for a given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return a ProfileFactory that accepts the reference (or null if it doesn't exist)\n */\n ProfileFactory getProfileFactory( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Return a boolean indicating whether a ProfileFactory exists for the given data source\n *\n * @param dataSourceMetadata the data source metadata\n * @return true iff there is a ProfileFactory that accepts the reference\n */\n boolean accepts( DataSourceMetadata dataSourceMetadata );\n\n /**\n * Creates a profile from the ProfileConfiguration and returns its initial status\n *\n * @param profileConfiguration the profile configuration\n * @return a ProfileStatusManager for the created profile\n * @throws ProfileCreationException if there is an error during profile creation\n */\n ProfileStatusManager create( ProfileConfiguration profileConfiguration ) throws ProfileCreationException;\n\n /**\n * Returns a list of the currently active profiles\n *\n * @return a list of the currently active profiles\n */\n List<ProfileStatusReader> getActiveProfiles();\n\n /**\n * Returns the profile for a given profileId\n *\n * @param profileId the profileId\n * @return the Profile\n */\n Profile getProfile( String profileId );\n\n /**\n * Returns the a ProfileStatusReader for the given profileId\n *\n * @param profileId the profileId\n * @return the ProfileStatusReader\n */\n ProfileStatusReader getProfileUpdate( String profileId );\n\n /**\n * Stops the profile with the given id\n *\n * @param profileId the profileId to stop\n */\n void stop( String profileId );\n\n /**\n * Stops all the running profiles\n */\n void stopAll();\n\n /**\n * Returns a boolean indicating whether a profile is running\n *\n * @param profileId the profileId to check\n * @return a boolean indicating whether a profile is running\n */\n boolean isRunning( String profileId );\n\n /**\n * Discards the profile with the given id\n *\n * @param profileId the profileId to discard\n */\n void discardProfile( String profileId );\n\n /**\n * Discards all profiles\n */\n void discardProfiles();\n}", "private void getCpuInfo() {\n\t\ttry {\n\t\t\tRandomAccessFile reader = new RandomAccessFile(\"/proc/stat\", \"r\");\n\t\t\tString load = reader.readLine();\n\n\t\t\tString[] toks = load.split(\" \");\n\n\t\t\tlong idle1 = Long.parseLong(toks[5]);\n\t\t\tlong cpu1 = Long.parseLong(toks[2]) + Long.parseLong(toks[3])\n\t\t\t\t\t+ Long.parseLong(toks[4]) + Long.parseLong(toks[6])\n\t\t\t\t\t+ Long.parseLong(toks[7]) + Long.parseLong(toks[8]);\n\n\t\t\ttry {\n\t\t\t\tThread.sleep(1000);\n\t\t\t} catch (Exception e) {\n\n\t\t\t}\n\t\t\t//get process name list in this time\n\t\t\tgetTopCpu();\n\n\t\t\treader.seek(0);\n\t\t\tload = reader.readLine();\n\t\t\treader.close();\n\n\t\t\ttoks = load.split(\" \");\n\n\t\t\t// find right data is the key\n\t\t\t// System.out.println(toks[0]+\" 1 \"+toks[1]+\" 2 \"+toks[2]+\" \"+toks[3]+\" \"+toks[4]+\" \"+toks[5]+\" \"+toks[6]+\" \"+toks[7]+\" 8 \"+toks[8]);\n\t\t\tlong idle2 = Long.parseLong(toks[5]);\n\t\t\tlong cpu2 = Long.parseLong(toks[2]) + Long.parseLong(toks[3])\n\t\t\t\t\t+ Long.parseLong(toks[4]) + Long.parseLong(toks[6])\n\t\t\t\t\t+ Long.parseLong(toks[7]) + Long.parseLong(toks[8]);\n\n\t\t\t// System.out.println(idle2+\" \"+cpu2);\n\t\t\trate = (float) (cpu2 - cpu1)\n\t\t\t\t\t/ (float) ((cpu2 + idle2) - (cpu1 + idle1));\n\t\t\t// System.out.println(rate);\n\t\t\tint temprate = (int) ((rate + 0.05) * 100);\n\t\t\tif (temprate < 0 || temprate > 100) {\n\t\t\t\t// System.out.println(toks[0]+\" 1 \"+toks[1]+\" 2 \"+toks[2]+\" \"+toks[3]+\" \"+toks[4]+\" \"+toks[5]+\" \"+toks[6]+\" \"+toks[7]+\" 8 \"+toks[8]);\n\t\t\t\treturn;\n\t\t\t}\n\t\t\tcpuChart.addData(temprate);\n\n\t\t} catch (IOException ex) {\n\t\t\tex.printStackTrace();\n\t\t}\n\t}", "synchronized public Profiler getProfiler () {\n Profiler prof = (Profiler) get (PROFILER.toString());\n if (prof == null) {\n prof = new Profiler();\n put (PROFILER.toString(), prof);\n }\n return prof;\n }", "public String getSummary() {\n/* 121 */ StringBuilder sb = new StringBuilder();\n/* 122 */ sb.append(\"FindIds exeMicros[\").append(this.executionTimeMicros).append(\"] rows[\").append(this.rowCount).append(\"] type[\").append(this.desc.getName()).append(\"] predicates[\").append(this.predicates.getLogWhereSql()).append(\"] bind[\").append(this.bindLog).append(\"]\");\n/* */ \n/* */ \n/* */ \n/* */ \n/* */ \n/* 128 */ return sb.toString();\n/* */ }", "private SensorData collectCPUUsageInfo() throws SigarException {\n \n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Collecting CPU Usage Information\");\n }\n SensorData data = new SensorData();\n \n CpuPerc cpuPerc = sigar.getCpuPerc();\n \n data.add(SensorAttributeConstants.CPUConstants.CPU_IDLE, (cpuPerc.getIdle() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_USER, (cpuPerc.getUser() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_SYSTEM, (cpuPerc.getSys() * 100));\n data.add(SensorAttributeConstants.CPUConstants.CPU_USAGE_TOTAL, (cpuPerc.getCombined() * 100));\n \n return data;\n }", "void printStats();", "public static String addToStatistics(){\n\t\tString addedStats = Start.addToStatistics();\n\t\t//add\n\t\t//e.g.: addedStats += MyReport();\n\t\treturn addedStats;\n\t}", "public static void showStatistics(){\n\n }", "private static void getStatistics() {\r\n\r\n\t\tfloat totalWaitTime = 0;\r\n\t\tfloat totalRideTime = 0;\r\n\r\n\t\t// generate info about min wait time\r\n\t\tfloat minWaitTime = people.get(0).getWaitTime();\r\n\t\tString minWaitPerson = \"\";\r\n\t\ttotalWaitTime += minWaitTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() < minWaitTime){\r\n\t\t\t\tminWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tminWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalWaitTime += people.get(i).getWaitTime();\r\n\t\t}\r\n\r\n\t\t// generate info about min ride time\r\n\t\tfloat minRideTime = people.get(0).getRideTime();\r\n\t\tString minRidePerson = \"\";\r\n\t\ttotalRideTime += minRideTime;\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() < minRideTime){\r\n\t\t\t\tminRideTime = people.get(i).getRideTime();\r\n\t\t\t\tminRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t\ttotalRideTime += people.get(i).getRideTime();\r\n\t\t}\r\n\r\n\t\t// generate info about max wait time\r\n\t\tfloat maxWaitTime = people.get(0).getWaitTime();\r\n\t\tString maxWaitPerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getWaitTime() > maxWaitTime){\r\n\t\t\t\tmaxWaitTime = people.get(i).getWaitTime();\r\n\t\t\t\tmaxWaitPerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// generate info about max ride time\r\n\t\tfloat maxRideTime = people.get(0).getRideTime();\r\n\t\tString maxRidePerson = \"\";\r\n\t\tfor (int i=1; i<people.size(); i++) {\r\n\t\t\tif(people.get(i).getRideTime() > maxRideTime){\r\n\t\t\t\tmaxRideTime = people.get(i).getRideTime();\r\n\t\t\t\tmaxRidePerson = people.get(i).getPersonName();\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tSystem.out.printf(\"Avg Wait Time: %.1f sec\\n\", totalWaitTime/people.size());\r\n\t\tSystem.out.printf(\"Avg Ride Time: %.1f sec\\n\\n\", totalRideTime/people.size());\r\n\r\n\t\tSystem.out.printf(\"Min Wait Time: %.1f sec (%s)\\n\", minWaitTime, minWaitPerson);\r\n\t\tSystem.out.printf(\"Min Ride Time: %.1f sec (%s)\\n\\n\", minRideTime, minRidePerson);\r\n\r\n\t\tSystem.out.printf(\"Max Wait Time: %.1f sec (%s)\\n\", maxWaitTime, maxWaitPerson);\r\n\t\tSystem.out.printf(\"Max Ride Time: %.1f sec (%s)\\n\\n\", maxRideTime, maxRidePerson);\r\n\r\n\t}", "public List<TPStatsInfo> getTPStats() {\n List<TPStatsInfo> tpstats = new ArrayList<>();\n Iterator<Map.Entry<String, JMXEnabledThreadPoolExecutorMBean>> threads = nodeProbe.getThreadPoolMBeanProxies();\n while (threads.hasNext()) {\n Map.Entry<String, JMXEnabledThreadPoolExecutorMBean> thread = threads.next();\n JMXEnabledThreadPoolExecutorMBean threadPoolProxy = thread.getValue();\n tpstats.add(new TPStatsInfo(thread.getKey(), threadPoolProxy.getActiveCount(),\n threadPoolProxy.getPendingTasks(), threadPoolProxy.getCompletedTasks(),\n threadPoolProxy.getCurrentlyBlockedTasks(), threadPoolProxy.getTotalBlockedTasks()));\n }\n return tpstats;\n }", "private static void printStats()\r\n\t{\r\n\t\tSystem.out.println(\"Keywords found: \" + keywordHits);\r\n\t\tSystem.out.println(\"Links found: \" + SharedLink.getLinksFound());\r\n\t\tSystem.out.println(\"Pages found: \" + SharedPage.getPagesDownloaded());\r\n\t\tSystem.out.println(\"Failed downloads: \" + SharedPage.getFailedDownloads());\r\n\t\tSystem.out.println(\"Producers: \" + fetchers);\r\n\t\tSystem.out.println(\"Consumers: \" + parsers);\r\n\t}", "public native ProfileInfo getGenericProfile(int i) throws MagickException;", "public static String traceCpuEnvironment() {\r\n\r\n StringWriter sw = new StringWriter();\r\n PrintWriter pw = new PrintWriter(sw);\r\n pw.println(\"General information: \");\r\n\r\n Properties p = System.getProperties();\r\n\r\n String[] split = p.toString().split(\",\");\r\n\r\n for (String string : split) {\r\n pw.println(string);\r\n }\r\n\r\n return sw.toString();\r\n }", "public interface ProfilerOperations \n{\n\n /* Returns how many times a given song was played by all the users*/\n int getTimesPlayed (String song_id);\n\n /* Returns how many times a given song was played by a given user*/\n int getTimesPlayedByUser (String user_id, String song_id);\n\n /* Returns the top three users playing a given song*/\n TasteProfile.TopThreeUsers getTopThreeUsersBySong (String song_id);\n\n /* Returns the top three songs played by a given user*/\n TasteProfile.TopThreeSongs getTopThreeSongsByUser (String user_id);\n\n /* Returns a complete user profile*/\n TasteProfile.UserProfile getUserProfile (String user_id);\n}", "private void getProfile() {\n if (this.mLocalProfile.isEmpty()) {\n getDeviceType();\n getDeviceName();\n getScreenResolution();\n getScreenSize();\n }\n }", "public String getStatistics() {\r\n \tString statistics;\r\n \tstatistics=\"Anzahl aller User: \"+ numberOfUsers() + \"\\n\"\r\n \t\t\t+ \"Anzahl aller Hotels: \" + numberOfHotels() + \"\\n\"\r\n \t\t\t+ \"Hotel mit der besten durchschnittlichen Bewertung: \" + bestHotel().getName() + \"\\n\";\r\n \treturn statistics;\r\n }", "public void printMetrics() {\n System.out.println(\"\\nPROG_SIZE = \" + Metrics.getProgSize() + '\\n' + \"EXEC_TIME = \" + Metrics.getExecTime() + \" ms\" + '\\n' + \"EXEC_MOVE = \" + Metrics.getExecMove() + '\\n' + \"DATA_MOVE = \" + Metrics.getDataMove() + '\\n' + \"DATA_READ = \" + Metrics.getDataRead() + '\\n' + \"DATA_WRITE = \" + Metrics.getDataWrite() + '\\n');\n }", "public String getQuickCounters()\n {\n return (prefix + \"(\" + counters[TYPE_WARNING] + \", \"\n + counters[TYPE_ERROR] + \", \" + counters[TYPE_FATALERROR] + \")\");\n }", "public String getLoadInfo()\n {\n return ssProxy.getLoadInfo();\n }", "public void setProfiling (boolean enable) {\n\tprofiling = enable;\n }", "public static Profile getProfile() {\n return profile;\n }", "private void getDynamicProfie() {\n getDeviceName();\n }", "public String toString() {\r\n\t\treturn profileName;\r\n\t}", "@Override\n\tpublic ImmutableMap<String, double[]> profiles() {\n\t\tvar nonPassengerTaskProfiles = calculator.getNonPassengerServingTaskProfiles()\n\t\t\t\t.entrySet()\n\t\t\t\t.stream()\n\t\t\t\t.sorted(Entry.comparingByKey(nonPassengerTaskTypeComparator))\n\t\t\t\t.map(e -> Pair.of(e.getKey().name(), e.getValue()));\n\n\t\t// occupancy profiles (for tasks related to passengers)\n\t\tvar occupancyProfiles = EntryStream.of(calculator.getVehicleOccupancyProfiles()).map(e -> Pair.of(e.getKey() + \" pax\", e.getValue()));\n\n\t\treturn Stream.concat(nonPassengerTaskProfiles, occupancyProfiles).collect(ImmutableMap.toImmutableMap(Entry::getKey, Entry::getValue));\n\t}", "public String getStatistics() throws IOException{\n initiateWordCount();\n getHamStatistics(); \n getSpamStatistics();\n return printStatistics(); \n }", "public void printStatistics() {\r\n\t\tLog.info(\"*** Statistics of Sequence Selector ***\");\r\n\r\n\t\t// chains\r\n\t\tLog.info(String.format(\"Chains: %d\", chains.size()));\r\n\t\tLog.info(String.format(\"Executable Chains: %d\", execChains.size()));\r\n\t\tLog.info(String.format(\"Causal Executable Chains: %d\",\r\n\t\t\t\tcausalExecChains.size()));\r\n\r\n\t\t// bushes\r\n\t\tLog.info(String.format(\"Bushes: %d\", bushes.size()));\r\n\t\tLog.info(String.format(\"Executable Bushes: %d\", execBushes.size()));\r\n\t\tLog.info(String.format(\"Required Bushes: %d\", requiredExecBushes.size()));\r\n\t\tLog.info(String.format(\"Redundant Bushes: %d\",\r\n\t\t\t\tredundantExecBushes.size()));\r\n\r\n\t\t// total\r\n\t\tLog.info(String.format(\"Bushes in Chains: %d\", bushesInChains.size()));\r\n\t\tLog.info(String.format(\"Total Sequences: %d\", totalSequences.size()));\r\n\r\n\t\t// time\r\n\t\tLog.info(String.format(\"Total Time: %d ms\", stopWatch.getTime()));\r\n\t\tLog.info(String.format(\"Time per Event: %d ms\", stopWatch.getTime()\r\n\t\t\t\t/ events.size()));\r\n\t}", "public static TransactionProfiler getLocalProfiler() {\r\n\t\treturn LOCAL_PROFILER.get();\r\n\t}", "public void testSummaryStatsPartialLog() {\n\n // TODO: Create File in platform independent way.\n File testFile = new File(\"src/test/data/dataset98.txt\");\n GcManager gcManager = new GcManager();\n File preprocessedFile = gcManager.preprocess(testFile, null);\n gcManager.store(preprocessedFile, false);\n JvmRun jvmRun = gcManager.getJvmRun(new Jvm(null, null), Constants.DEFAULT_BOTTLENECK_THROUGHPUT_THRESHOLD);\n Assert.assertEquals(\"GC event type count not correct.\", 2, jvmRun.getEventTypes().size());\n Assert.assertEquals(\"GC blocking event count not correct.\", 2, jvmRun.getBlockingEventCount());\n Assert.assertEquals(\"GC pause total not correct.\", 61, jvmRun.getTotalGcPause());\n Assert.assertEquals(\"GC first timestamp not correct.\", 1002192, jvmRun.getFirstGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last timestamp not correct.\", 1002847, jvmRun.getLastGcEvent().getTimestamp());\n Assert.assertEquals(\"GC last duration not correct.\", 41, jvmRun.getLastGcEvent().getDuration());\n Assert.assertEquals(\"Stopped Time event count not correct.\", 6, jvmRun.getStoppedTimeEventCount());\n Assert.assertEquals(\"Stopped time total not correct.\", 1064, jvmRun.getTotalStoppedTime());\n Assert.assertEquals(\"Stopped first timestamp not correct.\", 1000964,\n jvmRun.getFirstStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last timestamp not correct.\", 1003884,\n jvmRun.getLastStoppedEvent().getTimestamp());\n Assert.assertEquals(\"Stopped last duration not correct.\", 1000688, jvmRun.getLastStoppedEvent().getDuration());\n Assert.assertEquals(\"JVM first event timestamp not correct.\", 1000964, jvmRun.getFirstEvent().getTimestamp());\n Assert.assertEquals(\"JVM last event timestamp not correct.\", 1003884, jvmRun.getLastEvent().getTimestamp());\n Assert.assertEquals(\"JVM run duration not correct.\", 3920, jvmRun.getJvmRunDuration());\n Assert.assertEquals(\"GC throughput not correct.\", 98, jvmRun.getGcThroughput());\n Assert.assertEquals(\"Stopped time throughput not correct.\", 73, jvmRun.getStoppedTimeThroughput());\n Assert.assertTrue(Analysis.WARN_GC_STOPPED_RATIO + \" analysis not identified.\",\n jvmRun.getAnalysis().contains(Analysis.WARN_GC_STOPPED_RATIO));\n }", "public static void getClassUsage(){\r\n ClassMeasurement classMeasurement = new ClassMeasurement();\r\n classUsageList.add(classMeasurement);\r\n //ClassMeasurement.printClassMeasurement(classMeasurement);\r\n }", "private void aggregateStats() {\n\t\tfor (Map.Entry<Integer, ProcStats> entry : procStats.entrySet()) {\n\t\t\tfor (Map.Entry<Instant, Instant> startEndPair : entry.getValue().csStartAndEndTime)\n\t\t\t\taggStats.add(new HashMap.SimpleEntry(entry.getKey(), startEndPair));\n\t\t\ttotalWaitTime += entry.getValue().waitTime;\n\t\t\tnTotalReceived += entry.getValue().nReceived;\n\t\t\tnTotalSent += entry.getValue().nSent;\n\t\t}\n\t\tCollections.sort(aggStats, new SortByStartTime());\n\t\tint nTotalCS = aggStats.size();\n\t\tSystem.out.println(String.format(\"Total no. of CSs executed : %d\", nTotalCS));\n\t\tfor (Map.Entry<Integer, Map.Entry<Instant, Instant>> entry : aggStats)\n\t\t\tSystem.out.println(entry);\n\t\t\n\t\tfor (int i = 1; i < aggStats.size(); i++)\n\t\t\ttotalSyncDelay += Duration.between(aggStats.get(i - 1).getValue().getValue(), aggStats.get(i).getValue().getKey()).toNanos();\n\t\t\n\t\tSystem.out.println(String.format(\"\\nTotal synchronization delay in nanoseconds : %d\", totalSyncDelay));\n\t\tSystem.out.println(String.format(\"Average synchronization delay in nanoseconds : %f\\n\", (double)totalSyncDelay/(double)(nTotalCS - 1)));\n\t\t\n\t\tSystem.out.println(String.format(\"\\nTotal wait time in milliseconds : %d\", totalWaitTime));\n\t\tSystem.out.println(String.format(\"Average wait time in milliseconds : %f\\n\", (double)totalWaitTime/(double)nTotalCS));\n\t\t\n\t\tSystem.out.println(String.format(\"Total messages received : %d\", nTotalReceived));\n\t\tSystem.out.println(String.format(\"Average messages received : %f\\n\", (double)nTotalReceived/(double)nTotalCS));\n\t\t\n\t\tSystem.out.println(String.format(\"Total messages sent : %d\", nTotalSent));\n\t\tSystem.out.println(String.format(\"Average messages sent : %f\\n\", (double)nTotalSent/(double)nTotalCS));\n\t}", "public String getProfilingGroupName() {\n return this.profilingGroupName;\n }", "public MetadataProfile getProfile() {\n\t\treturn profile;\n\t}", "public Map<String, Object> getProfileProperties() {\n return profileProperties;\n }", "public void readCpuStat() {\n\t\ttry {\n\t\t\t// monitor total and idle cpu stat of certain process\n\t\t\tRandomAccessFile cpuInfo = new RandomAccessFile(\"/proc/stat\", \"r\");\n\t\t\tString[] toks = cpuInfo.readLine().split(\"\\\\s+\");\n\t\t\tidleCpu = Long.parseLong(toks[4]);\n\t\t\ttotalCpu = Long.parseLong(toks[1]) + Long.parseLong(toks[2])\n\t\t\t\t\t+ Long.parseLong(toks[3]) + Long.parseLong(toks[4])\n\t\t\t\t\t+ Long.parseLong(toks[6]) + Long.parseLong(toks[5])\n\t\t\t\t\t+ Long.parseLong(toks[7]);\n\t\t\tcpuInfo.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\t}", "java.util.Map<java.lang.Long, org.tensorflow.proto.profiler.XEventMetadata>\n getEventMetadataMap();", "public HashMap<String, String> getAIStatistics() {\n HashMap<String, String> stats = new HashMap<String, String>();\n HashMap<String, Long> objStats = new HashMap<String, Long>();\n Iterator<AIObject> iter = aiObjects.values().iterator();\n while (iter.hasNext()) {\n AIObject obj = iter.next();\n String className = obj.getClass().getSimpleName();\n if (objStats.containsKey(className)) {\n Long count = objStats.get(className);\n count++;\n objStats.put(className, count);\n } else {\n Long count = new Long(1);\n objStats.put(className, count);\n }\n }\n for (String k : objStats.keySet()) {\n stats.put(k, Long.toString(objStats.get(k)));\n }\n \n return stats;\n }", "String getProfile();", "private void getPoints()\n\t{\n\t\ttotalEntered = statsCollector.getTotalEnteredPoints();\n\t\taverageWait = statsCollector.getAverageWaitPoints();\n\t\tmaxWait = statsCollector.getMaxWaitPoints();\n\t\ttimeAlive = statsCollector.getTimeAlivePoints();\n\t}", "public PosSymbol getProfileName() {\n return profileName;\n }", "private void collectCpuMemoryUsage(){\r\n\t\tHmDomain hmDomain = CacheMgmt.getInstance().getCacheDomainByName(\"home\");\r\n\t\tfloat cpuUsage = LinuxSystemInfoCollector.getInstance().getCpuInfo() * 100;\r\n\t\tfloat memoryUsage = 0;\r\n\t\ttry {\r\n\t\t\tlong count[] = LinuxSystemInfoCollector.getInstance().getMemInfo();\r\n\t\t\tif(count[0] != 0){\r\n\t\t\t\tmemoryUsage = ((float)(count[0] - count[1] - count[2] - count[3]) * 100 / count[0]);\r\n\t\t\t}\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"calculate memory usage failure.\", e);\r\n\t\t}\r\n\t\tCpuMemoryUsage cmu = new CpuMemoryUsage();\r\n\t\tcmu.setCpuUsage(cpuUsage);\r\n\t\tcmu.setMemUsage(memoryUsage);\r\n\t\tcmu.setOwner(hmDomain);\r\n\t\tcmu.setTimeStamp((new Date()).getTime());\r\n\t\ttry {\r\n\t\t\tQueryUtil.createBo(cmu);\r\n\t\t} catch (Exception e) {\r\n\t\t\tBeLogTools.error(HmLogConst.M_PERFORMANCE,\"create CpuMemoryUsage failure.\", e);\r\n\t\t}\r\n\t}", "public String getThreadTimeInfo(long tid) {\n\t\t\n\t\tStringBuffer sb = new StringBuffer();\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\n\t\tif(!bean.isThreadCpuTimeSupported()) \n\t\t\treturn \"-1\";\n\n\t\tlong userTime = bean.getThreadUserTime(tid);\n\t\tlong cpuTime = bean.getThreadCpuTime(tid);\n\n\t\tsb.append(userTime).append(\"#\").append(cpuTime);\n\t\ttimeInfo = sb.toString();\n\t\treturn timeInfo;\n\t}", "public SharedMemory infos();", "java.lang.String getInsight();", "public String getTotalThreadTimeInfo(long[] tids) {\n\n\t\tStringBuffer sb = new StringBuffer();\n\t\n\t\tThreadMXBean bean = ManagementFactory.getThreadMXBean();\t\t\n\t\tif(!bean.isThreadCpuTimeSupported()) \t\t\t\t\t\t\t\n\t\t\treturn timeInfo;\n\t\tfor(long i : tids) {\n\t\t\tlong currentUserTime = bean.getThreadUserTime(i);\n\t\t\tlong currentCpuTime = bean.getThreadCpuTime(i);\n\t\t\tif(currentCpuTime != -1) {\t\t\t\t\t\t\t\t\t\t\n\t\t\t\ttotalCpuTime += currentCpuTime;\n\t\t\t\ttotalUserTime += currentUserTime;\n\t\t\t}\n\t\t\n\t\t}\n\t\tsb.append(totalUserTime).append(\"#\").append(totalCpuTime);\n\t\ttimeInfo = sb.toString();\n\t\treturn timeInfo;\n\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic List getDebugInfo();", "protected Map<String, Object> getUserProfile() {\r\n\t\tTimeRecorder timeRecorder = RequestContext.getThreadInstance()\r\n\t\t\t\t\t\t\t\t\t\t\t\t .getTimeRecorder();\r\n\t\tString profileId = (String)userProfile.get(AuthenticationConsts.KEY_PROFILE_ID);\r\n\r\n\t\tSite site = Utils.getEffectiveSite(request);\r\n\t\tString siteDNSName = (site == null ? null : site.getDNSName());\r\n\r\n\t\tIUserProfileRetriever retriever = UserProfileRetrieverFactory.createUserProfileImpl(AuthenticationConsts.USER_PROFILE_RETRIEVER, siteDNSName);\r\n\t\ttry {\r\n\t\t\ttimeRecorder.recordStart(Operation.PROFILE_CALL);\r\n\t\t\tMap<String, Object> userProfile = retriever.getUserProfile(profileId,\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t request);\r\n\t\t\ttimeRecorder.recordEnd(Operation.PROFILE_CALL);\r\n\t\t\treturn userProfile;\r\n\t\t} catch (UserProfileException ex) {\r\n\t\t\ttimeRecorder.recordError(Operation.PROFILE_CALL, ex);\r\n\t\t\tRequestContext.getThreadInstance()\r\n\t\t\t\t\t\t .getDiagnosticContext()\r\n\t\t\t\t\t\t .setError(ErrorCode.PROFILE001, ex.toString());\r\n\t\t\tthrow ex;\r\n\t\t}\r\n\t}", "public void endProfiling(){\r\n\t\tworld.profiler.endSection();\r\n\t}", "private java.util.Map<java.lang.String, java.lang.Object> collectInformation() {\n /*\n // Method dump skipped, instructions count: 418\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.ironsource.mediationsdk.utils.GeneralPropertiesWorker.collectInformation():java.util.Map\");\n }", "@Override\n\tpublic String getUsedCpuTime() {\n\t\treturn model.getUsedCpuTime();\n\t}", "public CANTalon.TrajectoryPoint[] calculateProfile() {\r\n\t\t\r\n\t\tCANTalon.TrajectoryPoint[] trajectory = new CANTalon.TrajectoryPoint[totalPoints + 1];\r\n\t\t\r\n\t\tfor(int i = 0; i <= totalPoints; i++) {\r\n\t\t\trunFilters();\r\n\t\t\tcalculateVelocity();\r\n\t\t\tcalculatePosition();\r\n\t\t\t\r\n\t\t\ttrajectory[i] = new CANTalon.TrajectoryPoint();\r\n\t\t\ttrajectory[i].timeDurMs = itp;\r\n\t\t\ttrajectory[i].position = currentPosition;\r\n\t\t\ttrajectory[i].velocity = currentVelocity * 60;\r\n\t\t\ttrajectory[i].profileSlotSelect = 0;\r\n\t\t\ttrajectory[i].velocityOnly = false;\r\n\t\t\ttrajectory[i].zeroPos = (currentPoint == 0);\r\n\t\t\ttrajectory[i].isLastPoint = (currentPoint == totalPoints);\r\n\t\t\t\t\t\r\n\t\t\tcurrentPoint++;\r\n\t\t}\r\n\t\t\r\n\t\tRobot.logger.log(\"Points in Trajectory: \" + totalPoints, 5);\r\n\t\t\t\t\r\n\t\treturn trajectory;\r\n\t}", "public double getProficiency(DefaultActivity i) {\n ActivityTypes subType = i.getActivityType();\n double proficiency = 0.0;\n int count = 1;\n switch (subType) {\n case SLEEP: //day\n for (String keyValue : i.getName().split(\" \")) {\n if (keyValue.length() >= 3) {\n if (sleepMap.get(keyValue) != null) {\n if (sleepMap.get(keyValue) <= 3) {\n proficiency += sleepMap.get(keyValue) * 100;\n count += sleepMap.get(keyValue);\n }\n } else {\n proficiency += 30;\n count++;\n }\n proficiency += proficiency / count;\n }\n }\n return proficiency;\n case MEAL: //day\n for (String keyValue : i.getName().split(\" \")) {\n if (keyValue.length() >= 4) {\n if (mealMap.get(keyValue) != null) {\n if (mealMap.get(keyValue) >= 4) {\n proficiency += mealMap.get(keyValue) * 100;\n count += mealMap.get(keyValue);\n }\n } else {\n proficiency += 30;\n }\n proficiency += proficiency / count;\n }\n }\n return proficiency;\n case TESTSTUDY: //week\n for (String keyValue : i.getName().split(\" \")) {\n if (keyValue.length() >= 4) {\n if (testMap.get(keyValue) != null) {\n if (testMap.get(keyValue) > 4) {\n proficiency += testMap.get(keyValue) * 100;\n count += testMap.get(keyValue);\n }\n } else {\n proficiency += 25;\n }\n proficiency += proficiency / count;\n }\n }\n return proficiency;\n default:\n return 50;\n }\n }", "public String currStats(){\n\t\treturn String.format(\"Damage: %f\\nRange (in tiles): %f\\nFire\"\n\t\t\t\t+ \" speed (shots per second): %d\\nUpgrade cost: %d\", damage,\n\t\t\t\trange / MainFrame.TILE_SIZE, initCooldown, getCostToUpgrade());\n\t}", "@Converted(kind = Converted.Kind.AUTO,\n source = \"${LLVM_SRC}/llvm/lib/Analysis/ProfileSummaryInfo.cpp\", line = 104,\n FQN=\"llvm::ProfileSummaryInfo::computeThresholds\", NM=\"_ZN4llvm18ProfileSummaryInfo17computeThresholdsEv\",\n cmd=\"jclank.sh -java-options=${SPUTNIK}/modules/org.llvm.analysis/llvmToClangType ${LLVM_SRC}/llvm/lib/Analysis/ProfileSummaryInfo.cpp -nm=_ZN4llvm18ProfileSummaryInfo17computeThresholdsEv\")\n //</editor-fold>\n private void computeThresholds() {\n if (!Summary.$bool()) {\n computeSummary();\n }\n if (!Summary.$bool()) {\n return;\n }\n final std.vector<ProfileSummaryEntry/*,default_cls_allocator*/> /*&*/ DetailedSummary = Summary.$arrow().getDetailedSummary();\n HotCountThreshold.$assign_T$RR(\n getMinCountForPercentile(DetailedSummary, $int2ulong(ProfileSummaryCutoffHot.$T()))\n );\n ColdCountThreshold.$assign_T$RR(\n getMinCountForPercentile(DetailedSummary, $int2ulong(ProfileSummaryCutoffCold.$T()))\n );\n }", "VirtualMachineProfile virtualMachineProfile();", "Map<String, Number> toStatsMap() {\n long s = successes.get();\n long r = responseTimes.get();\n long avg = s <= 0 ? -1 : r / s;\n\n Map<String, Number> stats = new HashMap<String, Number>();\n stats.put(\"successes\", (int) s);\n stats.put(\"averageResponseTime\", avg);\n stats.put(\"httpFailures\", httpFailures.get());\n stats.put(\"readTimeouts\", readTimeouts.get());\n stats.put(\"connectTimeouts\", connectTimeouts.get());\n stats.put(\"socketErrors\", socketErrors.get());\n stats.put(\"emptyResults\", emptyResults.get());\n return stats;\n }", "private void collectMetricsInfo() {\n // Retrieve a list of all references to registered metric services\n ServiceReference[] metricsList = null;\n try {\n metricsList = bc.getServiceReferences(null, SREF_FILTER_METRIC);\n } catch (InvalidSyntaxException e) {\n logError(INVALID_FILTER_SYNTAX);\n }\n \n // Retrieve information about all registered metrics found\n if ((metricsList != null) && (metricsList.length > 0)) {\n \n for (int nextMetric = 0;\n nextMetric < metricsList.length;\n nextMetric++) {\n \n ServiceReference sref_metric = metricsList[nextMetric];\n MetricInfo metric_info = getMetricInfo(sref_metric);\n \n // Add this metric's info to the list\n if (metric_info != null) {\n registeredMetrics.put(\n metric_info.getServiceID(),\n metric_info);\n }\n }\n }\n else {\n logInfo(\"No pre-existing metrics were found!\");\n }\n }", "public String getProfile() {\n return profile;\n }", "public Profile getProfile() {\n return _profile;\n }", "public void dump(String name) {\n String date = new SimpleDateFormat(\"c\",Locale.getDefault()).format(startDate);\n Log.v(\"Maply\", String.format(\"---MaplyTileFetcher %s Stats since %s---\",name,date));\n Log.v(\"Maply\", String.format(\" Active Requests = %d\",activeRequests) );\n Log.v(\"Maply\", String.format(\" Max Active Requests = %d\",maxActiveRequests) );\n Log.v(\"Maply\", String.format(\" Total Requests = %d\",totalRequests) );\n Log.v(\"Maply\", String.format(\" Canceled Requests = %d\",totalCancels) );\n Log.v(\"Maply\", String.format(\" Failed Requests = %d\",totalFails) );\n Log.v(\"Maply\", String.format(\" Data Transferred = %.2fMB\",(float)remoteData) );\n if (remoteRequests > 0) {\n Log.v(\"Maply\", String.format(\" Latency per request = %.2fms\",totalLatency / remoteRequests * 1000.0) );\n Log.v(\"Maply\", String.format(\" Average request size = %.2fKB\",remoteData / remoteRequests / 1024.0) );\n }\n Log.v(\"Maply\", String.format(\" Cached Data = %.2fMB\",localData / (1024.0*1024.0)) );\n }", "public long getUserTime( ) {\n ThreadMXBean bean = ManagementFactory.getThreadMXBean( );\n return bean.isCurrentThreadCpuTimeSupported( ) ?\n bean.getCurrentThreadUserTime( ) : 0L;\n}", "public abstract void calculateSufficientStatistics(File profiles);", "public String getPerformanceTime()\r\n {\r\n return performanceTime;\r\n }", "private static void printStats(Stats stats) {\n long elapsedTime = (System.nanoTime() - startTime) / 1000000;\n System.out.println(\"Analysis completed - \" + keyCount + \" keys processed in \" + elapsedTime + \" ms\");\n getConsole().println(\"Analysis completed - \" + keyCount + \" keys processed in \" + elapsedTime + \" ms\");\n stats.print();\n }", "com.google.protobuf2.Any getProfile();", "public static void getThreadInfo(){\r\n ThreadMeasurement currentThreadState = new ThreadMeasurement();\r\n threadList.add(currentThreadState);\r\n //ThreadMeasurement.printThreadState(currentThreadState);\r\n }", "private void statsOutput(long startTime, long endTime ,Stat stat, int taskSize, List<Stat> listStat) {\n\n System.out.println();\n System.out.println(\" !!! END OF REQUEST !!!\");\n System.out.println();\n System.out.println(\"----------------------------------\");\n System.out.println(\" STATISTICS\");\n System.out.println(\"----------------------------------\");\n System.out.println(\"1. Number of threads: \" + taskSize);\n System.out.println(\"2. Total run time: \" + (endTime - startTime));\n System.out.println(\"3. Total request sent: \" + stat.getSentRequestsNum());\n System.out.println(\"4. Total successful request: \" + stat.getSuccessRequestsNum());\n System.out.println(\"5. Mean latency: \" + stat.getMeanLatency());\n System.out.println(\"6. Median latency: \" + stat.getMedianLatency());\n System.out.println(\"7. 95th percentile latency: \" + stat.get95thLatency());\n System.out.println(\"8. 99th percentile latency: \" + stat.get99thLatency());\n\n if(listStat!=null){\n OutputChart outputChart = new OutputChart(listStat);\n outputChart.generateChart(\"Part 1\");\n }\n\n }" ]
[ "0.644738", "0.6117752", "0.61156714", "0.6079114", "0.6008916", "0.5992797", "0.59232485", "0.5895406", "0.58793104", "0.5860155", "0.5854131", "0.5853962", "0.57951105", "0.57874584", "0.57590055", "0.57583857", "0.5661549", "0.5577913", "0.5568414", "0.55584913", "0.5555462", "0.55444866", "0.5522242", "0.5518367", "0.5497682", "0.5494125", "0.54929155", "0.5491476", "0.54777724", "0.5456942", "0.54415476", "0.5426708", "0.54260254", "0.5422505", "0.54203963", "0.5403235", "0.5401977", "0.5392422", "0.53732276", "0.5352227", "0.5347355", "0.5345448", "0.53408915", "0.53357214", "0.5330647", "0.5321764", "0.5302458", "0.5290249", "0.5283727", "0.5278226", "0.5256067", "0.52489924", "0.5245169", "0.52400476", "0.5228186", "0.51970476", "0.5196199", "0.5192137", "0.51851606", "0.5184015", "0.51784736", "0.51701987", "0.5166664", "0.51664627", "0.5166085", "0.51656216", "0.5162864", "0.5159714", "0.5158049", "0.5153947", "0.5147922", "0.5146907", "0.51395285", "0.5130171", "0.5129103", "0.51242286", "0.5122091", "0.5119202", "0.5112326", "0.51101106", "0.51084673", "0.5106482", "0.51026094", "0.50957364", "0.5089439", "0.5086744", "0.50858486", "0.5082435", "0.5082061", "0.50809133", "0.508061", "0.507913", "0.5076922", "0.507401", "0.5070144", "0.50700086", "0.5065282", "0.50651693", "0.5064928", "0.50518686" ]
0.68125683
0
Set timeout (unless it is negative).
public void setTimeout (int timeout) { if (timeout >= 0) call.setTimeout (new Integer (timeout)); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void setTimeout(int _timeout) {\n if (timeout < 0)\n return;\n timeout = _timeout;\n }", "T setStartTimeout(Integer timeout);", "public void setTimeout(int timeout) {\r\n this.timeout = timeout;\r\n }", "public void setTimeout(int timeout);", "public void setTimeout( int timeout ) {\n this.timeout = timeout;\n }", "private void setTimedOut() {\n\t\tthis.timedOut.set(true);\n\t}", "public void setTimeout(Integer timeout) {\n\t\tthis.timeout = timeout;\n\t}", "public void setTimeout(double timeout){\n this.timeout = timeout;\n }", "public void setTimeout(int timeout) {\n this.timeout = timeout;\n }", "void setTimeout(@Nullable Duration timeout);", "public void setTimeout(long timeout)\r\n\t{\r\n\t\tthis.timeout = timeout;\r\n\t}", "public void setTimeout(long timeout) {\n this.timeout = timeout;\n }", "public void setTimeout(long timeout) {\n this.timeout = timeout;\n }", "public void setTimeout(final long timeout);", "public void setTimeout(int timeout) {\r\n\t\tthis.TIMEOUT = timeout;\r\n\t}", "public void setTimeout(final String timeout);", "public void setTimeout(Long value) {\r\n timeout = value;\r\n incompatibleWithSpawn |= timeout != null;\r\n }", "public void setTimeout(long timeout) {\n\t\tthis.timeout = timeout;\n\t}", "public void setTimeOut(int value) {\n this.timeOut = value;\n }", "public long timeout(long timeout);", "public void setTimeout(final int timeout) {\n this.timeout = timeout;\n }", "void setTimeout(long timeout) {\n if(timeout < 0) {\n throw new RuntimeException(buildMessage(\"Timeout value must be positive, not \" + timeout));\n }\n this.timeout = timeout;\n }", "public void setTimeout(org.apache.axis.types.UnsignedInt timeout) {\n this.timeout = timeout;\n }", "void setOperationTimeout(int timeout) throws RemoteException;", "protected void setTimeout() {\r\n\t\tTimeout timeout = new Timeout();\r\n\t\tt.schedule(timeout, TIMEOUT);\r\n\t}", "void setTimeout(long timeoutInNanos);", "@Test\r\n public void testSetTimeout() {\r\n // Not required\r\n }", "public void setDelayedTimeout(int seconds);", "public void resetTimeout(){\n this.timeout = this.timeoutMax;\n }", "public void setTimeOut(long timeOut) {\n _timeOut = timeOut;\n }", "@Override\n\tpublic void setOpTimeout(long arg0) {\n\n\t}", "public void setTimeout(int newTimeout) {\n this.timeout = newTimeout;\n }", "public void setTimeout(int timeout) {\r\n\t\tconnTimeout = timeout;\r\n\t}", "void setStartTimeout(int startTimeout);", "public void setNortpTimeout(int seconds);", "public void setTimeout(final int timeout) {\r\n clock.setTimeout(timeout);\r\n }", "public void setTimeout(long t) {\n StepTimeout = t;\n }", "public interface SetTimeout {\n /**\n * Mark next #wait to timeoutInNanos.\n *\n * @param timeoutInNanos\n */\n void setTimeout(long timeoutInNanos);\n}", "public SetIdleTimeoutCommand(int timeout) {\n this.timeout = timeout;\n }", "public boolean setTimeout(int timeout) {\n try {\n mTimeout = timeout;\n return true;\n } catch (Exception ex) {\n return false;\n }\n }", "public void setTimeouted() {\n this.timeouted = true;\n }", "@Override\n\tpublic void setConnectTimeout(long arg0) {\n\n\t}", "public void setIncTimeout(int seconds);", "void setStopTimeout(int stopTimeout);", "@Override\n public void setQueryTimeout( int x ) throws SQLException {\n timeout = x;\n }", "public LWTRTPdu timeout() throws IncorrectTransitionException;", "public void setSipTransportTimeout(int timeoutMs);", "public void setTimeoutLength(int timeout) {\n\t\tmyTimeoutLength = timeout;\n\t\tif (myPort == null) {\n\t\t\treturn;\n\t\t}\n\t\tmyPort.setTimeoutLength(timeout);\n\t}", "public native void setKeepAliveTimeout (int timeout);", "Builder withHardTimeout(int timeout);", "void setTransactionTimeout(int seconds) throws SystemException;", "public void setInCallTimeout(int seconds);", "long getTimeout();", "int hardTimeout();", "public void setResponseTimeOut(int timeOut)\n {\n fResponseTimeOut = timeOut;\n }", "public void onTimeout();", "void resetTimeout() {\n timer.cancel();\n timer = getTimer();\n timer.schedule(getTimerTask(), this.timeout);\n }", "public abstract void isTimeout(long ms);", "public void handleTimeout();", "int timeout();", "public abstract void onTimeout();", "@Test\n public void testSetTimeout() throws Exception {\n MockPIFrame frame = startSession();\n int timeout = 4000;\n\n // 1. driver requests setTimeout, server replies \"OK\" without contacting the browser\n sendCommand(\"setTimeout\", \"100\", \"\").expectResult(\"OK\");\n // 2. driver requests open\n DriverRequest open = sendCommand(\"open\", \"blah.html\", \"\", timeout);\n // 3. original frame receives open request; replies \"OK\"\n frame.expectCommand(\"open\", \"blah.html\", \"\");\n frame.sendResult(\"OK\");\n // 4. normally, a new frame instance would come into existence, and\n // send back a \"START\". But instead, too much time passes.\n sleepForAtLeast(timeout);\n // 5. server replies to driver with an error message\n String result = open.getResult();\n boolean hasTimeoutMessage = result.contains(\"timed out waiting for window\");\n assertTrue(\"wrong error message on timeout\", hasTimeoutMessage);\n }", "@Override\n public void onTimeout(TimeValue timeout) {\n run();\n }", "public void forceTimeout() {\n getTimeoutScheduler().forceExecute();\n }", "public int getTimeout();", "void timedOut();", "@Deprecated\r\n\tpublic void setTimeout(int timeout) {\r\n\t\tsetClientSoTimeout(timeout);\r\n\t\tsetServerSoTimeout(timeout);\r\n\t}", "public void setDefaultTimeout(int defaultTimeout) {\n this.defaultTimeout = defaultTimeout;\n }", "public native void setDefaultRetryTimeout (long retryTimeout) throws IOException,IllegalArgumentException;", "int getTimeout();", "@Override\r\n\tpublic void setLoginTimeout(int arg0) throws SQLException {\n\r\n\t}", "public long getTimeout() { return timeout; }", "public long GetTimeout() { return timeout; }", "@Override\n public void setTransactionTimeout(int arg0) throws SystemException {\n throw new UnsupportedOperationException();\n }", "public final synchronized void setConnectionTimeout(final int timeout) {\n HttpConnectionParams.setConnectionTimeout(params, timeout);\n }", "private static void timeout(String user, int time) { sendMessage(\"/timeout \" + user + \" \" + time); }", "public void setQueryTimeout(int seconds) throws SQLException {\n\r\n }", "void cancelTimeout() {\n timeoutCancelled = true;\n if (timeout != null) {\n timeout.cancel();\n }\n }", "public AutonDelay(double timeout) {\n super(\"autonDelay\");\n setTimeout(timeout);\n }", "public TimeoutException(long time) {\n\t\tduration = time;\n\t}", "private void reStartTimeout() {\n cancelTask();\n startTimeout();\n }", "protected void onTimeout() {\n }", "@Override\r\n\tpublic void setTransactionTimeout(int seconds) throws SystemException {\r\n\t\trequireTransaction(\"timeout\");\r\n\t}", "public final synchronized void setSocketTimeout(final int timeout) {\n HttpConnectionParams.setSoTimeout(params, timeout);\n }", "public void requestTimeout(Pdu packet);", "Future timeoutIn(long timeout, TimeUnit timeUnit);", "@Override\r\n\t\tpublic void setNetworkTimeout(Executor executor, int milliseconds)\r\n\t\t\t\tthrows SQLException {\n\t\t\t\r\n\t\t}", "public void setSendTimeout(int sendTimeout){\n return; //TODO codavaj!!\n }", "public void setTimeout (double seconds) {\n multiPathTimeout = seconds;\n }", "public void setQueryTimeout(long timeout) {\n queryTimeout = timeout;\n }", "private void checkTimeout() {\n val timeout = config.getInt(\"timeout\");\n\n checkArgument(timeout >= 1000, \"timeout is less than 1000!\");\n }", "public void setHttpClientTimeout(int timeout) {\n this.connectTimeout = timeout;\n this.customized = true;\n }", "public int getDelayedTimeout();", "public native void setDefaultEnqueueTimeout (long enqueueTimeout) throws IOException,IllegalArgumentException;", "protected void setTimeout(long milliseconds) {\n\t\tproxy.setTimeout(milliseconds);\n\t}", "@Override\n public ConfigurationImpl setNetworkCheckTimeout(int timeout) {\n this.networkCheckTimeout = timeout;\n return this;\n }", "public void setSoTimeout(int soTimeout)\r\n\t{\r\n\t\tthis.soTimeout = soTimeout;\r\n\t}", "public void setConnectTimeout(int connectTimeout){\n return; //TODO codavaj!!\n }", "protected void pktTimeout() {}", "public void setLoginTimeout(int paramLoginTimeout) {\n\tiLoginTimeout = paramLoginTimeout ;\n }" ]
[ "0.80908793", "0.79804426", "0.7820099", "0.7810785", "0.7801524", "0.7769376", "0.77595514", "0.7758553", "0.7745381", "0.7709139", "0.7684309", "0.76824445", "0.76824445", "0.7677326", "0.76466507", "0.7615252", "0.7590117", "0.75633246", "0.75029314", "0.7488691", "0.7482827", "0.74653566", "0.74562943", "0.73462653", "0.7311054", "0.7302251", "0.72785276", "0.7264002", "0.7205341", "0.7194362", "0.71919364", "0.7158638", "0.71260226", "0.7063985", "0.70499337", "0.70265853", "0.6890892", "0.6848304", "0.68249303", "0.6763047", "0.66967744", "0.66603523", "0.66353816", "0.66294914", "0.66203856", "0.6592716", "0.65481836", "0.65367675", "0.6534858", "0.65029454", "0.65015763", "0.64916426", "0.64898694", "0.6486694", "0.64864343", "0.6479786", "0.6438342", "0.6403587", "0.63926905", "0.6367894", "0.63639754", "0.6333574", "0.6314534", "0.630777", "0.62981707", "0.62947315", "0.62904716", "0.6279211", "0.62776136", "0.6268964", "0.623995", "0.6222092", "0.6213874", "0.61995554", "0.61952347", "0.61937314", "0.6180796", "0.61753875", "0.6166203", "0.613167", "0.6126425", "0.6122424", "0.6120389", "0.61202526", "0.6101452", "0.6076991", "0.60628045", "0.6062231", "0.6058963", "0.6053742", "0.60512644", "0.6040476", "0.6039869", "0.6034931", "0.60036373", "0.60018337", "0.5992823", "0.5992049", "0.59774774", "0.5976611" ]
0.75265133
18
Call 'method' with 'parameters' and return its result. Method can be given in several forms.
public Object doCall (QName method, Object[] parameters) throws GException { try { call.setOperationName (method); if (profiling) { long start = System.currentTimeMillis(); Object result = call.invoke (parameters); long time = System.currentTimeMillis() - start; profilingTotal += time; // should be replaced by java.util.Formatter from Java 1.5 profileBuf.append (time); profileBuf.append ("\t"); profileBuf.append (method.toString()); // profileBuf.append (Printf.format ("%7d\t%s\n", // new String[] { "" + time, // method.toString() })); return result; } else { return call.invoke (parameters); } } catch (AxisFault e) { ByteArrayOutputStream baos = new ByteArrayOutputStream(); PrintStream ps = new PrintStream (baos); AxisUtils.formatFault (e, ps, target.toString(), (call == null ? null : call.getOperationName())); throw new GException (baos.toString()); } catch (Exception e) { throw new GException (e.toString()); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected synchronized Object call(final String method, final Object... params) throws XmlRpcException {\r\n\r\n\t\tLOGGER.finest(\"Executing call \" + method + \" \" + Arrays.toString(params));\r\n\t\treturn client.execute(method, params);\r\n\t}", "public Object call(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).get(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result\", e);\r\n\t\t}\r\n\t}", "public AsyncResult<Value> call(Jid jid, String methodName, Value... parameters) {\r\n AsyncResult<IQ> query = xmppSession.query(IQ.set(jid, Rpc.ofMethodCall(methodName, parameters)));\r\n return query.thenApply(result -> {\r\n if (result != null) {\r\n Rpc rpc = result.getExtension(Rpc.class);\r\n if (rpc != null) {\r\n Rpc.MethodResponse methodResponse = rpc.getMethodResponse();\r\n if (methodResponse != null) {\r\n if (methodResponse.getFault() != null) {\r\n throw new CompletionException(new RpcException(methodResponse.getFault().getFaultCode(), methodResponse.getFault().getFaultString()));\r\n }\r\n return methodResponse.getResponse();\r\n }\r\n }\r\n }\r\n return null;\r\n });\r\n }", "public abstract Object[] callMethod(IComputerAccess computer, ILuaContext context, int method,\n\t\t\t\tObject[] arguments) throws Exception;", "String execute(String... parameters);", "public Object call(Object receiver, String methodName, Object[] parameter) {\r\n\t\tClass<?>[] parameterClasses = new Class<?>[parameter.length];\r\n\t\tint index = 0;\r\n\t\tfor (Object param : parameter) {\r\n\t\t\tparameterClasses[index] = param.getClass();\r\n\t\t\tindex++;\r\n\t\t}\r\n\t\tClass<?> aClass = receiver.getClass();\r\n\t\tObject result = null;\r\n\t\twhile (aClass!=Object.class) {\r\n\t\t\ttry {\r\n\t\t\t\tMethod method = aClass.getDeclaredMethod(methodName, parameterClasses);\r\n\t\t\t\tmethod.setAccessible(true);\r\n\t\t\t\tresult = method.invoke(receiver, parameter);\r\n\t\t\t\treturn result;\r\n\t\t\t} catch (SecurityException e) {\r\n\t\t\t\tLoggingUtil.getLoggerFor(this).finest(LoggingUtil.getMessageAndStackTrace(e));\r\n\t\t\t} catch (NoSuchMethodException e) {\r\n\t\t\t\tLoggingUtil.getLoggerFor(this).finest(LoggingUtil.getMessageAndStackTrace(e));\r\n\t\t\t} catch (IllegalArgumentException e) {\r\n\t\t\t\tLoggingUtil.getLoggerFor(this).finest(LoggingUtil.getMessageAndStackTrace(e));\r\n\t\t\t} catch (IllegalAccessException e) {\r\n\t\t\t\tLoggingUtil.getLoggerFor(this).finest(LoggingUtil.getMessageAndStackTrace(e));\r\n\t\t\t} catch (InvocationTargetException e) {\r\n\t\t\t\tLoggingUtil.getLoggerFor(this).finest(LoggingUtil.getMessageAndStackTrace(e));\r\n\t\t\t} finally {\r\n\t\t\t\taClass =aClass.getSuperclass();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "public String callString(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getString(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to String\", e);\r\n\t\t}\r\n\t}", "public static Method getMethod(final Class<?> clazz, final String method, final Class<?>... parameters) {\n try {\n return clazz.getDeclaredMethod(method, parameters);\n } catch (NoSuchMethodException e) {\n fail(\"Method [\" + method + \"] with parameters [\" + parameters + \"] not found on class [\" + clazz.getName() + \"]\");\n } catch (NullPointerException e) {\n fail(\"Invalid parameters given for method extraction, using method [\" + method + \"], parameters [\" + parameters + \"] and class [\" + clazz + \"]\");\n }\n return null;\n }", "protected String getMethodCallText(String receiver, String method,\n ParameterDescriptor[] parameters) {\n StringBuilder result =\n new StringBuilder().append(getApplyReceiverText(receiver)).append(getApplyOperatorText())\n .append(method).append(getLeftParametersText());\n String separator = \"\";\n for (ParameterDescriptor parameter : parameters) {\n result.append(separator).append(getValueText(parameter));\n separator = getParameterSeparator();\n }\n result.append(getRightParametersText());\n\n return result.toString();\n }", "void callMethod(String name, Object... args)\n throws ScriptRunnerException;", "public void callMethod( String objectName, String methodName, Object[] parameters, Class[] parameterTypes )\n throws MraldException\n {\n try\n {\n Class mraldObject = ( Class )Class.forName( objectName ).newInstance();\n Method method = mraldObject.getMethod( methodName, parameterTypes );\n method.invoke( mraldObject, parameters );\n }\n catch ( ClassNotFoundException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( NoSuchMethodException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( IllegalAccessException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InstantiationException e )\n {\n throw new MraldException(e, messageObject);\n }\n catch ( InvocationTargetException e )\n {\n throw new MraldException(e, messageObject);\n }\n }", "MethodName getMethod();", "<R> Promise<R> invoke(String methodName, Class<R> returnType, Object... arguments);", "Object executeMethodCall(ActionType actionType, String actionName, Map<String, Object> inParams) throws APIException;", "public String invokeMethod(String pid,\n String methodName,\n Map<String, List<String>> parameters,\n Long asOfTime)\n throws\n BackendInvalidCredsException,\n BackendMethodFailedException,\n BackendInvalidResourceException;", "public static String sendRequest(MyTDCServer server, Method method, String[] args) throws Exception {\n\t\tswitch(method) { // The desired service method.\n\t\t\t// Ensures that the correct arguments have been inputted.\n\t\t\t// First element being the method, and the second being the location.\n\t\t\tcase currentOffset: \n\t\t\t\tif (args.length == 2) {\n\t\t\t\t\t// Returns a String representation of the Double value received \n\t\t\t\t\t// from the webservices currentOffset method (based on the location).\n\t\t\t\t\treturn Double.toString(server.currentOffset(args[1]));\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase listLocations:\n\t\t\t\t// Invokes the listLocations webservice method.\n\t\t\t\t// Outputs a list of the available locations.\n\t\t\t\treturn server.listLocations();\n\t\t\tcase difference:\n\t\t\t\t// Ensures that the correct arguments have been inputted.\n\t\t\t\t// First element being the method, the second being the first location, and the third being the second location.\n\t\t\t\tif (args.length == 3) {\n\t\t\t\t\t// Calculates and returns the offset difference between two locations.\n\t\t\t\t\treturn server.difference(args[1].toUpperCase(), args[2].toUpperCase());\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t}\n\t\treturn DEFAULT_ERROR;\n\t}", "<T> T callMethod(String name, Class<T> resultType, Object... args)\n throws ScriptRunnerException;", "Object executeMethodCall(String actionName, String inMainParamValue) throws APIException;", "@Override\n\tpublic void runFunction(String functionName, String[] parameter) throws Exception {\n\t\tfinal Method method;\n\t\tfinal String methodName = functionAssignments.get(functionName);\n\t\t\t\t\n\n\t\tif (parameter.length==0) {\n\t\t\ttry {\n\t\t\t\tmethod = this.clzz.getDeclaredMethod(methodName);\n\t\t\t\tmethod.invoke(this);\n\t\t\t} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {\n\t\t\t\tlog.error(\"Cannot invoke method. \", e);\t\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t} else {\n\t\t\ttry {\n\t\t\t\tmethod = this.clzz.getDeclaredMethod(methodName, String[].class);\n\t\t\t\tmethod.invoke(this, (Object)parameter);\n\t\t\t} catch (NoSuchMethodException | SecurityException | IllegalAccessException | IllegalArgumentException | InvocationTargetException e) {\n\t\t\t\tlog.error(\"Cannot invoke method. Maybe a parameter is used, where there should not be any parameter\");\t\n\t\t\t\tthrow e;\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public void simulateMethod(SootMethod method, ReferenceVariable thisVar, ReferenceVariable returnVar,\n ReferenceVariable params[]) {\n\n String subSignature = method.getSubSignature();\n\n if (subSignature.equals(\"java.lang.Object getObjectFieldValue(java.lang.Object,long)\")) {\n java_io_ObjectOutputStream_getObjectFieldValue(method, thisVar, returnVar, params);\n return;\n\n } else {\n defaultMethod(method, thisVar, returnVar, params);\n return;\n\n }\n }", "public FunctionCall( Method method , Class< ? > returnType ) {\r\n this.method = method;\r\n this.returnType = returnType;\r\n }", "public Object invoke(Object obj, Object[] params) throws Exception {\r\n return this.method.invoke(obj, params);\r\n }", "public String callTheAgentViaXmlRpc(String function, String[] params) {\r\n String result = null;\r\n //the parameters are inserted in a vector\r\n Vector v = new Vector();\r\n for(int i = 0; i < params.length; i ++){\r\n v.addElement(params[i]);\r\n }\r\n \r\n log.info(function + \" method is going to be called\");\r\n\r\n try {\r\n\r\n result = (String) myClient.execute(function, v);\r\n } catch (XmlRpcException e) {\r\n log.info(\"exception while transmitting message \" + e);\r\n } catch (java.io.IOException e) {\r\n log.info(\"exception while transmitting message \" + e);\r\n }\r\n return result;\r\n }", "public static Object invokeMethod(Method method, Object[] args) {\n try {\n return method.invoke(null, args);\n }\n catch (IllegalAccessException | InvocationTargetException e) {\n e.printStackTrace();\n }\n return null;\n }", "Method getMethod();", "Method getMethod();", "public Method getMethod();", "public static Object invokeMethod(Method method, Object instance, Object... params) {\n return performReflectionAction(() -> method.invoke(instance, params));\n }", "public int callInt(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getInt(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to int\", e);\r\n\t\t}\r\n\t}", "public static HttpResponseMessage executeHttpMethod(HttpMethod method) {\n\n HttpResponseMessage responseMessage = null;\n\n try {\n System.out.println(\"Method invocation on URI: \\n\");\n System.out.println(method.getURI().toString());\n // Execute Request\n LowLevelRestApi.httpClient.executeMethod(method);\n responseMessage = LowLevelRestApi.extractResponseInformation(method);\n } catch (Exception e) {\n e.printStackTrace();\n } finally {\n\n // Release Connection anyway\n method.releaseConnection();\n }\n\n // Extract response information and return\n return responseMessage;\n }", "public static Object perform(Object receiver, String methodName, Object[] arguments, Class[] types) throws DiagnoseException {\r\n if (\"this\".equals(methodName))\r\n return receiver;\r\n Object result = null;\r\n try {\r\n Class methodClass = receiver.getClass();\r\n if (methodClass == Class.class) // receiver is class?\r\n methodClass = (Class) receiver;\r\n Method method = methodClass.getMethod(methodName, types);\r\n result = method.invoke(receiver, arguments);\r\n } catch (IllegalArgumentException e) {\r\n throw new DiagnoseException(\"IllegalArgumentException invoking \" + methodName, e);\r\n } catch (IllegalAccessException e) {\r\n throw new DiagnoseException(\"IllegalAccessException invoking \" + methodName, e);\r\n } catch (InvocationTargetException e) {\r\n throw new DiagnoseException(\"InvocationTargetException invoking \" + methodName, e);\r\n } catch (SecurityException e) {\r\n throw new DiagnoseException(\"SecurityException invoking \" + methodName, e);\r\n } catch (NoSuchMethodException e) {\r\n throw new DiagnoseException(\"NoSuchMethodException invoking \" + methodName, e);\r\n }\r\n return result;\r\n }", "protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }", "protected final Object dynamicMethod(GeneratedMessageLite.MethodToInvoke paramMethodToInvoke, Object paramObject1, Object paramObject2) {\n }", "public JsonNode callMethod(final JsiiObjectRef objRef, final String method, final ArrayNode args) {\n ObjectNode req = makeRequest(\"invoke\", objRef);\n req.put(\"method\", method);\n req.set(\"args\", args);\n\n JsonNode resp = this.runtime.requestResponse(req);\n return resp.get(\"result\");\n }", "ServiceResponse execute(RequestParameters request);", "protected JSONObject doRequest(String method, Object[] params) throws JSONRPCException\r\n\t{\n\t\tJSONArray jsonParams = new JSONArray();\r\n\t\tfor (int i=0; i<params.length; i++)\r\n\t\t{\r\n\t\t\tjsonParams.put(params[i]);\r\n\t\t}\r\n\t\t\r\n\t\t//Create the json request object\r\n\t\tJSONObject jsonRequest = new JSONObject();\r\n\t\ttry \r\n\t\t{\r\n\t\t\t//id hard-coded at 1 for now\r\n\t\t\tjsonRequest.put(\"id\", 1);\r\n\t\t\tjsonRequest.put(\"method\", method);\r\n\t\t\tjsonRequest.put(\"params\", jsonParams);\r\n\t\t}\r\n\t\tcatch (JSONException e1)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Invalid JSON request\", e1);\r\n\t\t}\r\n\t\treturn doJSONRequest(jsonRequest);\r\n\t}", "protected Object executeMethod(Object instance, Method method, Object args) {\n try {\n if (args == null) {\n return method.invoke(instance);\n } else {\n return method.invoke(instance, args);\n }\n } catch (Exception e) {\n exceptionHandling(e);\n return null;\n }\n }", "public void execute(MethodInfo method, Vector localVariables,\n OperandStack callerStack) {\n VerificationFrameFactory frameFactory = FrameFactoryPlaceHolder.getInstanceOf().getFactory();\n String methodString = oracle.getMethodOrFieldString(method);\n try {\n if (executeVirtually(method, localVariables, callerStack)) {\n return;\n }\n\n workBeforeMethodExecuted(method, localVariables, callerStack, lastInstrExecuted);\n\n //clear any already existing frame from the method instructions.\n clearMethodOldFrames(method);\n //INITIALIZATION\n Frame frame = InitializeFirstInstruction.createFrameAndInitFirstInstr(method, localVariables);\n LocalVariables locaVar = frame.getLocalVariables();\n Vector callingParameters = (Vector) locaVar.getAll().clone();\n lastBytecodeVerifier = frameFactory.createBytecodeVerifier(frame, method, callingParameters);\n if (frame != null && shouldMethodExecute(method, localVariables, callerStack)) {\n\n if (methodString.contains(\"testException\")) {\n //System.out.println(\"Stop here\");\n //shouldDebugPrint = true;\n }\n Debug_print(\"\\n---------------------------- Class Name = \",\n ClassFile.currentClassToWorkOn.getFullyQualifiedClassName());\n Debug_print(\" method = \" + oracle.getMethodOrFieldString(method),\n \", method NaTIndex=\" + method.getNameIndex() + \", \" + method.getDescriptorIndex());\n Debug_print(\"\\n\\n\\tOperandStack after initiliation \", frame.getOperandStack());\n Debug_print(\"\\tLocalVariables after initiliation \", frame.getLocalVariables());\n //done with initilization and now executeInstructions verification on the method\n executeInstructions(lastBytecodeVerifier, callerStack, localVariables);\n } else {\n Debug_print1(\"************ Method has been execute before and is not executed again or has no instructions\");\n }\n workAfterMethodExecuted(method, frame, callerStack,\n lastBytecodeVerifier.getReturnType(),\n callingParameters);\n } catch (Exception d) {\n d.printStackTrace();\n Miscellaneous.exit();\n }\n }", "public long callLong(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getLong(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to long\", e);\r\n\t\t}\r\n\t}", "public ObjectType callMethod(String methodName, ObjectType... args) {\n\t\t// getting the member\n\t\tObjectType member = getProperty(methodName);\n\t\t//check if exists\n\t\tif (member.isUndefined())\n\t\t\t//call hosted one instead if not exist\n\t\t\treturn callHostedMethod(\"_\", methodName, args);\n\t\t\n\t\t//calling the function\n\t\treturn member.invoke(this, args);\n\t}", "@Override\n\tpublic Object getResponseObject(String resourceMethod, String parameter) throws Exception {\n\t\t\n\t\tMethod method;\t\t\n\t\tObject result;\n\t\t\n\t\t//Use reflection to invoke the appropriate method and store the result\n\t\ttry {\n\t\t\tif (parameter != null) {\n\t\t\t\t\n\t\t\t\tmethod = this.getClass().getMethod(resourceMethod, String.class);\n\t\t\t\tresult = method.invoke(this, parameter);\n\t\t\t} else {\n\t\t\t\t\n\t\t\t\tmethod = this.getClass().getMethod(resourceMethod);\n\t\t\t\tresult = method.invoke(this);\n\t\t\t}\t\t \n\t\t} catch (SecurityException se) {\n\t\t\t\n\t\t\tthrow new Exception (\"Security exception getting method\", se);\n\t\t} catch (NoSuchMethodException nsme) {\n\t\t\t\n\t\t\tthrow new Exception (\"No such method exception getting method\", nsme);\n\t\t} catch (IllegalArgumentException iae) {\n\t\t\t\n\t\t\tthrow new Exception (\"Illegal argument exception invoking method\", iae);\t\t\t\n\t\t} catch (IllegalAccessException iace) {\n\t\t\t\n\t\t\tthrow new Exception (\"Illegal access exception getting method\", iace);\n\t\t} catch (InvocationTargetException ite) {\n\t\t\t\n\t\t\tthrow new Exception (\"Invocation target exception getting method\", ite);\t\t\t\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "public double callDouble(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getDouble(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to double\", e);\r\n\t\t}\r\n\t}", "public Method getMethodByParameters(String name, Class<?> returnType, Class<?>[] args) {\r\n \t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (method.getReturnType().equals(returnType) && Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}", "public EthTransaction callModMethod(String method, Object... args) throws NoSuchContractMethod {\n\t\tFunction methodFunction = factory.getModFunction(method);\n\n\t\tif (methodFunction == null) {\n\t\t\tthrow new NoSuchContractMethod(\"Method \" + method + \" does not exist for contract factory\");\n\t\t}\n\n\t\tEthTransaction tx = new EthTransaction(this.contractAddress, BigInteger.ZERO, EthTransaction.defaultGasPrice,\n\t\t\t\tEthTransaction.defaultGasLimit, methodFunction.encode(args));\n\t\tlogger.debug(\"Generated function call tx(contractAddress: \" + this.contractAddress + \", method: \" + method\n\t\t\t\t+ \", params: \" + Arrays.toString(args) + \")\" + tx.toString());\n\n\t\treturn tx;\n\t}", "Object executeMethod(Object pObject, Method pMethod,Object[] pArgs) {\r\n\t\tObject result = null ;\r\n\t\ttry {\r\n\t\t\tresult = pMethod.invoke(pObject,pArgs) ;\r\n\t\t} catch (Exception e) {\r\n\t\t\tString message ;\r\n\t\t\tmessage = \"Error Capturing \" + getCallingClassSignature() ;\r\n\t\t\t_supervisor.echo(message) ;\r\n\t\t\tthrow new ExecutionException(message) ;\r\n\t\t}\r\n\t\treturn result ;\r\n\t}", "public static <T> T invoke(Method method, Object o, Object... params) {\n try {\n return (T) method.invoke(o, params);\n } catch (IllegalAccessException e) {\n throw new RuntimeException(e);\n } catch (InvocationTargetException e) {\n throw new RuntimeException(e.getCause());\n }\n }", "protected void invokeMethod(MetaMethod method) {\n Class callClass = method.getInterfaceClass();\n boolean useInterface = false;\n if (callClass == null) {\n callClass = method.getCallClass();\n }\n else {\n useInterface = true;\n }\n String type = BytecodeHelper.getClassInternalName(callClass.getName());\n String descriptor = BytecodeHelper.getMethodDescriptor(method.getReturnType(), method.getParameterTypes());\n\n // System.out.println(\"Method: \" + method);\n // System.out.println(\"Descriptor: \" + descriptor);\n\n if (method.isStatic()) {\n loadParameters(method, 3);\n cv.visitMethodInsn(INVOKESTATIC, type, method.getName(), descriptor);\n }\n else {\n cv.visitVarInsn(ALOAD, 2);\n helper.doCast(callClass);\n loadParameters(method, 3);\n cv.visitMethodInsn((useInterface) ? INVOKEINTERFACE : INVOKEVIRTUAL, type, method.getName(), descriptor);\n }\n\n helper.box(method.getReturnType());\n }", "public boolean callBoolean(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getBoolean(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to boolean\", e);\r\n\t\t}\r\n\t}", "<T> T callMethod(Object obj, String name, Class<T> resultType, Object... args)\n throws ScriptRunnerException;", "String getMethod();", "String getMethod();", "public Method getMethodByParameters(String name, Class<?>... args) {\r\n \t\t\r\n \t\t// Find the correct method to call\r\n \t\tfor (Method method : getMethods()) {\r\n \t\t\tif (Arrays.equals(method.getParameterTypes(), args)) {\r\n \t\t\t\treturn method;\r\n \t\t\t}\r\n \t\t}\r\n \t\t\r\n \t\t// That sucks\r\n \t\tthrow new RuntimeException(\"Unable to find \" + name + \" in \" + source.getName());\r\n \t}", "public Value execute(Map<String, Value> columns, Map<String, Value> parameters) {\n return execute(buildRequest(columns, parameters));\n }", "public void method(String name) {\n System.out.printf(\"Called method with parameters %s \\n\", name);\n }", "public static Object invoke(Method paramMethod, Object paramObject, Object[] paramArrayOfObject) throws InvocationTargetException, IllegalAccessException {\n/* */ try {\n/* 276 */ return bounce.invoke(null, new Object[] { paramMethod, paramObject, paramArrayOfObject });\n/* 277 */ } catch (InvocationTargetException invocationTargetException) {\n/* 278 */ Throwable throwable = invocationTargetException.getCause();\n/* */ \n/* 280 */ if (throwable instanceof InvocationTargetException)\n/* 281 */ throw (InvocationTargetException)throwable; \n/* 282 */ if (throwable instanceof IllegalAccessException)\n/* 283 */ throw (IllegalAccessException)throwable; \n/* 284 */ if (throwable instanceof RuntimeException)\n/* 285 */ throw (RuntimeException)throwable; \n/* 286 */ if (throwable instanceof Error) {\n/* 287 */ throw (Error)throwable;\n/* */ }\n/* 289 */ throw new Error(\"Unexpected invocation error\", throwable);\n/* */ }\n/* 291 */ catch (IllegalAccessException illegalAccessException) {\n/* */ \n/* 293 */ throw new Error(\"Unexpected invocation error\", illegalAccessException);\n/* */ } \n/* */ }", "public Object invoke(MethodInvocation methodInvocation) throws Throwable\r\n\t{\r\n\t\tlong startTime = System.currentTimeMillis();\r\n\t\tLOG.info(\"Beginning executing method: \" + methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t+ methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t+ methodInvocation.getMethod().getName());\r\n\t\tif (LOG.isDebugEnabled())\r\n\t\t{\r\n\t\t\tLOG.debug(\"Method parameters: \" + methodInvocation.getArguments().length);\r\n\r\n\t\t\tfor (Object object : methodInvocation.getArguments())\r\n\t\t\t{\r\n\t\t\t\tLOG.debug(SensusStringUtil.createToString(object));\r\n\t\t\t}\r\n\t\t}\r\n\t\tObject returnValue = new Object();\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturnValue = methodInvocation.proceed();\r\n\t\t}\r\n\t\tfinally\r\n\t\t{\r\n\t\t\tLOG.info(\"Finished executing method: \" + methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t\t+ methodInvocation.getMethod().getDeclaringClass() + \"::\"\r\n\t\t\t\t\t+ methodInvocation.getMethod().getName() + \"::\" + (System.currentTimeMillis() - startTime)\r\n\t\t\t\t\t+ \" msecs.\");\r\n\t\t\tif (LOG.isDebugEnabled())\r\n\t\t\t{\r\n\t\t\t\tLOG.debug(\"Return value of method: \" + SensusStringUtil.createToString(returnValue));\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn returnValue;\r\n\t}", "public EthCall callConstantMethod(String method, Object... args) throws NoSuchContractMethod {\n\t\tFunction methodFunction = factory.getConstantFunction(method);\n\n\t\tif (methodFunction == null) {\n\t\t\tthrow new NoSuchContractMethod(\"Method \" + method + \" does not exist for contract factory\");\n\t\t}\n\n\t\tTransactionCall callPojo = new TransactionCall(methodFunction);\n\t\tcallPojo.setData(CryptoUtil.byteToHexWithPrefix(methodFunction.encode(args)));\n\t\tcallPojo.setFrom(null);\n\t\tcallPojo.setGas(null);\n\t\tcallPojo.setGasPrice(null);\n\t\tcallPojo.setTo(this.contractAddress);\n\t\tcallPojo.setValue(null);\n\n\t\tlogger.debug(\"Generated constant call (contractAddress: \" + this.contractAddress + \", method: \" + method\n\t\t\t\t+ \", params: \" + Arrays.toString(args) + \")\" + callPojo.toString());\n\n\t\treturn new EthCall(callPojo);\n\t}", "public static Method getMethod(String method) throws IllegalArgumentException {\n/* 119 */ return getMethod(method, false);\n/* */ }", "void callMethod(Object obj, String name, Object... args)\n throws ScriptRunnerException;", "abstract public void execute(Parameters p);", "K invoke(Map<String, Method> methods, T object);", "public Object execute(String commandName, Map<String, ?> parameters) {\n Response response;\n\n if (parameters == null || parameters.isEmpty()) {\n response = driver.execute(commandName, ImmutableMap.of());\n } else {\n response = driver.execute(commandName, parameters);\n }\n\n return response.getValue();\n }", "public void getParameters(Parameters parameters) {\n\n }", "public void testCreateMethodWithParameters() {\n IDOMMethod method = this.domFactory.createMethod();\n method.setName(\"foo\");\n method.setParameters(new String[] { \"String\", \"int\", \"char[]\" }, new String[] { \"name\", \"number\", \"buffer\" });\n assertSourceEquals(\"source code incorrect\", \"public void foo(String name, int number, char[] buffer) {\\n\" + \"}\\n\", method.getContents());\n }", "public JSONObject callJSONObject(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getJSONObject(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to JSONObject\", e);\r\n\t\t}\r\n\t}", "public static MethodCallExpression call(Method method, Expression argument0, Expression argument1, Expression argument2, Expression argument3) { throw Extensions.todo(); }", "public Object invokeMethod(Object object, String methodName, Object arguments) {\n /*\n System\n .out\n .println(\n \"Invoker - Invoking method on object: \"\n + object\n + \" method: \"\n + methodName\n + \" arguments: \"\n + InvokerHelper.toString(arguments));\n \n */\n \n if (object == null) {\n throw new NullPointerException(\"Cannot invoke method: \" + methodName + \" on null object\");\n }\n \n if (object instanceof GroovyObject) {\n GroovyObject groovy = (GroovyObject) object;\n return groovy.invokeMethod(methodName, arguments);\n }\n else {\n if (object instanceof Class) {\n Class theClass = (Class) object;\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeStaticMethod(object, methodName, asArray(arguments));\n }\n else {\n Class theClass = object.getClass();\n \n MetaClass metaClass = metaRegistry.getMetaClass(theClass);\n return metaClass.invokeMethod(object, methodName, asArray(arguments));\n }\n }\n }", "public static Method getMethod(Class<?> paramClass, String paramString, Class<?>[] paramArrayOfClass) throws NoSuchMethodException {\n/* 90 */ ReflectUtil.checkPackageAccess(paramClass);\n/* 91 */ return paramClass.getMethod(paramString, paramArrayOfClass);\n/* */ }", "public static Object invokeMethod(Method method, Object target, Object... args) {\n try {\n return method.invoke(target, args);\n } catch (Exception e) {\n handleReflectionException(e);\n }\n throw new IllegalStateException(\"Should never get here\");\n }", "Mono<Void> invokeMethod(String methodName);", "public static MethodCallExpression call(Method method, Expression argument0, Expression argument1, Expression argument2, Expression argument3, Expression argument4) { throw Extensions.todo(); }", "public JSONArray callJSONArray(String method, Object ... params) throws JSONRPCException\r\n\t{\r\n\t\ttry \r\n\t\t{\r\n\t\t\treturn doRequest(method, params).getJSONArray(\"result\");\r\n\t\t} \r\n\t\tcatch (JSONException e)\r\n\t\t{\r\n\t\t\tthrow new JSONRPCException(\"Cannot convert result to JSONArray\", e);\r\n\t\t}\r\n\t}", "public void testOneOrMoreParameters() {\n int nrParameters = methodToTest.getParameterTypes().length;\n Class[] params = methodToTest.getParameterTypes();\n Object[] foo = new Object[nrParameters];\n \n // set up all parameters. Some methods are invoked with\n // primitives or collections, so we need to create them\n // accordingly\n for (int i = 0; i < nrParameters; i++) {\n try {\n if (params[i].isPrimitive()) {\n String primitiveName = params[i]\n .getName();\n if (primitiveName.equals(\"int\")) {\n foo[i] = Integer.valueOf(0);\n }\n if (primitiveName.equals(\"boolean\")) {\n foo[i] = Boolean.TRUE;\n }\n if (primitiveName.equals(\"short\")) {\n foo[i] = new Short(\"0\");\n }\n } else if (params[i].getName().equals(\"java.util.Collection\")) {\n foo[i] = new ArrayList();\n } else {\n /*\n * this call could easily fall if there is e.g. no public\n * default constructor. If it fails tweak the if/else tree\n * above to accommodate the parameter or check if we need to\n * test the particular method at all.\n */\n foo[i] = params[i].newInstance();\n }\n } catch (InstantiationException e) {\n fail(\"Cannot create an instance of : \"\n + params[i].getName()\n + \", required for \"\n + methodToTest.getName()\n + \". Check if \"\n + \"test needs reworking.\");\n } catch (IllegalAccessException il) {\n fail(\"Illegal Access to : \"\n + params[i].getName());\n }\n }\n \n try {\n methodToTest.invoke(facade, foo);\n fail(methodToTest.getName()\n + \" does not deliver an IllegalArgumentException\");\n } catch (InvocationTargetException e) {\n if (e.getTargetException() instanceof IllegalArgumentException \n || e.getTargetException() instanceof ClassCastException\n || e.getTargetException() instanceof NotImplementedException) {\n return;\n }\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \"\n + e.getTargetException());\n } catch (NotImplementedException e) {\n // If method not supported ignore failure\n } catch (Exception e) {\n fail(\"Test failed for \" + methodToTest.toString()\n + \" because of: \" + e.toString());\n }\n }", "public JValue invokeMethodInternal(\n\t\tIFuncValue func,\r\n\t\tJMethodType methodType,\r\n\t\tString methodName,\r\n\t\tJValue[] values, \r\n\t\tJValue instance){\r\n\t\tArgument[] args = prepareArguments(methodName, methodType, values, instance, false);\r\n\t\treturn invokeFunction(func, methodType, methodName, args);\r\n\t}", "private AylaCallResponse execute(int method, AylaRestService rs)\n\t{\n\n\t\trequestRetryCounter = 3;\n\t\tAylaCallResponse commitResponse = null;\n\t\tBundle responseBundle = null;\n\n if (!AylaReachability.isCloudServiceAvailable()) {\n if (AylaReachability.isDeviceLanModeAvailable(null) && supportsLanModeResponse(method)) {\n // We aren't connected to the cloud, but we are connected to the LAN mode device\n AylaSystemUtils.saveToLog(\"%s, %s, %s:%d, %s\", \"V\", \"ExecuteRequest\", \"lanMode\", method, \"execute\");\n } else if (!supportsOfflineResponse(method)) {\n // Make sure the method supports cached results if we cannot reach the service.\\\n // return failure here\n AylaSystemUtils.saveToLog(\"%s, %s, %s:%d, %s\", \"E\", \"ExecuteRequest\", \"!cloud && !supportOffline\", method, \"execute\");\n responseBundle = new Bundle();\n responseBundle.putString(\"result\", rs.jsonResults); // response v3.07\n responseBundle.putInt(\"subTask\", rs.subTaskFailed);\n responseCode = AylaNetworks.AML_ERROR_UNREACHABLE;\n \n if (async) {\n receiver.send(responseCode, responseBundle);\n } else {\n commitResponse = new AylaCallResponse(responseCode, responseBundle);\n }\n return commitResponse;\n } else {\n AylaSystemUtils.saveToLog(\"%s, %s, %s:%d, %s\", \"V\", \"ExecuteRequest\", \"cached\", method, \"execute\");\n }\n }\n\n\t\tAylaCallResponse failureResponse = checkRequest(method, rs);\n\t\tif ( failureResponse != null ) {\n\t\t\treturn failureResponse;\n\t\t}\n\n\t\ttry{\n\t\t\tswitch(method)\n\t\t\t{\n\t\t\t\tcase AylaRestService.CREATE_GROUP_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_GROUP_ZIGBEE:\n\t\t\t\tcase AylaRestService.TRIGGER_GROUP_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_GROUP_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.CREATE_BINDING_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs );\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_BINDING_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_BINDING_ZIGBEE:\n\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs );\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.CREATE_SCENE_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_SCENE_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.RECALL_SCENE_ZIGBEE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_SCENE_ZIGBEE:\n\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.CREATE_USER_SHARE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_USER_SHARE:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\tcase AylaRestService.GET_USER_SHARE:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"GET\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_USER_SHARE:\n\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\n\t\t\t\tcase AylaRestService.LOGIN_THROUGH_OAUTH :\t// Compound objects, no service API, just return to handler\n\t\t\t\t{\n\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.CREATE_USER_CONTACT:\n\t\t\t\t\tif (!AylaSystemUtils.ERR_URL.equals(url)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_USER_CONTACT:\n\t\t\t\t\tif (!AylaSystemUtils.ERR_URL.equals(url)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}// end of if error_url.equals(url)\n\n\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_USER_CONTACT:\n\t\t\t\t\tif (!AylaSystemUtils.ERR_URL.equals(url)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.CREATE_USER_METADATA:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else{\n\t\t\t\t\t\tresponseBundle = new Bundle();\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_USER_METADATA:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.GET_USER_METADATA_BY_KEY:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"GET\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_USER_METADATA:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.CREATE_DEVICE_METADATA:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_DEVICE_METADATA:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.GET_DEVICE_METADATA_BY_KEY:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"GET\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_DEVICE_METADATA:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.CREATE_LOG_IN_SERVICE:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.CREATE_SCHEDULE_ACTION:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.UPDATE_SCHEDULE_ACTION:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.DELETE_SCHEDULE_ACTION:\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t}\n\t\t\t\t\telse { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t//case AylaRestService.CREATE_SCHEDULE:\n\t\t\t\tcase AylaRestService.UPDATE_SCHEDULE:\n\t\t\t\tcase AylaRestService.CLEAR_SCHEDULE:\n\t\t\t\t\t//case AylaRestService.DELETE_SCHEDULE:\n\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\t\tcase AylaRestService.CREATE_SCHEDULE_ACTIONS: // only called on (url.equals(AylaSystemUtils.ERR_URL)\n\t\t\t\tcase AylaRestService.DELETE_SCHEDULE_ACTIONS: // only called on (url.equals(AylaSystemUtils.ERR_URL)\n\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase AylaRestService.UPDATE_DEVICE:\n\t\t\t\t\tif(!url.equals(AylaSystemUtils.ERR_URL)){\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\n\t\t\t\tcase AylaRestService.SEND_NETWORK_PROFILE_LANMODE:\n\t\t\t\tcase AylaRestService.DELETE_NETWORK_PROFILE_LANMODE:\n\n\t\t\t\tcase AylaRestService.GET_DEVICES_LANMODE:\n\t\t\t\tcase AylaRestService.GET_NODES_LOCAL_CACHE:\n\t\t\t\tcase AylaRestService.CREATE_DATAPOINT_LANMODE:\n\t\t\t\tcase AylaRestService.CREATE_NODE_DATAPOINT_LANMODE:\n\n\t\t\t\tcase AylaRestService.GET_DATAPOINT_LANMODE:\n\t\t\t\tcase AylaRestService.GET_DATAPOINTS_LANMODE:\n\t\t\t\tcase AylaRestService.GET_PROPERTIES_LANMODE:\n\t\t\t\tcase AylaRestService.GET_NODES_CONNECTION_STATUS_ZIGBEE_LANMODE:\n\n\t\t\t\tcase AylaRestService.GET_NODE_PROPERTIES_LANMODE:\n\t\t\t\tcase AylaRestService.GET_NODE_DATAPOINT_LANMODE:\n\n\t\t\t\tcase AylaRestService.GET_PROPERTY_DETAIL_LANMODE:\n\t\t\t\t{\n\t\t\t\t\tresponseBundle = new Bundle();\n\t\t\t\t\tresponseBundle.putString(\"result\", rs.jsonResults); // response v3.07\n\t\t\t\t\tresponseBundle.putInt(\"subTask\", rs.subTaskFailed);\n\t\t\t\t\tresponseCode = rs.responseCode;\n\n\t\t\t\t\tif (async) {\n\t\t\t\t\t\treceiver.send(responseCode, responseBundle);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcommitResponse = new AylaCallResponse(responseCode, responseBundle);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.GET_DATAPOINT_BLOB_SAVE_TO_FILE:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\n\t\t\t\t\t\tsetUrlConnection(\"GET\", url, NETWORK_TIMEOUT_CLOUD, false);\n\t\t\t\t\t\t// For debug, reserved for future.\n//\t\t\t\t\t\tAylaSystemUtils.saveToLog(\"%s, %s, %s, %s, %s, %s.\", \"D\", tag,\n//\t\t\t\t\t\t\t\t\"getDatapointBlobSaveToFile\"\n//\t\t\t\t\t\t\t\t, \"url:\" + urlConnection.getURL()\n//\t\t\t\t\t\t\t\t, \"method:\" + urlConnection.getRequestMethod()\n//\t\t\t\t\t\t\t\t, \"headers:\" + headers);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.GET_DEVICES:\n\t\t\t\tcase AylaRestService.GET_DEVICE_DETAIL:\n\t\t\t\tcase AylaRestService.GET_DEVICE_DETAIL_BY_DSN:\n\t\t\t\tcase AylaRestService.GET_NEW_DEVICE_CONNECTED:\n\t\t\t\tcase AylaRestService.GET_REGISTERED_NODES:\n\t\t\t\tcase AylaRestService.GET_DEVICE_NOTIFICATIONS:\n\t\t\t\tcase AylaRestService.GET_APP_NOTIFICATIONS:\n\t\t\t\tcase AylaRestService.GET_PROPERTIES:\n\t\t\t\tcase AylaRestService.GET_PROPERTY_DETAIL:\n\t\t\t\tcase AylaRestService.GET_DATAPOINTS:\n\t\t\t\tcase AylaRestService.GET_DATAPOINT_BY_ID:\n\n\t\t\t\tcase AylaRestService.GET_DATAPOINT_BLOB:\n\t\t\t\tcase AylaRestService.GET_PROPERTY_TRIGGERS:\n\t\t\t\tcase AylaRestService.GET_APPLICATION_TRIGGERS:\n\t\t\t\tcase AylaRestService.GET_REGISTRATION_CANDIDATE:\n\t\t\t\tcase AylaRestService.GET_GATEWAY_REGISTRATION_CANDIDATES:\n\n\t\t\t\tcase AylaRestService.GET_NEW_DEVICE_STATUS:\n\t\t\t\tcase AylaRestService.GET_NEW_DEVICE_SCAN_RESULTS_FOR_APS:\n\t\t\t\tcase AylaRestService.GET_MODULE_WIFI_STATUS:\n\t\t\t\tcase AylaRestService.GET_NEW_DEVICE_PROFILES:\n\t\t\t\tcase AylaRestService.GET_DEVICE_LANMODE_CONFIG:\n\t\t\t\tcase AylaRestService.GET_USER_INFO:\n\t\t\t\tcase AylaRestService.GET_SCHEDULES:\n\t\t\t\tcase AylaRestService.GET_SCHEDULE:\n\t\t\t\tcase AylaRestService.GET_SCHEDULE_ACTIONS:\n\t\t\t\tcase AylaRestService.GET_SCHEDULE_ACTIONS_BY_NAME:\n\t\t\t\tcase AylaRestService.GET_TIMEZONE:\n\t\t\t\tcase AylaRestService.GET_USER_METADATA:\n\t\t\t\tcase AylaRestService.GET_DEVICE_METADATA:\n\t\t\t\tcase AylaRestService.GET_USER_SHARES:\n\t\t\t\tcase AylaRestService.GET_USER_RECEIVED_SHARES:\n\t\t\t\tcase AylaRestService.GET_GROUP_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_GROUPS_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_BINDING_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_BINDINGS_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_SCENE_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_SCENES_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_NODES_CONNECTION_STATUS_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_USER_CONTACT:\n\t\t\t\tcase AylaRestService.GET_USER_CONTACT_LIST:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tString combinedParams = \"\";\n\n\t\t\t\t\t\tif(params!= null && !params.isEmpty()) {\n\t\t\t\t\t\t\tcombinedParams += \"?\";\n\t\t\t\t\t\t\tfor(AylaParcelableNVPair p : params) {\n\t\t\t\t\t\t\t\tif ( p.getName() != null && p.getValue() != null ) {\n\t\t\t\t\t\t\t\t\tString paramString = p.getName() + \"=\" + URLEncoder.encode(p.getValue(), \"UTF-8\");\n\t\t\t\t\t\t\t\t\tif (combinedParams.length() > 1) {\n\t\t\t\t\t\t\t\t\t\tcombinedParams += \"&\" + paramString;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tcombinedParams += paramString;\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\turl+=combinedParams;\n\t\t\t\t\t\tsetUrlConnection(\"GET\", url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.GET_MODULE_REGISTRATION_TOKEN:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tString combinedParams = \"\";\n\n\t\t\t\t\t\tif(params!= null && !params.isEmpty()) {\n\t\t\t\t\t\t\tcombinedParams += \"?\";\n\t\t\t\t\t\t\tfor(AylaParcelableNVPair p : params) {\n\t\t\t\t\t\t\t\tif ( p.getName() != null && p.getValue() != null ) {\n\t\t\t\t\t\t\t\t\tString paramString = p.getName() + \"=\" + URLEncoder.encode(p.getValue(), \"UTF-8\");\n\t\t\t\t\t\t\t\t\tif (combinedParams.length() > 1) {\n\t\t\t\t\t\t\t\t\t\tcombinedParams += \"&\" + paramString;\n\t\t\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t\t\tcombinedParams += paramString;\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\turl+=combinedParams;\n\t\t\t\t\t\tsetUrlConnection(\"GET\", url, NETWORK_TIMEOUT_LAN);\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t} else { // return errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.POST_USER_LOGIN:\n\t\t\t\tcase AylaRestService.POST_USER_LOGOUT:\n\t\t\t\tcase AylaRestService.POST_USER_SIGNUP:\n\t\t\t\tcase AylaRestService.POST_USER_RESEND_CONFIRMATION:\n\t\t\t\tcase AylaRestService.POST_USER_RESET_PASSWORD:\n\t\t\t\tcase AylaRestService.POST_USER_REFRESH_ACCESS_TOKEN:\n\t\t\t\tcase AylaRestService.POST_USER_OAUTH_LOGIN:\n\t\t\t\tcase AylaRestService.POST_USER_OAUTH_AUTHENTICATE_TO_SERVICE:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\n\t\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t} else { // return user sign-up errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.CREATE_DATAPOINT_BLOB_POST_TO_FILE:\n\t\t\t\t{\n\t\t\t/* Interact with amazon S3\n\t\t\t * authorization mechanism and param already in url\n\t\t\t * do not need header.*/\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD, false);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return user sign-up errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.PUT_USER_CHANGE_PASSWORD:\n\t\t\t\tcase AylaRestService.PUT_RESET_PASSWORD_WITH_TOKEN:\n\t\t\t\tcase AylaRestService.PUT_USER_CHANGE_INFO:\n\t\t\t\tcase AylaRestService.PUT_USER_SIGNUP_CONFIRMATION:\n\t\t\t\tcase AylaRestService.UPDATE_PROPERTY_TRIGGER:\n\t\t\t\tcase AylaRestService.UPDATE_APPLICATION_TRIGGER:\n\t\t\t\tcase AylaRestService.UPDATE_DEVICE_NOTIFICATION:\n\t\t\t\tcase AylaRestService.UPDATE_APP_NOTIFICATION:\n\t\t\t\tcase AylaRestService.PUT_DEVICE_FACTORY_RESET:\n\t\t\t\tcase AylaRestService.BLOB_MARK_FETCHED:\n\t\t\t\tcase AylaRestService.BLOB_MARK_FINISHED:\n\t\t\t\tcase AylaRestService.IDENTIFY_NODE:\n\t\t\t\tcase AylaRestService.UPDATE_USER_EMAIL:\n case AylaRestService.PUT_DISCONNECT_AP_MODE:\n\t\t\t\t{\n\t\t\t\t\tif (!url.equals(AylaSystemUtils.ERR_URL)) {\n\t\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\t\twriteData();\n\t\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\t} else { // return user sign-up errors to handler\n\t\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.CREATE_DATAPOINT:\n\t\t\t\tcase AylaRestService.CREATE_BATCH_DATAPOINT:\n\t\t\t\tcase AylaRestService.CREATE_DATAPOINT_BLOB:\n\t\t\t\tcase AylaRestService.CREATE_PROPERTY_TRIGGER:\n\t\t\t\tcase AylaRestService.CREATE_APPLICATION_TRIGGER:\n\t\t\t\tcase AylaRestService.START_NEW_DEVICE_SCAN_FOR_APS:\n\t\t\t\tcase AylaRestService.REGISTER_DEVICE:\n\t\t\t\t\t//\tcase AylaRestService.SET_DEVICE_CONNECT_TO_NETWORK:\n\t\t\t\tcase AylaRestService.POST_LOCAL_REGISTRATION:\n\t\t\t\tcase AylaRestService.OPEN_REGISTRATION_WINDOW:\n\t\t\t\tcase AylaRestService.CREATE_TIMEZONE:\n\t\t\t\tcase AylaRestService.CREATE_DEVICE_NOTIFICATION:\n\t\t\t\tcase AylaRestService.CREATE_APP_NOTIFICATION:\n\t\t\t\t{\n\t\t\t\t\tsetUrlConnection(\"POST\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\twriteData();\n\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase AylaRestService.SET_DEVICE_CONNECT_TO_NETWORK:\n\t\t\t\t{\n\t\t\t\t\t// request = new HttpPost(url);\n\n\t\t\t\t\tString urlQueryParams = \"\";\n\t\t\t\t\tif (!params.isEmpty()) {\n\t\t\t\t\t\turlQueryParams += \"?\";\n\t\t\t\t\t\tfor (AylaParcelableNVPair p : params) {\n\t\t\t\t\t\t\tString paramString = p.getName() + \"=\" + URLEncoder.encode(p.getValue(), \"UTF-8\");\n\t\t\t\t\t\t\tif (urlQueryParams.length() > 1) {\n\t\t\t\t\t\t\t\turlQueryParams += \"&\" + paramString;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\turlQueryParams += paramString;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\turl = rs.url + urlQueryParams;\n\t\t\t\t\t//request = new HttpPost(url);\n\n\t\t\t\t\tsetUrlConnection(\"POST\", url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\twriteData();\n\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase AylaRestService.PUT_LOCAL_REGISTRATION:\n\t\t\t\tcase AylaRestService.PUT_NEW_DEVICE_TIME:\n\t\t\t\tcase AylaRestService.PUT_DATAPOINT: // used to mark blob fetched\n\t\t\t\tcase AylaRestService.UPDATE_TIMEZONE:\n\t\t\t\t{\n\t\t\t\t\tsetUrlConnection(\"PUT\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\twriteData();\n\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\t\t\t\tcase AylaRestService.DELETE:\n\t\t\t\tcase AylaRestService.DESTROY_DEVICE_NOTIFICATION:\n\t\t\t\tcase AylaRestService.DESTROY_APP_NOTIFICATION:\n\t\t\t\tcase AylaRestService.DESTROY_PROPERTY_TRIGGER:\n\t\t\t\tcase AylaRestService.DESTROY_APPLICATION_TRIGGER:\n\t\t\t\tcase AylaRestService.UNREGISTER_DEVICE:\n\t\t\t\tcase AylaRestService.DELETE_DEVICE_WIFI_PROFILE:\n\t\t\t\tcase AylaRestService.DELETE_USER:\n\t\t\t\t{\n\t\t\t\t\tsetUrlConnection(\"DELETE\", rs.url, NETWORK_TIMEOUT_CLOUD);\n\t\t\t\t\tcommitResponse = commit(rs);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t//\t\tcase AylaRestService.SECURE_SETUP_SESSION_COMPLETED:\n\t\t\t\tcase AylaRestService.PROPERTY_CHANGE_NOTIFIER:\n\t\t\t\t{\n\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.REACHABILITY:\n\t\t\t\t{\n\t\t\t\t\tsendToReceiver(rs);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.REGISTER_NEW_DEVICE:\t\t\t// Compound objects, no service API, just return to handler\n\t\t\t\t{\n\t\t\t\t\t// wait for completion if it's a synchronous call\n\t\t\t\t\tif (async == false) {\n\t\t\t\t\t\twhile (rs.jsonResults == null) {\n\t\t\t\t\t\t\ttry { //NOP\n\t\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresponseBundle = new Bundle();\n\t\t\t\t\tresponseBundle.putString(\"result\", rs.jsonResults); // response v3.07\n\t\t\t\t\tresponseBundle.putInt(\"subTask\", rs.subTaskFailed);\n\t\t\t\t\tresponseCode = rs.responseCode;\n\t\t\t\t\tif (async) {\n\t\t\t\t\t\treceiver.send(responseCode, responseBundle);\n\t\t\t\t\t} else {\n\t\t\t\t\t\tcommitResponse = new AylaCallResponse(responseCode, responseBundle);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.CONNECT_TO_NEW_DEVICE: // Compound objects no service API, just return to handler\n\t\t\t\tcase AylaRestService.RETURN_HOST_WIFI_STATE: // Using host local calls, no service API, just return to handler\n\t\t\t\tcase AylaRestService.RETURN_HOST_SCAN:\n\t\t\t\tcase AylaRestService.RETURN_HOST_NETWORK_CONNECTION:\n\t\t\t\tcase AylaRestService.SET_HOST_NETWORK_CONNECTION:\n\t\t\t\tcase AylaRestService.DELETE_HOST_NETWORK_CONNECTION:\n\t\t\t\tcase AylaRestService.DELETE_HOST_NETWORK_CONNECTIONS:\n\t\t\t\tcase AylaRestService.RETURN_HOST_DNS_CHECK:\n\t\t\t\tcase AylaRestService.GROUP_ACK_ZIGBEE:\n\t\t\t\tcase AylaRestService.BINDING_ACK_ZIGBEE:\n\t\t\t\tcase AylaRestService.SCENE_ACK_ZIGBEE:\n\t\t\t\tcase AylaRestService.GET_NODES_CONNECTION_STATUS:\n\t\t\t\t{\n\t\t\t\t\t// wait for completion if it's a synchronous call\n\t\t\t\t\tif (async == false) {\n\t\t\t\t\t\twhile (rs.jsonResults == null) {\n\t\t\t\t\t\t\ttry { //NOP\n\t\t\t\t\t\t\t\tThread.sleep(100);\n\t\t\t\t\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\tresponseBundle = new Bundle();\n\t\t\t\t\tresponseBundle.putString(\"result\", rs.jsonResults); // response v3.07\n\t\t\t\t\tresponseBundle.putInt(\"subTask\", rs.subTaskFailed);\n\t\t\t\t\tresponseCode = rs.responseCode;\n\t\t\t\t\tif (async) {\n\n\t\t\t\t\t\treceiver.send(responseCode, responseBundle);\n\t\t\t\t\t} else {\n\n\t\t\t\t\t\tcommitResponse = new AylaCallResponse(responseCode, responseBundle);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tcase AylaRestService.CONNECT_NEW_DEVICE_TO_SERVICE:\n\t\t\t\tcase AylaRestService.CONFIRM_NEW_DEVICE_TO_SERVICE_CONNECTION: // Compound object\n\t\t\t\tcase AylaRestService.GET_NEW_DEVICE_WIFI_STATUS: // compound object\n\t\t\t\tcase AylaRestService.GET_NODES_CONNECTION_STATUS_LANMODE:\n\t\t\t\t{\n\t\t\t\t\tresponseBundle = new Bundle();\n\t\t\t\t\tresponseBundle.putString(\"result\", rs.jsonResults); // response v3.07\n\t\t\t\t\tresponseBundle.putInt(\"subTask\", rs.subTaskFailed);\n\t\t\t\t\tresponseCode = rs.responseCode;\n\n\t\t\t\t\treceiver.send(responseCode, responseBundle);\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\tdefault:\n\t\t\t\t\tAylaSystemUtils.saveToLog(\"%s, %s, %s, %s.\", \"E\", tag, \"execute\", \"method \" + method + \" unknown\");\n\t\t\t\t\tbreak;\n\t}\n\n\t\t}catch(Exception e){\n\t\t\te.printStackTrace();\n\t\t\tcloseResources();\n\t\t\tresponseBundle = new Bundle();\n\t\t\tresponseBundle.putString(\"result\", rs.jsonResults); // response v3.07\n\t\t\tresponseBundle.putInt(\"subTask\", rs.subTaskFailed);\n\t\t\tresponseCode = rs.responseCode;\n\t\t\tif (async) {\n\t\t\t\treceiver.send(responseCode, responseBundle);\n\t\t\t} else {\n\t\t\t\tcommitResponse = new AylaCallResponse(responseCode, responseBundle);\n\t\t\t}\n\t\t} finally{\n\t\t\tcloseResources();\n\t\t}\n\t\treturn commitResponse;\n\t}", "public abstract Object invoke(T target , Method method , Object[] args) throws Throwable;", "public Object call(Object[] args) {\r\n return invoke(args);\r\n }", "private Object executeMethod(Object target, CallStatement callStatement)\n throws EngineException {\n try {\n CallStatement.CallStatementEntry entry = \n callStatement.getEntries().get(callStatement.getEntries().size() -1);\n Method[] methods = target.getClass().getMethods();\n for (Method method: methods) {\n if (methodsMatch(method,entry)) {\n return method.invoke(target, parameters.toArray(new Object[0]));\n }\n }\n } catch (EngineException ex) {\n throw ex;\n } catch (Exception ex) {\n throw new EngineException(\"Failed to execute the method because : \" \n + ex.getMessage(),ex);\n }\n throw new java.lang.NoSuchMethodError(\n \"No method matching the requirments was found\");\n }", "protected Object invokeWithRetries(Method m, Object... params)\n {\n long endTime = System.currentTimeMillis() + config.getTimeout();\n do\n {\n try\n {\n if (trace) log.trace(\"About to invoke operation \" + m);\n Object rv = m.invoke(this, params);\n if (trace) log.trace(\"Completed invocation of \" + m);\n return rv;\n }\n catch (IllegalAccessException e)\n {\n log.error(\"Should never get here!\", e);\n }\n catch (InvocationTargetException e)\n {\n if (e.getCause() instanceof IOException)\n {\n try\n {\n // sleep 250 ms\n if (log.isDebugEnabled()) log.debug(\"Caught IOException. Retrying.\", e);\n Thread.sleep(config.getReconnectWaitTime());\n restarter.restartComponent(this);\n }\n catch (InterruptedException e1)\n {\n Thread.currentThread().interrupt();\n }\n catch (Exception e1)\n {\n if (trace) log.trace(\"Unable to reconnect\", e1);\n }\n }\n else\n {\n throw new CacheException(\"Problems invoking method call!\", e);\n }\n }\n }\n while (System.currentTimeMillis() < endTime);\n throw new CacheException(\"Unable to communicate with TCPCacheServer(\" + config.getHost() + \":\" + config.getPort() + \") after \" + config.getTimeout() + \" millis, with reconnects every \" + config.getReconnectWaitTime() + \" millis.\");\n }", "public Object invoke(String name, Object... args) throws Exception;", "MethodType (String m, Type r, ExpressionList args) {\r\n name = m;\r\n return_type = r;\r\n arguments = args;\r\n body = null;\r\n }", "InvocationResult invoke(RemoteService service, MethodInvocation invocation);", "Methodsig getMethod();", "void updateMethod(Method method);", "public java.lang.Object callMethod (Symbol methodName, java.lang.Object[] args, int timeOut)\n throws G2AccessException;", "Mono<Void> invokeMethod(String methodName, Object data);", "public static Object invoke(String methodName, Object o, Object... params) {\n\t\treturn invoke(getMethod(methodName, o.getClass()), o, params);\n\t}", "private <T> T executeRequest(Map<String, Object> params, AlchemyAPI operation, Class<T> returnType,\n\t\t\tString... acceptedFormats) {\n\t\t// Get the input format and check for missing parameters\n\t\tString format = getInputFormat(params, acceptedFormats);\n\t\t// Get the path that represent this operation based on the operation and format\n\t\tString path = AlchemyEndPoints.getPath(operation, format);\n\n\t\t// Return json\n\t\tparams.put(OUTPUT_MODE, \"json\");\n\n\t\t// Prevent jsonp to be returned\n\t\tparams.remove(JSONP);\n\n\t\tRequest request = Request.Post(path);\n\t\tfor (String param : params.keySet()) {\n\t\t\trequest.withForm(param, params.get(param));\n\t\t}\n\t\tHttpRequestBase requestBase = request.build();\n\t\ttry {\n\t\t\tHttpResponse response = execute(requestBase);\n\t\t\treturn ResponseUtil.getObject(response, returnType);\n\t\t} catch (IOException e) {\n\t\t\tthrow new RuntimeException(e);\n\t\t}\n\t}", "public synchronized List<String> isMethod(String[] isParameter, int isParameter, Result isParameter, boolean isParameter, int isParameter) throws IOException, RootToolsException, TimeoutException {\n isNameExpr.isMethod(\"isStringConstant\" + isNameExpr.isFieldAccessExpr + \"isStringConstant\" + (isNameExpr.isFieldAccessExpr > isIntegerConstant ? \"isStringConstant\" : \"isStringConstant\"));\n Worker isVariable = new Worker(this, isNameExpr, isNameExpr, isNameExpr, isNameExpr);\n isNameExpr.isMethod();\n try {\n if (isNameExpr == -isIntegerConstant) {\n isNameExpr = isIntegerConstant;\n }\n isNameExpr.isMethod(isNameExpr);\n // isComment\n isNameExpr.isMethod(isNameExpr.isFieldAccessExpr);\n if (isNameExpr.isFieldAccessExpr != -isIntegerConstant)\n return isNameExpr.isFieldAccessExpr;\n else\n throw new TimeoutException();\n } catch (InterruptedException isParameter) {\n isNameExpr.isMethod();\n isNameExpr.isMethod().isMethod();\n throw new TimeoutException();\n }\n }", "public static MethodCallExpression call(Expression expression, Method method, Iterable<Expression> arguments) { throw Extensions.todo(); }", "public static MethodCallExpression call(Expression expression, Method method, Expression[] arguments) { throw Extensions.todo(); }", "@Override\r\n\tpublic void callMethod(MethodDescriptor method, RpcController controller, Message request, Message responsePrototype, RpcCallback<Message> done) {\n\t\t\r\n\t}", "public AMethod lookupMethod(\n\t\tIJml2bConfiguration config,\n\t\tString mth_name,\n\t\tVector param_types)\n\t\tthrows Jml2bException {\n\t\t// Java Language Specification, pp 108: \n\t\t// 1. Find all the methods that could possibly apply to the\n\t\t// invocation, namely all the overloaded methods that have the\n\t\t// correct name, and whose parameters are of types that can be\n\t\t// assigned to the values of all the arguments. If one method\n\t\t// match exactly for all arguments, you invoke that method\n\t\t// 2. If any method in the set has parameters types that are all \n\t\t// assignable to any other method in the set, the other method \n\t\t// is removed from the set since it is less specific. Repeat\n\t\t// until no elimination can be made.\n\t\t// 3. If you are left with one method, that method is the most \n\t\t// specific and will be the one invoked. If you have more than\n\t\t// one method left, then the call is ambiguous, there being no \n\t\t// most specific method, and the invoking code is invalid.\n\n\t\tAMethod result;\n\n\t\tif (isInterface()) {\n\t\t\t// search in current interface and super interfaces\n\t\t\tresult = lookupMethodInterface(config, mth_name, param_types, null);\n\n\t\t\t// if we don't have an exact match, look for a better match in java.lang.Object\n\t\t\tif (result == null\n\t\t\t\t|| !result.getParams().hasSameTypes(param_types)) {\n\t\t\t\t// searh in the super class (which should be object)\n\t\t\t\tAClass object = config.getObject().getRefType();\n\t\t\t\tresult =\n\t\t\t\t\tobject.lookupMethodCurrentClass(\n\t\t\t\t\t\tconfig,\n\t\t\t\t\t\tmth_name,\n\t\t\t\t\t\tparam_types,\n\t\t\t\t\t\tresult);\n\t\t\t}\n\t\t} else {\n\t\t\t// search in class and super classes\n\t\t\tresult = lookupMethodClass(config, mth_name, param_types, null);\n\t\t}\n\n\t\treturn result;\n\t}", "private String doRequest(Method method, String message,\n String authorization, String timestamp)\n throws Exception {\n HttpClient client = HttpUtils.getCertificateClient();\n HttpPost post;\n String url = HOST + \"/\" + SERVICE + \"/\" + method.getMethod();\n switch (method) {\n case UPDATE_USER:\n case UPDATE_STUDY:\n post = new HttpPost(url) {\n public static final java.lang.String METHOD_NAME = \"UPDATE\";\n\n @Override\n public String getMethod() {\n return METHOD_NAME;\n }\n };\n break;\n default:\n post = new HttpPost(url);\n break;\n }\n BasicHttpEntity data = new BasicHttpEntity();\n data.setContent(new ByteArrayInputStream(message.getBytes(\"UTF-8\")));\n// data.setContentType(\"application/json\");\n data.setContentType(\"application/json; charset=UTF-8\");\n data.setChunked(false);\n data.setContentLength(message.getBytes(\"UTF-8\").length);\n data.setContentEncoding(\"UTF-8\");\n post.setEntity(data);\n post.addHeader(new BasicHeader(\"x-authorization\", authorization));\n post.addHeader(new BasicHeader(\"x-date\", timestamp));\n\n HttpResponse response = client.execute(post);\n HttpEntity entity = response.getEntity();\n ByteArrayOutputStream bout = new ByteArrayOutputStream();\n InputStream in = entity.getContent();\n try {\n int len;\n byte[] buf = new byte[512];\n while ((len = in.read(buf)) > 0) {\n bout.write(buf, 0, len);\n }\n } finally {\n if (in != null) {\n in.close();\n }\n }\n String responseMessage = new String(bout.toByteArray());\n //ClientLogger.d(\"Response: \" + responseMessage);\n return responseMessage;\n }", "void method(String string);", "@Override\n\tpublic HttpRespModel methodDispatch(String method, String body) {\n\t\tSituationMethod requestMethod = SituationMethod.fromString(method);\n\t\tHttpRespModel respModel = new HttpRespModel();\n\t\t\n\t\t\n\t\tswitch (requestMethod) {\n\t\tcase AddMealSituationMethod:\n\t\t{\n\t\t\t//添加吃饭记录\n\t\t\trespModel = addMealSituationHandler(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayMealSituationMethod:{\n\t\t\t//获取当天吃饭记录\n\t\t\trespModel = getTodayMealSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddSleepSituationMethod:{\n\t\t\t//添加睡觉情况记录\n\t\t\trespModel = addSleepSituation(body);\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\tcase TodaySleepSituationMethod:{\n\t\t\t//获取当天睡觉情况记录\n\t\t\trespModel = getTodaySleepSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase InterestCateList:{\n\t\t\t//获取兴趣分类列表\n\t\t\tInterestUtil util = new InterestUtil();\n\t\t\trespModel = util.getAllInterestList();\n\t\t\tbreak;\n\t\t}\n\t\tcase TodayInterestSituationMethod:{\n\t\t\trespModel = getTodayInterestSituations(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase AddInterestSituationMethod:{\n\t\t\t//添加兴趣学习清理\n\t\t\trespModel = addInterestSituation(body);\n\t\t\tbreak;\n\t\t}\n\t\tcase UnkonwnMethod:\n\t\tdefault:{\n\t\t\trespModel.setCode(RespError.urlMethodError);\n\t\t\trespModel.setMessage(\"对不起, method: \" + method + \"没有找到。\");\n\t\t}\n\t\t\tbreak;\n\t\t\t\n\t\t}\n\t\treturn respModel;\n\t}", "public static void sendRequest(Method mode, String route, JSONObject params, SuccessListener<JSONObject> onSuccess, ErrorListener<String> onError){\n\t\tString link = getRoute(route);\n\t\tnew HttpRequest(mode, link, params, onSuccess, onError).execute();\n\t}", "public void methodInvoked(String methodName, String resultReturned) {\n final long timeNow = System.currentTimeMillis();\n\n// final CallStats callStats = stats.computeIfAbsent(methodName, k -> new CallStats(methodName, timeNow, resultReturned));\n CallStats callStats = stats.get(methodName);\n\n if (callStats != null) {\n callStats.count.increment();\n callStats.lastCall.set(timeNow);\n callStats.lastResult.set(resultReturned);\n }\n // do not track stats for non existing methods\n }", "@Override\r\n \tpublic Object invoke(Object arg0, Method arg1, Object[] arg2)\r\n \t\t\tthrows Throwable {\n \t\tString urlfortheobject = baseUrl+methodToID(arg1);\r\n \t\t\r\n \t\t// Get the IRemoteRestCall object for this method...\r\n\t\tClientResource cr = new ClientResource(urlfortheobject);\r\n \t\tIRemoteRestCall resource = cr.wrap(IRemoteRestCall.class, arg1.getReturnType());\r\n \t\t\r\n \t\t// Call\r\n \t\tObject returnObject = resource.doCall(arg2);\r\n\t\tcr.release();\r\n \t\t\r\n \t\t// return\r\n \t\treturn returnObject;\r\n \t}", "private boolean methodsMatch(Method method,\n CallStatement.CallStatementEntry entry) throws EngineException {\n if (!method.getName().equals(entry.getName())) {\n return false;\n }\n if (method.getParameterTypes().length != parameters.size()) {\n return false;\n }\n Class[] parameterTypes = method.getParameterTypes();\n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n if (!parameterType.isAssignableFrom(parameterValue.getClass())) {\n return false;\n }\n }\n \n for (int index = 0; index < parameters.size(); index++) {\n Class parameterType = parameterTypes[index];\n Object parameterValue = parameters.get(index);\n parameters.set(index, parameterType.cast(parameterValue));\n }\n return true;\n }" ]
[ "0.6394559", "0.62726647", "0.597509", "0.5941581", "0.578042", "0.5748538", "0.57337296", "0.5631724", "0.5623747", "0.56107706", "0.55964077", "0.55952287", "0.55617267", "0.555905", "0.5554076", "0.55397767", "0.55172235", "0.5493204", "0.54710764", "0.54669523", "0.5461895", "0.54589266", "0.5447912", "0.54416734", "0.5440071", "0.5440071", "0.5436843", "0.5431942", "0.54025507", "0.5369182", "0.5367655", "0.53666574", "0.53666574", "0.5355822", "0.53487194", "0.5320852", "0.53194493", "0.52964485", "0.52843004", "0.5263633", "0.5251148", "0.524873", "0.52389973", "0.52135676", "0.52111113", "0.52108395", "0.5210735", "0.52069265", "0.5205681", "0.52047443", "0.52047443", "0.5146002", "0.5139547", "0.51287305", "0.51215214", "0.51180625", "0.5102287", "0.50948036", "0.5064044", "0.5058063", "0.5046872", "0.50374025", "0.5029581", "0.5028343", "0.50025487", "0.49987227", "0.49960467", "0.49930605", "0.49868277", "0.49772316", "0.49752092", "0.49720126", "0.49587515", "0.49498415", "0.49437907", "0.49354097", "0.4926867", "0.49229175", "0.49218884", "0.49205062", "0.4888655", "0.48885396", "0.48787332", "0.48755506", "0.48705205", "0.48689207", "0.48676422", "0.4851652", "0.48486048", "0.48353004", "0.48317808", "0.48128542", "0.48118636", "0.48072273", "0.48068026", "0.48060426", "0.48006478", "0.4797215", "0.47957173", "0.4794173" ]
0.671256
0
show menu if app is running on a phone or a portraitoriented tablet
@Override public boolean onCreateOptionsMenu(Menu menu) { // get the device's current orientation int orientation = getResources().getConfiguration().orientation; // display the app's menu only in portrait orientation if (orientation == Configuration.ORIENTATION_PORTRAIT) { // inflate the menu getMenuInflater().inflate(R.menu.menu_main, menu); this.menu = menu; // Get the SearchView and set the searchable configuration SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE); SearchView searchView = (SearchView) menu.findItem(R.id.menu_search).getActionView(); // Assumes current activity is the searchable activity searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName())); searchView.setIconifiedByDefault(false); // Do not iconify the widget; expand it by default searchView.setOnQueryTextListener(queryTextListener); return true; } else return false; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean isTablet();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n if(!isTablet) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n this.menu = menu;\n }\n return true;\n }", "boolean onPhone() {\n\t\treturn ((getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK)\n\t\t\t\t< Configuration.SCREENLAYOUT_SIZE_LARGE);\n\t}", "public boolean isTablet() { \n\t \tTelephonyManager telephony = (TelephonyManager) activity.getSystemService(Context.TELEPHONY_SERVICE); \n\t \tint type = telephony.getPhoneType();\n\t \tif (type == TelephonyManager.PHONE_TYPE_NONE) { return true;} \n\t \t return false; \n\t }", "public static boolean isTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK)\n >= Configuration.SCREENLAYOUT_SIZE_LARGE;\n }", "public static boolean isTablet() {\n return TeamUp.getAppContext().getResources().getBoolean(R.bool.is_tablet);\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n if (userType.equalsIgnoreCase(\"TSE\")) {\r\n MenuItem item = menu.findItem(R.id.home_button);\r\n item.setVisible(false);\r\n }\r\n return true;\r\n }", "private boolean isSmallTablet(DisplayMetrics metrics) {\n float dpWidth = metrics.widthPixels / metrics.density;\n return (dpWidth >= 600 && dpWidth < 720);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_host, menu);\n\n /*mainMenu = menu;\n\n SharedPreferences mSharedPreferences = getSharedPreferences(getString(R.string.preference_file_key), Context.MODE_PRIVATE);\n\n if (mSharedPreferences.getBoolean(\"isConnected\", false)) // Если есть привязка к BLE-сервису, то\n {\n mainMenu.findItem(R.id.action_device).setIcon(R.drawable.chew_logo);\n } else {\n mainMenu.findItem(R.id.action_device).setIcon(R.drawable.black_logo);\n }\n*/\n return true;\n }", "public static boolean isTablet() {\r\n\t\treturn isTablet;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n getMenuInflater().inflate(R.menu.main_menu, menu);\n\n int nightMode = AppCompatDelegate.getDefaultNightMode();\n\n if (nightMode == AppCompatDelegate.MODE_NIGHT_YES) {\n menu.findItem(R.id.night_mode).setTitle(R.string.day_mode);\n } else {\n menu.findItem(R.id.night_mode).setTitle(R.string.night_mode);\n }\n return true;\n }", "public static boolean isEmulator(){\n String brand = Build.BRAND;\n if (brand.equalsIgnoreCase(\"generic\")) {\n return true;\n } else {\n return false;\n }\n }", "private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_device, menu);\n return true;\n }", "private static boolean isXLargeTablet(Context context)\n {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }", "public boolean isOnMenu ();", "private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }", "private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }", "private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }", "private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }", "private static boolean isXLargeTablet(Context context) {\n return (context.getResources().getConfiguration().screenLayout\n & Configuration.SCREENLAYOUT_SIZE_MASK) >= Configuration.SCREENLAYOUT_SIZE_XLARGE;\n }", "public static boolean hasTouchScreen(Context context) {\n if (context.getPackageManager().hasSystemFeature(\"android.hardware.touchscreen\")) {\n Log.d(\"HardwareFeatureTest\", \"Device has a touch screen.\");\n return true;\n }\n return false;\n }", "private boolean isXLargeTablet() {\n if (((WindowManager) this.getSystemService(Context.WINDOW_SERVICE)).getDefaultDisplay().getRotation() % 180 != 0)\n return true;\n return false;\n }", "public boolean isTablet() {\n return mState.isTablet;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_platform_info, menu);\n return true;\n }", "public boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n \n\t case MENU_PREFS:\n\t \tToast.makeText(getApplicationContext(), \"Prefs\", Toast.LENGTH_SHORT).show();\n\t \t//Intent intent = new Intent()\n\t \t//\t.setClass(this, com.osilabs.android.apps.Prefs.class);\n\t \t//this.startActivityForResult(intent, 0);\n\t \treturn true;\n\t \n\t case R.id.menu_feedback:\n\t \tString pi = URLEncoder.encode(\n\t \t\t\tBuild.MANUFACTURER + \", \" +\n Build.MODEL + \", \" +\n Build.BRAND + \", \" +\n Build.DEVICE + \", \" +\n Build.DISPLAY + \", \" +\n Build.FINGERPRINT + \", \" +\n Build.PRODUCT + \", \" +\n Build.VERSION.RELEASE);\n\t \t\n\t \tIntent i = new Intent(Intent.ACTION_VIEW);\n\t \ti.setData(Uri.parse(URI_FEEDBACK + \"?phoneinfo=\" + pi));\n\t \tstartActivity(i);\n\t \treturn true;\n\n\t\t\tcase R.id.menu_help:\n\t\t //\n\t\t // Set locals with manifest variables\n\t\t //\n\t\t PackageInfo pInfo = null;\n\t\t\t\ttry {\n\t\t\t\t\tpInfo = getPackageManager().getPackageInfo(\"com.osilabs.android.apps.livedropper\",\n\t\t\t\t\t\t\tPackageManager.GET_META_DATA);\n\t\t\t\t\tversion = pInfo.versionName;\n\t\t\t\t} catch (NameNotFoundException e) {\n\t\t\t\t\te.printStackTrace();\n\t\t\t\t}\n\t\t\t\t\n\t\t AlertDialog alertDialog = new AlertDialog.Builder(this).create();\n\t\t alertDialog.setTitle(R.string.app_name);\n\t\t alertDialog.setMessage(\"You are running version \" + version);\n\t\t alertDialog.setButton(this.getString(R.string.sample_button),\n\t\t \t\tnew DialogInterface.OnClickListener() {\n\t\t \tpublic void onClick(DialogInterface dialog, int which) {\n\t\t \t\tIntent mIntent = new Intent(Intent.ACTION_VIEW, \n\t\t \t\t\t\tUri.parse(\"http://osilabs.com/m/mobilecontent/livedropper/about.php#\" + version)); \n \t\t\t\tstartActivity(mIntent); \n\t\t } \n\t\t });\n\t\t alertDialog.setIcon(R.drawable.ic_launcher);\n\t\t alertDialog.show();\n\t\t \treturn true;\n\n\t\t case R.id.menu_quit:\n\t\t finish();\n\t\t return true;\n\t }\n\t return false;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.system_info_main, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_window, menu);\n MenuItem m = menu.add(2,4,9,\"Debug Service\");\n m.setCheckable(true);\n m.setChecked(GRClient.getInstance().isDebug());\n\n menu.add(3,9,1, (isSocalConnected) ? \"Sign Out\" : \"Sign In\");\n menu.add(3,8,100,\"Send Feedback\");\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n MenuItem showSystemApps = menu.findItem(R.id.action_show_system_app);\n MenuItem showPackageName = menu.findItem(R.id.action_show_package_name);\n\n showSystemApps.setChecked(pref.getBoolean(Constants.KEY_SHOW_SYSTEM_APP, false));\n showPackageName.setChecked(pref.getBoolean(Constants.KEY_SHOW_PACKAGE_NAME, false));\n refresh(showSystemApps.isChecked());\n return true;\n }", "public boolean check_Help_Buttom_AppBar_Presence() {\r\n\t\tWebElement bottomMenu_AppHelp_Icon = driver.findElementByAccessibilityId(\"HelpAppBarButton\");\r\n\t\treturn IsElementVisibleStatus(bottomMenu_AppHelp_Icon);\r\n\t}", "public static void showPowerMenu() {\n final IWindowManager wm = WindowManagerGlobal.getWindowManagerService();\n try {\n wm.showGlobalActions();\n } catch (RemoteException e) {\n e.printStackTrace();\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n //Add any device elements we've discovered to the overflow menu\n for (int i=0; i < mDevices.size(); i++) {\n BluetoothDevice device = mDevices.valueAt(i);\n menu.add(0, mDevices.keyAt(i), 0, device.getName());\n }\n\n return true;\n }", "public boolean deviceIsAPhone() {\n TelephonyManager manager = (TelephonyManager) getSystemService(Context.TELEPHONY_SERVICE);\r\n return manager.getPhoneType() != TelephonyManager.PHONE_TYPE_NONE;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (webViewType != AppEnum.WebViewType.AdViewInto) {\n getMenuInflater().inflate(R.menu.menu_live_room, menu);\n }\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.gatt_services, menu);\n if (mConnected) {\n menu.findItem(R.id.menu_connect).setVisible(false);\n menu.findItem(R.id.menu_disconnect).setVisible(true);\n } else {\n menu.findItem(R.id.menu_connect).setVisible(true);\n menu.findItem(R.id.menu_disconnect).setVisible(false);\n }\n return true;\n }", "private void showSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n }", "private void showSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n }", "private void showSystemUI() {\n View decorView = getWindow().getDecorView();\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_device_list, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.settings, menu);\n MenuItem settings = menu.findItem(R.id.settings);\n if(currentScreenGameState == GameState.STOPPED ){\n settings.setVisible(true);\n }else{\n settings.setVisible(false);\n }\n return true;\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tmenu.add(\"\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"How-To\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"About\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"Rate it\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"Contact\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\tmenu.add(\"Preview SMS\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\r\n\t\t\r\n\t\treturn true;\r\n\t\r\n\t\t\r\n\t}", "public boolean check_WndsHelp_Buttom_AppBar_Presence() {\r\n\t\tWebElement bottomMenu_WndsHelp_Icon = driver.findElementByAccessibilityId(\"WindowsHelpAppBarButton\");\r\n\t\treturn IsElementVisibleStatus(bottomMenu_WndsHelp_Icon);\r\n\t}", "private void showSystemUI() {\n decorView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN\n );\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_about) {\n Intent intent=new Intent(this,AboutActivity.class);\n startActivity(intent);\n return true;\n }if(id==R.id.action_open_wifi){\n flag=!flag;\n TextView textView=(TextView)findViewById(R.id.textView_password);\n if(flag){\n textView.setVisibility(View.VISIBLE);\n Toast.makeText(this,\"热点已开启\",Toast.LENGTH_SHORT).show();\n }else {\n textView.setVisibility(View.INVISIBLE);\n Toast.makeText(this,\"热点已关闭\",Toast.LENGTH_SHORT).show();\n }\n\n setWifiApEnabled(flag);\n return true;\n }if(id==R.id.action_help){\n Intent intent=new Intent(this,HelpActivity.class);\n startActivity(intent);\n }if(id==R.id.action_exit){\n //stopService(intentService);\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void ifWin() {\n WinMenu.setVisible(true);\n }", "private void showMenuScreen()\n {\n logoutButton.setVisibility(textViewLabel.VISIBLE);\n battleButton.setVisibility(View.VISIBLE);\n char1.setVisibility(View.VISIBLE);\n char2.setVisibility(View.VISIBLE);\n char3.setVisibility(View.VISIBLE);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t case R.id.developer:\n\t openMyApps();\n\t return true;\t \n\t \n\t default:\n\t return super.onOptionsItemSelected(item);\n\t }\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home, menu);\n MenuItem item = menu.findItem(R.id.action_now_playing);\n item.setVisible(ServiceTools.isServiceRunning(this,StreamerService.class.getName()));\n return true;\n }", "@Override\r\n protected void onScreenActivate() {\n if (Forge.isLandscapeMode() && displaySidebarForLandscapeMode()) {\r\n menu.hide();\r\n menu.show(getLeft(), 0, getWidth(), getHeight());\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (item.getItemId()) {\n // case R.id.my_library_screen:\n // return true;\n case R.id.my_profile_screen:\n return true;\n /* case R.id.home_screen:\n return true;\n case R.id.logout:\n return true;*/\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == R.id.QuanLyMonAn) {\n //mở màn hình thêm ở đây\n Intent intent = new Intent(MainHomeActivity.this, MainQuanLyMonAnActivity.class);\n startActivity(intent);\n } else if (item.getItemId() == R.id.QuanLyThongKe) {\n Intent intent = new Intent(MainHomeActivity.this, MainQuanLyThongKeActivity.class);\n startActivity(intent);\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void setTablet(boolean tablet) {\n isTablet = tablet;\n }", "public boolean check_Home_Buttom_AppBar_Presence() {\r\n\t\tWebElement bottomMenu_Home_Icon = driver.findElementByAccessibilityId(\"HomeAppBarButton\");\r\n\t\treturn IsElementVisibleStatus(bottomMenu_Home_Icon);\r\n\t}", "public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(0, 0, 0, R.string.menu_track);\n menu.add(0, 1, 0, R.string.menu_rideList);\n if (ride.getDistanceMI() != 0){\n menu.add(0, 2, 0, \"View Map\");\n }\n return true;\n }", "private void showSystemUI() {\n getWindow().getDecorView().setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu){\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_all, menu);\n // set correct powerState icon\n MenuItem ON_OFF = menu.findItem(R.id.action_powerState);\n if (!on_off) {\n ON_OFF.setIcon(R.drawable.poweroff);\n ON_OFF.setTitle(\"Power OFF\");\n } else {\n ON_OFF.setIcon(R.drawable.poweron);\n ON_OFF.setTitle(\"Power ON\");\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.wotkerhome, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n itemIdMSCSM = menu.findItem(R.id.action_registration);\n itemAutoReg = menu.findItem(R.id.action_auto_reg);\n itemExit = menu.findItem(R.id.action_exit);\n itemRegister = menu.findItem(R.id.action_register);\n if (registered) {\n itemIdMSCSM.setVisible(false);\n itemAutoReg.setVisible(false);\n itemExit.setVisible(false);\n } else {\n itemIdMSCSM.setVisible(true);\n itemAutoReg.setVisible(true);\n itemExit.setVisible(true);\n }\n return true;\n }", "public boolean check_About_Buttom_AppBar_Presence() {\r\n\t\tWebElement bottomMenu_About_Icon = driver.findElementByAccessibilityId(\"AboutAppBarButton\");\r\n\t\treturn IsElementVisibleStatus(bottomMenu_About_Icon);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == R.id.menu1) {\n alt.show();\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item){\n\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == R.id.setting){\n return true;\n }\n if(id == R.id.exit){\n Intent startMain = new Intent(Intent.ACTION_MAIN);\n startMain.addCategory(Intent.CATEGORY_HOME);\n startMain.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n startActivity(startMain);\n System.exit(0);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "protected void showSystemMenu() {\n windowMenu.doClick(0);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case R.id.ic_wifi :\n //nothing yet;\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_commonone, menu);\n MenuItem item3 = menu.findItem(R.id.messager);\n MenuItem item4 = menu.findItem(R.id.search);\n item3.setIcon(R.drawable.openmessage);\n item4.setIcon(R.drawable.search);\n try{\n if (loggedIn.equals(\"noValue\")) {\n\n\n item3.setVisible(false);\n\n } else {\n\n item3.setVisible(true);\n\n }}\n catch (Exception e){\n\n }\n return true;\n }", "private boolean m21865i() {\n TelephonyManager telephonyManager = (TelephonyManager) this.f16409k.getSystemService(\"phone\");\n if (telephonyManager != null) {\n return telephonyManager.getNetworkOperatorName().equalsIgnoreCase(\"android\");\n }\n return false;\n }", "public boolean isSmallScreen() {\n \t\treturn m_smallScreenMode;\n \t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Toast t = Toast.makeText(this,\"setting\",Toast.LENGTH_LONG);\n t.show();\n return true;\n }\n else if (id == R.id.action_help) {\n Toast t = Toast.makeText(this,\"help\",Toast.LENGTH_LONG);\n t.show();\n\n Intent i = new Intent(this,HelpActivity.class);\n this.startActivity(i);\n\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "private boolean canShowBars() {\n if (mAppBridge != null && mCurrentIndex == 0\n && !mPhotoView.getFilmMode()) {\n return false;\n }\n\n // No bars if it's not allowed.\n if (!mActionBarAllowed) {\n return false;\n }\n\n Configuration config = mActivity.getResources().getConfiguration();\n return config.touchscreen != Configuration.TOUCHSCREEN_NOTOUCH;\n }", "boolean hasMobileDeviceConstant();", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Toast.makeText(this,MENSAJE,Toast.LENGTH_LONG).show();\n }\n\n return super.onOptionsItemSelected(item);\n }", "public void checkEnabled(Activity context) {\r\n if(menuShown)\r\n this.show(context,false);\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_top_screen, menu);\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Toast.makeText(Inserting.this, \"Sorry, there is no any option for setting!!!\", Toast.LENGTH_LONG).show();\n return true;\n }\n switch(id){\n case R.id.id_about_us:\n Toast.makeText(Inserting.this, \"I am Junior Android Developer!!!\", Toast.LENGTH_LONG).show();\n return true;\n case R.id.id_contact_us:\n Toast.makeText(Inserting.this, \"If you want to cantact me, please write email to doston2509@gmail.com!!!\",\n Toast.LENGTH_LONG).show();\n return true;\n case R.id.id_search:\n Toast.makeText(Inserting.this, \"Sorry, there is no any option for search!!!\", Toast.LENGTH_LONG).show();\n return true;\n case R.id.id_exit_app:\n Exit_alert();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Intent intent = getIntent();\n id = intent.getIntExtra(\"id\", 9999);\n\n Log.d(\"ss\", Locale.getDefault().getLanguage());\n\n if( Locale.getDefault().getLanguage().equals(\"iw\")||Locale.getDefault().getLanguage().equals(\"he\")){\n getMenuInflater().inflate(R.menu.menu_main_rtl, menu);}\n else\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n if(id!=9999)\n getMenuInflater().inflate(R.menu.menu_main_update, menu);\n\n return true;\n }", "private void showSystemUi()\n\t{\n\t\tif (android.os.Build.VERSION.SDK_INT < android.os.Build.VERSION_CODES.HONEYCOMB)\n\t\t\treturn;\n\n\t\tmUnityPlayer.setSystemUiVisibility(mUnityPlayer.getSystemUiVisibility() & ~getLowProfileFlag());\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.phone_dialer, menu);\n return true;\n }", "private static boolean supportedPlatform() {\n return System.getProperty(\"os.name\").startsWith(\"iPhone\");\n }", "public void toggleSystemUI() {\r\n if (fullScreenMode)\r\n showSystemUI();\r\n else hideSystemUI();\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n MenuItem helpButton = menu.findItem(R.id.menu1);\n helpButton.setVisible(true);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_host_or_connect, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n menu.add(0, MENU_A, 0, \"Info\");\n menu.add(0, MENU_B, 0, \"Legal Notices\");\n menu.add(0, MENU_c, 0, \"Mode\");\n return true;\n }", "public boolean onOptionsItemSelected(MenuItem item) {\n\r\n switch(item.getItemId()){\r\n\r\n case R.id.menu_BelAlarmnummer:\r\n //bel 112\r\n boolean isOk = true;\r\n Intent intent = new Intent();\r\n\r\n if(!deviceIsAPhone()){\r\n displayAlert();\r\n isOk = false;\r\n }\r\n if (isOk){\r\n intent.setAction(Intent.ACTION_DIAL);\r\n intent.setData(Uri.parse(getResources().getString(R.string.telefoonnummer)));\r\n startActivity(intent);\r\n }\r\n\r\n break;\r\n\r\n case R.id.menu_naarMenu:\r\n //naar Activity startMenu\r\n Class ourClass1;\r\n try {\r\n ourClass1 = Class.forName(\"com.aid.first.mb.firstaid.Menu1\");\r\n Intent intentDrie = new Intent(MoederClass.this, ourClass1);\r\n startActivity(intentDrie);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n break;\r\n case R.id.menu_sluitAf:\r\n Class ourClass3;\r\n try {\r\n ourClass3 = Class.forName(\"com.aid.first.mb.firstaid.Personlijke_veiligheid\");\r\n Intent intentDrie = new Intent(MoederClass.this, ourClass3);\r\n intentDrie.putExtra(\"sluiten\",1);\r\n intentDrie.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n intentDrie.addFlags(Intent.FLAG_ACTIVITY_NO_HISTORY);\r\n startActivity(intentDrie);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n finish();\r\n break;\r\n\r\n case R.id.menu_WaarBenIk:\r\n //naar activity Locatie\r\n Class ourClass4;\r\n try {\r\n ourClass4 = Class.forName(\"com.aid.first.mb.firstaid.Lokatie\");\r\n Intent intentVier = new Intent(MoederClass.this, ourClass4);\r\n startActivity(intentVier);\r\n\r\n } catch (ClassNotFoundException e) {\r\n // TODO Auto-generated catch block\r\n e.printStackTrace();\r\n }\r\n\r\n\r\n break;\r\n\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Toast.makeText(getBaseContext(),\"Designed and developed by : Akash Giri\", Toast.LENGTH_LONG).show();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.hospitalmanagerhubmainmenu, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_register_device, menu);\n return true;\n }", "private void showSystemUI() {\n photoView.setSystemUiVisibility(\n View.SYSTEM_UI_FLAG_LAYOUT_STABLE\n | View.SYSTEM_UI_FLAG_LAYOUT_HIDE_NAVIGATION\n | View.SYSTEM_UI_FLAG_LAYOUT_FULLSCREEN);\n isShowingSystemUI = true;\n }", "private void hideMenuScreen()\n {\n logoutButton.setVisibility(textViewLabel.INVISIBLE);\n battleButton.setVisibility(View.INVISIBLE);\n char1.setVisibility(View.INVISIBLE);\n char2.setVisibility(View.INVISIBLE);\n char3.setVisibility(View.INVISIBLE);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.home_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.homescreen, menu);\n return true;\n }", "public static boolean showAppSettingsScreen(Activity activity) {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n Intent intent = new Intent(\n Settings.ACTION_APPLICATION_DETAILS_SETTINGS,\n Uri.fromParts(\n \"package\",\n activity.getPackageName(),\n null));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n activity.startActivity(intent);\n return true;\n } else {\n return false;\n }\n }", "@Override\n public void onMenuClick() {\n Toast.makeText(activity.getApplicationContext(), \"Menu click\",\n Toast.LENGTH_LONG).show();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n mMenu = menu;\n if(selectedTab == APPS_TAG){\n\t\t\tif(mMenu != null){\n\t\t\t\tMenuItem addButton = mMenu.findItem(R.id.action_add);\n\t\t\t\taddButton.setVisible(false);\n\t\t\t\tMenuItem loadButton = mMenu.findItem(R.id.action_load_profile);\n\t\t\t\tloadButton.setVisible(false);\n\t\t\t}\n\t\t}\n\t\telse if(selectedTab == RULES_TAG){\n\t\t\tif(mMenu != null){\n\t\t\t\tMenuItem addButton = mMenu.findItem(R.id.action_add);\n\t\t\t\taddButton.setVisible(true);\n\t\t\t\tMenuItem loadButton = mMenu.findItem(R.id.action_load_profile);\n\t\t\t\tloadButton.setVisible(true);\n\t\t\t}\n\t\t}\n\t\telse if(selectedTab == IFACES_TAG){\n\t\t\tif(mMenu != null){\n\t\t\t\tMenuItem addButton = mMenu.findItem(R.id.action_add);\n\t\t\t\taddButton.setVisible(false);\n\t\t\t\tMenuItem loadButton = mMenu.findItem(R.id.action_load_profile);\n\t\t\t\tloadButton.setVisible(false);\n\t\t\t}\n\t\t}\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home, menu);\n /* Make an Language option so the user can change the language of the game*/\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.about_the_app) {\n Intent intent=new Intent(getApplicationContext(),Main3Activity.class);\n startActivity(intent);\n return true;\n }\n// else if(id==R.id.Settings){\n// Intent intent2=new Intent(getApplicationContext(),Main3Activity.class);\n// startActivity(intent2);\n// return true;\n// }\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\n\t\t\tcase 1:\n\t\t\t\t//Toast msg = Toast.makeText(orgDetails.this, \"Menu 1\", Toast.LENGTH_LONG);\n\t\t\t\t//msg.show();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cambiar_pass).setVisible(false);\n menu.findItem(R.id.action_ayuda).setVisible(false);\n menu.findItem(R.id.action_settings).setVisible(false);\n menu.findItem(R.id.action_cancel).setVisible(false);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n if (showArchived) {\n //standard menu shown on archived shopping lists\n getMenuInflater().inflate(R.menu.menu_main_archived, menu);\n } else if (BuildConfig.DEBUG) {\n //special debug menu shown on active shopping lists\n getMenuInflater().inflate(R.menu.menu_main_debug, menu);\n } else {\n //standard menu shown on active shopping lists\n getMenuInflater().inflate(R.menu.menu_main, menu);\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n Log.d(TAG, \"onOptionsItemSelected\");\n if (id == android.R.id.home){\n Log.d(TAG, \"onOptionsItemSelected: HOME\");\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_settings) {\n Toast.makeText(this, \"Opening Settings...\", Toast.LENGTH_LONG).show();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // MyApp myApp = MyApp.getInstance();\n\n MenuItem item = menu.findItem(R.id.action_matches);\n item.setVisible(false);\n\n return true;\n }" ]
[ "0.66786724", "0.6497936", "0.6492495", "0.6440268", "0.61530364", "0.6124384", "0.60583895", "0.59374225", "0.5907924", "0.5808885", "0.58077884", "0.57715327", "0.57541764", "0.5747194", "0.5744998", "0.57340735", "0.5724607", "0.5724607", "0.5724607", "0.5724607", "0.5724607", "0.5712619", "0.56990236", "0.56926525", "0.5648136", "0.5630397", "0.5594786", "0.55777735", "0.5572789", "0.5568589", "0.5566812", "0.55648386", "0.55521023", "0.5551863", "0.55484945", "0.55471236", "0.55471236", "0.55471236", "0.553186", "0.55239767", "0.55223376", "0.55170614", "0.5515876", "0.55018854", "0.5490939", "0.5486294", "0.54395473", "0.5436366", "0.54187936", "0.54151034", "0.5397386", "0.5392491", "0.5381871", "0.53742373", "0.53697956", "0.5357364", "0.5347171", "0.53467774", "0.5335995", "0.53350186", "0.53226405", "0.531467", "0.5302756", "0.5296605", "0.5293387", "0.5291904", "0.52898", "0.5289655", "0.5284538", "0.5282784", "0.52754486", "0.5271574", "0.5271173", "0.5271088", "0.52676773", "0.52586246", "0.5232504", "0.52323794", "0.52248156", "0.5223748", "0.52060485", "0.5203665", "0.519923", "0.5198165", "0.5197537", "0.5197345", "0.5193584", "0.5187937", "0.51851493", "0.5183698", "0.5182063", "0.51816857", "0.51749307", "0.5171311", "0.51696944", "0.5165815", "0.51654005", "0.516421", "0.51640236", "0.5163019", "0.5161921" ]
0.0
-1
Do something check if empty
@Override public boolean onQueryTextChange(String newText) { if (newText.isEmpty()) { //show the whole list again //set book list status AfterLoginActivity.this.status = StatusEnum.STARTED_BOOK_LIST; AfterLoginActivity.this.databaseHandler.getBookList(); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isItEmpty(){\n\t\t\tif (this.items.isEmpty() && (this.receptacle.isEmpty() || findSpecialtyContainers())){//if there's nothing in there.\n\t\t\t\tSystem.out.println(\"\\nThere's nothing here to do anything with.\");\n\t\t\t\treturn true;}\n\t\t\treturn false;\n\t\t}", "boolean checkIfEmpty();", "private boolean isEmpty() {\n\t\treturn size() == 0;\n\t}", "private boolean isEmpty() {\n\t\treturn (size == 0);\n\t}", "private boolean isEmpty() { return getSize() == 0; }", "private boolean isEmpty() {\n return (size == 0);\n }", "@Override\n public boolean isEmpty() {\n return this.size==0;\n }", "boolean isEmpty() {\n return contents.size() == 0;\n }", "boolean isEmpty() {\n return contents.size() == 0;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn(size() == 0);\n\t}", "@Override\n public boolean isEmpty() {\n return _size == 0;\n }", "@Override\n public boolean isEmpty() {\n return this.size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size()==0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return size() == 0;\n }", "@Override\n public boolean isEmpty() {\n return this.count() == 0;\n }", "@Override\r\n\tpublic boolean isEmpty() {\n\t\treturn this.size == 0;\r\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\r\n\t\treturn data.isEmpty();\r\n\t}", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn size() == 0;\r\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn size == 0;\n\t}", "public boolean isEmpty(){\n return thing == null;\n }", "@Override\r\n public boolean isEmpty() {\n return size == 0;\r\n }", "private boolean checkEmpty() {\n\t\treturn this.array[0] == null;\n\t}", "public boolean is_empty() {\n\t\treturn false;\n\t}", "@Override\r\n public boolean isEmpty() {\r\n return size == 0;\r\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "@Override\n public boolean isEmpty() {\n return size == 0;\n }", "public abstract boolean IsEmpty();", "@Override\n public boolean isEmpty() { return true; }", "@Override\r\n\tpublic boolean isempty() {\n\t\treturn count<=0;\r\n\t\t\r\n\t}", "@Override\n public boolean isEmpty()\n {\n return size == 0;\n }", "public boolean isEmpty(){\n return(numItems == 0);\n }", "public boolean isEmpty()\n {return data == null;}", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return size == 0; }", "public boolean isEmpty() { return true; }", "@Override\n public boolean isEmpty(){\n return itemCount == 0;\n }", "@Override\r\n\tpublic boolean isEmpty() {\r\n\t\treturn count == 0;\r\n\t}", "public boolean isEmpty(){\n return (numItems==0);\n }", "private boolean isAnyEmpty(){\n //get everything\n return (fname.getText().toString().trim().length() == 0)\n || (lname.getText().toString().trim().length() == 0)\n || (email.getText().toString().trim().length() == 0)\n || (password.getText().toString().trim().length() == 0);\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn (getSize() == 0);\n\t}", "boolean isEmpty(){\n\treturn size() == 0;\n }", "public boolean my_is_empty();", "public boolean empty() { \t \n\t\t return size <= 0;\t \n }", "public boolean isEmptyHuh() {\n return true; \n }", "@Override\n public boolean isEmpty(){\n return (count == 0);\n }", "@Override\n public boolean isEmpty()\n {\n return false;\n }", "public boolean isEmpty() { return count == 0; }", "@Override\r\n\tpublic boolean isEmpty(){\r\n\t\tif(size == 0){\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "public boolean isEmpty() {\n // YOUR CODE HERE\n return true;\n }", "public boolean isEmpty() {\n \t\treturn size == 0;\n \n \t}", "public boolean empty() {\n return data.size() == 0;\n }", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "@Override\n\tpublic boolean isEmpty() {\n\t\treturn false;\n\t}", "public boolean isEmpty()\r\n\t{\r\n\t\treturn data.size() == 0;\r\n\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "@Override\n\t\tpublic boolean isEmpty() {\n\t\t\treturn false;\n\t\t}", "public boolean is_empty () {\n return is_empty;\r\n }", "public boolean isEmpty()\r\n\t{\r\n\t\treturn numItems == 0 ;\r\n\t}", "public boolean isEmpty() {\n \t return size == 0;\n }", "public boolean isEmpty(){\r\n\t\treturn size() == 0;\r\n\t}", "@Override\n public boolean isEmpty()\n {\n return list.size()<1;\n }", "private boolean isEmpty() {\r\n\t\t// TODO Auto-generated method stub\r\n\t\tif (this.size() == 0) {\r\n\t\t\treturn true;\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "@Override\n\t\t\tpublic boolean isEmpty() {\n\t\t\t\treturn false;\n\t\t\t}", "@Override\n public boolean isEmpty() {\n if (size == 0) {\n return true;\n } else {\n return false;\n }\n }", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();", "public boolean isEmpty();" ]
[ "0.76921034", "0.7671487", "0.76204044", "0.7590165", "0.7553317", "0.75081766", "0.7413237", "0.73993665", "0.73993665", "0.73789084", "0.7370665", "0.73599976", "0.73537505", "0.73413044", "0.73413044", "0.73413044", "0.73413044", "0.73413044", "0.73297256", "0.7325511", "0.7304917", "0.730353", "0.7295344", "0.7295344", "0.7292485", "0.7291541", "0.72761303", "0.727536", "0.7271164", "0.72693014", "0.72693014", "0.72693014", "0.72693014", "0.72693014", "0.72637516", "0.7257518", "0.7256688", "0.72549397", "0.72365814", "0.7231187", "0.7219049", "0.7219049", "0.7219049", "0.72082525", "0.7200455", "0.719636", "0.7195458", "0.7193407", "0.7186072", "0.71838623", "0.71801555", "0.717513", "0.7173899", "0.7162905", "0.7153059", "0.7151129", "0.7148281", "0.71479356", "0.71404946", "0.7133105", "0.71275425", "0.71275425", "0.71275425", "0.71275425", "0.71275425", "0.71275425", "0.71275425", "0.71271515", "0.7125603", "0.7125603", "0.7122689", "0.7121689", "0.71196675", "0.71122366", "0.71105343", "0.71103895", "0.71101546", "0.71083885", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212", "0.7108212" ]
0.0
-1
Do something search book list and return where string is find
@Override public boolean onQueryTextSubmit(String query) { if (AfterLoginActivity.this.latestBookList != null) { searchBookList = new ArrayList<>(); for (Book book : AfterLoginActivity.this.latestBookList) { //str1.toLowerCase().contains(str2.toLowerCase()) if (book.getName().toLowerCase().contains(query.toLowerCase())) { //add to search book list searchBookList.add(book); } } //set books to book list view AfterLoginActivity.this.bookListFragment.setBooks(searchBookList); } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public ArrayList<Book> search(String part){ \n this.searchBooks = new ArrayList<Book>();\n this.numberedListOfSearch = new HashMap<Integer, Book>();\n if (part.length()>=4){\n //Adding all the searching books into an ArrayList<Book>\n //No duplicating for books having the same title\n boolean bookExist = false;\n for (Book book : this.libraryBooks){\n if ((book.getTitle().toLowerCase().contains(part.toLowerCase())) || (book.getAuthor().toLowerCase().contains(part.toLowerCase()))){\n //Check whether any books having the same title in the list\n for (Book bookSearch : this.searchBooks){\n if (bookSearch.getTitle().equals(book.getTitle())){\n bookExist = true;\n break;\n }\n }\n //If none!\n if(!bookExist){\n this.searchBooks.add(book);\n }\n }\n bookExist = false;\n }\n //To put into a numbered list for printing\n //No duplicating for books having the same title\n for (int i =0; i < (this.searchBooks.size());i++){\n // put the book in the HashMap for printing \n this.numberedListOfSearch.put(i+1, this.searchBooks.get(i));\n }\n\n //To print out\n this.println(\"The searching process has finished!\");\n String researchBooks=\"\";\n //check whether the numbered list is empty or not\n if(this.numberedListOfSearch.size() >0){\n researchBooks += \"{\";\n for (int i = 0; i < this.numberedListOfSearch.size();i++){\n researchBooks += (i+1);\n researchBooks += \": \";\n researchBooks += this.numberedListOfSearch.get(i+1).toString();\n researchBooks += \"; \";\n }\n researchBooks = researchBooks.substring(0, researchBooks.length()-2);\n researchBooks += \"}\"; \n }\n //if the numbered list is empty\n else if ( this.numberedListOfSearch.size() == 0){\n researchBooks += \"Nothing found!\";\n }\n this.println(researchBooks);\n }\n\n //If not enough input key words!\n else{\n this.println(\"Please enter more key words! At least four!!\");\n }\n return this.searchBooks;\n }", "@In String search();", "String printListSearch(String searchString);", "@Override\n\tpublic Book findBook(Book book) throws RemoteException {\n\t\tPredicate<Book> predicate = x-> x.getIsbn().equals(book.getIsbn());\n\t\treturn bookList.stream().filter(predicate).findFirst().get();\n\t\t\n\t}", "public int searchBook(String title){\n for (int i = 0; i < titleList.size(); i++){\n if (titleList.get(i).equals(title))\n return i;\n }\n return -1;\n }", "public static void bookNameSearch(Set<Book> books) {\n Pattern pattern = Pattern.compile(SEARCH_PARAMETER);\n for (Book book : books) {\n Matcher matcher = pattern.matcher(book.getBookName());\n if (matcher.find()) {\n System.out.println(book);\n }\n }\n }", "public void findBookTitle(String title) {\n\t\tboolean match = false;\n\t\tfor (int i = 0; i < bookList.size(); i++) {\n\t\t\t// Find text with Contains OR find text with the full title\n\t\t\tif (bookList.get(i).getTitle().toLowerCase().contains(title.toLowerCase())\n\t\t\t\t\t|| bookList.get(i).getTitle().toLowerCase().equals(title.toLowerCase())) {\n\t\t\t\tmatch = true;\n\t\t\t\tSystem.out.println(bookList.get(i));\n\t\t\t}\n\t\t}\n\t\tif (!match) {\n\t\t\tSystem.out.println(\"Could not find the book Title\");\n\t\t}\n\t}", "public void printBookDetails(Book bookToSearch) {\n boolean exists = false;\n\n //Search if the given book exists in the library\n // There are better ways. But not with arrays!!\n for (Book element : books) {\n if (element.equals(bookToSearch)) {\n exists = true;\n }\n\n //Print book details if boook found\n if (exists) {\n System.out.print(bookToSearch.toString());\n } else {\n System.out.print(bookToSearch.toString() + \" not found\");\n }\n }\n }", "public abstract int search(String[] words, String wordToFind) throws ItemNotFoundException;", "public List<Product> search(String searchString);", "private void searchBooks(String callNumber, String[] keywords,int startYear, int endYear) {\n\t\t/* Loop to sequentially search master list 'Reference' */\n\t\tfor (int i = 0; i < items.size(); i++)\n\t\t\tif ((callNumber.equals(\"\") || items.get(i).getCallNumber()\n\t\t\t\t\t.equalsIgnoreCase(callNumber))\n\t\t\t\t\t&& (keywords == null || matchedKeywords(keywords, items\n\t\t\t\t\t\t\t.get(i).getTitle()))\n\t\t\t\t\t&& (items.get(i).getYear() >= startYear && items.get(i)\n\t\t\t\t\t\t\t.getYear() <= endYear)) {\n\t\t\t\tReference ref = items.get(i);\n\t\t\t\t/* Checks if reference is of a 'Book' type */\n\t\t\t\tif (ref instanceof Book) {\n\t\t\t\t\tBook book = (Book) ref;\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t\tSystem.out.println(book.toString());\n\t\t\t\t\tSystem.out.println(\"--------------------------------------------\");\n\t\t\t\t}\n\n\t\t\t}\n\t}", "public List<Book> readByBookName(String searchString) throws Exception{\n\t\tsearchString = \"%\"+searchString+\"%\";\n\t\treturn (List<Book>) template.query(\"select * from tbl_book where title like ?\", new Object[] {searchString}, this);\n\t}", "public void searchBooks(String searchKeyword) {\n\n\n books = new ArrayList<>();\n Call<BooksObject> call = NetworkUtils.booksAPI.findBooks(searchKeyword, NetworkUtils.apiKey, 5);\n call.enqueue(new Callback<BooksObject>() {\n @Override\n public void onResponse(Call<BooksObject> call, Response<BooksObject> response) {\n if (!response.isSuccessful()) {\n Log.i(TAG, \"\" + response.code());\n return;\n }\n\n BooksObject booksObject = response.body();\n ArrayList<Book> bookList = booksObject.getItems();\n for (Book b : bookList) {\n String id = b.getId();\n boolean exists = false;\n for (Book bo : library) {\n if (id.equals(bo.getId())) {\n exists = true;\n break;\n }\n }\n if (!exists) {\n books.add(b);\n }\n }\n\n customSearchAdapter = new CustomSearchAdapter(getContext(), books);\n acLibrary.setAdapter(customSearchAdapter);\n customSearchAdapter.notifyDataSetChanged();\n }\n\n @Override\n public void onFailure(Call<BooksObject> call, Throwable t) {\n Log.i(TAG, t.getMessage());\n }\n });\n\n }", "public void search() {\n String q = this.query.getText();\n String cat = this.category.getValue();\n if(cat.equals(\"Book\")) {\n searchBook(q);\n } else {\n searchCharacter(q);\n }\n }", "public List search(String str) {\n List searchList = new ArrayList();\n try {\n //set the scanner to the entire bible file\n scan = new Scanner(new File(\"kjvdat.txt\"));\n //set the regex pattern with the search string\n Pattern p = Pattern.compile(\"(\" + str + \")\");\n //scan through the entire verses for the search parameter\n while (scan.hasNext()) {\n String txt = scan.nextLine();\n Matcher m = p.matcher(txt);\n if (m.find()) {\n //insert verses that are found into the searchlist\n searchList.add(txt.substring(0, txt.length() - 1));\n }\n }\n\n } catch (FileNotFoundException ex) {\n Logger.getLogger(Finder.class.getName()).log(Level.SEVERE, null, ex);\n }\n //return list of all verses found containing the search parameter\n scan.close();\n return searchList;\n }", "public List<Books> searchBook(String keywords,String author,double low_price,double high_price){\n /*\n * search books by keywords of book_name\n * */\n List<Books> books=null;\n ResultSet resultSet=null;\n if(keywords!=\"\"&&author==\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book where book_name like '%\"+keywords+\"%'\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by keywords and author\n else if(keywords!=\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where b.book_name like '%keywords=?%' and book_author=?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{keywords,author});\n books=resultSetToBook(baseDao);\n return books;\n }//search books by author\n else if(keywords==\"\"&&author!=\"\"&&low_price<0&&high_price<0){\n String sql=\"select * from Book b where book_author=?\";\n BaseDao baseDaot=dao.executeQuery(sql,new Object[]{author});\n books=resultSetToBook(baseDaot);\n return books;\n }\n else if(keywords==\"\"&&author==\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n //search books by keywords and price\n else if(keywords!=\"\"&&author!=\"\"&&low_price>0&&high_price>0){\n String sql=\"select * from Book b where b.book_name like '%\"+keywords+\"%' \" +\n \"and book_author=? and book_price>? and book_price<?\";\n BaseDao baseDao=dao.executeQuery(sql,new Object[]{author,low_price,high_price});\n books=resultSetToBook(baseDao);\n return books;\n }\n return null;\n }", "Book findBook(String title, boolean silent);", "List<Card> search(String searchString) throws PersistenceCoreException;", "public String searchBooks() {\r\n if (keywords.isEmpty()) {\r\n return \"advanced-search\";\r\n }\r\n\r\n keywords = keywords.trim();\r\n \r\n //Get list of all the queries\r\n List<List<Books>> listOfLists = new ArrayList<List<Books>>();\r\n listOfLists.add(findBooksByGenre(keywords));\r\n listOfLists.add(findBooksByIdentifier(keywords));\r\n listOfLists.add(findBooksByContributor(keywords));\r\n listOfLists.add(findBooksByFormat(keywords));\r\n listOfLists.add(findBooksByPublisher(keywords));\r\n listOfLists.add(findBooksByTitle(keywords));\r\n listOfLists.add(findBooksByYear(keywords));\r\n\r\n clearFields();\r\n\r\n List<Books> books = new ArrayList<Books>();\r\n\r\n //Filter out useless data\r\n List<Books> tempBookList;\r\n for (int cntr = 0; cntr < listOfLists.size(); cntr++) {\r\n tempBookList = listOfLists.get(cntr);\r\n\r\n if (tempBookList == null) {\r\n continue;\r\n }\r\n\r\n if (tempBookList.isEmpty()) {\r\n continue;\r\n }\r\n\r\n books.addAll(tempBookList);\r\n }\r\n\r\n //Remove duplicates\r\n Set<Books> bookSet = new HashSet<Books>();\r\n bookSet.addAll(books);\r\n books.clear();\r\n books.addAll(bookSet);\r\n\r\n return displayBooks(books);\r\n }", "public List search(Veranstaltung veranstatung) throws RuntimeException;", "void search();", "void search();", "public void searchByAlbum()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the album you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase();\n \n Collections.sort(catalog);\n int index = Collections.binarySearch(catalog, new Album(\"\",input,null), null);\n if(index >= 0)\n System.out.println(\"Album:\\t\" + catalog.get(index).getAlbum()\n + \"\\nArtist: \" + catalog.get(index).getArtist()+\"\\n\");\n else System.err.println(\"Album '\" + input + \"' not found!\\n\"); \n }", "public List<Books> searchBook(int book_id){\n String sql=\"select * from Book where id=?\";\n BaseDao baseDao =dao.executeQuery(sql,new Object[]{book_id});\n return resultSetToBook(baseDao);\n }", "public boolean searchLibrary(String key)\n\t{\n\t\tif(availableBooks!=0)\n\t\t{\n\t\t\tboolean val=b.searchBook(key);\n\t\t\treturn val;\n\t\t}\n\t\treturn false;\t\n\t\t\t\n\t}", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookIsbn().equals(isbn) || isbn.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public String advancedSearchBooks() {\r\n List<Books> books = new ArrayList<Books>();\r\n keywords = keywords.trim();\r\n \r\n switch (searchBy) {\r\n case \"all\":\r\n return searchBooks();\r\n case \"title\":\r\n books = findBooksByTitle(keywords);\r\n break;\r\n case \"identifier\":\r\n books = findBooksByIdentifier(keywords);\r\n break;\r\n case \"contributor\":\r\n books = findBooksByContributor(keywords);\r\n break;\r\n case \"publisher\":\r\n books = findBooksByPublisher(keywords);\r\n break;\r\n case \"year\":\r\n books = findBooksByYear(keywords);\r\n break;\r\n case \"genre\":\r\n books = findBooksByGenre(keywords);\r\n break;\r\n case \"format\":\r\n books = findBooksByFormat(keywords);\r\n break;\r\n }\r\n clearFields();\r\n\r\n if (books == null || books.isEmpty()) {\r\n books = new ArrayList<Books>();\r\n }\r\n\r\n return displayBooks(books);\r\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(containsAllAuthors(authors, b))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "public WordList find(String s) {\n \treturn index.get(s);\n }", "private void searchRoutine() {\n String s = (String) JOptionPane.showInputDialog(\n this,\n \"Enter the name of the routine:\",\n \"Search\",\n JOptionPane.PLAIN_MESSAGE,\n null, null, null);\n\n if (s != null) {\n try {\n Routine r = collection.search(s);\n list.setSelectedValue(r, true);\n } catch (DoesNotExistException ee) {\n JOptionPane.showMessageDialog(this, \"Routine with given name does not exist.\");\n }\n }\n }", "private void searchFunction() {\n\t\t\r\n\t}", "private void search(String[] searchItem)\n {\n }", "public String find(String keyword) {\n ArrayList<Task> result = new ArrayList<>();\n final StringBuilder matchedTasks = new StringBuilder(\"Here are the matching tasks in your list:\\n\\t\");\n\n for (int i = 0; i < records.size(); i++) {\n Task current = records.get(i);\n if (current.description.toLowerCase().contains(keyword.toLowerCase())) {\n result.add(current);\n }\n }\n result.forEach((el) -> matchedTasks.append(\n String.format(\"%1$d. %2$s \\n\\t\",\n result.indexOf(el) + 1, el.toString())));\n return matchedTasks.toString();\n }", "List<Block> search(String searchTerm);", "public void searchSong(String name)\n {\n for(int i=0; i<songs.size(); i++)\n if(songs.get(i).getFile().contains(name) || songs.get(i).getSinger().contains(name))\n {\n System.out.print((i+1) + \"- \");\n listSong(i);\n\n }\n }", "abstract public void search();", "private void searchBook(String query) {\n String filter = this.bookFilter.getValue();\n String sort = this.sort.getValue();\n \n // Get the user defined comparator\n Comparator<Book> c = getBookComparator(filter, sort);\n\n // Create a book used for comparison\n Book book = createBookForQuery(filter, query);\n \n // Find all matches\n GenericList<Book> results = DashboardController.library.getBookTable().findAll(book, c);\n\n // Cast results to an array\n Book[] bookResults = bookResultsToArray(results, c);\n\n // Load the results in a new scene\n this.loadBookResultsView(bookResults);\n }", "public List<ReadBookVO> searchReadBookList(String searchVal) {\n\t\t\n\t\tList<String> names = Arrays.asList(searchVal.split(\" \"));\n\t\treturn readBookDao.searchReadBookList(names);\n\t}", "public Book search(String bookId) {\r\n for (Iterator iterator = books.iterator(); iterator.hasNext();) {\r\n Book book = (Book) iterator.next();\r\n if (book.getId().equals(bookId)) {\r\n return book;\r\n }\r\n }\r\n return null;\r\n }", "public void run(){\n\t\tif(searchHow==0){\n\t\t\tint isbnCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestIsbn = new SearchRequest(db, searchForThis, isbnCount, db.size());\n\t\t\t\t\tdb.searchByISBN(requestIsbn);\n\t\t\t\t\tisbnCount = requestIsbn.foundPos;\n\t\t\t\t\tif (requestIsbn.foundPos >= 0) {\n\t\t\t\t\t\tisbnCount++;\n\t\t\t\t\t\tString formatThis = \"Matched ISBN at position: \" + requestIsbn.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestIsbn.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==1){\n\t\t\tint titleCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestTitle = new SearchRequest(db, searchForThis, titleCount, db.size());\n\t\t\t\t\tdb.searchByTitle(requestTitle);\n\t\t\t\t\ttitleCount = requestTitle.foundPos;\n\t\t\t\t\tif (requestTitle.foundPos >= 0) {\n\t\t\t\t\t\ttitleCount++;\n\t\t\t\t\t\tString formatThis = \"Matched title at position: \" + requestTitle.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestTitle.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==2){\n\t\t\tint authorCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestAuthor = new SearchRequest(db, searchForThis, authorCount, db.size());\n\t\t\t\t\tdb.searchByAuthor(requestAuthor);\n\t\t\t\t\tauthorCount = requestAuthor.foundPos;\n\t\t\t\t\tif (requestAuthor.foundPos >= 0) {\n\t\t\t\t\t\tauthorCount++;\n\t\t\t\t\t\tString formatThis = \"Matched author at position: \" + requestAuthor.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestAuthor.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==3){\n\t\t\tint pageCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestPage = new SearchRequest(db, searchForThis, pageCount, db.size());\n\t\t\t\t\tdb.searchByNumPages(requestPage);\n\t\t\t\t\tpageCount = requestPage.foundPos;\n\t\t\t\t\tif (requestPage.foundPos >= 0) {\n\t\t\t\t\t\tpageCount++;\n\t\t\t\t\t\tString formatThis = \"Matched pages at position: \" + requestPage.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestPage.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t\tif(searchHow==4){\n\t\t\tint yearCount = 0;\n\t\t\tfor(int i=0; i<db.size(); i++){\n\t\t\t\t\tSearchRequest requestYear = new SearchRequest(db, searchForThis, yearCount, db.size());\n\t\t\t\t\tdb.searchByYear(requestYear);\n\t\t\t\t\tyearCount = requestYear.foundPos;\n\t\t\t\t\tif (requestYear.foundPos >= 0) {\n\t\t\t\t\t\tyearCount++;\n\t\t\t\t\t\tString formatThis = \"Matched year at position: \" + requestYear.foundPos;\n\t\t\t\t\t\tSystem.out.printf(\"%-35s || Title: \"+db.getBook(requestYear.foundPos)+\"\\n\",formatThis);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t\ti=db.size();\n\t\t\t}\n\t\t}\n\t}", "List<DataTerm> search(String searchTerm);", "public void search() {\r\n \t\r\n }", "public List search(String text){\r\n\t\tif(this.inverntory.empty())\r\n\t\t\tthrow new RuntimeException(\"Inventory is empty.\");\r\n\t\tList matchings = new List();\r\n\t\t// as long as inventory is not empty\r\n\t\t\r\n\t\twhile(!this.inverntory.empty()){\r\n\t\t /* Note:\r\n\t\t * public boolean contains(CharSequence s) Returns true if and only if\r\n\t\t * this string contains the specified sequence of char values. \r\n\t\t * contains(CharSequence s):boolean expects a CharSequence s as parameter.\r\n\t\t * CharSequence is an interface implemented by String\r\n\t\t */\r\n\t\t\t\r\n\t\t // check if entered string matches the description of the item\r\n\t\t if( ((LibraryItem) inverntory.elem()).getDescription().contains(text) ) {\r\n\t\t\t\t// add matchings to our list\r\n\t\t\t\tmatchings.add(this.inverntory.elem());\r\n\t\t\t}\r\n\t\t\t// if head of list is not target string, advance in list\r\n\t\t\telse {\r\n\t\t\t\tthis.inverntory.advance();\r\n\t\t\t}\r\n\t\t}\r\n\t\t// if you reach the end of the list, return the matchings\t\t\t\r\n\t\treturn matchings;\r\n\t}", "public List<Ve> searchVe(String maSearch);", "public List<BookData> searchBookbyAuthor (String author) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where author_name = ?\");\n\t\t\tmyStmt.setString(1, author);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public void searchByArtist()\n {\n String input = JOptionPane.showInputDialog(null,\"Enter the artist you'd like to search for:\");\n input = input.replaceAll(\" \", \"_\").toUpperCase(); //standardize output.\n \n Collections.sort(catalog, new ArtistComparator());\n int index = Collections.binarySearch(catalog, \n new Album(input,\"\",null), new ArtistComparator());\n //Since an artist could be listed multiple times, there is *no guarantee*\n //which artist index we find. So, we have to look at the artists\n //left and right of the initial match until we stop matching.\n if(index >= 0)\n {\n Album initial = catalog.get(index);\n String artist = initial.getArtist();\n \n ArrayList<Album> foundAlbums = new ArrayList<>();\n //this ArrayList will have only the albums of our found artist \n foundAlbums.add(initial);\n try { \n int j = index, k = index;\n while(artist.equalsIgnoreCase(catalog.get(j+1).getArtist()))\n {\n foundAlbums.add(catalog.get(j+1));\n j++;\n }\n while(artist.equalsIgnoreCase(catalog.get(k-1).getArtist()))\n {\n foundAlbums.add(catalog.get(k-1));\n k--;\n }\n }\n catch(IndexOutOfBoundsException e) {\n //happens on the last round of the while-loop test expressions\n //don't do anyhting because now we need to print out our albums.\n }\n System.out.print(\"Artist: \" + artist + \"\\nAlbums: \");\n for(Album a : foundAlbums)\n System.out.print(a.getAlbum() + \"\\n\\t\");\n System.out.println();\n }\n else System.err.println(\"Artist '\" + input + \"' not found!\\n\"); \n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer)\n if(b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "private List<FindResult> findOnPage(int page) {\n\t\t\tif (this.text == null) throw new IllegalStateException(\"text cannot be null\");\n\t\t\treturn this.parent.pdf.find(this.text, page);\n\t\t}", "List<PilotContainer> Search(String cas, String word);", "public static ArrayList<Book> search(String title, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: purchasedBooks.keySet())\n if(b.getBookName().equals(title) || title.equals(\"*\"))\n searchedBooks.add(b);\n\n return searchedBooks;\n }", "String search(int key);", "public String findItem(String searchItem) {\n\n int position = groceryList.indexOf(searchItem);\n if(position >=0) {\n return groceryList.get(position);\n }\n\n return null;\n }", "public AddressBook search(String query)\n {\n Integer count = 0;\n Integer size = addressEntryList.size();\n AddressBook ab = new AddressBook();\n int indexes[] = new int[size];\n //For loop, iterating through our entire list of Address Entries\n for (int i = 0; i < addressEntryList.size(); i++)\n {\n //If the lastname is the search query\n if(addressEntryList.get(i).getLastName().contains(query))\n {\n indexes[count] = i;\n count++;\n }\n }\n //If we found anything\n if (count > 0)\n {\n //Add entries found\n for (int i = 0; i < count; i++)\n {\n ab.addressEntryList.add(addressEntryList.get(indexes[i]));\n }\n }\n //No entries were found\n else {\n System.out.println(\"No entries were found.\");\n }\n\n return ab;\n\n }", "public String searchByName(String searchString) {\n boolean foundBook = false;\n String searchResult = \"\";\n \n for(Literature literature:literatureRegister) {\n if(literature.getTitle().contains(searchString) || literature.getAuthor().contains(searchString)) {\n searchResult += \"The literature title is: \" + literature.getTitle() + \".\\n\"\n + \"The literature author is: \" + literature.getAuthor() + \".\\n\";\n if(literature instanceof Book) {\n searchResult += \"The book genre is: \" + ((Book) literature).getGenre() + \".\\n\";\n }\n if(literature instanceof Magazine) {\n searchResult += \"The magazine brand is: \" + ((Magazine) literature).getBrand() + \".\\n\";\n }\n if(literature instanceof NewsPaper) {\n searchResult += \"The new's paper brand is: \" + ((NewsPaper) literature).getBrand() + \".\\n\";\n }\n if(literature instanceof BookSeries) {\n searchResult += \"The literature brand is: \" + ((BookSeries) literature).getGenre() + \".\\n\" + \"The books in this series is: \" + \"\\n\" + (((BookSeries) literature).listAllBooks());\n }\n foundBook = true;\n }\n }\n \n if(!foundBook){\n searchResult = (\"No literature with the name: \" + searchString + \" found.\");\n }\n return searchResult;\n }", "public static int searchref(String ref) {\n String target = ref.toUpperCase() ;\n existebis = 0;\n Cars xx = new Cars();\n for (int i = 0; i < listcars.size(); i++) {\n xx = listcars.get(i);\n String record = xx.getReference().toUpperCase() ;\n if (record.equals(target)) {\n existebis = 1;\n break;\n\n\n } else {\n existebis = 0;\n }\n }\n\n return existebis;}", "public List<Budget> search (String search) throws SQLException{\n List<Budget> found = new ArrayList<Budget>();\n DatabaseConnection dbaInfo = new DatabaseConnection();\n Connection conn = null;\n try {\n conn = dbaInfo.getConnection();\n search = search + \"%\";\n PreparedStatement ps = conn.prepareStatement(\"SELECT * FROM finance.budget WHERE (bud_category ILIKE ?) OR (bud_description ILIKE ?);\");\n ps.setString(1, search);\n ps.setString(2, search);\n ResultSet rs = ps.executeQuery();\n found = listResults(rs);\n }catch (Exception error) {\n error.printStackTrace();\n conn.rollback();\n }finally {\n conn.close();\n }\n return found;\n }", "private int findItem(String searchItem){\n return myGrocery.indexOf(searchItem);\n }", "public static int search (String searching)\n {\n ListAlbum listAlbum = new ListAlbum(true, false, false);\n AlbumXmlFile.readAllAlbumsFromDataBase(listAlbum, true);\n Iterator albumIterator = listAlbum.iterator();\n Album actualAlbum;\n int actualAlbumIndex=0;\n while (albumIterator.hasNext())\n {\n \n actualAlbum = (Album) albumIterator.next();\n \n if (actualAlbum.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n else if (actualAlbum.getArtist().getName().equals(searching))\n {\n JSoundsMainWindowViewController.showAlbumResults(true, false, false, actualAlbum);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n return 1;\n }\n actualAlbum.getSongs();\n Iterator songsIterator = actualAlbum.getSongs().iterator();\n int actualSongIndex = 0;\n\n while (songsIterator.hasNext())\n {\n /* Se añade el número de la canción al modelo de la lista */\n Song song = (Song) songsIterator.next();\n if (song.getName().equals(searching))\n {\n JSoundsMainWindowViewController.showSongResults(true, false, false, actualAlbum,song,actualSongIndex);\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n indexFromSearchedSong=actualSongIndex;\n if (alreadyPlaying)\n {\n JSoundsMainWindowViewController.stopSong();\n alreadyPlaying=false;\n dontInitPlayer=true;\n }\n //playListSongs(true);\n return 1;\n }\n actualSongIndex++;\n }\n actualAlbumIndex++;\n }\n JSoundsMainWindow.jtfSearchSong.setText(\"\");\n JOptionPane.showMessageDialog(null, \"Not Found :( \");\n return 0;\n }", "@Override\n public List<Book> result(List<Book> books) {\n return search.result(books);\n }", "public List<Bookmark> searchBookmarks (String searchString, BookmarkType type, Long userId) throws BookMarkException;", "List<Book> findBooksByName(String name);", "private void search(String product) {\n // ..\n }", "public static void searchJobs(String searchTerm) {\n\n for (int i = 0; i > PostJob.allJobs.size(); i++) {\n\n\n if (PostJob.allJobs.contains(searchTerm)) {\n int itemIndx = PostJob.allJobs.indexOf(searchTerm);\n String output = PostJob.allJobs.get(itemIndx);\n System.out.print(\"Available jobs within your search terms\" + output);\n\n }\n }\n }", "public boolean inBag(String searchString) {\r\n\t\tboolean found = false;\r\n\t\tfor(Iterator<Item> it = items.iterator(); it.hasNext() && !found; ) {\r\n\t\t\tif(it.next().getDescription().contains(searchString)) {\r\n\t\t\t\tfound = true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn found;\r\n\t\t\r\n\t}", "private void performSearch() {\n String text = txtSearch.getText();\n String haystack = field.getText();\n \n // Is this case sensitive?\n if (!chkMatchCase.isSelected()) {\n text = text.toLowerCase();\n haystack = haystack.toLowerCase();\n }\n \n // Check if it is a new string that the user is searching for.\n if (!text.equals(needle)) {\n needle = text;\n curr_index = 0;\n }\n \n // Grab the list of places where we found it.\n populateFoundList(haystack);\n \n // Nothing was found.\n if (found.isEmpty()) {\n Debug.println(\"FINDING\", \"No occurrences of \" + needle + \" found.\");\n JOptionPane.showMessageDialog(null, \"No occurrences of \" + needle + \" found.\",\n \"Nothing found\", JOptionPane.INFORMATION_MESSAGE);\n \n return;\n }\n \n // Loop back the indexes if we have reached the end.\n if (curr_index == found.size()) {\n curr_index = 0;\n }\n \n // Go through the findings one at a time.\n int indexes[] = found.get(curr_index);\n field.select(indexes[0], indexes[1]);\n curr_index++;\n }", "public ArrayList<Book> getBookByPart(String titlePart) {\n titlePart = this.sanitizeString(titlePart);\n ArrayList<Book> bookList = new ArrayList<>();\n\n for (String bookTitle: this.books.keySet()) {\n if (bookTitle.contains(titlePart)) {\n bookList.add(this.books.get(bookTitle));\n }\n }\n return bookList;\n }", "public List<BookData> searchBookbyPublisher (String publisher) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where publisher_name = ?\");\n\t\t\tmyStmt.setString(1, publisher);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "@Override\n\tpublic List<book> look_book(book p,int index, int seve) {\n\t\treturn dao.look_book(p,index,seve);\n\t}", "public Vector searchFile(String str){\r\n Vector search = new Vector();\r\n\r\n /* Search corresponding to title */\r\n Vector titleLoc = (Vector) titleHashTable.get(str);\r\n if (titleLoc != null) { // title matches\r\n for(int i=0 ;i < titleLoc.size(); i++){\r\n if(((FileLocation)titleLoc.elementAt(i)).record.isConnected)\r\n search.addElement(titleLoc.elementAt(i));\r\n }\r\n }\r\n\r\n Vector artistLoc = (Vector) artistHashTable.get(str);\r\n if (artistLoc != null) {\r\n for(int i=0 ;i < artistLoc.size();i++){\r\n if(((FileLocation)artistLoc.elementAt(i)).record.isConnected)\r\n search.addElement(artistLoc.elementAt(i));\r\n }\r\n }\r\n\r\n Vector albumLoc = (Vector) albumHashTable.get(str);\r\n if (albumLoc != null) {\r\n for(int i=0 ;i<albumLoc.size();i++){\r\n if(((FileLocation)albumLoc.elementAt(i)).record.isConnected)\r\n search.addElement(albumLoc.elementAt(i));\r\n }\r\n }\r\n\r\n\t\treturn search;\r\n\t}", "private String findLine(String line, String search){\n List<String> lines = line.lines().collect(Collectors.toList());\n for (String l: lines) {\n if(l.contains(search)){\n return l;\n }\n }\n return \"\";\n }", "public abstract Search defaultSearch(StringBuilder sb);", "private Song findSong(String title){\n for (Song checkedSong : this.songArrayList){\n if (checkedSong.getTitle().equals(title)){\n return checkedSong;\n }\n }\n return null;\n }", "public List<Book> getByAuthor(String name );", "public static void itemsearch(List<String> shoppingList) {\n\n\n\n if(shoppingList.contains(\"milk\")){\n System.out.println(\"The list contains milk\");\n }\n else{\n System.out.println(\"We dont have milk on our list\");\n }\n\n if(shoppingList.contains(\"bananas\")){\n System.out.println(\"the list contains bananas\");\n }\n else{\n System.out.println(\"We dont have bananas on our list\");\n }\n }", "private static int search(String item, ListArrayBasedGeneric<Runway> runwayList)\r\n\t{\r\n\t\tint size = runwayList.size();\r\n\t\tString itemFromList = \"\";\r\n\r\n\t\tfor(int i = 0; i < size; i++)\r\n\t\t{\r\n\t\t\titemFromList = runwayList.get(i).getRunwayName();\r\n\r\n\t\t\tif(itemFromList.compareToIgnoreCase(item) == 0)\r\n\t\t\t{\r\n\t\t\t\treturn i;\r\n\t\t\t} // END IF\r\n\t\t} // END FOR\r\n\r\n\t\treturn -1;\r\n\t}", "private static void queryBooksByAuthor(){\n\t\tSystem.out.println(\"===Query Books By Author===\");\n\t\tScanner string_input = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"Enter First Name of Author to Query Books by: \");\n\t\tString author_firstname = string_input.next();\n\t\t\n\t\tSystem.out.println(\"Enter Middle Name of Author to Query Books by (Type 'null' if Author has no middlename): \");\n\t\tString author_middlename = string_input.next();\n\t\tif(author_middlename.equalsIgnoreCase(\"null\"))\n\t\t\tauthor_middlename = \"\";\n\t\t\n\t\tSystem.out.println(\"Enter Last Name of Author to Query Books by: \");\n\t\tString author_lastname = string_input.next();\n\t\t\n\t\tString author_fullname = author_firstname + \" \" + author_middlename + \" \" + author_lastname;\n\t\t\n\t\tif(ALL_AUTHORS.containsKey(author_fullname)){//if author_full_name exists in the Hashtable then print out all of the author's book titles\n\t\t\tSystem.out.println(\"Author found!\");\n\t\t\tSystem.out.println(author_fullname + \"'s list of book titles are: \"); \n\t\t\tIterator<String> iter = ALL_AUTHORS.get(author_fullname).iterator();\n\t\t\tprintAllElements(iter);\n\t\t}\n\t\telse\n\t\t\tSystem.out.println(\"Sorry Author name entered does not exist in our records\");\n\t}", "public List<String> searchByStreet(String street) {\n if (street == null)\n throw new NullPointerException();\n List<String> searchResult = new ArrayList<>();\n Set<Map.Entry<String, Address>> allAddress = addressBook.entrySet();\n for (Map.Entry<String, Address> currentAddress : allAddress) {\n String currentStreet = currentAddress.getValue().getStreet();\n if (currentStreet.equals(street))\n searchResult.add(currentAddress.getKey());\n }\n return searchResult;\n }", "public void search() {\n }", "public void searchByCity() {\n System.out.println(\"Enter City Name : \");\n String city = sc.next();\n list.stream().filter(n -> n.getCity().equals(city)).forEach(i -> System.out.println(\"Result: \"+i.getFirstName()));\n }", "private int JobSearch(String ClientID, ArrayList<Jobs> SearchThrough) {\n \t\tint size = SearchThrough.size();\n \t\tint scan = 0;\n \n \t\twhile (scan < size) {\n \t\t\tJobs looking = SearchThrough.get(scan);\n \t\t\t// See if the client name matches the search parameter\n \t\t\tif (looking.GetIussed() == ClientID) {\n \t\t\t\treturn scan;\n \t\t\t}\n \t\t\tscan++;\n \t\t}\n \t\treturn -1;\n \t}", "public static Book find(String callNum) {\r\n\t\t \treturn books.get(callNum);\r\n\t\t}", "private void returnBook(String string) {\n\t\t\n\t}", "public static void findName(String searchedWord, ArrayList<Recipe> recipes) {\n System.out.println();\n System.out.println(\"Recipes:\");\n for (Recipe recipe: recipes) {\n if (recipe.getName().contains(searchedWord)) {\n System.out.println(recipe);\n }\n }\n System.out.println();\n }", "@Override\n protected List<Book> doInBackground(String... params) {\n\n String importedQuery[] = params[0].split(\"#\");\n String fullQuery = \"\";\n\n for (int i = 0; i < importedQuery.length; i++) {\n if (!fullQuery.equals(\"\")) fullQuery+='&';\n //vanaf hier moet de lus komen voor meerdere gekoppelde queries\n String prefix = \"\";\n String searchWord = \"\";\n\n int tmp = 0;\n for (String s : importedQuery) Log.d(TAG, \"params[]\" + tmp++ + s);\n\n String args[] = importedQuery[i].split(\"\\\\|\"); //todo params[i]\n prefix = args[0].trim();\n searchWord = args[1].trim();\n searchWord = searchWord.replace(\" \", \"+\");\n\n\n Log.d(TAG, \"searchWord:\" + searchWord);\n Log.d(TAG, \"Prefix\" + prefix);\n\n String[] options = SearchMethodGoogleApi.getPrefixesForQuery();\n// for (String s:options)Log.v(TAG+\"options\",s);\n if (!isStringInArray(prefix, options)) {\n //een ongeldige parameter mee gestuurd\n throw new IllegalArgumentException(\"invalid parameters\");\n }\n fullQuery += prefix + searchWord;\n\n //tot hier moet de lus komen voor meerdere gekoppelde queries\n\n }\n\n\n\n\n List<Book> bookList = new ArrayList<>();\n Volume volume = null;\n Volumes volumes = null;\n Books books = QueryGoogleBooksHelper.setUpClient();\n\n\n Books.Volumes.List volumesList = null;\n try {\n volumesList = books.volumes().list(fullQuery).setMaxResults(40L);\n\n Log.d(App.getTAG(), \"queryFullString:\" + fullQuery);\n\n\n // Execute the searchWord.\n volumes = volumesList.execute();\n } catch (IOException e) {\n e.printStackTrace();\n }\n if (volumes != null && volumes.getItems() != null) {\n //vanaf hier halen we de details op:\n for (Volume vol : volumes.getItems()) {\n Log.v(TAG + \"Book (genAll)\", vol != null ? vol.toString() : \"\");\n\n Volume.VolumeInfo volInfo = vol.getVolumeInfo();\n Volume.SaleInfo salesInfo = vol.getSaleInfo();\n Volume.SearchInfo searchInfo = vol.getSearchInfo();\n\n\n //get authors in List\n List<String> authorStringList = volInfo.getAuthors();\n ArrayList<Author> authorArrayList = new ArrayList<>();\n //copy contents of list to array\n if (volInfo.getAuthors() != null) {\n for (String author : authorStringList)\n authorArrayList.add(new Author(author));\n } else {\n authorArrayList.add(new Author(App.getContext().getString(R.string.no_returned_authors_google)));\n }\n\n //getGoogleID\n String googleID = vol.getId();\n\n //get ISBN:\n String ISBN = \"\";\n if (volInfo.getIndustryIdentifiers() != null) {\n if (volInfo.getIndustryIdentifiers().size() > 1)\n ISBN = volInfo.getIndustryIdentifiers().get(1).getIdentifier();\n }\n\n //get Title:\n String title = \"\";\n if (volInfo.getTitle() != null) {\n title = volInfo.getTitle();\n }\n //get description\n String description = \"\";\n if (volInfo.getDescription() != null) {\n description = volInfo.getDescription();\n }\n\n //get ImageLinks:\n Volume.VolumeInfo.ImageLinks imageLinks = null;\n if (volInfo.getImageLinks() != null) {\n imageLinks = volInfo.getImageLinks();\n }\n\n //get links to book (pre)views:\n String previewLink = \"\";\n if (volInfo.getPreviewLink() != null) {\n previewLink = volInfo.getPreviewLink();\n }\n\n //String shortDescription=searchInfo.getTextSnippet()+App.getContext().getString(R.string.etc_after_book_description);\n Double averageRating = volInfo.getAverageRating();\n\n //TODO:etc verder doen\n\n //create new Book and edit its info with the info from Google\n Book book = new Book(ISBN, googleID, title, authorArrayList, description, imageLinks, previewLink);\n bookList.add(book);\n Log.v(TAG, bookList.size() + \"Book added\");\n }\n }\n\n\n return bookList;\n\n\n }", "public List<BookData> searchBookbyTitle (String name) throws SQLException{\n\t\tList<BookData> list = new ArrayList<>();\n\t\t\n\t\tPreparedStatement myStmt = null;\n\t\tResultSet myRs = null;\n\t\t\n\t\ttry {\n\t\t\t\n\t\t\tmyStmt = myConn.prepareStatement(\"select title, author_name, publisher_name, book_id from books natural join book_authors where title = ?\");\n\t\t\tmyStmt.setString(1, name);\n\t\t\tmyRs = myStmt.executeQuery();\n\t\t\t\n\t\t\twhile (myRs.next()) {\n\t\t\t\tBookData tempbook = convertRowToBook(myRs);\n\t\t\t\tlist.add(tempbook);\n\t\t\t}\n\t\t\t\n\t\t\treturn list;\n\t\t}\n\t\tfinally {\n\t\t\tmyRs.close();\n\t\t\tmyStmt.close();\n\t\t\n\t\t}\n\t\t\n\t}", "public String find(String kw) {\n StringJoiner result = new StringJoiner(\"\\n\");\n for (int i = 0; i < tasks.size(); i++) {\n Task t = tasks.get(i);\n if (t.toString().contains(kw)) {\n result.add(String.format(\"%d.%s\", i + 1, t));\n }\n }\n\n return result.toString();\n }", "public ArrayList<AddressEntry> searchByNote(String text) {\r\n ArrayList<AddressEntry> textMatches = new ArrayList<AddressEntry>();\r\n text = text.toLowerCase();\r\n for (AddressEntry current : contacts) {\r\n String currentname = current.getNote().toLowerCase();\r\n if (currentname.contains(text)) {\r\n textMatches.add(current);\r\n }\r\n }\r\n return textMatches;\r\n }", "public void findTask() {\n System.out.println(LINEBAR);\n System.out.println(\"Below are a list of tasks matching your description\\n\");\n\n String targetDesc = userIn.substring(FIND_HEADER);\n\n int matching = 0;\n\n for (Task t : tasks.TaskList) {\n String currDesc = t.taskDescription;\n\n if (currDesc.contains(targetDesc)) {\n matching++;\n System.out.println(matching + \". \" + t);\n }\n }\n\n if (matching == 0) {\n System.out.println(\"No matches found\\n\");\n }\n System.out.println(LINEBAR);\n }", "void searchProbed (Search search);", "public static void searchBMonth(Contact[] myContacts, String find)\n {\n int counter = 0;\n System.out.println(\"Find results: \");\n for(int i = 0; i<myContacts.length; i++)\n {\n if(myContacts[i].getBirthday().substring(0,3).equals(find))\n {\n System.out.println(myContacts[i]);\n counter++;\n }\n }\n if(counter == 0)\n {\n System.out.println(\"There are no listings for \"+find);\n }\n else if(counter == 1)\n {\n System.out.println(\"There was \"+counter+\" listing for \"+find);\n }\n else\n {\n System.out.println(\"There were \"+counter+\" listings for \"+find);\n }\n }", "public static ArrayList<Book> search(String title, ArrayList<String> authors, String isbn, String publisher, String sortOrder, HashMap<Book, Integer> purchasedBooks)\n {\n ArrayList<Book> tempBookBuffer = search(title, authors, isbn, publisher, purchasedBooks);\n ArrayList<Book> searchedBooks = new ArrayList<>();\n\n for(Book b: tempBookBuffer) {\n if (b.getBookPublisher().equals(publisher) || publisher.equals(\"*\"))\n searchedBooks.add(b);\n }\n if (sortOrder.equals(\"title\")) {\n Collections.sort(searchedBooks, Book.BookTitleComparator);\n }\n else if(sortOrder.equals(\"publish-date\")){\n Collections.sort(searchedBooks,Book.BookDateComparator);\n }\n else{\n\n }\n return searchedBooks;\n }", "public List<Recipe> search(String queryText, Category category, CookingMethod cookingMethod);", "public int search (String name) {\n int result = -1;\n int offset = 0;\n\n for (int i=9; i>-1; i--)\n {\n qLock[i].lock ();\n result = q[i].indexOf (name);\n if (result == -1)\n offset += q[i].size ();\n qLock[i].unlock ();\n if (result != -1)\n break;\n }\n\n if (result == -1)\n return result;\n\n return result + offset;\n }", "public static void search(String word){\n if(index.containsKey(word)){\n System.out.println(\"word \" + word + \" displays in :\");\n HashSet<String> list = index.get(word);\n for(String str:list){\n System.out.println(str);\n }\n }\n else{\n System.out.println(\"word \" + word + \" doesn't found!\");\n }\n }", "public SearchResult search(String text, String subText);", "public ArrayList<Book> listOfBooksByAuthor (Author providedAuthor){\n //Array list for storing books written by provided author\n ArrayList<Book> authorBooks = new ArrayList<>();\n\n //loops through the booklist to find books with the author in the list of authors\n for (Book book : bookList) {\n //loops through the list of authors to see if the provided author is among thelist\n for (Author author1 : book.getAuthors()) {\n if (providedAuthor.equals(author1)) {\n authorBooks.add(book);\n }\n }\n }\n return authorBooks;\n }", "Road findByName(String toFind, ArrayList<Road> list)\n\t{\n\t\tRoad tmp;\n\t\tIterator<Road> it = list.iterator();\n\t\twhile(it.hasNext())\n\t\t{\n\t\t\ttmp = it.next();\n\t\t\tif(tmp.getName().equals(toFind))\n\t\t\t{\n\t\t\t\treturn tmp;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t}", "int search(ICard toFind);", "public void searchTitle(String srchttl){\r\n \t\r\n \tboolean found = false;\t\t\t\t\t\r\n \tIterator<Item> i = items.iterator();\r\n \tItem current = new Item();\r\n\r\n\twhile(i.hasNext()){\r\n\t current = i.next();\r\n\t \r\n\t if(srchttl.compareTo(current.getTitle()) == 0) {\r\n\t System.out.print(\"Found \" + current.toString());\r\n\t found = true;\r\n\t } \r\n }\r\n \r\n\tif(found != true){\r\n\t System.out.println(\"Title \" + srchttl + \" could not be found.\");\r\n\t System.out.println(\"Check the spelling and try again.\");\r\n\t}\r\n \r\n }", "public static void main(String[] args) {\n\t\tint SizeX = 10 , SizeY = 7;\n\t\tString search_type =\"\";//用書名還是書號\n\t\tString answer =\"\";\n\t\tString query = \"\";//搜尋的關鍵字\n\t\tString operation = \"\";//儲存操作的動作: 借書/還書等\n\t\tString identity = \"\";//儲存使用者身分,student/staff/exit\n\t\tScanner in = new Scanner(System.in);\n\t\tString [][] booklists = new String[SizeX][SizeY];\n\t\t//建立資料庫\n\t\tbooklists = AddBooks(\"82101\",\"Cihai\",\"Reference\",\"Shu Xincheng\",\"20000\",booklists,0);\n\t\tbooklists = AddBooks(\"80001\",\"WW2 History\",\"History\",\"Winston Churchill\",\"971\",booklists,1);\n\t\tbooklists = AddBooks(\"00003\",\"Egg 100\",\"Cookbook\",\"Su yuan ma\",\"104\",booklists,2);\n\t\tbooklists = AddBooks(\"50001\",\"Be a honest man\",\"Political\",\"Ma Ying jeou\",\"520\",booklists,3);\n\t\tbooklists = AddBooks(\"85719\",\"Sword Art Online\",\"Novel\",\"Reki Kawahara\",\"8763\",booklists,4);\n\t\tbooklists = AddBooks(\"85728\",\"Spice and Wolf\",\"Novel\",\"Isuna Hasekura\",\"510\",booklists,5);\n\t\tbooklists = AddBooks(\"85707\",\"The Old Man and the Sea\",\"Novel\",\"Ernest Hemingway\",\"127\",booklists,6);\n\t\tbooklists = AddBooks(\"85703\",\"Romance of the Three Kingdoms\",\"Novel\",\"Luo Guanzhong\",\"480\",booklists,7);\n\t\tbooklists = AddBooks(\"80005\",\"Records of the Grand Historian\",\"History\",\"Sima Qian\",\"6000\",booklists,8);\n\t\tbooklists[4][5] = \"true\";\n\t\tbooklists[4][6] = \"1\";\n\t\t\n\t\tSystem.out.println(\"【圖書館租借模擬系統】\");\n\t\tBookSystem bs = new BookSystem();\n\t\tdo{\n\t\t\tSystem.out.println(\"請問你是何種身分?學生(student)或者圖書館人員(staff)?(輸入exit離開)\");\n\t\t\tidentity = in.nextLine();\n\t\t\tif(identity.equals(\"student\")){\n\t\t\t\tdo{\n\t\t\t\t\tbs.ViewStudent(booklists, SizeX);\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 借書(borrow)\");\n\t\t\t\t\tSystem.out.println(\"2. 還書(return)\");\n\t\t\t\t\tSystem.out.println(\"3. 預約書籍(reserve)\");\n\t\t\t\t\tSystem.out.println(\"4. 取消預約書籍(reservecancel)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\twhile(!operation.equals(\"borrow\")&&!operation.equals(\"1\")\n\t\t\t\t\t\t&&!operation.equals(\"return\")&&!operation.equals(\"2\")\n\t\t\t\t\t\t&&!operation.equals(\"reserve\")&&!operation.equals(\"3\")\n\t\t\t\t\t\t&&!operation.equals(\"reservecancel\")&&!operation.equals(\"4\")\n\t\t\t\t\t\t&&!operation.equals(\"search\")&&!operation.equals(\"5\")\n\t\t\t\t\t\t&&!operation.equals(\"exit\")&&!operation.equals(\"6\")){\n\t\t\t\t\t\t\tSystem.out.println(\"輸入錯誤!請重新輸入:\");\n\t\t\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\t}\n\t\t\t\t\tif(!operation.equals(\"search\") && !operation.equals(\"5\")&&!operation.equals(\"exit\")&&!operation.equals(\"6\") ){\n\t\t\t\t\t\tif(operation.equals(\"borrow\")|| operation.equals(\"1\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來借閱呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來還書呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來預借呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來取消預借呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"borrow\")||operation.equals(\"1\")) \n\t\t\t\t\t\t\tbooklists = bs.BorrowBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"return\")||operation.equals(\"2\")) \n\t\t\t\t\t\t\tbooklists = bs.ReturnBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reserve\")||operation.equals(\"3\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"reservecancel\")||operation.equals(\"4\")) \n\t\t\t\t\t\t\tbooklists = bs.ReserveCancel(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"5\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}else if(identity.equals(\"staff\")){\n\t\t\t\tdo{\n\t\t\t\t\tSystem.out.println(\"=========This is staff page=============\");\n\t\t\t\t\tSystem.out.println(\"請問你要進行何種操作?\");\n\t\t\t\t\tSystem.out.println(\"1. 登錄新書籍(bookregister)\");\n\t\t\t\t\tSystem.out.println(\"2. 刪除書籍(bookdelete)\");\n\t\t\t\t\tSystem.out.println(\"3. 更新書籍資料(bookedit)\");\n\t\t\t\t\tSystem.out.println(\"4. 查詢書單(search)\");\n\t\t\t\t\tSystem.out.println(\"5. 查詢學生資料(viewstudent)\");\n\t\t\t\t\tSystem.out.println(\"6. 離開(exit)\");\n\t\t\t\t\toperation = in.nextLine();\n\t\t\t\t\tif(operation.equals(\"bookregister\")||operation.equals(\"1\")){\n\t\t\t\t\t\tbooklists = bs.RregisterBook(booklists,SizeX);\n\t\t\t\t\t}else if(operation.equals(\"bookdelete\")||operation.equals(\"2\")\n\t\t\t\t\t\t\t||operation.equals(\"bookedit\")||operation.equals(\"3\")){\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來刪除書籍呢?\");\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tSystem.out.println(\"請問你要輸入[書名](bookname)還是[書號](booknum)來修改書籍呢?\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\t\t\t\t\t\t\n\t\t\t\t\t\tif(search_type.equals(\"bookname\"))\tSystem.out.print(\"請輸入書名:\");\n\t\t\t\t\t\telse if(search_type.equals(\"booknum\"))\tSystem.out.print(\"請輸入書號:\");\n\t\t\t\t\t\tanswer = in.nextLine();\n\t\t\t\t\t\tif(operation.equals(\"bookdelete\")||operation.equals(\"2\"))\n\t\t\t\t\t\t\tbooklists = bs.DeleteBooks(booklists,SizeX,SizeY,answer,search_type);\n\t\t\t\t\t\telse if(operation.equals(\"bookedit\")||operation.equals(\"3\"))\n\t\t\t\t\t\t\tbooklists = bs.EditBooks(booklists,SizeX,answer,search_type);\n\t\t\t\t\t\n\t\t\t\t\t}else if(operation.equals(\"search\")||operation.equals(\"4\")){\n\t\t\t\t\t\tSystem.out.println(\"請問你要以何種方式查詢呢?\");\n\t\t\t\t\t\tSystem.out.println(\"1. [書號](booknum)\");\n\t\t\t\t\t\tSystem.out.println(\"2. [書名](bookname)\");\n\t\t\t\t\t\tSystem.out.println(\"3. [種類](booktype)\");\n\t\t\t\t\t\tSystem.out.println(\"4. [全部列出](all)\");\n\t\t\t\t\t\tsearch_type = in.nextLine();\n\t\t\t\t\t\tint OrderIndex = 0;\n\t\t\t\t\t\tint TypeIndex = 0;\n\t\t\t\t\t\tif(search_type.equals(\"booknum\")||search_type.equals(\"1\")){\n\t\t\t\t\t\t\tOrderIndex = 0;//依書號排列\n\t\t\t\t\t\t\tTypeIndex = 0;\n\t\t\t\t\t\t}else if(search_type.equals(\"bookname\")||search_type.equals(\"all\")||search_type.equals(\"2\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 1;\n\t\t\t\t\t\t}else if(search_type.equals(\"booktype\")||search_type.equals(\"3\")){\n\t\t\t\t\t\t\tOrderIndex = 1;//依書名排列\n\t\t\t\t\t\t\tTypeIndex = 2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(!search_type.equals(\"all\")){\n\t\t\t\t\t\t\tSystem.out.print(\"請輸入 \"+search_type+\"的關鍵字:\");\n\t\t\t\t\t\t\tquery = in.nextLine();\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,query,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\tbs.SearchBooks(booklists,SizeX,SizeY,TypeIndex,OrderIndex);\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(operation.equals(\"viewstudent\")||operation.equals(\"5\")){\n\t\t\t\t\t\tbs.ViewStudent(booklists,SizeX);\n\t\t\t\t\t}\n\t\t\t\t}while(!operation.equals(\"exit\"));\n\t\t\t}\n\t\t\t\n\t\t}while(!identity.equals(\"exit\"));\n\t\t\n\t\tSystem.out.println(\"感謝您使用此系統!\");\n\t}" ]
[ "0.7041998", "0.688357", "0.67923355", "0.6600741", "0.65862954", "0.65618867", "0.65599215", "0.6425663", "0.6378047", "0.63504636", "0.6313495", "0.6232443", "0.62309235", "0.62281555", "0.6218868", "0.62006724", "0.6190714", "0.6189222", "0.61799175", "0.61695033", "0.6168073", "0.6168073", "0.6152005", "0.61341995", "0.61210626", "0.61109275", "0.6099605", "0.6095239", "0.6093968", "0.6075618", "0.6057709", "0.6041616", "0.60215783", "0.59955245", "0.5991933", "0.59878844", "0.5981247", "0.5969262", "0.5954826", "0.5954364", "0.5954304", "0.59410506", "0.5940367", "0.5939632", "0.59355897", "0.5926433", "0.5922324", "0.592124", "0.59196985", "0.5917083", "0.5898384", "0.58955383", "0.58951235", "0.5893383", "0.5891055", "0.58783346", "0.58713144", "0.5871097", "0.5867314", "0.5856586", "0.5848829", "0.5847872", "0.5839316", "0.58152395", "0.58040404", "0.58038676", "0.58028555", "0.5801848", "0.5796067", "0.5795668", "0.5791032", "0.5746334", "0.57348436", "0.57284117", "0.57272273", "0.57251316", "0.5720654", "0.5704755", "0.5701194", "0.57010305", "0.56988037", "0.5698056", "0.5696731", "0.5696243", "0.56914175", "0.56854725", "0.5673227", "0.5672927", "0.5661528", "0.5656485", "0.5653249", "0.5637167", "0.56359446", "0.56315184", "0.5621271", "0.5609334", "0.5608604", "0.56085014", "0.5592938", "0.55901694" ]
0.58885217
55
check which id switch based on the MenuItem id
@Override public boolean onOptionsItemSelected(MenuItem item) { switch (item.getItemId()) { case R.id.action_settings: // displays the SettingsActivity when running on a phone startMySettingsActivity(); // consume the menu event return true; case R.id.add_book: startAddBookFragment(); // consume the menu event return true; default: break; } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public MenuItem findItem(int id);", "@Override\n\t\t\t\tpublic boolean onMenuItemClick(MenuItem item) {\n\t\t\t\t\tint id = item.getItemId();\n\t\t\t\t\tIntent i;\n\t\t\t\t\tswitch (item.getItemId()) {\n\t\t\t\t\tcase R.id.menu_add_new_list:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(getBaseContext(), MyMap.class);\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_dashboard:\n\t\t\t\t\t\tif (task.getString(\"user_id\", null) != null) {\n\t\t\t\t\t\t\ti = new Intent(MyMap.this, dashboard_main.class);\n\t\t\t\t\t\t\ti.putExtra(\"edit\", \"12344\");\n\t\t\t\t\t\t\tstartActivity(i);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tToast.makeText(MyMap.this, \"Please Login first\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\tcase R.id.menu_login:\n\t\t\t\t\t\tif (bedMenuItem.getTitle().equals(\"Logout\")) {\n\t\t\t\t\t\t\tSharedPreferences.Editor editor = getSharedPreferences(\"user\", MODE_PRIVATE).edit();\n\t\t\t\t\t\t\teditor.clear();\n\t\t\t\t\t\t\teditor.commit();\n\t\t\t\t\t\t\tbedMenuItem.setTitle(\"Login/Register\");\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tIntent i_user = new Intent(getBaseContext(), user_login.class);\n\t\t\t\t\t\t\tstartActivity(i_user);\n\t\t\t\t\t\t}\n\t\t\t\t\t\treturn true;\n\t\t\t\t\t}\n\t\t\t\t\treturn false;\n\t\t\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n super.onOptionsItemSelected(item);\n\n int id = item.getItemId();\n Log.d(\"menu check\",\"clicked: \"+id);\n Log.d(\"menu check\",\"doc id: \"+R.id.doc);\n Log.d(\"menu check\",\"stat id:\"+R.id.stat);\n //noinspection SimplifiableIfStatement\n switch(id){\n case R.id.doc: {\n startActivity(new Intent(BasicInfo.this, Doctor.class));\n finish();\n break;\n }\n case R.id.stat: {\n startActivity(new Intent(BasicInfo.this, LastStatus.class));\n break;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onMenuItemSelected(int featureId, MenuItem item) {\n int lSelectedItemID = item.getItemId(); // 액션 메뉴 아이디 확인함.\n if(lSelectedItemID == R.id.action_example){\n // To-do something\n }\n return super.onMenuItemSelected(featureId, item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Intent intent = getIntent();\n id = intent.getIntExtra(\"id\", 9999);\n\n Log.d(\"ss\", Locale.getDefault().getLanguage());\n\n if( Locale.getDefault().getLanguage().equals(\"iw\")||Locale.getDefault().getLanguage().equals(\"he\")){\n getMenuInflater().inflate(R.menu.menu_main_rtl, menu);}\n else\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n if(id!=9999)\n getMenuInflater().inflate(R.menu.menu_main_update, menu);\n\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n \n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "UmsMenu getItem(Long id);", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Bundle extras = getIntent().getExtras();\n if(extras !=null)\n {\n int Value = extras.getInt(\"id\");\n if(Value>0){\n getMenuInflater().inflate(R. menu.display_contact, menu);\n }\n else{\n getMenuInflater().inflate(R.menu.menu_main, menu);\n }\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"Ravi\", \"DisplayContact onCreateOptionsMenu Start 23\");\n Bundle extras = getIntent().getExtras();\n\n if(extras !=null) {\n Log.d(\"Ravi\", \"DisplayContact onCreateOptionsMenu Start 24\");\n int Value = extras.getInt(\"id\");\n if(Value>0){\n Log.d(\"Ravi\", \"DisplayContact onCreateOptionsMenu Start 25\");\n getMenuInflater().inflate(R.menu.display_contact, menu);\n } else{\n Log.d(\"Ravi\", \"DisplayContact onCreateOptionsMenu Start 26\");\n getMenuInflater().inflate(R.menu.menu_main, menu);\n }\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n String messageText = item.getTitle().toString();\n /*if(item.getGroupId() != 0) {\n R.id.my_group;\n }*/\n switch (item.getItemId()) {\n case R.id.first_item:\n Toast.makeText(this, item.getTitle(), Toast.LENGTH_LONG).show();\n break;\n case R.id.second_item:\n Toast.makeText(this, item.getTitle(), Toast.LENGTH_LONG).show();\n break;\n case R.id.first_in_group:\n if (item.isChecked()) {\n item.setChecked(false);\n messageText += \" unchecked\";\n } else {\n item.setChecked(true);\n messageText += \" checked\";\n }\n\n Toast.makeText(this, messageText, Toast.LENGTH_LONG).show();\n break;\n case R.id.second_in_group:\n if (item.isChecked()) {\n item.setChecked(false);\n messageText += \" unchecked\";\n } else {\n item.setChecked(true);\n messageText += \" checked\";\n }\n\n Toast.makeText(this, messageText, Toast.LENGTH_LONG).show();\n break;\n case R.id.first_in_submenu:\n if (item.isChecked()) {\n item.setChecked(false);\n messageText += \" unchecked\";\n } else {\n item.setChecked(true);\n messageText += \" checked\";\n }\n\n Toast.makeText(this, messageText, Toast.LENGTH_LONG).show();\n\n break;\n case R.id.second_in_submenu:\n Toast.makeText(this, item.getTitle(), Toast.LENGTH_LONG).show();\n break;\n }\n return true;\n }", "private void updateMenuItems(){\n String awayState = mStructure.getAway();\n MenuItem menuAway = menu.findItem(R.id.menu_away);\n if (KEY_AUTO_AWAY.equals(awayState) || KEY_AWAY.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_home);\n } else if (KEY_HOME.equals(awayState)) {\n menuAway.setTitle(R.string.away_state_away);\n }\n }", "@Override\n public boolean onOptionsItemSelected (MenuItem item)\n {\n int id = item.getItemId();\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Bundle extras = getIntent().getExtras();\n\n if(extras !=null) {\n int Value = extras.getInt(\"id\");\n if(Value>0){\n getMenuInflater().inflate(R.menu.display_contact, menu);\n } else{\n getMenuInflater().inflate(R.menu.main_menu, menu);\n }\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n Toast.makeText(Inserting.this, \"Sorry, there is no any option for setting!!!\", Toast.LENGTH_LONG).show();\n return true;\n }\n switch(id){\n case R.id.id_about_us:\n Toast.makeText(Inserting.this, \"I am Junior Android Developer!!!\", Toast.LENGTH_LONG).show();\n return true;\n case R.id.id_contact_us:\n Toast.makeText(Inserting.this, \"If you want to cantact me, please write email to doston2509@gmail.com!!!\",\n Toast.LENGTH_LONG).show();\n return true;\n case R.id.id_search:\n Toast.makeText(Inserting.this, \"Sorry, there is no any option for search!!!\", Toast.LENGTH_LONG).show();\n return true;\n case R.id.id_exit_app:\n Exit_alert();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (true) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (id)\n {\n //change id\n case R.id.view_food: return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Bundle extras = getIntent().getExtras();\n\n if (extras != null) {\n\n int Value = extras.getInt(\"id\");\n if (Value > 0) {\n\n getMenuInflater().inflate(R.menu.menu_displayfriend, menu);\n }\n else {\n\n getMenuInflater().inflate(R.menu.menu_main, menu);\n }\n\n }\n return true;\n }", "@Override\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase MapConstant.MAP_MENU_SHARE: {\n\n\t\t\ttry {\n\t\t\t\tString screenShotPath = shareScreenShot(mMapView);\n\t\t\t\tToast.makeText(RouteActivity.this,\n\t\t\t\t\t\tR.string.share + screenShotPath, Toast.LENGTH_LONG)\n\t\t\t\t\t\t.show();\n\t\t\t\tIntent intent = new Intent(RouteActivity.this,\n\t\t\t\t\t\tSendMessageActivity.class);\n\t\t\t\tBundle bundle = new Bundle();\n\t\t\t\tbundle.putString(\"action\", \"new\");\n\t\t\t\tbundle.putString(\"target\", \"\");\n\t\t\t\tbundle.putString(\"filePath\", screenShotPath);\n\t\t\t\tbundle.putString(\"location-message\", rounterMessage);\n\t\t\t\tintent.putExtras(bundle);\n\t\t\t\tstartActivity(intent);\n\t\t\t} catch (Exception e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\n\t\t\tbreak;\n\n\t\t}\n\t\tcase MapConstant.MAP_MENU_ROUNTER: {\n\t\t\t// 路綫寻找\n\t\t\tIntent i;\n\t\t\ti = new Intent(RouteActivity.this, SearchDialogActivity.class);\n\t\t\ti.putExtra(\"flag\", \"\");\n\t\t\ti.putExtra(\"startOrendDialogFlag\", \"\");\n\t\t\ti.putExtra(\"map\", \"\");\n\t\t\ti.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\tstartActivity(i);\n\t\t\topenSearchRounterDialog();\n\t\t\tbreak;\n\t\t}\n\t\tcase MapConstant.MAP_MENU_NEAR: {\n\t\t\t// 附近查找\n\t\t\tIntent i = new Intent(RouteActivity.this, PoiActivity.class);\n\t\t\ti.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\t}\n\t\tcase MapConstant.MAP_MENU_CURRENT: {\n\t\t\t// 附近查找\n\t\t\tIntent i = new Intent(RouteActivity.this, MyLocationActivity.class);\n\t\t\ti.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\tstartActivity(i);\n\t\t\tbreak;\n\t\t}\n\t\tcase MapConstant.MAP_MENU_CLEAR: {\n\t\t\tmMapView.getOverlays().clear();\n\t\t\troutemsg.setVisibility(View.GONE);\n\t\t\tbreak;\n\n\t\t}\n\t\tcase MapConstant.MAP_MENU_BACK: {\n\t\t\t// Logout\n\t\t\tIntent home = new Intent(RouteActivity.this,\n\t\t\t\t\tHomeTimelineActivity.class);\n\t\t\thome.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n\t\t\tstartActivity(home);\n\t\t\toverridePendingTransition(R.anim.in_from_left, R.anim.out_to_right);\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\tdefault: {\n\t\t\tbreak;\n\t\t}\n\t\t}\n\t\treturn super.onMenuItemSelected(featureId, item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch (item.getItemId()) {\n // case R.id.my_library_screen:\n // return true;\n case R.id.my_profile_screen:\n return true;\n /* case R.id.home_screen:\n return true;\n case R.id.logout:\n return true;*/\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n System.out.println(\"id = \" + id);\n\n if (id == 16908332) {\n mNavigationDrawerFragment.openDrawer();\n return true;\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int selectedItmId = item.getItemId();\n\n switch (selectedItmId){\n case (R.id.item_action_refresh):\n new SpotifyNewRelease(accessToken).execute();\n return true;\n case (R.id.find_web):\n Toast.makeText(MainActivity.this,\"Find In Web Selected\",Toast.LENGTH_SHORT).show();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "public int getMenuId() {\n return 0;\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n\n int id = item.getItemId();\n\n if(id == R.id.action_setting){\n Toast.makeText(getContext(), \"Settings Clicked\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item1_setting){\n Toast.makeText(getContext(), \"Settings: Sub item1\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item2_setting){\n Toast.makeText(getContext(), \"Settings: Sub item2\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item3_setting){\n Toast.makeText(getContext(), \"Settings: Sub item3\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.sub_item4_setting){\n Toast.makeText(getContext(), \"Settings: Sub item4\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.action_more){\n Toast.makeText(getContext(), \"More options Clicked\", Toast.LENGTH_LONG).show();\n }\n if(id == R.id.action_search){\n Toast.makeText(getContext(), \"Search Call\", Toast.LENGTH_LONG).show();\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "public void setMenuid(Integer menuid) {\n this.menuid = menuid;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch(id){\n case R.id.dates:\n getdatemenu();\n break;\n case R.id.keys:\n getkeymenu();\n break;\n case R.id.list:\n getlistmenu();\n case android.R.id.home:\n Intent goHome = new Intent(this,MainActivity.class);\n boolean foundHome = navigateUpTo(goHome);\n\n\n }\n\n\n\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n\n switch (item.getItemId())\n {\n/**\n * Figure I might as well leave this in.\n *\n case R.id.menu_bookmark:\n // Single menu item is selected do something\n // Ex: launching new activity/screen or show alert message\n Toast.makeText(getApplicationContext(),\"menu_bookmark\", Toast.LENGTH_LONG).show();\n return true;\n\n case R.id.menu_save:\n Toast.makeText(getApplicationContext(),\"menu_save\", Toast.LENGTH_LONG).show();\n return true;\n\n case R.id.menu_search:\n Toast.makeText(getApplicationContext(),\"menu_search\", Toast.LENGTH_LONG).show();\n return true;\n\n case R.id.menu_delete:\n Toast.makeText(getApplicationContext(),\"menu_delete\", Toast.LENGTH_LONG).show();\n return true;\n**/\n case R.id.menu_preferences:\n final Context c = this;\n startActivity(new Intent(c, Settings.class));\n finish();\n return true;\n\n case R.id.menu_share:\n Toast.makeText(getApplicationContext(),\"menu_share\", Toast.LENGTH_LONG).show();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\npublic boolean onMenuItemClicked(MenuScene pMenuScene, IMenuItem pMenuItem,\n\t\tfloat pMenuItemLocalX, float pMenuItemLocalY) {\n\tswitch(pMenuItem.getID())\n\t{\n\t\tcase MENU_PROFILE02:\n\t\t\tresourcesManager.setProfile(0);\n\t\t\tplaySelectSound();\t\t\t\n\t\t\t//resourcesManager.setIdMenu(10);\n\t\t\tresourcesManager.setIdMenu(0);\n\t\t\tSceneManager.getInstance().loadMainMenuScene(engine);\n\t\t\t//SceneManager.getInstance().loadMainMenuScene(engine);\t\t\t\n\t\t\treturn true;\n\t\tcase MENU_PROFILE24:\n\t\t\tresourcesManager.setProfile(1);\n\t\t\tplaySelectSound();\t\t\t\n\t\t\t//resourcesManager.setIdMenu(20);\n\t\t\tresourcesManager.setIdMenu(0);\n\t\t\tSceneManager.getInstance().loadMainMenu24Scene(engine);\n\n\t\t\treturn true;\n\t\tcase MENU_PROFILE4:\n\t\t\tresourcesManager.setProfile(2);\n\t\t\tplaySelectSound();\t\t\t\n\t\t\t//resourcesManager.setIdMenu(30);\n\t\t\tresourcesManager.setIdMenu(0);\n\t\t\tSceneManager.getInstance().loadMainMenu4Scene(engine);\n\t\t\t//getFullVersion();\n\t\t\treturn true;\n\t\t\n\t\tdefault:\n\t\t\treturn false;\n\t}\n}", "@Override\r\n public boolean onMenuItemClick(MenuItem item) {\r\n switch (item.getItemId()) {\r\n//---------------BMI option------------------\r\n case R.id.my_bmi:\r\n Intent bmiIntent = new Intent(MainHome.this, MainBMI.class);\r\n bmiIntent.putExtra(\"id\", _id);\r\n bmiIntent.putExtra(\"userName\", userName);\r\n bmiIntent.putExtra(\"pref\", preference);\r\n startActivity(bmiIntent);\r\n return true;\r\n//-----------------------top distance list--------------\r\n case R.id.action_list_dist:\r\n Intent list = new Intent(MainHome.this, MainTopDist.class);\r\n list.putExtra(\"id\", _id);\r\n list.putExtra(\"userName\", userName);\r\n list.putExtra(\"pref\", preference);\r\n startActivity(list);\r\n return true;\r\n//-----------------top time list------------------\r\n case R.id.action_list_time:\r\n Intent listTime = new Intent(MainHome.this, MainTopTime.class);\r\n listTime.putExtra(\"id\", _id);\r\n listTime.putExtra(\"userName\", userName);\r\n listTime.putExtra(\"pref\", preference);\r\n startActivity(listTime);\r\n return true;\r\n//----------------------logout----------------------------------\r\n case R.id.action_logout:\r\n Intent logIntent = new Intent(MainHome.this, MainActivity.class);\r\n startActivity(logIntent);\r\n finish();\r\n return true;\r\n//------------toggle normal map-----------------\r\n case R.id.map_normal:\r\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\r\n return true;\r\n//----------------toggle hybrid map------------------------\r\n case R.id.map_hybrid:\r\n mMap.setMapType(GoogleMap.MAP_TYPE_HYBRID);\r\n return true;\r\n//----------------------list all journeys-----------------------------------\r\n case R.id.action_list_all:\r\n Intent listIntent = new Intent(MainHome.this, MainListAll.class);\r\n listIntent.putExtra(\"id\", _id);\r\n listIntent.putExtra(\"userName\", userName);\r\n listIntent.putExtra(\"pref\", preference);\r\n startActivity(listIntent);\r\n return true;\r\n default:\r\n return false;\r\n }\r\n }", "public boolean onCommand(short id)\r\n {\r\n if (rhPtr == null)\r\n {\r\n return false;\r\n }\r\n if (rhPtr.rh2PauseCompteur != 0)\r\n {\r\n return false;\r\n }\r\n if (bReady == false)\r\n {\r\n return false;\r\n }\r\n\r\n rhCurParam0 = id;\r\n rh3CurrentMenu = id;\t\t \t// Pour les evenements II\r\n rhPtr.rh4MenuEaten = false;\t\t\t// Pour bloquer l'option de menu\r\n handle_GlobalEvents(((-14 << 16) | 65535));\t\t// CNDL_MENUSELECTED\r\n\r\n return rhPtr.rh4MenuEaten;\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getGroupId()) {\n case MENU_ROUTES:\n \t if (!item.isChecked())\n \t\t webView.loadUrl(\"javascript:loadRoute(\" + item.getItemId() + \")\");\n default:\n if (item.isChecked()) item.setChecked(false);\n else {\n item.setChecked(true);\n }\n return super.onOptionsItemSelected(item);\n }\n }", "private void setMenu(String user_id) {\n FirebaseDatabase database = FirebaseDatabase.getInstance();\n Log.d(\"User id\", user_id);\n final String[] user_type = new String[1];\n DatabaseReference databaseReference = database.getReference(\"Users\").child(user_id).child(\"type\");\n databaseReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n user_type[0] = snapshot.getValue().toString();\n Log.d(\"User Type \", user_type[0]);\n //done.set(true);\n switch (user_type[0]) {\n case \"residente\":\n navView.getMenu().findItem(R.id.navigation_notifications).setVisible(false);\n navView.getMenu().findItem(R.id.historyFragment).setVisible(false);\n navView.getMenu().findItem(R.id.userManagementFragment).setVisible(false);\n navView.getMenu().findItem(R.id.navigation_dashboard).setVisible(true);\n return;\n case \"admin\":\n navView.getMenu().findItem(R.id.navigation_notifications).setVisible(true);\n navView.getMenu().findItem(R.id.historyFragment).setVisible(true);\n navView.getMenu().findItem(R.id.userManagementFragment).setVisible(false);\n navView.getMenu().findItem(R.id.navigation_dashboard).setVisible(true);\n return;\n case \"guardia\":\n navView.getMenu().findItem(R.id.navigation_dashboard).setVisible(false);\n navView.getMenu().findItem(R.id.userManagementFragment).setVisible(false);\n navView.getMenu().findItem(R.id.navigation_notifications).setVisible(true);\n navView.getMenu().findItem(R.id.historyFragment).setVisible(true);\n return;\n case \"\":\n navView.getMenu().findItem(R.id.navigation_notifications).setVisible(false);\n navView.getMenu().findItem(R.id.historyFragment).setVisible(false);\n navView.getMenu().findItem(R.id.userManagementFragment).setVisible(false);\n navView.getMenu().findItem(R.id.navigation_dashboard).setVisible(true);\n return;\n }\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n //while (user_type[0].isEmpty());\n //return user_type[0];\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == R.id.action_settings) {\n return true;\n }\n if (R.id.action_add == id && mSelectedItem == 1) {\n return mFencesFragment.onOptionsItemSelected(item);\n } else if (R.id.action_add == id && mSelectedItem == 2) {\n return mTargetsFragment.onOptionsItemSelected(item);\n }\n return super.onOptionsItemSelected(item);\n }", "UmsMenu selectByPrimaryKey(String menuId);", "protected boolean onMenuItemSelected(int menuItemId) {\r\n\t\treturn false;\r\n\t}", "@Override\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\n\t\t\tcase 1:\n\t\t\t\t//Toast msg = Toast.makeText(orgDetails.this, \"Menu 1\", Toast.LENGTH_LONG);\n\t\t\t\t//msg.show();\n\t\t\t\treturn true;\n\t\t\t}\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}", "public boolean onOptionsItemSelected(MenuItem item){\n int id=item.getItemId();\n switch (id){\n\n case(R.id.opcion1):\n Intent intent1=new Intent(Home.this,Acercade.class);\n startActivity(intent1);\n break;\n\n case(R.id.opcion2):\n cambiarIdioma(\"en\");\n Intent intent2=new Intent(Home.this,Home.class);\n startActivity(intent2);\n break;\n\n case(R.id.opcion3):\n cambiarIdioma(\"es\");\n Intent intent3=new Intent(Home.this,Home.class);\n startActivity(intent3);\n break;\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic MenuItem getMenuItem(long menuItemId) \n\t{\n\t\tList<MenuItem> list=this.menuItemList;\n\t\tfor(MenuItem m:list)\n\t\t{\n\t\t\tif(m.getId()==menuItemId)\n\t\t\t{\n\t\t\t\treturn m;\n\t\t\t}\n\t\t}\n\t\treturn null;\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_commonone, menu);\n MenuItem item3 = menu.findItem(R.id.messager);\n MenuItem item4 = menu.findItem(R.id.search);\n item3.setIcon(R.drawable.openmessage);\n item4.setIcon(R.drawable.search);\n try{\n if (loggedIn.equals(\"noValue\")) {\n\n\n item3.setVisible(false);\n\n } else {\n\n item3.setVisible(true);\n\n }}\n catch (Exception e){\n\n }\n return true;\n }", "@Override\n\tpublic void setMenuId(String menuId) {\n\t\t\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n mOption = menu;\n getMenuInflater().inflate(R.menu.menu, menu);\n int menunya = sharedpreferences.getInt(\"menu\", 0);\n SharedPreferences.Editor editor = sharedpreferences.edit();\n if (menunya == 0) {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 2) {\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n navigation.setSelectedItemId(R.id.navigation_dashboard);\n } else if (menunya == 3) {\n f2.setVisibility(View.GONE);\n f3.setVisibility(View.VISIBLE);\n navigation.setSelectedItemId(R.id.navigation_notifications);\n } else {\n editor.putInt(\"menu\", 2);\n editor.commit();\n f2.setVisibility(View.VISIBLE);\n f3.setVisibility(View.GONE);\n }\n return true;\n }", "@Override\n public boolean onMenuItemSelected(int featureId, MenuItem item) {\n \tif(featureId == 0){\n \t\tif(!in_set_param){\n\t \t\tin_set_param = true;\n\t \t\ton_button_setting();\n \t}\n \t\tif(button_setting_num < 6){\n\t \t\tbutton_setting_num++;\n\t \t}else{\n\t \t\tbutton_setting_num = 1;\n\t \t\tGetGpioNumberAndSerialNumber();\n\t \t}\n \t}\n \treturn super.onMenuItemSelected(featureId, item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch(id) {\n case R.id.acercade:\n \tlanzarAcercaDe(null);\n \tbreak;\n case R.id.config:\n \tlanzarPreferencias(null);\n \tbreak;\n }\n return true;\n\n }", "@Override\r\n \tpublic boolean onPrepareOptionsMenu(Menu menu) {\r\n \t\tmenu.removeGroup(0);\r\n \t\tmenu.removeGroup(1);\r\n \t\tResources res = getResources();\r\n \t\tif(keyValue == 1)\r\n \t\t{\r\n \t\t\tmenu.add(0, R.id.selectAll, 0, res.getString(R.string.select_all))\r\n \t\t\t\t.setIcon(android.R.drawable.checkbox_on_background);\r\n \t\t\tmenu.add(1, R.id.deSelect, 1, res.getString(R.string.deselect_all))\r\n \t\t\t\t.setIcon(android.R.drawable.checkbox_off_background);\r\n \t\t}\r\n \t\treturn true;\r\n \r\n \t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_settings) {\n return true;\n }\n if (id == R.id.action_myinfo){\n return true;\n }\n if (id == R.id.action_myschedule){\n// Intent it = new Intent(SwipePlot.this,Choice.class);\n// Bundle bundle = new Bundle();\n// if(myid!=null) {\n// bundle.putString(\"memberid\", myid);\n// bundle.putString(\"my_google_id\",my_google_id);\n// bundle.putString(\"my_supervise_id\",my_supervise_id);\n// }else{\n// bundle.putString(\"memberid\", current_id);\n// bundle.putString(\"my_google_id\",my_google_id);\n// bundle.putString(\"my_supervise_id\",my_supervise_id);\n// }\n// it.putExtras(bundle);\n// startActivity(it);\n return true;\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n Log.d(\"NICK\", \"CWECNEWKVNERIPNVIEWNFVIPEWNVIPEWNVPIEWNVPIEWNVPIEWNVPIRWNVPRWVPO\");\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n //drawerLayout = (DrawerLayout) findViewById(R.id.drawer_main);\n drawerLayout.openDrawer(GravityCompat.START);\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic Tmenu findByKey(String id) throws Exception {\n\t\treturn menuMapper.findForObject(id);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n switch (id){\n case R.id.home:\n Intent i = new Intent(this, MainActivity.class);\n startActivity(i);\n return true;\n\n case R.id.kalenderansicht_abrufen:\n i = new Intent(this, Kalender.class);\n startActivity(i);\n return true;\n\n case R.id.notizfunktion_aufrufen:\n i = new Intent(this, Notizen.class);\n startActivity(i);\n return true;\n\n case R.id.wetterinformationen_abrufen:\n i = new Intent(this, Wetter.class);\n startActivity(i);\n return true;\n\n case R.id.rechnerfunktion_aufrufen:\n i = new Intent(this, Rechner.class);\n startActivity(i);\n return true;\n\n case R.id.stopwatch:\n i = new Intent(this, StopWatch.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == dozaengine.nanocluster.R.id.action_settings) {\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n //get item id to handle item clicks\n return super.onOptionsItemSelected(item);\n }", "public void menuClicked(MenuItem menuItemSelected);", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n// if (id == R.id.action_settings) {\n// Toast.makeText(Activity_Main2.this, \"Action Menu hapa\", Toast.LENGTH_SHORT).show();\n// }\n// else\n if(id == R.id.about_Ubunifu){\n Toast.makeText(Activity_Main2.this, \"About Ubunifu hapa\", Toast.LENGTH_SHORT).show();\n\n } else if (id == R.id.about_App){\n Intent intent = new Intent(Activity_Main2.this, about_Bawasa.class);\n startActivity(intent);\n\n } else if (id == R.id.logoff_mnu){\n customDialog(\"WARNING\",\"You are about to Sign Out \\n Are You Sure ?\",\"cancelMethod1\",\"okMethod1\");\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int vid = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (vid == R.id.action_logout) {\r\n Intent intent=new Intent(Dashboard.this,MainActivity.class);\r\n startActivity(intent);\r\n return true;\r\n }else if (vid == R.id.action_changepassword) {\r\n Intent intent=new Intent(Dashboard.this,StudentChangePassword.class);\r\n intent.putExtra(\"userid\",userid);\r\n startActivity(intent);\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "public String chooseMenu() {\n String input = FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"menu_id\");\n setName(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"name\"));\n setType(FacesContext.getCurrentInstance().getExternalContext().getRequestParameterMap().get(\"type\"));\n setMenu_id(Integer.parseInt(input));\n return \"EditMenu\";\n\n }", "@Override\n public boolean onMenuItemSelected(int featureId, MenuItem item) {\n int id = item.getItemId();\n\n if(id == R.id.action_home){\n Intent intent = new Intent(this,Display.class);\n startActivity(intent);\n }\n\n else if(id == R.id.action_semester){\n Intent intent = new Intent(this,Semester.class);\n startActivity(intent);\n }\n\n else if(id == R.id.action_logout){\n Intent intent = new Intent(this, MainActivity.class);\n //To clear the current session\n intent.setFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n startActivity(intent);\n Toast.makeText(this,\"Logout Successful\", Toast.LENGTH_LONG).show();\n }\n return super.onMenuItemSelected(featureId, item);\n }", "public boolean onOptionsItemsSelected(MenuItem item)\n\n {\n // use the .id from the menu.xml file\n if(item.getItemId() == R.id.changeMapStyle1)\n {\n Intent intent= new Intent( this, MapChooseActivity.class)\n //start activity actually starts the activity\n startActivity(intent);\n return true;\n }\n return false;\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n// //noinspection SimplifiableIfStatement\n// if (id == R.id.action_settings) {\n// return true;\n// }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t\tswitch (item.getItemId()) {\r\n\t\tcase R.id.buildingslist:\r\n\t\t\tIntent launch = new Intent(AdminListActivity.this,\r\n\t\t\t\t\tBuildingListActivity.class);\r\n\t\t\tstartActivity(launch);\r\n\t\t\treturn true;\r\n\t\tcase R.id.administrationlist:\r\n\t\t\tToast.makeText(getApplicationContext(), \"Already on this menu\",\r\n\t\t\t\t\tToast.LENGTH_SHORT).show();\r\n\t\t\treturn true;\r\n\t\tcase R.id.facultylist:\r\n\t\t\tIntent launch2 = new Intent(AdminListActivity.this,\r\n\t\t\t\t\tFacultyListActivity.class);\r\n\t\t\tstartActivity(launch2);\r\n\t\t\treturn true;\r\n\t\tdefault:\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}\r\n\t}", "private void checkMenuItemStatus() {\n\t\tif (VozCache.instance().getCookies() == null) { // not logged in yet\n\t\t\tlogoutMenu.setVisible(false);\t\t\t\n\t\t\tloginMenu.setVisible(true);\n\t\t\tloginWithPresetMenu.setVisible(true);\n\t\t} else { // logged in\n\t\t\tlogoutMenu.setVisible(true);\t\t\t\n\t\t\tloginMenu.setVisible(false);\n\t\t\tloginWithPresetMenu.setVisible(false);\n\t\t}\t\t\n\t\tif (VozCache.instance().canShowReplyMenu()) {\n\t\t\tif(VozCache.instance().getCookies() != null) {// logged in\n\t\t\t\tquickRepMenu.setVisible(true);\n\t\t\t} else {\n\t\t\t\tquickRepMenu.setVisible(false);\n\t\t\t}\n\t\t} else {\n\t\t\tquickRepMenu.setVisible(false);\n\t\t}\n\t\t\n\t\tif (canShowPinnedMenu()) {\n\t\t\tpinMenu.setVisible(true);\n\t\t} else {\n\t\t\tpinMenu.setVisible(false);\n\t\t}\n\t\t\n\t\tif (canShowUnpinnedMenu()) {\n\t\t\tunpinMenu.setVisible(true);\n\t\t} else {\n\t\t\tunpinMenu.setVisible(false);\n\t\t}\n\t}", "@Override\n\tpublic String getMenuId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic boolean onMenuItemSelected(int featureId, MenuItem item) {\n\t\tOptionsMenu.selectItem(item,getApplicationContext());\n\t\treturn super.onMenuItemSelected(featureId, item);\n\t}", "@Override\n public boolean onNavigationItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.activity_main_bills :\n break;\n case R.id.activity_main_drawer_profile:\n break;\n case R.id.activity_main_drawer_layout:\n break;\n default:\n break;\n }\n\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n switch (id){\n case R.id.menu_parking:\n\n Intent In = new Intent(Secure.this,ParkingActivity.class);\n startActivity(In);\n finish();\n break;\n\n case R.id.menu_shuttle:\n Intent inti = new Intent(Secure.this,Shuttle.class);\n startActivity(inti);\n finish();\n break;\n case R.id.menu_wallet:\n Intent u =new Intent(Secure.this,Wallet.class);\n startActivity(u);\n finish();\n break;\n case R.id.menu_payment:\n Intent a = new Intent(Secure.this,Secure.class);\n startActivity(a);\n finish();\n break;\n case R.id.menu_contact:\n Intent b = new Intent(Secure.this,Contact.class);\n startActivity(b);\n finish();\n break;\n case R.id.menu_logout:\n editor.clear();\n editor.commit();\n Intent i = new Intent(Secure.this,LoinActivity.class);\n startActivity(i);\n finish();\n break;\n\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.buyer_role) {\n\n Intent intent = new Intent(Home_buyer.this, Home_buyer.class);\n startActivity(intent);\n return true;\n }\n\n /* else if\n (id == R.id.seller_role) {\n\n Intent intent = new Intent(Home_buyer.this, Home_seller.class);\n startActivity(intent);\n return true;\n } */\n\n return super.onOptionsItemSelected(item);\n }", "public boolean isOnMenu ();", "UsrMmenus selectByPrimaryKey(String menuid);", "public void VerifyMainMenuItems() {\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Dashboard);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Initiatives);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_LiveMediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_MediaPlans);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Audiences);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Offers);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_CreativeAssets);\n\t\t UserActions.VerifyElementIsDisplayed(Lnk_Reports);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_current_order) {\n Intent intent=new Intent(getBaseContext(),ViewCurrentOrders.class);\n intent.putExtra(\"resid\",resid);\n startActivity(intent);\n return true;\n }\n\n if (id == R.id.action_past_order) {\n Intent intent=new Intent(getBaseContext(),ViewPastOrders.class);\n intent.putExtra(\"resid\",resid);\n startActivity(intent);\n } if (id == R.id.action_logout) {\n preferences.edit().remove(\"resid\").commit();\n Intent intent=new Intent(getBaseContext(),ResLogin.class);\n startActivity(intent);\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }" ]
[ "0.6930427", "0.67433786", "0.668886", "0.662502", "0.6576895", "0.65727496", "0.65727496", "0.65727496", "0.65727496", "0.65727496", "0.65727496", "0.6556056", "0.6526749", "0.6519833", "0.6515866", "0.64941055", "0.6409128", "0.6409128", "0.63879323", "0.63828486", "0.63568825", "0.63568825", "0.63568825", "0.63568825", "0.63568825", "0.63568825", "0.63568825", "0.63568825", "0.63568825", "0.63190424", "0.63099784", "0.63014346", "0.62859404", "0.62813866", "0.6274279", "0.62690264", "0.623098", "0.6228514", "0.62008125", "0.61879885", "0.6149654", "0.61260456", "0.61260456", "0.61260456", "0.61260456", "0.61260456", "0.6106277", "0.6095334", "0.6070218", "0.6056728", "0.599279", "0.5969317", "0.59485465", "0.5941245", "0.5941245", "0.5941245", "0.5941245", "0.5941245", "0.5941245", "0.59366256", "0.5924534", "0.5908167", "0.5902275", "0.59013516", "0.58998454", "0.58883035", "0.5887175", "0.58867687", "0.58864856", "0.5881964", "0.58807194", "0.58744967", "0.5865826", "0.586556", "0.5863182", "0.5861996", "0.5823511", "0.58100563", "0.580206", "0.579842", "0.5795674", "0.5793308", "0.57899916", "0.5775285", "0.5771097", "0.57585156", "0.57584393", "0.575636", "0.5754905", "0.57533795", "0.57533306", "0.5751293", "0.57470536", "0.57466316", "0.57459927", "0.57453525", "0.5744821", "0.57415044", "0.5733646", "0.57270306", "0.572151" ]
0.0
-1
called when the user changes the app's preferences
@Override public void onSharedPreferenceChanged( SharedPreferences sharedPreferences, String key) { preferencesChanged = true; // user changed app setting if (key.equals(USER_NAME)) { //update user name user.setName(sharedPreferences.getString(USER_NAME, "")); //update user name to firebase database databaseHandler.updateUserData(user.getUserId(), user.getUserName(), MessageEnum.UPDATE_USER_NAME); } else if (key.equals(LOCATION)) { //update user location user.setLocation(sharedPreferences.getString(LOCATION, "")); databaseHandler.updateUserData(user.getUserId(), user.getUserLocation(), MessageEnum.UPDATE_USER_LOCATION); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void handlePreferences() {\n displayPrefs ();\n }", "@Override\n public void onSettingChanged(ListPreference pref) {\n }", "@Override\n \tpublic void onSharedPreferenceChanged(SharedPreferences prefs, String key) {\n \t\tcheckDefaults();\n \t}", "public void updatePreferences() {\n\n Toast.makeText(this, \"enter your data\", Toast.LENGTH_SHORT).show();\n startActivity(new Intent(this, SipSettingsActivity.class));\n\n }", "@Override\r\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\r\n if (somethingIsBeingProcessed) {\r\n return;\r\n }\r\n if (onSharedPreferenceChanged_busy || !MyPreferences.isInitialized()) {\r\n return;\r\n }\r\n onSharedPreferenceChanged_busy = true;\r\n \r\n try {\r\n String value = \"(not set)\";\r\n if (sharedPreferences.contains(key)) {\r\n try {\r\n value = sharedPreferences.getString(key, \"\");\r\n } catch (ClassCastException e) {\r\n try {\r\n value = Boolean.toString(sharedPreferences.getBoolean(key, false));\r\n } catch (ClassCastException e2) {\r\n value = \"??\";\r\n }\r\n }\r\n }\r\n MyLog.d(TAG, \"onSharedPreferenceChanged: \" + key + \"='\" + value + \"'\");\r\n \r\n // Here and below:\r\n // Check if there are changes to avoid \"ripples\": don't set new\r\n // value if no changes\r\n \r\n if (key.equals(MyAccount.Builder.KEY_ORIGIN_NAME)) {\r\n if (state.getAccount().getOriginName().compareToIgnoreCase(mOriginName.getValue()) != 0) {\r\n // If we have changed the System, we should recreate the\r\n // Account\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(mOriginName.getValue(),\r\n state.getAccount().getUsername()).toString(),\r\n TriState.fromBoolean(state.getAccount().isOAuth()));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_OAUTH)) {\r\n if (state.getAccount().isOAuth() != mOAuth.isChecked()) {\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(mOriginName.getValue(),\r\n state.getAccount().getUsername()).toString(),\r\n TriState.fromBoolean(mOAuth.isChecked()));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_USERNAME_NEW)) {\r\n String usernameNew = mEditTextUsername.getText();\r\n if (usernameNew.compareTo(state.getAccount().getUsername()) != 0) {\r\n boolean isOAuth = state.getAccount().isOAuth();\r\n String originName = state.getAccount().getOriginName();\r\n state.builder = MyAccount.Builder.newOrExistingFromAccountName(\r\n AccountName.fromOriginAndUserNames(originName, usernameNew).toString(),\r\n TriState.fromBoolean(isOAuth));\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(Connection.KEY_PASSWORD)) {\r\n if (state.getAccount().getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n state.builder.setPassword(mEditTextPassword.getText());\r\n showUserPreferences();\r\n }\r\n }\r\n } finally {\r\n onSharedPreferenceChanged_busy = false;\r\n }\r\n }", "@Override\n public void onPause() {\n \t\t//Save settings Enabled, Alarm Hour, Alarm Minute\n SharedPreferences settings = getSharedPreferences(MainActivity.PREFS_NAME, 0);\n SharedPreferences.Editor editor = settings.edit();\n editor.putBoolean(MainActivity.ALARM_ENABLED, AlarmEnabled);\n editor.putInt(MainActivity.SNOOZE_MINUTE, SnoozeMin);\n \n //Commit the edits\n editor.commit();\n \n super.onPause();\n }", "@Override\n\tprotected void onPause() {\n\t\t// TODO Auto-generated method stub\n\t\tsuper.onPause();\n\n\t\tsavePreferences();\n\t}", "protected void updatePreferences() {\n boolean theme = PreferenceManager.getDefaultSharedPreferences(this).getBoolean(getString(R.string.prefTheme), false);\n\n if (theme) {\n\n // Set to light mode.\n AppCompatDelegate.setDefaultNightMode(\n AppCompatDelegate.MODE_NIGHT_NO);\n } else {\n\n // Set to dark mode.\n AppCompatDelegate.setDefaultNightMode(\n AppCompatDelegate.MODE_NIGHT_YES);\n }\n }", "public boolean onPreferenceChange(Preference preference, Object newValue) {\n \t\t\treturn false;\r\n \t\t}", "@Override\n protected void onResume() {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n sp.registerOnSharedPreferenceChangeListener(this);\n super.onResume();\n }", "@Override\n protected void onResume() {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n sp.registerOnSharedPreferenceChangeListener(this);\n super.onResume();\n }", "private void saveCurrentPreferences() {\n\t\toldUnitType = preferences.getInt(\"displayUnit\", UnitType.FOOTINCH.getId());\n\t\toldPrecision = preferences.getInt(\"precision\", 16);\n\t\toldRounding = preferences.getBoolean(\"roundUp\", true);\n\t\toldDisplayOptions = preferences.getString(\"displayOptions\", context.getString(R.string.displayAutomatic));\n\t}", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if(key.equals(DEFAULT_QUERY_PATH)){\n sortOrderOfResults = sharedPreferences.getString(key, AppUtilities.QUERY_PATH_POPULAR);\n } else if(key.equals(getString(R.string.pref_genre_key))){\n preferredMovieGenre = sharedPreferences.getString(key,\n getString(R.string.pref_genre_any_value));\n } else if(key.equals(getString(R.string.pref_earliest_year_key))){\n preferredStartYear = sharedPreferences.getString(key,\n getString(R.string.pref_earliest_year_default));\n } else if(key.equals(getString(R.string.pref_latest_year_key))){\n preferredEndYear = sharedPreferences.getString(key,\n getString(R.string.pref_latest_year_default));\n } else if(key.equals(getString(R.string.pref_save_on_exit_key))){\n persistPreferences = sharedPreferences.getBoolean(key,\n getResources().getBoolean(R.bool.pref_save_on_exit_default));}\n\n // update boolean value\n checkForDefaultSharedPreferences();\n\n // call for reload\n // Note: reload is potentially necessary after any change, except for the preference\n // that controls change on exit\n if(!key.equals(getString(R.string.pref_save_on_exit_key))){\n performNewQuery();\n }\n }", "public boolean onPreferenceChange(Preference preference, Object objValue) {\n if (preference == mButtonDTMF) {\n int index = mButtonDTMF.findIndexOfValue((String) objValue);\n Settings.System.putInt(mPhone.getContext().getContentResolver(),\n Settings.System.DTMF_TONE_TYPE_WHEN_DIALING, index);\n } else if (preference == mButtonTTY) {\n handleTTYChange(preference, objValue);\n } else if (preference == mVoicemailProviders) {\n updateVMPreferenceWidgets((String)objValue);\n \n // If the user switches to a voice mail provider and we have a\n // number stored for it we will automatically change the phone's\n // voice mail number to the stored one.\n // Otherwise we will bring up provider's config UI.\n \n final String providerVMNumber = loadNumberForVoiceMailProvider(\n (String)objValue);\n \n if (providerVMNumber == null) {\n // Force the user into a configuration of the chosen provider\n simulatePreferenceClick(mVoicemailSettings);\n } else {\n saveVoiceMailNumber(providerVMNumber);\n }\n }\n // always let the preference setting proceed.\n return true;\n }", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if (key.equals(KEY_PREF_RUN_ON_START)) {\n CheckBoxPreference runOnStartPref = (CheckBoxPreference) findPreference(key);\n if(runOnStartPref.isChecked()) {\n requestPermission(getActivity(), PermissionsMapping.REBOOT_NOTIF);\n }\n } else if(key.equals(KEY_PREF_KEEP_SCREEN_ON)){\n CheckBoxPreference pref = (CheckBoxPreference) findPreference(key);\n if(pref.isChecked()) {\n getActivity().findViewById(R.id.main_layout).setKeepScreenOn(true);\n } else {\n getActivity().getParent().findViewById(R.id.main_layout).setKeepScreenOn(false);\n }\n }\n }", "private void savePrefsData() {\n SharedPreferences pref = getApplicationContext().getSharedPreferences(\"myPrefs\", MODE_PRIVATE);\n SharedPreferences.Editor editor = pref.edit();\n editor.putBoolean(\"isIntroOpnend\", true);\n editor.commit();\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.pref);\n sharedPreferences = PreferenceManager.getDefaultSharedPreferences(getActivity());\n //onSharedPreferenceChanged(sharedPreferences, getString(R.string.language_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.difficulty_key));\n onSharedPreferenceChanged(sharedPreferences, getString(R.string.word_category_key));\n }", "@Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n String difficultySummary = \"Current difficulty: \" + newValue;\n difficultyLevelPref.setSummary(difficultySummary);\n // Since we are handling the pref, we must save it\n SharedPreferences.Editor ed = sharedPrefs.edit();\n ed.putString(\"difficulty_level\", newValue.toString());\n ed.apply();\n setDifficultyLevel(newValue.toString());\n return true;\n }", "protected void onSharedPreferenceChangedExtended(SharedPreferences prefs,\n String key) {\n // no additional preferences, maybe the shopping list (in the future)\n }", "@Override\n\tpublic void notifySettingChanged() {\n\t}", "@Override\n\tpublic void onPause() {\n\n\t\t// Save the current setting for updates\n\t\tmEditor.putBoolean(LocationUtils.KEY_UPDATES_REQUESTED, mUpdatesRequested);\n\t\tmEditor.commit();\n\n\t\tsuper.onPause();\n\t}", "private void registerPrefsListener() {\n if (userSharedPreferences == null) {\n userSharedPreferences = Util.getUserSharedPreferences();\n }\n userPreferenceChangeListener = new SharedPreferences.OnSharedPreferenceChangeListener() {\n @Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n switch (key) {\n case HPIApp.Prefs.SHARED_KEY_TOTAL_STEPS:\n int steps = sharedPreferences.getInt(HPIApp.Prefs.SHARED_KEY_TOTAL_STEPS, 0);\n txtViewStepsCountToday.setText(String.valueOf(steps));\n break;\n case HPIApp.Prefs.SHARED_KEY_MILESTONES_TODAY:\n int milestones = sharedPreferences.getInt(HPIApp.Prefs.SHARED_KEY_MILESTONES_TODAY, 0);\n txtViewMilestonesCountToday.setText(String.valueOf(milestones));\n case HPIApp.Prefs.SHARED_KEY_RUN_SERVICE:\n boolean runService = sharedPreferences.getBoolean(HPIApp.Prefs.SHARED_KEY_RUN_SERVICE, false);\n if (runService) {\n HPIApp.getAppContext().startService(new Intent(HPIApp.getAppContext(), StepService.class));\n } else {\n HPIApp.getAppContext().stopService(new Intent(HPIApp.getAppContext(), StepService.class));\n }\n default:\n break;\n }\n }\n };\n\n userSharedPreferences.registerOnSharedPreferenceChangeListener(userPreferenceChangeListener);\n }", "@Override\n protected void onPause() {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n sp.unregisterOnSharedPreferenceChangeListener(this);\n super.onPause();\n }", "@Override\n protected void onPause() {\n SharedPreferences sp = PreferenceManager.getDefaultSharedPreferences(this);\n sp.unregisterOnSharedPreferenceChangeListener(this);\n super.onPause();\n }", "public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\r\n if (AccountSettings.this.mSomethingIsBeingProcessed) {\r\n return;\r\n }\r\n if (onSharedPreferenceChanged_busy || !MyPreferences.isInitialized()) {\r\n return;\r\n }\r\n onSharedPreferenceChanged_busy = true;\r\n\r\n try {\r\n String value = \"(not set)\";\r\n if (sharedPreferences.contains(key)) {\r\n try {\r\n value = sharedPreferences.getString(key, \"\");\r\n } catch (ClassCastException e) {\r\n try {\r\n value = Boolean.toString(sharedPreferences.getBoolean(key, false));\r\n } catch (ClassCastException e2) {\r\n value = \"??\";\r\n }\r\n }\r\n }\r\n MyLog.d(TAG, \"onSharedPreferenceChanged: \" + key + \"='\" + value + \"'\");\r\n\r\n // Here and below:\r\n // Check if there are changes to avoid \"ripples\": don't set new value if no changes\r\n \r\n if (key.equals(MyAccount.Builder.KEY_ORIGIN_NAME)) {\r\n if (state.getMyAccount().getOriginName().compareToIgnoreCase(mOriginName.getValue()) != 0) {\r\n // If we have changed the System, we should recreate the Account\r\n state.builder = MyAccount.Builder.valueOf(mOriginName.getValue() + \"/\" + state.getMyAccount().getUsername());\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_OAUTH)) {\r\n if (state.getMyAccount().isOAuth() != mOAuth.isChecked()) {\r\n state.builder.setOAuth(mOAuth.isChecked());\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(MyAccount.Builder.KEY_USERNAME_NEW)) {\r\n String usernameNew = mEditTextUsername.getText();\r\n if (usernameNew.compareTo(state.getMyAccount().getUsername()) != 0) {\r\n boolean oauth = state.getMyAccount().isOAuth();\r\n String originName = state.getMyAccount().getOriginName();\r\n // TODO: maybe this is not enough...\r\n state.builder = MyAccount.Builder.valueOf(originName + \"/\" + usernameNew);\r\n state.builder.setOAuth(oauth);\r\n showUserPreferences();\r\n }\r\n }\r\n if (key.equals(ConnectionBasicAuth.KEY_PASSWORD)) {\r\n if (state.getMyAccount().getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n state.builder.setPassword(mEditTextPassword.getText());\r\n showUserPreferences();\r\n }\r\n }\r\n } finally {\r\n onSharedPreferenceChanged_busy = false;\r\n }\r\n }", "@Override\n public void configChanged(UserPreferences prefs) {\n if (prefs == UserPreferences.POWER_SOURCE) {\n speedRoll.clear();\n speedRoll.add(30);\n }\n\n if ((prefs == UserPreferences.INSTANCE) ||\n (prefs == UserPreferences.WEIGHT) ||\n (prefs == UserPreferences.BIKE_WEIGHT))\n {\n weight = prefs.getTotalWeight();\n }\n }", "@Override\n public boolean onPreferenceChange(Preference preference, Object value) {\n setPreferenceSummary(preference, value);\n Log.i(LOG_TAG, \"onPreferenceChange: \" + value.toString());\n return true;\n }", "private void showChangeSettings() {\n showedChangeSettings = true;\n if (this.getActivity() == null || PreferenceManager.getDefaultSharedPreferences((Context)this.getActivity()).getBoolean(\"crumbyHasVisitedSettings\", false)) {\n return;\n }\n Toast toast = Toast.makeText((Context)this.getActivity(), (CharSequence)\"\", (int)1);\n toast.setGravity(17, 0, 0);\n TextView textView = (TextView)View.inflate((Context)this.getActivity(), (int)2130903119, (ViewGroup)null);\n textView.setText((CharSequence)\"Hint: settings are auto-saved!\");\n toast.setView((View)textView);\n toast.show();\n PreferenceManager.getDefaultSharedPreferences((Context)this.getActivity()).edit().putBoolean(\"crumbyHasVisitedSettings\", true).commit();\n }", "@Override\n\tprotected void onPause() {\n\t\tSharedPreferences.Editor editor = myprefs.edit();\n\t\teditor.putString(\"userN\", userName);\n\t\teditor.putString(\"name\",person_name);\n\t\teditor.commit();\n\t\tsuper.onPause();\n\t}", "@Override\r\n \tpublic void onSharedPreferenceChanged(SharedPreferences sp, String key) {\r\n \t\tif (localLOGV) {\r\n \t\t\tLog.i(TAG, \"Pref \" + key + \"changed... reading new value...\");\r\n \t\t}\r\n \t\tif (key.equals(res.getString(R.string.pref_data_file_key))) {\r\n \t\t\t// get new value\r\n \t\t\tString newPath = sp.getString(\r\n \t\t\t\t\tres.getString(R.string.pref_data_file_key), null);\r\n \t\t\tif (localLOGV) {\r\n \t\t\t\tLog.i(TAG, \"New value \" + String.valueOf(newPath));\r\n \t\t\t}\r\n \t\t\t// change value\r\n \t\t\tsetDataFileChanged(newPath);\r\n \t\t} else if (key.equals(res.getString(R.string.pref_data_file_gzip))) {\r\n \t\t\t// get new value\r\n \t\t\tgzipFile = sp.getBoolean(\r\n \t\t\t\t\tres.getString(R.string.pref_data_file_gzip), false);\r\n \t\t\tif (localLOGV) {\r\n \t\t\t\tLog.i(TAG, \"New value \" + String.valueOf(gzipFile));\r\n \t\t\t}\r\n \t\t\t// Set to reload file\r\n \t\t\treloadFile = true;\r\n \t\t} \r\n \t}", "public void onLaunchPreferenceActivitySelected(Context context);", "public void setUserPreferences(final BwPreferences val) {\n userPreferences = val;\n }", "private void checkPreferences() {\n final Editor editor = AppUtils.getInstance().pPrefs.edit();\n boolean changed = false;\n if (AppUtils.getInstance().pPrefs.getString(Api.PREF_MODE, \"\").length() == 0) {\n editor.putString(Api.PREF_MODE, Api.MODE_WHITELIST);\n changed = true;\n }\n if (changed)\n editor.commit();\n }", "public void onSettingChanged(ListPreference pref) {\n\t\tLog.v(\"yang\", \"+++ onSettingChanged: \" + pref.getKey() + \" +++ \");\n\t\tif (notSame(pref, CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL,\n\t\t\t\tmActivity.getString(R.string.pref_video_time_lapse_frame_interval_default))) {\n\t\t\tListPreference hfrPref = mPreferenceGroup.findPreference(CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE);\n\t\t\tif (hfrPref != null && !\"off\".equals(hfrPref.getValue())) {\n\t\t\t\tRotateTextToast.makeText(mActivity, R.string.error_app_unsupported_hfr_selection,Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\tsetPreference(CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE, \"off\");\n\t\t}\n\t\tif (notSame(pref, CameraSettings.KEY_VIDEO_HIGH_FRAME_RATE, \"off\")) {\n\t\t\tString defaultValue = mActivity.getString(R.string.pref_video_time_lapse_frame_interval_default);\n\t\t\tListPreference lapsePref = mPreferenceGroup.findPreference(CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL);\n\t\t\tif (lapsePref != null && !defaultValue.equals(lapsePref.getValue())) {\n\t\t\t\tRotateTextToast.makeText(mActivity, R.string.error_app_unsupported_hfr_selection,Toast.LENGTH_LONG).show();\n\t\t\t}\n\t\t\tsetPreference(CameraSettings.KEY_VIDEO_TIME_LAPSE_FRAME_INTERVAL, defaultValue);\n\t\t}\n\t\tif (notSame(pref, CameraSettings.KEY_RECORD_LOCATION, \"off\")) {\n\t\t\tmActivity.requestLocationPermission();\n\t\t}\n\t\tsuper.onSettingChanged(pref);\t// call VideoModule's CameraPreference.OnPreferenceChangedListener\n\t\tLog.v(\"yang\", \"--- onSettingChanged: \" + pref.getKey() + \" --- \" );\n\t}", "private void setPreferences(Preferences preferences) {\n this.preferences = preferences;\n }", "@Override\n\tpublic void onCreate() {\n\t\tsuper.onCreate();\n\t\t\n\t\tthis.prefs = PreferenceManager.getDefaultSharedPreferences(this);\n\t\t/*\n\t\t * Each app has its own shared preferences available to all components\n\t\t * of the app and this loads the default preferences that are saved on\n\t\t * the phone\n\t\t */\n\t\tthis.prefs.registerOnSharedPreferenceChangeListener(this);\n\t\t/*\n\t\t * Each user can change preferences. So this listener is a mechanism to\n\t\t * notify this activity that the old values are stale\n\t\t */\n\t}", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n updateView(key);\n }", "protected void onResume () {\n super.onResume();\n this.verifyPreferences ();\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n\n // Load the preferences from an XML resource\n addPreferencesFromResource(R.xml.preferences);\n\n wifi = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI);\n wifiData = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_WIFI_DATA);\n data = (CheckBoxPreference) findPreference(KEY_PREF_UPLOAD_DATA);\n\n wifi.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n data.setChecked(false);\n wifi.setChecked(true);\n }\n return true;\n }\n });\n\n wifiData.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifi.setChecked(false);\n data.setChecked(false);\n wifiData.setChecked(true);\n }\n return true;\n }\n });\n\n data.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newVal) {\n final boolean value = (Boolean) newVal;\n if(value) {\n wifiData.setChecked(false);\n wifi.setChecked(false);\n data.setChecked(true);\n }\n return true;\n }\n });\n\n Preference button = findPreference(KEY_PREF_UPDATE);\n button.setSummary(getString(R.string.current_version) + \" \" + ApplicationController.VERSION);\n\n button.setOnPreferenceClickListener(new Preference.OnPreferenceClickListener() {\n @Override\n public boolean onPreferenceClick(Preference preference) {\n UpdateController.getInstance(getActivity()).checkVersion();\n return true;\n }\n });\n }", "@Override\n public void onResume() {\n super.onResume();\n\n getPreferenceManager().getSharedPreferences().registerOnSharedPreferenceChangeListener(this);\n }", "public void savePreferences(SharedPreferences preferences){\r\n\t\tSharedPreferences.Editor editor = preferences.edit();\r\n editor.putBoolean(\"initialSetupped\", initialSetuped);\r\n editor.putString(\"username\", userName);\r\n editor.putString(\"useremail\", userEmail);\r\n editor.putString(\"recipientemail\", recipientEmail);\r\n editor.putBoolean(\"option\", option.isPound());\r\n\r\n // Commit the edits!\r\n editor.commit();\r\n\t}", "protected void onPref(String name, String value){}", "private void showUserPreferences() {\r\n MyAccount ma = state.getMyAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n mOriginName.setEnabled(!ma.isPersistent());\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary = new StringBuilder(this.getText(R.string.summary_preference_username));\r\n if (ma.getUsername().length() > 0) {\r\n summary.append(\": \" + ma.getUsername());\r\n } else {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(ma.canSetUsername());\r\n\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(ma.canChangeOAuth());\r\n\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(ma.getConnection().isPasswordNeeded());\r\n\r\n int titleResId;\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (ma.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n mVerifyCredentials.setTitle(titleResId);\r\n mVerifyCredentials.setSummary(summary);\r\n mVerifyCredentials.setEnabled(ma.isOAuth() || ma.getCredentialsPresent());\r\n }", "private void changePreferences (String prefItem, String prefValue){\n SharedPreferences.Editor prefEditor = sharedPreferences.edit();\n //store the cards array and append the deck id\n prefEditor.putString(prefItem, prefValue);\n prefEditor.apply();\n }", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if (key.equals(getString(R.string.pref_driver_key))) {\n setDriver(sharedPreferences);\n } else if (key.equals(getString(R.string.pref_track_key))) {\n setTrack(sharedPreferences);\n }\n }", "public void save() {\n savePrefs();\n }", "public void onActive() {\n super.onActive();\n this.f5335l.registerOnSharedPreferenceChangeListener(this);\n }", "public void setPreferences(Preferences preferences) {\n\n this.preferences = preferences;\n }", "public void setUserPreferences (int outdoorPref, int nightlifePref, int hotelPref, int shoppingPref, int restaurantPref) {\n\t\tpreferences.clear(); \n\t\tpreferences.add(outdoorPref); \n\t\tpreferences.add(nightlifePref); \n\t\tpreferences.add(hotelPref); \n\t\tpreferences.add(shoppingPref); \n\t\tpreferences.add(restaurantPref); \n\t}", "@SuppressLint(\"CommitPrefEdits\")\n @Override\n public void onLoadFinished(Loader<SharedPreferences> loader,\n SharedPreferences prefs) {\n }", "@Override\n protected void onPause() {\n getPreferenceScreen().getSharedPreferences().unregisterOnSharedPreferenceChangeListener(this);\n \n super.onPause();\n }", "@Override\n\t@SuppressWarnings(\"deprecation\")\n\tprotected void onResume() {\n\t\tsuper.onResume();\n\t\tgetPreferenceScreen().getSharedPreferences()\n\t\t\t\t.registerOnSharedPreferenceChangeListener(this);\n\n\t}", "public void handlePreferences(ApplicationEvent evt) {\n OptionManager om = (OptionManager) bio.getManager(OptionManager.class);\n if (om == null) evt.setHandled(false);\n else {\n evt.setHandled(true);\n om.fileOptions();\n }\n }", "public void setPreference() {\n prefs = Preferences.userRoot().node(this.getClass().getName());\n String ID1 = \"Test1\";\n String ID2 = \"Test2\";\n String ID3 = \"Test3\";\n// First we will get the values\n// Define a boolean value\n System.out.println(prefs.getBoolean(ID1, true));\n// Define a string with default \"Hello World\n System.out.println(prefs.get(ID2, \"Hello World\"));\n// Define a integer with default 50\n System.out.println(prefs.getInt(ID3, 50));\n// Now set the values\n prefs.putBoolean(ID1, false);\n prefs.put(ID2, \"Hello Europa\");\n prefs.putInt(ID3, 45);\n\t\t\n prefs.remove(ID1);// Delete the preference settings for the first value\n }", "public void save () {\n preference.putBoolean(\"sound effect\", hasSoundOn);\n preference.putBoolean(\"background music\", hasMusicOn);\n preference.putFloat(\"sound volume\", soundVolume);\n preference.putFloat(\"music volume\", musicVolume);\n preference.flush(); //this is called to write the changed data into the file\n }", "private void showUserPreferences() {\r\n MyAccount ma = state.getAccount();\r\n \r\n mOriginName.setValue(ma.getOriginName());\r\n SharedPreferencesUtil.showListPreference(this, MyAccount.Builder.KEY_ORIGIN_NAME, R.array.origin_system_entries, R.array.origin_system_entries, R.string.summary_preference_origin_system);\r\n \r\n mOriginName.setEnabled(!state.builder.isPersistent() && TextUtils.isEmpty(ma.getUsername()));\r\n \r\n if (mEditTextUsername.getText() == null\r\n || ma.getUsername().compareTo(mEditTextUsername.getText()) != 0) {\r\n mEditTextUsername.setText(ma.getUsername());\r\n }\r\n StringBuilder summary;\r\n if (ma.getUsername().length() > 0) {\r\n summary = new StringBuilder(ma.getUsername());\r\n } else {\r\n summary = new StringBuilder(this.getText(ma.alternativeTermForResourceId(R.string.summary_preference_username)));\r\n }\r\n mEditTextUsername.setDialogTitle(this.getText(ma.alternativeTermForResourceId(R.string.dialog_title_preference_username)));\r\n mEditTextUsername.setTitle(this.getText(ma.alternativeTermForResourceId(R.string.title_preference_username)));\r\n mEditTextUsername.setSummary(summary);\r\n mEditTextUsername.setEnabled(!state.builder.isPersistent() && !ma.isUsernameValidToStartAddingNewAccount());\r\n \r\n boolean isNeeded = ma.canChangeOAuth();\r\n if (ma.isOAuth() != mOAuth.isChecked()) {\r\n mOAuth.setChecked(ma.isOAuth());\r\n }\r\n // In fact, we should hide it if not enabled, but I couldn't find an easy way for this...\r\n mOAuth.setEnabled(isNeeded);\r\n if (isNeeded) {\r\n mOAuth.setTitle(R.string.title_preference_oauth);\r\n mOAuth.setSummary(ma.isOAuth() ? R.string.summary_preference_oauth_on : R.string.summary_preference_oauth_off);\r\n } else {\r\n mOAuth.setTitle(\"\");\r\n mOAuth.setSummary(\"\");\r\n }\r\n \r\n isNeeded = ma.getConnection().isPasswordNeeded();\r\n if (mEditTextPassword.getText() == null\r\n || ma.getPassword().compareTo(mEditTextPassword.getText()) != 0) {\r\n mEditTextPassword.setText(ma.getPassword());\r\n }\r\n if (isNeeded) {\r\n mEditTextPassword.setTitle(R.string.title_preference_password);\r\n summary = new StringBuilder(this.getText(R.string.summary_preference_password));\r\n if (TextUtils.isEmpty(ma.getPassword())) {\r\n summary.append(\": (\" + this.getText(R.string.not_set) + \")\");\r\n }\r\n } else {\r\n summary = null;\r\n mEditTextPassword.setTitle(\"\");\r\n }\r\n mEditTextPassword.setSummary(summary);\r\n mEditTextPassword.setEnabled(isNeeded);\r\n \r\n int titleResId;\r\n boolean addAccountOrVerifyCredentialsEnabled = ma.isOAuth() || ma.getCredentialsPresent();\r\n switch (ma.getCredentialsVerified()) {\r\n case SUCCEEDED:\r\n titleResId = R.string.title_preference_verify_credentials;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials));\r\n break;\r\n default:\r\n if (state.builder.isPersistent()) {\r\n titleResId = R.string.title_preference_verify_credentials_failed;\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_verify_credentials_failed));\r\n } else {\r\n if (!ma.isUsernameValidToStartAddingNewAccount()) {\r\n addAccountOrVerifyCredentialsEnabled = false;\r\n }\r\n titleResId = R.string.title_preference_add_account;\r\n if (ma.isOAuth()) {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_oauth));\r\n } else {\r\n summary = new StringBuilder(\r\n this.getText(R.string.summary_preference_add_account_basic));\r\n }\r\n }\r\n break;\r\n }\r\n addAccountOrVerifyCredentials.setTitle(titleResId);\r\n addAccountOrVerifyCredentials.setSummary(summary);\r\n addAccountOrVerifyCredentials.setEnabled(addAccountOrVerifyCredentialsEnabled);\r\n }", "public synchronized void onSharedPreferenceChanged(SharedPreferences sharedPrefs, String key){\n\t\tif(key.equals(\"vibrate_feedback\")){\n\t\t\tLog.d(TAG_APPLICATION,\"Vibrate setting changed\");\n\t\t\tisVibrateFeedbackOn = sharedPrefs.getBoolean(key,false);\n\t\t\tLog.d(TAG_APPLICATION, \"vibrate value changed to \"+isVibrateFeedbackOn);\n\t\t}\n\t\tif(key.equals(\"alert_feedback\")){\n\t\t\tLog.d(TAG_APPLICATION,\"Alert setting changed\");\n\t\t\tisSoundFeedbackOn = sharedPrefs.getBoolean(key, false);\n\t\t\tLog.d(TAG_APPLICATION, \"Alert setting changed to \"+isSoundFeedbackOn);\n\t\t}\n\t\tif(key.equals(\"set_threshold\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_threshold\", \"3.0\").equals(\"\"))){\n\t\t\t\tthresholdSetting = Float.parseFloat(sharedPrefs.getString(\"set_threshold\", \"3.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"threshold Setting changed to \"+thresholdSetting);\n\t\t\t} else\n\t\t\t\tthresholdSetting = 3.0f;\n\t\t}\n\t\tif(key.equals(\"set_height\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_height\", \"1.83\").equals(\"\"))){\n\t\t\t\tpersonsHeight = Float.parseFloat(sharedPrefs.getString(\"set_height\", \"1.83\"));\n\t\t\t\t//Segment.initialCross[0][2] = 100*personsHeight*3/(8*GRID_ROWS*2); // getting changed height setting from shared preference\n\t\t\t\t//Segment.initialCross[2][2] = -100*personsHeight*3/(8*GRID_ROWS*2);\n\t\t\t\t//Log.d(TAG_APPLICATION, \"acc segment distance changed to \"+accSegmentDistance+\" Persons height: \"+personsHeight+\"$\"+ 100*personsHeight*3/(8*GRID_ROWS*2)+\"$segments coords: \"+Segment.initialCross[0][2]+\" \"+Segment.initialCross[1][2]+\" \"+Segment.initialCross[2][2]+\" \"+Segment.initialCross[3][2]);\n\t\t\t} else{\n\t\t\t\t//Segment.initialCross[0][2] = (float)100*1.83f*3/(8*GRID_ROWS*2); // getting changed height setting from shared preference\n\t\t\t // Segment.initialCross[2][2] = (float)-100*1.83f*3/(8*GRID_ROWS*2)key.;\n\t\t\t}\n\t\t}\n\t\tif(key.equals(\"set_statistics_interval\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_statistics_interval\", \"1.0\").equals(\"\"))){\n\t\t\t\tstatisticsIntervalSetting=Float.parseFloat(sharedPrefs.getString(\"set_statistics_interval\", \"1.0\"));\n\t\t\t\tLog.d(\"statistics updated\",\"\"+statisticsIntervalSetting);\n\t\t\t}\n\t\t\telse{\n\t\t\t\tstatisticsIntervalSetting=1.0f;\n\t\t\t\tLog.d(\"statistics updated\",\"\"+statisticsIntervalSetting);\n\t\t\t}\n\t\t\t\t\n\t\t\t\n\t\t}\n\t\tif(key.equals(\"select_algorithm\")){\n\t\t\talgorithm = sharedPrefs.getString(\"select_algorithm\", \"distances\");\n\t\t\tLog.d(TAG_APPLICATION, \"algorithm select setting changed to \"+algorithm );\n\t\t}\n\t\tif(key.equals(\"log_enable\")){\n\t\t\tisLoggingFeatureEnabled=sharedPrefs.getBoolean(key,false);\n\t\t\tLog.d(TAG_APPLICATION, \"log enable setting changed to \"+ isLoggingFeatureEnabled);\n\t\t\t\n\t\t}\n\t\tif(key.equals(\"set_angle1\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_angle1\", \"0.0\").equals(\"\"))){\n\t\t\t\tZ_ANGLE1 = Float.parseFloat(sharedPrefs.getString(\"set_angle1\", \"0.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"angle1 changed to \"+Z_ANGLE1);\n\t\t\t} else{\n\t\t\t\tZ_ANGLE1 = 0.0f;\n\t\t }\n\t\t\tfor(int i=0;i<GRID_ROWS;i++){\n\t\t\t\tcurrentStateSegments[i][0].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegments[i][0].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegmentsInitial[i][0].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE1));\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[i][6].setSegmentZRotation((float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegments[i][6].setSegmentZRotation((float)Math.toRadians(Z_ANGLE1));\n\t\t\t\trefferenceStateSegmentsInitial[i][6].setSegmentZRotation((float)Math.toRadians(Z_ANGLE1));\n\t\t\t}\n\t\t}\n\t\tif(key.equals(\"set_angle2\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_angle2\", \"0.0\").equals(\"\"))){\n\t\t\t\tZ_ANGLE2 = Float.parseFloat(sharedPrefs.getString(\"set_angle2\", \"0.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"angle2 changed to \"+Z_ANGLE2);\n\t\t\t} else{\n\t\t\t\tZ_ANGLE2 = 0.0f;\n\t\t }\n\t\t\t\n\t\t\tfor(int i=0;i<GRID_ROWS;i++){\n\t\t\t\tcurrentStateSegments[i][1].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegments[i][1].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegmentsInitial[i][1].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE2));\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[i][5].setSegmentZRotation((float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegments[i][5].setSegmentZRotation((float)Math.toRadians(Z_ANGLE2));\n\t\t\t\trefferenceStateSegmentsInitial[i][5].setSegmentZRotation((float)Math.toRadians(Z_ANGLE2));\n\t\t\t}\n\n\t\t}\n\t\t\n\t\tif(key.equals(\"set_angle3\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_angle3\", \"0.0\").equals(\"\"))){\n\t\t\t\tZ_ANGLE3 = Float.parseFloat(sharedPrefs.getString(\"set_angle3\", \"0.0\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"angle3 changed to \"+Z_ANGLE3);\n\t\t\t} else{\n\t\t\t\tZ_ANGLE3 = 0.0f;\n\t\t }\n\t\t\t\n\t\t\tfor(int i=0;i<GRID_ROWS;i++){\n\t\t\t\tcurrentStateSegments[i][2].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegments[i][2].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegmentsInitial[i][2].setSegmentZRotation(-(float)Math.toRadians(Z_ANGLE3));\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[i][4].setSegmentZRotation((float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegments[i][4].setSegmentZRotation((float)Math.toRadians(Z_ANGLE3));\n\t\t\t\trefferenceStateSegmentsInitial[i][4].setSegmentZRotation((float)Math.toRadians(Z_ANGLE3));\n\t\t\t}\n\t\t}\n\t\t\n\t\tif(key.equals(\"set_reference_row\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_reference_row\", \"1\").equals(\"\"))){\n\t\t\t\treferenceRow = Integer.parseInt(sharedPrefs.getString(\"set_reference_row\", \"1\")); // getting changed threshold setting from shared preference\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegments, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegmentsInitial, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tsaveDefaultPosture(SmartWearApplication.DEFAULT_POSTURE_FILE, refferenceStateSegments);\n\t\t\t\t\n\t\t\t\tLog.d(TAG_APPLICATION, \"reference row changed to \"+referenceRow);\n\t\t\t} else{\n\t\t\t\treferenceRow = 1;\n\t\t }\n\t\t}\n\t\t\n\t\tif(key.equals(\"set_reference_col\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_reference_col\", \"3\").equals(\"\"))){\n\t\t\t\treferenceCol = Integer.parseInt(sharedPrefs.getString(\"set_reference_col\", \"3\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"reference col changed to \"+referenceCol);\n\t\t\t\t\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\tcurrentStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\t\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegments[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[0]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[1]=0;\n\t\t\t\trefferenceStateSegmentsInitial[referenceRow][referenceCol].center[2]=0;\n\t\t\t\t\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegments, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tSegment.setSegmentCenters(refferenceStateSegmentsInitial, (short)getReferenceRow(), (short)getReferenceCol());\n\t\t\t\tsaveDefaultPosture(SmartWearApplication.DEFAULT_POSTURE_FILE, refferenceStateSegments);\n\t\t\t} else{\n\t\t\t\treferenceCol = 3;\n\t\t }\n\t\t}\n\t\tif(key.equals(\"set_colormap_sensitivity\")){\n\t\t\tif(!(sharedPrefs.getString(\"set_colormap_sensitivity\", \"1\").equals(\"\"))){\n\t\t\t\tcolormapSensitivity = Float.parseFloat(sharedPrefs.getString(\"set_colormap_sensitivity\", \"1\")); // getting changed threshold setting from shared preference\n\t\t\t\tLog.d(TAG_APPLICATION, \"colormap sensitivity changed to \"+colormapSensitivity);\n\t\t\t} else{\n\t\t\t\tcolormapSensitivity = 1;\n\t\t }\n\t\t}\n\t}", "@Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n if(updateAddress(newValue.toString()) == true) {\n Log.d(TAG, \"Updated preference.\");\n EditTextPreference editedUrl = (EditTextPreference) findPreference(\"url\");\n editedUrl.setSummary(newValue.toString());\n return true;\n }\n else\n return false;\n }", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.preferences, rootKey);\n\n Preference themePreference = findPreference(\"dark_theme\");\n if(themePreference != null) {\n themePreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n mainActivity.toggleTheme((boolean) newValue);\n return true;\n }\n });\n }\n }", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String s) {\n if (s.equals(Utils.KEY_REQUESTING_LOCATION_UPDATES)) {\n setButtonsState(sharedPreferences.getBoolean(Utils.KEY_REQUESTING_LOCATION_UPDATES,\n false));\n }\n }", "@Override\n protected void onPause() {\n super.onPause();\n\n SharedPreferences.Editor preferencesEditor = mPreferences.edit();\n preferencesEditor.putString(FULLNAME_KEY, myFullname);\n preferencesEditor.apply();\n }", "@Override\n public void onPause() {\n SharedPreferences.Editor editor = savedValues.edit();\n editor.putInt(\"num1\", num1);\n editor.putInt(\"num2\", num2);\n editor.commit();\n\n super.onPause();\n }", "private void saveSharedPref() {\n SharedPreferences.Editor editor = this.sharedPreferences.edit();\n if (checkBox.isChecked()) {\n editor.putBoolean(Constants.SP_IS_REMEMBERED_KEY, true);\n }\n editor.apply();\n }", "private void preferences() {\n\tstartActivity (new Intent(getApplicationContext(), PushPreferencesActivity.class));\n}", "private void updatePreferences() {\n SharedPreferences prefs =\n PreferenceManager.getDefaultSharedPreferences(this);\n\n // See if we want to keep alive.\n boolean keepAwake = false;\n try {\n keepAwake = prefs.getBoolean(\"keepAwake\", false);\n } catch (Exception e) {\n Log.e(TAG, \"Pref: bad keepAwake\");\n }\n if (keepAwake) {\n Log.i(TAG, \"Prefs: keepAwake true: take the wake lock\");\n if (wakeLock == null)\n wakeLock = powerManager.newWakeLock(PowerManager.SCREEN_DIM_WAKE_LOCK, \"My Tag\");\n if (!wakeLock.isHeld())\n wakeLock.acquire();\n } else {\n Log.i(TAG, \"Prefs: keepAwake false: release the wake lock\");\n if (wakeLock != null && wakeLock.isHeld())\n wakeLock.release();\n wakeLock = null;\n }\n }", "@Override\n\tprotected void onActivityResult(int requestCode, int resultCode, Intent data) {\n\t\tloadPref();\n\t}", "@Override\n protected void onPause() {\n prefs.saveHighestScore(score.getScore());\n prefs.seState(currentQuestionIndex);\n super.onPause();\n }", "public void save() {\n\t\tpreferences().flush();\n\t}", "@Override\n public void onPause() {\n super.onPause();\n getPreferenceManager().getSharedPreferences().\n unregisterOnSharedPreferenceChangeListener(this);\n }", "private void loadSettings(){\n SharedPreferences sharedPreferences = getActivity().getSharedPreferences(SHARED_PREF, Context.MODE_PRIVATE);\n notificationSwtich = sharedPreferences.getBoolean(SWITCH, false);\n reminderOnOff.setChecked(notificationSwtich);\n }", "@SuppressWarnings(\"deprecation\")\n\tpublic void onSharedPreferenceChanged(SharedPreferences sharedPreferences,\n\t\t\tString key) {\n\t\t// 갱신 시간 간격\n\t\tif (key.equals(IBRConstants.KEY_PREF_REFRESH_INTERVAL)) {\n\t\t\tPreference refreshInterval = findPreference(key);\n\t\t\tint position = Integer.parseInt(sharedPreferences\n\t\t\t\t\t.getString(key, \"\"));\n\t\t\t// Set summary to be the user-description for the selected value\n\t\t\trefreshInterval.setSummary(mRefreshIntervals[position]);\n\n setLocationFinderRefreshInterval(position);\n\n\t\t} else if (key.equals(IBRConstants.KEY_PREF_FACEBOOK_PROFILE)) {\n Preference refreshInterval = findPreference(key);\n boolean isChecked =sharedPreferences\n .getBoolean(key, true);\n\n sendFacebookProfilePolicyToServer(isChecked);\n\n }\n\t\t// else if (key.equals(PBNConstants.KEY_PREF_ZOOM_LEVEL)) {\n\t\t// eventLabel = \"keep_draft\";\n\t\t// boolean value = sharedPreferences.getBoolean(key, false);\n\t\t// eventValue = (value) ? 1 : 0;\n\t\t//\n\t\t// }\n\t}", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n switch (key) {\n\n case MZ_SHOW:\n showMZ(sharedPreferences.getBoolean(MZ_SHOW, true));\n break;\n\n case PREF_MZ_DELETE_FLAG:\n if (sharedPreferences.getBoolean(PREF_MZ_DELETE_FLAG, false)){\n removeMZ();\n }\n sharedPreferences.edit().putBoolean(PREF_MZ_DELETE_FLAG, false).apply();\n break;\n\n case GPS_ACTIVATED:\n gps();\n break;\n\n }\n\n }", "private void initPreferencesListener()\n {\n Activator.getDefault().getPreferenceStore().addPropertyChangeListener( new IPropertyChangeListener()\n {\n /* (non-Javadoc)\n * @see org.eclipse.jface.util.IPropertyChangeListener#propertyChange(org.eclipse.jface.util.PropertyChangeEvent)\n */\n public void propertyChange( PropertyChangeEvent event )\n {\n if ( authorizedPrefs.contains( event.getProperty() ) )\n {\n if ( PluginConstants.PREFS_SCHEMA_VIEW_GROUPING == event.getProperty() )\n {\n view.reloadViewer();\n }\n else\n {\n view.refresh();\n }\n }\n }\n } );\n }", "private void loadPreferences() {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n boolean lm = sp.getBoolean(getString(R.string.live_match), true);\n boolean ls = sp.getBoolean(getString(R.string.live_score), true);\n\n if(lm) live_match.setChecked(true);\n else live_match.setChecked(false);\n\n if(ls) live_score.setChecked(true);\n else live_score.setChecked(false);\n }", "public String prefsAutomaticallyCheck();", "@Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n String difficultySummary = \"Username: \" + newValue;\n usernamePref.setSummary(difficultySummary);\n // Since we are handling the pref, we must save it\n SharedPreferences.Editor ed = sharedPrefs.edit();\n name = newValue.toString();\n ed.putString(\"user_id\", newValue.toString());\n ed.apply();\n return true;\n }", "@Override\r\n\tpublic void pause() {\n Settings.save();\r\n\t\t\r\n\t}", "protected void changePreferences(CheckBox preference, CheckBox[] preferenceButtons) {\n SharedPreferences preferences = getApplicationContext().getSharedPreferences(\"Preferences\", Context.MODE_PRIVATE);\n Editor prefEdit = preferences.edit();\n if (preference.isChecked()) {\n prefEdit.putBoolean(String.valueOf(preference.getId()), true).apply();\n } else {\n prefEdit.putBoolean(String.valueOf(preference.getId()), false).apply();\n }\n\n for (CheckBox preferenceButton : preferenceButtons) {\n if (preferences.getBoolean(String.valueOf(preferenceButton.getId()), false))\n return;\n }\n prefEdit.putBoolean(String.valueOf(preferenceButtons[1].getId()), true).apply();\n checkBoxIfInPreference(preferenceButtons[1]);\n }", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if (key.equals(getString(R.string.pref_show_distance_key))) {\n boolean isChecked = sharedPreferences.getBoolean(getString(R.string.pref_show_distance_key),\n Boolean.parseBoolean(getString(R.string.pref_show_distance_default)));\n storeOnlyShowLocationDataInDatabase(isChecked);\n }\n }", "@Override\r\n\tpublic void onSharedPreferenceChanged(SharedPreferences sharedPreferences,\r\n\t\t\tString key) {\n\t\tupdatePrefSummary(findPreference(key));\r\n\r\n\t}", "protected void onAppsChanged() {\n\t\t\n\t}", "public void updateUserPrefs(UserPrefs prefs) {\n // Get the backup path in the Text Field\n String backup = tfBackupPath.getText().trim();\n\n // Nothing there, so add default based on username - this is OK\n if(backup.length() == 0) {\n backup = DataFiler.getDefaultBackupFolder(prefs.getUserName());\n }\n\n prefs.putProperty(UserPrefs.BACKUP_FOLDER, backup);\n\n prefs.putProperty(UserPrefs.BACKUP, cbBackUpOnExit.isSelected());\n prefs.putProperty(UserPrefs.SAVE_NAG_MINS, tfNagSave.getText().trim());\n\n try {\n int mins = Integer.parseInt(tfNagSave.getText().trim());\n MainFrame.getInstance().mainMenu.actionSave.setNagInterval(mins);\n }\n catch(Exception ex) {\n //MainFrame.getInstance().mainMenu.actionSave.setNagInterval(0);\n }\n\n prefs.putProperty(UserPrefs.MESSAGE_QUOTE, cbIncludeText.isSelected());\n\n LookAndFeel lf = (LookAndFeel)cbLookAndFeel.getSelectedItem();\n prefs.putProperty(UserPrefs.APP_LOOK_FEEL, lf.getClassName());\n\n prefs.putProperty(UserPrefs.STATUS_MESSAGES, cbShowStatusMessages.isSelected());\n }", "@Override\n public void onCreate(Bundle savedInstanceState) {\n super.onCreate(savedInstanceState);\n addPreferencesFromResource(R.xml.framework_setting);\n SharedPreferences sharedPreferences = this.getPreferenceManager().getSharedPreferences();\n String preference_smartbar_default_type = getResources().getString(R.string.preference_smartbar_default_type);\n final ListPreference listPreference = (ListPreference) findPreference(preference_smartbar_default_type);\n //修改Smartbar类型\n String smart_type = sharedPreferences.getString(preference_smartbar_default_type, null);\n int index = listPreference.findIndexOfValue(String.valueOf(smart_type));\n if (index != -1) {\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n }\n if (listPreference != null) {\n listPreference.setOnPreferenceChangeListener(new Preference.OnPreferenceChangeListener() {\n @Override\n public boolean onPreferenceChange(Preference preference, Object newValue) {\n int index = listPreference.findIndexOfValue(newValue.toString());\n CharSequence[] entries = listPreference.getEntries();\n listPreference.setTitle(entries[index]);\n return true;\n }\n });\n }\n }", "@Override\n public void onCreatePreferences(Bundle savedInstanceState, String rootKey) {\n setPreferencesFromResource(R.xml.prefs, rootKey);\n setVersionName();\n }", "public void setPrefs(GamePreferences prefs) {\n\t\tthis.prefs = prefs;\n\t}", "public final void mo32362c() {\n Editor edit = PreferenceManager.getDefaultSharedPreferences(C13499h.m39721g()).edit();\n edit.putString(\"com.facebook.appevents.SourceApplicationInfo.callingApplicationPackage\", this.f34929a);\n edit.putBoolean(\"com.facebook.appevents.SourceApplicationInfo.openedByApplink\", this.f34930b);\n edit.apply();\n }", "@Override\n\tprotected void okPressed() {\n\t\tfor (int i = 0; i < LAST_USED_PREF_IDS.length; i++) {\n\t\t\tlatencyPrefs.setValue(LAST_USED_PREF_IDS[i], localValues.get(LAST_USED_PREF_IDS[i]));\n\t\t}\n\t\t// Save the show dialog pref\n\t\tlatencyPrefs.setValue(Constants.DONT_SHOW_DIALOG, dontShowDialog);\n\t\tsavePreferences();\n\n\t\tsuper.okPressed();\n\t}", "@Override\n public void onSharedPreferenceChanged(SharedPreferences sharedPreferences, String key) {\n if (key.equals(KEY_SWITCH_PREFERENCE)) {\n boolean bool = sharedPreferences.getBoolean(key, true);\n if (bool == Boolean.FALSE) {\n NotificationManager manager = (NotificationManager) getSystemService(Context.NOTIFICATION_SERVICE);\n manager.cancelAll();\n }\n }\n }", "private void setupSharedPreferences() {\n SharedPreferences sharedPreferences = PreferenceManager.getDefaultSharedPreferences(this);\n\n String aaString = sharedPreferences.getString(getString(R.string.pref_antalAktier_key), getString(R.string.pref_antalAktier_default));\n// float aaFloat = Float.parseFloat(aaString);\n editTextAntalAktier.setText(aaString);\n\n String kk = sharedPreferences.getString(getString(R.string.pref_koebskurs_key), getString(R.string.pref_koebskurs__default));\n editTextKoebskurs.setText(kk);\n\n String k = sharedPreferences.getString(getString(R.string.pref_kurtage_key), getString(R.string.pref_kurtage_default));\n editTextKurtage.setText(k);\n\n// float minSize = Float.parseFloat(sharedPreferences.getString(getString(R.string.pref_size_key),\n// getString(R.string.pref_size_default)));\n// mVisualizerView.setMinSizeScale(minSize);\n\n // Register the listener\n sharedPreferences.registerOnSharedPreferenceChangeListener(this);\n }", "void updatePreferences(List<IPreference> prefs);", "@Override\r\n\tpublic boolean onPreferenceChange(Preference preference, Object newValue) {\n\t\tmcallback.onReturnFromPreFragment(3);\r\n\t\treturn false;\r\n\t}", "public void onResume() {\n super.onResume();\n Log.i(tag, \"onResume\");\n handlePing();\n if (ControlWidget.getPreferenceInt(getApplicationContext(), \"redirect_widget_settings\") == 1) {\n Log.i(tag, \"redirect_widget_settings 1, redirect to widget settings\");\n ControlWidget.setPreferenceInt(getApplicationContext(), \"redirect_widget_settings\", 0);\n attemptToJumpToWidgetSettings();\n }\n }", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tsiv_update.changeSwitchStatus();\n\t\t\t\tEditor editor = sharedPreferences.edit();\n\t\t\t\teditor.putBoolean(MobileGuard.APP_AUTO_UPDATE,\n\t\t\t\t\t\tsiv_update.getSwitchStatus());\n\t\t\t\teditor.commit();\n\t\t\t}", "public void savingVariablesWebConfig(){\n SharedPreferences prefs = getSharedPreferences(Constants.PREFERENCES_NAME, Context.MODE_PRIVATE);\n //Save data of user in preferences\n SharedPreferences.Editor editor = prefs.edit();\n\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_ACCEPTED, \"3\");\n editor.putString(Constants.PREF_VALUE_MAX_ORDERS_VISIBLE, \"10\");\n editor.putString(Constants.PREF_VALUE_MAX_TIME_ORDERS, \"15\");\n editor.commit();\n }", "@Override\n\t@SuppressWarnings(\"deprecation\")\n\tprotected void onPause() {\n\t\tsuper.onPause();\n\t\tgetPreferenceScreen().getSharedPreferences()\n\t\t\t\t.unregisterOnSharedPreferenceChangeListener(this);\n\t}", "private void setPreferences(String sw, boolean checked) {\n SharedPreferences sp = getActivity().getSharedPreferences(SETTINGS, Context.MODE_PRIVATE );\n SharedPreferences.Editor editor = sp.edit();\n editor.putBoolean(sw,checked);\n editor.apply();\n\n }", "@Override\n\tpublic void onPause() {\n\t\tsuper.onPause();\n\n\t\tSystem.out.println(\"!!!!!!!!!!!!!!!onPause\");\n\t\tLanguageConvertPreferenceClass.loadLocale(getApplicationContext());\n\n\t}", "public void fireUISettingsChanged() {\n UISettingsListener[] listeners= myListenerList.getListeners(UISettingsListener.class);\n for (UISettingsListener listener : listeners) {\n listener.uiSettingsChanged(this);\n }\n }", "public void UpdatePrefs()\r\n {\r\n \t\r\n \t// Data from the first name field is being stored into persistent storage\r\n \teditor.putString\r\n \t(\"name\", \r\n \tfNameField.getText()\r\n \t.toString());\r\n \t\r\n \t// Data from the last name field is being stored into persistent storage\r\n editor.putString\r\n (\"lName\",\r\n lNameField.getText()\r\n .toString());\r\n \r\n // Data from the phone number field is being stored into persistent storage\r\n editor.putString\r\n (\"phoneNum\"\r\n , phoneNumField.getText()\r\n .toString());\r\n \r\n // Data from the address field is being stored into persistent storage\r\n editor.putString\r\n (\"address\"\r\n , homeAddressField.getText()\r\n .toString());\r\n \r\n // Push all fields data to persistent storage forever\r\n editor.commit();\r\n }", "@Override\n public void onCreatePreferences(Bundle bundle, String s) {\n addPreferencesFromResource(R.xml.preferences);\n }" ]
[ "0.7421899", "0.72689795", "0.7011927", "0.6944882", "0.69063467", "0.6864405", "0.6854972", "0.68019885", "0.6779617", "0.67204416", "0.67204416", "0.6707394", "0.6665145", "0.6645453", "0.660813", "0.6602611", "0.6602438", "0.659931", "0.65968704", "0.6595268", "0.6575844", "0.6569651", "0.6565539", "0.6565539", "0.65128577", "0.65112996", "0.65097964", "0.6507672", "0.6495739", "0.6493946", "0.6483679", "0.64708656", "0.6443557", "0.6441705", "0.6430158", "0.6425686", "0.64183784", "0.6410137", "0.63990283", "0.6392921", "0.63901246", "0.63870096", "0.63679785", "0.6348853", "0.6337906", "0.6330671", "0.63288724", "0.6318203", "0.63148594", "0.63089335", "0.6302262", "0.63008547", "0.6287208", "0.6278071", "0.6266797", "0.6264858", "0.6260028", "0.62491095", "0.62134176", "0.6203871", "0.620273", "0.61950237", "0.6193441", "0.61929643", "0.6191897", "0.61793274", "0.6164899", "0.6161332", "0.6161213", "0.6160057", "0.61598766", "0.61532116", "0.61515385", "0.61466247", "0.6143667", "0.6142991", "0.614007", "0.6133247", "0.6130857", "0.61287624", "0.6124091", "0.6123373", "0.61176354", "0.6103832", "0.60973424", "0.6096191", "0.6091468", "0.6088167", "0.60874397", "0.60787696", "0.6075754", "0.6073978", "0.6072136", "0.6066219", "0.60637194", "0.6056085", "0.6035404", "0.60290027", "0.60257727", "0.60222757" ]
0.721267
2
first set up RECEIVER ((MyMessage)result).setReceiverId(this.selectedBook.getOwnerId()); if owner id is the same as user id, receiver will be get from messages if messages not null, otherwise receiver is the same is book owner id
private void startChatMessageFragment(ArrayList<MyMessage> messages) { if (this.selectedBook.getOwnerId().equals(this.userId)) { for (MyMessage message : messages) { if (!message.getReceiverId().equals(this.userId)) { this.receiverId = message.getReceiverId(); break; } else if (!message.getSenderId().equals(this.userId)) { this.receiverId = message.getSenderId(); break; } } } else { this.receiverId = this.selectedBook.getOwnerId(); } //if messages is empty if (messages.size() == 0) { MyMessage message = new MyMessage( " ", " ", " ", " ", " ", " ", false ); //if book is sender's book if (this.userId.equals(this.selectedBook.getOwnerId())) { //set message to message field not to add edittext field message.setText("MessageEnum.USER_OWNER"); } messages.add(message); } //update application status status = StatusEnum.STARTED_CHAT_MESSAGE; //hide search from menu this.menu.findItem(R.id.menu_search).setVisible(false); this.menu.findItem(R.id.add_book).setVisible(false); //open book view fragment //create bundle for fragment Bundle data = new Bundle(); data.putSerializable("Messages", messages); // Create new fragment and transaction chatMessageFragment = new ChatMessageFragment(); //set arguments/bundle to fragment chatMessageFragment.setArguments(data); // consider using Java coding conventions (upper first char class names!!!) FragmentTransaction transaction = getFragmentManager().beginTransaction(); // Replace whatever is in the fragment_container view with this fragment, // and add the transaction to the back stack transaction.replace(R.id.activityAfterLoginId, chatMessageFragment); transaction.addToBackStack(null); // Commit the transaction transaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void onChatMessageFragmentInteraction(MessageEnum message, Object result) {\n ((MyMessage)result).setSenderId(this.user.getUserId());\n ((MyMessage)result).setReceiverId(this.receiverId);\n ((MyMessage)result).setBookId(this.selectedBook.getBookId());\n //send message to message list\n databaseHandler.sendMessageToDatabase((MyMessage)result);\n //message should come back with reference change?\n }", "public void setReceiverId(int v) \n {\n \n if (this.receiverId != v)\n {\n this.receiverId = v;\n setModified(true);\n }\n \n \n }", "@Override\n public void onFragmentInteraction(MessageEnum message, Object result) {\n\n if (message == MessageEnum.ADD_BOOK) {\n ((Book)result).setOwnderId(user.getUserId());\n ((Book)result).setOwnerName(user.getUserName());\n ((Book)result).setOwnerLocation(user.getUserLocation());\n //first send book information without image,\n //wait for answer and then send image to firebase storage!!\n databaseHandler.sendBookToDatabase((Book)result);\n }\n else if (message == MessageEnum.GET_BOOK_IMAGE) {\n databaseHandler.getBookImage((Book)result);\n }\n else if (message == MessageEnum.CHAT){\n\n //if buyer, open chat view with owner\n //TODO else if owner, open chat view list with list of buyers\n if (!((Book)result).getOwnerId().equals(user.getUserId())) {\n\n //so not owner, open chat view\n //actually first get previous messages from Firebase database\n //regarding this bookid\n databaseHandler.getBookMessages((Book)result, this.user);\n }\n else {\n //TODO open with list of buyers.....\n databaseHandler.getBookMessages((Book)result, this.user);\n }\n }\n else if (message == MessageEnum.DELETE_BOOK) {\n databaseHandler.deleteBook ((Book)result);\n }\n\n }", "public int getReceiverid() {\n return receiverid_;\n }", "public int getReceiverid() {\n return receiverid_;\n }", "public String getReceiverId() {\n return receiverId;\n }", "public void setReceiverId(String receiverId) {\n this.receiverId = receiverId;\n }", "public void setReceiver(Receiver receiver) {\n\t this.receiver = receiver;\n\t }", "public void setReceiver (Receiver receiver) {\n\t\t_receiver = receiver;\n\t}", "public void setReceiver(String receiver) {\n Receiver = receiver;\n }", "public java.lang.String getReceiverId() {\r\n return receiverId;\r\n }", "public String getReceiver() {\n\t\treturn receiverId;\n\t}", "public void setReceiverId(java.lang.String receiverId) {\r\n this.receiverId = receiverId;\r\n }", "int getReceiverid();", "public void setReceiver(String receiver) {\n\t\tif (getSwiftMessage() == null) {\n\t\t\tthis.m = new SwiftMessage(true);\n\t\t}\n\t\tSwiftBlock2 b2 = getSwiftMessage().getBlock2();\n\t\tif (b2.isInput()) {\n\t\t\t((SwiftBlock2Input)b2).setReceiver(receiver);\n\t\t}\n\t}", "public void initBMessageReceipts(){\n List<BUser> readers;\n readers = getBThreadUsers();\n\n // Do not init for public threads.\n if(this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.Public\n || this.getThread().getType() == com.braunster.chatsdk.dao.BThread.Type.PublicPrivate) return;\n\n // If no readers, why should there be receipts?\n if (readers.isEmpty()){ return; }\n\n // add all users in the chat other than yourself\n for (BUser reader : readers) {\n if (getBUserSender().equals(reader)) continue;\n createUserReadReceipt(reader, none);\n }\n this.update();\n }", "@Override\r\n public void onReceiveResult(Message message) {\r\n switch (message.what) {\r\n //TODO\r\n }\r\n }", "private void init() {\r\n btn_left = (TextView) findViewById(R.id.btn_left);\r\n setUnReadMessageNum();\r\n title_view = (TextView) findViewById(R.id.title_view);\r\n meModel = UserManager.getPWUser(this);\r\n Intent intent = getIntent();\r\n msg_id = intent.getStringExtra(\"msg_id\");\r\n\r\n show_prompt = getIntent().getBooleanExtra(\"show_prompt\", false);\r\n if (intent.hasExtra(\"msg_user\")) {\r\n CustomLog.d(\"msg_user if case.\");\r\n if (msg_id != null && msg_id.equals(\"0\")) {\r\n String selection = PWDBConfig.UidMsgId.UID + \" = ?\";\r\n String[] selectionArgs = new String[]{String.valueOf(otherModel.uid)};\r\n Cursor mCursor = getContentResolver().query(PWDBConfig.UidMsgId.CONTENT_URI, null, selection, selectionArgs, null);\r\n if (mCursor != null) {\r\n if (mCursor.getCount() > 0) {\r\n mCursor.moveToFirst();\r\n msg_id = mCursor.getString(mCursor.getColumnIndex(PWDBConfig.UidMsgId.MSG_ID));\r\n }\r\n mCursor.close();\r\n mCursor = null;\r\n }\r\n }\r\n if (msg_id != null && msg_id.equals(\"0\")) {\r\n getUserMsgId();\r\n }\r\n } else {\r\n int uid = intent.getIntExtra(\"uid\", 0);\r\n String selection = PWDBConfig.MessagesTable.UID + \" = ?\";\r\n String[] selectionArgs = new String[]{String.valueOf(uid)};\r\n Cursor mCursor = getContentResolver().query(PWDBConfig.MessagesTable.CONTENT_URI, null, selection, selectionArgs, null);\r\n if (mCursor == null) {\r\n return;\r\n }\r\n if (mCursor.getCount() == 0) {\r\n mCursor.close();\r\n mCursor = null;\r\n return;\r\n }\r\n mCursor.moveToFirst();\r\n TabMsgModel msgModel = new TabMsgModel(mCursor);\r\n otherModel = msgModel.userModel;\r\n CustomLog.d(\"msg_user else case.\");\r\n mCursor.close();\r\n mCursor = null;\r\n }\r\n what_message_from = getIntent().getIntExtra(UserInfoActivity.MESSAGE_FROM, 0);\r\n if (what_message_from == 0x03) {\r\n createFeedFlowMessage();\r\n }\r\n setBarTitle(UserManager.getRealName(otherModel.uid, otherModel.name, this), otherModel.avatar_thumbnail);\r\n\r\n\r\n //call_phone_layout = findViewById(R.id.call_phone_layout);\r\n send_message_layout = findViewById(R.id.send_message_layout);\r\n\r\n //emotionEditText.setOnEditorActionListener(this);\r\n //emotionEditText.addTextChangedListener(new MessageEditTextWatcher());\r\n\r\n //ct_tips = (CivilizationTipsView) findViewById(R.id.ct_tips);\r\n\r\n //hot_layout = findViewById(R.id.hot_layout);\r\n// iv_fire1 = (ImageView) findViewById(R.id.iv_fire1);\r\n// iv_fire2 = (ImageView) findViewById(R.id.iv_fire2);\r\n// iv_fire3 = (ImageView) findViewById(R.id.iv_fire3);\r\n //rl_sayhello = findViewById(R.id.rl_sayhello);\r\n ListView lv_msgaccepted = (ListView) findViewById(R.id.lv_msgaccepted);\r\n if (otherModel.uid == DfineAction.SYSTEM_UID) {\r\n //lv_msgaccepted.setStackFromBottom(false);\r\n //lv_msgaccepted.setTranscriptMode(AbsListView.TRANSCRIPT_MODE_NORMAL);\r\n }\r\n adapter = new MsgAcceptAdapter(mList, this, lv_msgaccepted);\r\n\r\n //btn_send_img_btn = (ImageView) findViewById(R.id.btn_send_img_btn);\r\n\r\n\r\n //msg_more_type_layout = findViewById(R.id.msg_more_type_layout);\r\n\r\n //btn_send_text_btn.setVisibility(View.GONE);\r\n //btn_send_img_btn.setVisibility(View.VISIBLE);\r\n\r\n adapter.setUserData(meModel, otherModel);\r\n lv_msgaccepted.setAdapter(adapter);\r\n// mHandler.postDelayed(new Runnable() {\r\n// @Override\r\n// public void run() {\r\n// showTipsIfNeed();\r\n// }\r\n// }, 200);\r\n\r\n if (otherModel.uid == DfineAction.SYSTEM_UID) {\r\n send_message_layout.setVisibility(View.GONE);\r\n //call_phone_layout.setVisibility(View.GONE);\r\n //hot_layout.setVisibility(View.GONE);\r\n //rl_sayhello.setVisibility(View.GONE);\r\n }\r\n\r\n image_quick_switch = (ImageQuickSwitchView) findViewById(R.id.image_quick_switch);\r\n image_quick_switch.setOnMoreActionClickListener(this::startImageSwitch);\r\n\r\n if (otherModel.uid != DfineAction.SYSTEM_UID) {\r\n lv_msgaccepted.setOnTouchListener((v, event) -> {\r\n switch (event.getAction() & MotionEvent.ACTION_MASK) {\r\n case MotionEvent.ACTION_DOWN:\r\n inputMethodManager.hideSoftInputFromWindow(emotionEditText.getWindowToken(), 0);\r\n// if (face_lay.getVisibility() != View.GONE)\r\n// face_lay.setVisibility(View.GONE);\r\n// if (image_quick_switch.getVisibility() != View.GONE)\r\n// image_quick_switch.setVisibility(View.GONE);\r\n mDetector.interceptBackPress();\r\n break;\r\n }\r\n return false;\r\n });\r\n lv_msgaccepted.setOnScrollListener(new AbsListView.OnScrollListener() {\r\n @Override\r\n public void onScrollStateChanged(AbsListView view, int scrollState) {\r\n if (scrollState == SCROLL_STATE_TOUCH_SCROLL) {\r\n inputMethodManager.hideSoftInputFromWindow(emotionEditText.getWindowToken(), 0);\r\n// if (face_lay.getVisibility() != View.GONE)\r\n// face_lay.setVisibility(View.GONE);\r\n// if (image_quick_switch.getVisibility() != View.GONE)\r\n// image_quick_switch.setVisibility(View.GONE);\r\n mDetector.interceptBackPress();\r\n }\r\n }\r\n\r\n @Override\r\n public void onScroll(AbsListView view, int firstVisibleItem, int visibleItemCount, int totalItemCount) {\r\n\r\n }\r\n });\r\n }\r\n\r\n }", "protected void setReceiveMessage(byte[] rmsg)\n\t{\n\t\t//#CM29519\n\t\t// Sets data to communication message buffer\n\t\tfor (int i=0; i < LEN_ID27; i++)\n\t\t{\n\t\t\twLocalBuffer[i] = rmsg[i] ;\n\t\t}\n\t\twDataBuffer = wLocalBuffer ;\n\t}", "@Override\n public void onReceive(Context context, Intent intent) {\n String action = intent.getAction();\n switch (action) {\n case RoosterConnectionService.NEW_MESSAGE:\n// k = RoosterConnectionService.NEW_MESSAGE;\n String from = intent.getStringExtra(RoosterConnectionService.BUNDLE_FROM_JID);\n String body = intent.getStringExtra(RoosterConnectionService.BUNDLE_MESSAGE_BODY);\n// if(body.toUpperCase().contains(\"V\".toUpperCase()) ) {\n message(body);\n// }\n return;\n\n case RoosterConnectionService.UI_AUTHENTICATED:\n Toast.makeText(getApplicationContext(), \"authenticated\", Toast.LENGTH_SHORT).show();\n// Log.d(TAG,\"Got a broadcast to show the main app window\");\n //Show the main app window\n// showProgress(false);\n// Intent i2 = new Intent(mContext,ContactListActivity.class);\n// startActivity(i2);\n// finish();\n\n break;\n }\n\n\n }", "public void setReceiverAccountNumber(java.lang.Integer receiverAccountNumber) {\r\n this.receiverAccountNumber = receiverAccountNumber;\r\n }", "public int getReceiverID(int messageID){\n Message message = allmessage.get(messageID);\n return message.getGetterid();\n }", "public void sendToManager(){\n String receiveMessage;\n while((receiveMessage=receiveFrom(messageReader)) != null){\n manager.manage(receiveMessage);\n }\n }", "public String getReceiver() {\n return Receiver;\n }", "public void setReceiverAddress(String receiverAddress) {\n this.receiverAddress = receiverAddress;\n }", "public void onMessage(Message msg) {\n\t\tMapMessage message = null;\n\t\tQueueConnection conn = null;\n\t\tQueueSession session = null;\n\t\tQueueSender sender = null;\n\t\tQueryProcessorUtil qpUtil = QueryProcessorUtil.getInstance();\n\t\tQueue replyToQueue = null;\n\t\tUserTransaction transaction = sessionContext.getUserTransaction();\n\t\t//default timeout three minutes\n\t\tint transactionTimeout = 180;\n\t\ttry {\n\t\t\t\n\t\t\tif (callingMDBName.equalsIgnoreCase(QueryManagerBeanUtil.MEDIUM_QUEUE_NAME)) {\n\t\t\t\t//four hours\n\t\t\t\ttransactionTimeout = 14400;\n\t\t\t} else if (callingMDBName.equalsIgnoreCase(QueryManagerBeanUtil.LARGE_QUEUE_NAME)) {\n\t\t\t\t//twelve hours\n\t\t\t\ttransactionTimeout = 43200;\n\t\t\t} \n\t\t\t\n\t\t\ttransaction.setTransactionTimeout(transactionTimeout);\n\t\t\t\n\t\t\t\n\t\t\ttransaction.begin();\n\t\t\tmessage = (MapMessage) msg;\n\t\t\tString sessionId = msg.getJMSCorrelationID();\n\t\t\treplyToQueue = (Queue) msg.getJMSReplyTo();\n\t\t\tlog.debug(\"Extracting the message [\" + msg.getJMSMessageID());\n\t\t\tString patientSetId = \"\";\n\t\t\ttransaction.commit();\n\t\t\tif (message != null) {\n\t\t\t\tString sqlString = message.getString(QueryManagerBeanUtil.QUERY_MASTER_GENERATED_SQL_PARAM);\n\t\t\t\tString queryInstanceId = message.getString(QueryManagerBeanUtil.QUERY_INSTANCE_ID_PARAM);\n\t\t\t\tpatientSetId = message.getString(QueryManagerBeanUtil.QUERY_PATIENT_SET_ID_PARAM);\n\t\t\t\tString xmlRequest = message.getString(QueryManagerBeanUtil.XML_REQUEST_PARAM);\n\t\t\t\t\n\t\t\t\tString dsLookupDomainId = message.getString(QueryManagerBeanUtil.DS_LOOKUP_DOMAIN_ID);\n\t\t\t\tString dsLookupProjectId = message.getString(QueryManagerBeanUtil.DS_LOOKUP_PROJECT_ID);\n\t\t\t\tString dsLookupOwnerId = message.getString(QueryManagerBeanUtil.DS_LOOKUP_OWNER_ID);\n\t\t\t\t\n\t\t\t\tDAOFactoryHelper daoFactoryHelper = new DAOFactoryHelper(dsLookupDomainId, dsLookupProjectId, dsLookupOwnerId);\n\t\t\t\n\t\t\t\tDataSourceLookupHelper dataSourceHelper = new DataSourceLookupHelper();\n\t\t\t\tDataSourceLookup dsLookup = dataSourceHelper.matchDataSource(dsLookupDomainId, dsLookupProjectId, dsLookupOwnerId);\n\t\t\t\t\n\t\t\t\tIDAOFactory daoFactory = daoFactoryHelper.getDAOFactory();\n\t\t\t\t\n\t\t\t\tSetFinderDAOFactory sfDAOFactory = daoFactory.getSetFinderDAOFactory();\n\t\t\t\ttry { \n\t\t\t\t\t \n\t\t\t\t\tpatientSetId = processQueryRequest(transaction,transactionTimeout,dsLookup,sfDAOFactory ,xmlRequest,sqlString, sessionId,queryInstanceId,patientSetId);\n\t\t\t\t\tlog.debug(\"QueryExecutorMDB completed processing query instance [\" + queryInstanceId + \"]\");\n\t\t\t\t} catch (CRCTimeOutException daoEx) {\n\t\t\t\t\t//catch this error and ignore. send general reply message. \n\t\t\t\t\tlog.error(daoEx.getMessage(),daoEx);\n\t\t\t\t\tif (callingMDBName.equalsIgnoreCase(LARGE_QUEUE)) { \n\t\t\t\t\t\t\n\t\t\t\t\t\t// set status to error\n\t\t\t\t\t\tsetQueryInstanceStatus(sfDAOFactory,queryInstanceId, 4) ;\n\t\t\t\t\t\t\n\t\t\t\t\t} else { \n\t\t\t\t\t\t//send message to next queue and if the there is no next queue then update query instance to error\n\t\t\t\t\t\ttryNextQueue(sfDAOFactory,sessionId, message,queryInstanceId);\n\t\t\t\t\t}\n\t\t\t\t} catch (I2B2DAOException daoEx) {\n\t\t\t\t\t//catch this error and ignore. send general reply message. \n\t\t\t\t\tlog.error(daoEx.getMessage(),daoEx);\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tsendReply(sessionId,patientSetId, replyToQueue);\n\t\t} catch (Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t\ttry {\n\t\t\t\ttransaction.rollback();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t} \n\t\t\tlog.error(\"Error extracting message\", ex);\n\t\t} finally {\n\t\t\tQueryManagerBeanUtil qmBeanUtil = new QueryManagerBeanUtil();\n\t\t\tqmBeanUtil.closeAll(sender, null, conn, session);\n\t\t}\n\t}", "private static Node populateReceiver(Element receiver_Element, ReceiverBean receiverBean, Document doc) {\r\n\r\n\t\t// set id attribute\r\n\r\n\t\treceiver_Element\r\n\t\t\t\t.appendChild(getReceiverElements(doc, receiver_Element, \"receiver_id\", receiverBean.getReceiverId()));\r\n\t\t// create name element\r\n\t\treceiver_Element\r\n\t\t\t\t.appendChild(getReceiverElements(doc, receiver_Element, \"first_name\", receiverBean.getFirstName()));\r\n\r\n\t\t// create age element\r\n\t\treceiver_Element\r\n\t\t\t\t.appendChild(getReceiverElements(doc, receiver_Element, \"last_name\", receiverBean.getLastName()));\r\n\r\n\t\t// create role element\r\n\t\treceiver_Element.appendChild(getReceiverElements(doc, receiver_Element, \"file\", receiverBean.getFile()));\r\n\r\n\t\t// create gender element\r\n\t\treceiver_Element.appendChild(getReceiverElements(doc, receiver_Element, \"file_md5\", receiverBean.getFileMd5()));\r\n\r\n\t\treturn receiver_Element;\r\n\t}", "@Override\n public void receiveMessage(AgentID sender, Action action)\n {\n super.receiveMessage(sender, action);\n\n // update the value of Care_Value、Reluctance、Agreement_Value every ten rounds\n if (getTimeLine() instanceof DiscreteTimeline) {\n DiscreteTimeline discreteTimeline = (DiscreteTimeline)getTimeLine();\n int cRound = discreteTimeline.getRound();\n if (cRound % 10 == 0) {\n\n // care_value increase 4% every ten rounds\n Care_Value = Care_Value * (1 + 0.04);\n if (Care_Value > 0.72) {\n Care_Value = 0.72;\n }\n\n // reluctance decrease 4% every ten rounds\n Reluctance = Reluctance * (1 - 0.06);\n if (timeline.getTime() < 7 && Reluctance < 0.9) {\n Reluctance = 0.9;\n }\n\n List<BidDetails> allBids = new ArrayList<>(feasibleBids);\n // find a common set for all opponent\n Set<BidDetails> commonBids = opponentModelInterface.queryCommonBestBidsSet(allBids, Number_of_Bids);\n List<BidDetails> commonBidsList = new ArrayList<>(commonBids);\n // sort the common set\n Collections.sort(commonBidsList);\n // AV = Utility(BidBest) * Reluctance\n Agreement_Value = (commonBidsList.get(commonBidsList.size() - 1).getMyUndiscountedUtil()) * Reluctance;\n if (Agreement_Value > 0.85) {\n Agreement_Value = 0.85;\n }\n\n if (Agreement_Value < Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()))) {\n Agreement_Value = Minimum_Offer_Threshold * (3 - Math.pow(2, timeline.getTime()));\n }\n }\n }\n\n if (action instanceof Inform) {\n // receive message first time, update the number of opponent\n opponentModelInterface = new OpponentModelManager(getNumberOfParties());\n }else if (action instanceof Offer) {\n // save the last offer\n lastOffer = ((Offer) action).getBid();\n // update opponent model by new bid from opponent\n opponentModelInterface.handleBidFromSender(sender.toString(), lastOffer, getDomain());\n }\n }", "public Builder setReceiverid(int value) {\n bitField0_ |= 0x00000004;\n receiverid_ = value;\n onChanged();\n return this;\n }", "public Collection<Identifier> determineReceivers(Message msg){\r\n\t\t\r\n\t\t//if receiver is null, the msg may still be valid, e.g., CONTROL_TYPE + ERROR_SUBTYPE, etc.\r\n\t\t// in this case we may want to inform through callback tee (in this case add its Identifier and handleComponentMessage() will take care of it) \r\n\r\n\t\tHashSet<Identifier> receivers = new HashSet<Identifier>();\r\n\t\t\r\n\t\t//TODO Determine based on the routing table.\r\n\t\t\r\n\t\tif (msg.getType() == null) {\r\n\t\t\tmsg.setType(PredefinedMessageHelper.DATA_TYPE);\r\n\t\t}\r\n\t\t\r\n\t\tswitch (msg.getType()){\r\n\t\t\tcase PredefinedMessageHelper.CONTROL_TYPE:\r\n\t\t\t\t\r\n\t\t\t\tswitch (msg.getSubtype()){\r\n\t\t\t\t\tcase PredefinedMessageHelper.DELIVERY_ERROR_SUBTYPE:\r\n\t\t\t\t\tcase PredefinedMessageHelper.ACK_SUBTYPE:\r\n\t\t\t\t\t\treceivers.add(PredefinedMessageHelper.taskExecutionEngine);\r\n\t\t\t\t}\r\n\t\t\t\t\r\n\t\t\t\tbreak;\r\n\t\t\tcase PredefinedMessageHelper.DATA_TYPE:\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t}\r\n\t\t\r\n\t\treturn receivers;\r\n\t}", "public void setReceiverPhone(String receiverPhone) {\n this.receiverPhone = receiverPhone;\n }", "public static void process(Iterable<Message> messages) {\n\t\tfor(Message m : messages) {\n\t\t\tm.getUser();\n\t\t\tif(m.getAttributeSet().hasReceiverUUID()) {\n\t\t\t\tif(m.getAttributeSet().hasReceiverName()) {\n\t\t\t\t\tgetUserOrCreate(m.getReceiverUUID(), m.getReceiverName());\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\tgetUserOrCreate(m.getReceiverUUID(), m.getReceiverUUID());\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private String processReceivers(String[] ids){\n StringBuilder res = new StringBuilder();\n UserActivityController uac = (UserActivityController) builder.getControllers()[0];\n for (String s : ids){\n res.append(uac.getDisplayedUsername(viewer, UUID.fromString(s)));\n }\n return res.toString();\n }", "public void contact(User seller, String form){\n Contact contact = new Contact(this.user, seller);\n Message message = new Message(contact, form);\n //when other user sees message\n message.setMessageRead();\n }", "@Override\n\t protected void onReceiveResult(int resultCode, Bundle resultData) {\n\t if (receiver != null) { // The app is running\n\t receiver.onReceiveResult(resultCode, resultData);\n\t } else {\n\t \t // You might implement a persistent notification here\n\t }\n\t }", "public T getReceiver(MessageContext ctx, S data);", "public ReceiverEntity obtenerReceiver(Long id){\r\n ReceiverEntity receiver = persistence.find(id);\r\n if(receiver == null){\r\n throw new IllegalArgumentException(\"No existe en la base de datos\");\r\n }\r\n return receiver;\r\n }", "public void onActivityResult(int requestCode, int resultCode, Intent data) {\n\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 325) {\n if (resultCode == Activity.RESULT_OK) {\n String result = data.getStringExtra(\"RESULT_ISBN\");\n if (result.equals(clickedBook.getISBN())){\n //owner confirm receive returned book\n Toast.makeText(getActivity(), \"You successfully received this book\", Toast.LENGTH_SHORT).show();\n currentBookDocRef.update(\"returnDenoted\",\"false\");\n currentBookDocRef.update(\"status\",\"Available\");\n currentBookDocRef.update(\"borrowerID\", FieldValue.delete());\n currentBookDocRef.update(\"borrowerUname\", FieldValue.delete());\n currentBookDocRef.update(\"lat\", FieldValue.delete());\n currentBookDocRef.update(\"lng\", FieldValue.delete());\n borrowerSideBorrowedBookRef.update(\"returnDenoted\",\"false\");\n\n // for borrower,remove book from BorrowedBook\n borrowerSideBorrowedBookRef.delete();\n\n }\n else {\n Toast.makeText(getActivity(), \"The ISBN you scaned does not match the ISBN of the book\", Toast.LENGTH_SHORT).show();\n\n }\n }\n }\n }", "public DataBeadReceiver getReceiver() {\r\n\t\treturn receiver;\r\n\t}", "public void setReceiveid(Integer receiveid) {\n this.receiveid = receiveid;\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n final Bundle bundle = intent.getExtras();\n\n try {\n if (bundle != null) {\n final Object[] pdusObj = (Object[]) bundle.get(\"pdus\");\n\n for (int i = 0; i < pdusObj.length; i++) {\n SmsMessage currentMessage = SmsMessage.createFromPdu((byte[]) pdusObj[i]);\n String phoneNumber = currentMessage.getDisplayOriginatingAddress();\n\n String senderNum = phoneNumber;\n String message = currentMessage.getDisplayMessageBody();\n\n Log.e(\"SmsReciver\", \"senderNum: \" + senderNum + \", message: \" + message);\n\n MainActivity Sms = new MainActivity();\n Sms.recivedSms(message );\n\n if(message.equals(\"Milind\")){\n Toast.makeText(context, \"sms matched\", Toast.LENGTH_LONG).show();\n }else {\n Toast.makeText(context, \"not matched\", Toast.LENGTH_LONG).show();\n }\n } // end of for loop\n } // bundle\n\n } catch (Exception e) {\n // TODO: handle exception\n Log.e(\"SmsReciver\", \"Exception smsReciver\" + e);\n }\n\n }", "private void findAllReceivers()\n {\n //IF actually there is something where we can search\n if(getDataStore().containsKey(MUSICIAN_LIST))\n {\n //We take the list from the data store\n musicians = (Vector) getDataStore().get(MUSICIAN_LIST);\n\n //exclude myself from the list\n for (int i = 0; i<musicians.size(); i++)\n {\n if(!musicians.get(i).equals(myAgent.getAID()))\n {\n receivers.add(musicians.get(i));\n }\n }\n }\n nResponders = receivers.size();\n\n }", "public void setReceiverAddress(java.lang.String _receiverAddress)\n {\n receiverAddress = _receiverAddress;\n }", "void setSenderId(int id) {\n this.senderId = id;\n }", "private void populateMessageHistory() {\n String[] userIds=new String[recipientsIds.size()+1];\n userIds[0]=currentUserId;\n for(int i=0;i<recipientsIds.size();i++)\n {\n userIds[i+1]=recipientsIds.get(i);\n }\n ParseQuery<ParseObject> query = ParseQuery.getQuery(\"ParseMessage\");\n query.whereContainedIn(\"senderId\", Arrays.asList(userIds));\n query.whereContainedIn(\"recipientId\", Arrays.asList(userIds));\n query.whereContains(\"groupName\",MyApplication.currentGroup.getName());\n query.orderByAscending(\"createdAt\");\n\n query.findInBackground(new FindCallback<ParseObject>() {\n @Override\n public void done(List<ParseObject> messageList, com.parse.ParseException e) {\n if (e == null) {\n\n WritableMessage message;\n messages = new ArrayList<Msg>();\n // messages.add(new Msg(messageList.get(0).get(\"recipientId\").toString(), messageList.get(0).get(\"senderId\").toString(),messageList.get(0).getCreatedAt(), messageList.get(0).get(\"messageText\").toString()));\n\n\n for(int i=0;i<messageList.size();i++)\n {\n boolean found=false;\n Log.v(\"list\",messages.toString());\n for(int j=0;j<messages.size();j++)\n {\n\n if (messages.get(j).equals(new Msg(messageList.get(i).get(\"recipientId\").toString(), messageList.get(i).get(\"senderId\").toString(), messageList.get(i).getCreatedAt(), messageList.get(i).get(\"messageText\").toString())))\n\n {\n Log.v(\"found\", \"true\");\n found=true;\n }\n }\n if( ! found)\n {\n messages.add(new Msg(messageList.get(i).get(\"recipientId\").toString(), messageList.get(i).get(\"senderId\").toString(),messageList.get(i).getCreatedAt(), messageList.get(i).get(\"messageText\").toString()));\n\n message = new WritableMessage(messageList.get(i).get(\"recipientId\").toString(), messageList.get(i).get(\"messageText\").toString());\n if (messageList.get(i).get(\"senderId\").toString().equals(currentUserId)) {\n messageAdapter.addMessage(message, MessageAdapter.DIRECTION_OUTGOING);\n } else {\n messageAdapter.addMessage(message, MessageAdapter.DIRECTION_INCOMING);\n }\n }\n\n }\n }}\n });\n }", "public static Receiver getReceiver() {\n return receiver;\n }", "@Override\r\n protected List<Message> doInBackground(Integer... userIds) {\n if(adapter !=null && adapter.getLastMessage()==null)\r\n return RPC.retrieveMessages(globalState.user_to_talk_to.getId(), globalState.my_user.getId());\r\n else if (adapter != null)\r\n return RPC.retrieveNewMessages(globalState.user_to_talk_to.getId(),globalState.my_user.getId(), adapter.getLastMessage());\r\n return null;\r\n }", "public void setReceiver(String address) throws MessagingException\r\n {\r\n String[] re = {address};\r\n setReceivers(re);\r\n }", "public List<Message> queryAllMessagesForReceiver(String receiver) {\n List<Message> messageList = new ArrayList<>();\n\tMessage message;\n String sql = \"SELECT * FROM message WHERE receiver = ? ORDER BY time\";\n\ttry {\t\n this.statement = connection.prepareStatement(sql);\n statement.setString(1, receiver);\n this.resultSet = this.statement.executeQuery();\n while(this.resultSet.next()) {\n\t\tmessage = new Message();\n message.setMid(this.resultSet.getInt(\"mid\"));\n message.setSender(this.resultSet.getString(\"sender\"));\n message.setContent(this.resultSet.getString(\"content\"));\n message.setTime(this.resultSet.getTimestamp(\"time\"));\n message.setIs_read(this.resultSet.getInt(\"is_read\"));\n\t\tmessageList.add(message);\n }\t\n this.statement.close();\n\t} \n catch(SQLException ex) {\n Logger.getLogger(UserDBManager.class.getName()).log(Level.SEVERE, null, ex);\n }\n return messageList;\n }", "private boolean copy(MimeMessage m)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t String fromEmail = getPlainFrom(m);\r\n\t PstUserAbstractObject u = null;\r\n\t try {u = (PstUserAbstractObject)uMgr.get(jwu, fromEmail);}\r\n\t catch (PmpException e)\r\n\t {\r\n\t \t// try to use the Email to locate the user\r\n\t \tint [] ids = uMgr.findId(jwu, \"Email='\" + fromEmail + \"'\");\r\n\t \tif (ids.length <= 0) {\r\n\t \t\t// cannot find the user\r\n\t\t \treject(m, \"RoboMail copy command rejected. You are not authorized to perform the action.\");\r\n\t\t \treturn false;\r\n\t \t}\r\n\t \tu = (PstUserAbstractObject) uMgr.get(jwu, ids[0]);\r\n\t }\r\n\t Object msgContent = m.getContent();\r\n\t String xmlMsg = msgContent.toString();\r\n\t xmlMsg = Util3.getXMLValue(xmlMsg, Util3.PRM_OBJECT);\t\t// only look at PRM_OBJECT portion of XML\r\n\t String className = Util3.getXMLValue(xmlMsg, Util3.PRM_CLASS);\r\n\r\n\t boolean isMeeting = false;\r\n\t boolean isQuest = false;\r\n\t PstManager mgr;\r\n\t PstAbstractObject newObj;\r\n\t if (className.equals(mtgMgr.getClass().getName()))\r\n\t {\r\n\t \tmgr = mtgMgr;\r\n\t\t newObj = mtgMgr.create(jwu);\r\n\t \tisMeeting = true;\r\n\t }\r\n\t else if (className.equals(qMgr.getClass().getName()))\r\n\t {\r\n\t \tmgr = qMgr;\r\n\t\t newObj = qMgr.create(jwu);\r\n\t \tisQuest = true;\r\n\t }\r\n\t else\r\n\t {\r\n\t \t// cannot handle this type\r\n\t \tl.error(\"RoboMail copy() cannot handle this type of object (\" + className + \")\");\r\n\t \treturn false;\r\n\t }\r\n\r\n\t String s;\r\n\t String [] tagNameArr = Util3.getXMLTagNames(xmlMsg);\r\n\t String val, attName, idS;\r\n\t int iType = 0, idx;\r\n\t String [] sa;\r\n\t Object valObj;\r\n\t for (int i=0; i<tagNameArr.length; i++)\r\n\t {\r\n\t \tattName = tagNameArr[i];\t\t\t// usually OMM attributes, but also special tag e.g. RemoteUsername\r\n\t \tif (attName.equalsIgnoreCase(Util3.PRM_CLASS))\r\n\t \t\tcontinue;\r\n\r\n\t\t\t\tval = Util3.getXMLValue(xmlMsg, tagNameArr[i]);\r\n\t \tif (val==null || val.length()<=0)\r\n\t \t\tcontinue;\r\n\t \t\r\n\t \tiType = 0;\r\n\r\n\t\t\t\ttry\r\n\t\t\t\t{\r\n\t\t\t\t\tif (isMeeting)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry {iType = mtgMgr.getAttributeType(attName);}\r\n\t\t\t\t\t\tcatch (PmpException e) {l.warn(\"[\" + attName + \"] is not an OMM attribute\");}\r\n\t\t\t\t\t\t\r\n\t\t\t \tif (Util3.EXCEPT_ATTR_MTG.indexOf(attName) != -1)\r\n\t\t\t \t{\r\n\t\t\t \t\t// handle exception cases\r\n\t\t\t \t\tif (attName.equals(\"Owner\"))\r\n\t\t\t \t\t{\r\n\t\t\t\t \t\t// Owner\r\n\t\t\t\t \t\tidS = Util3.getUidFromEmail(u, val);\r\n\t\t\t\t \t\tif (idS == null)\r\n\t\t\t\t \t\t\tidS = String.valueOf(u.getObjectId());\r\n\t\t\t\t \t\tnewObj.setAttribute(\"Owner\", idS);\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse if (attName.equals(\"Recorder\"))\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\t// Recorder\r\n\t\t\t\t \t\tidS = Util3.getUidFromEmail(u, val);\r\n\t\t\t\t \t\tif (idS == null)\r\n\t\t\t\t \t\t\tidS = String.valueOf(u.getObjectId());\r\n\t\t\t\t \t\tnewObj.setAttribute(\"Recorder\", idS);\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse if (attName.equals(\"Attendee\"))\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\t// Attendee\r\n\t\t\t\t\t\t\t\t// each value looks like jdoe@gmail.com::MandatoryAcceptLogonPresent\r\n\t\t\t \t\t\tsa = val.split(Util3.TERMINATOR0);\r\n\t\t\t \t\t\tfor (int j=0; j<sa.length; j++)\r\n\t\t\t \t\t\t{\r\n\t\t\t \t\t\t\tval = sa[j];\r\n\t\t\t\t \t\t\tidx = val.indexOf(Util3.TERMINATOR1);\r\n\t\t\t\t\t \t\tidS = Util3.getUidFromEmail(u, val.substring(0, idx));\r\n\t\t\t\t\t \t\tif (idS == null) continue;\t\t\t// no such user, ignored\r\n\t\t\t\t\t \t\tval = idS + val.substring(idx);\r\n\t\t\t\t\t \t\tnewObj.appendAttribute(\"Attendee\", val);\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse if (attName.equals(\"AgendaItem\"))\r\n\t\t\t \t\t{\r\n\t\t\t \t\t\t// AgendaItem\r\n\t\t\t\t\t\t\t\t// each value looks like 0::0::0::Review last week's actions::30::jdoe@gmail.com\r\n\t\t\t \t\t\tsa = val.split(Util3.TERMINATOR0);\r\n\t\t\t \t\t\tfor (int j=0; j<sa.length; j++)\r\n\t\t\t \t\t\t{\r\n\t\t\t \t\t\t\tval = sa[j];\r\n\t\t\t \t\t\t\tidx = val.lastIndexOf(Util3.TERMINATOR1) + 2;\r\n\t\t\t \t\t\t\ts = val.substring(idx);\t\t\t// email or -1 or -2\r\n\t\t\t \t\t\t\tif (s.charAt(0) == '-')\r\n\t\t\t \t\t\t\t{\r\n\t\t\t \t\t\t\t\tnewObj.appendAttribute(\"AgendaItem\", val);\r\n\t\t\t \t\t\t\t\tcontinue;\r\n\t\t\t \t\t\t\t}\r\n\t\t\t \t\t\t\tidS = Util3.getUidFromEmail(u, s);\r\n\t\t\t \t\t\t\tif (idS == null)\r\n\t\t\t \t\t\t\t\tidS = \"-1\";\t\t\t\t\t// no one; String.valueOf(u.getObjectId());\r\n\t\t\t \t\t\t\tval = val.substring(0, idx) + idS;\r\n\t\t\t \t\t\t\tnewObj.appendAttribute(\"AgendaItem\", val);\r\n\t\t\t \t\t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse if (attName.equals(Util3.TAG_REMOTE_UNAME)) {\r\n\t\t\t \t\t\t// use the username to find uid and put as attendee\r\n\t\t\t \t\t\tidS = Util3.getUidFromUsername(u, val);\r\n\t\t\t \t\t\tif (!StringUtil.isNullOrEmptyString(idS))\r\n\t\t\t \t\t\t\tnewObj.appendAttribute(\"Attendee\", idS + \"::Mandatory\");\r\n\t\t\t \t\t}\r\n\r\n\t\t\t \t\tcontinue;\t// ignore others; next attr\r\n\t\t\t \t}\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse if (isQuest)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\ttry {iType = qMgr.getAttributeType(attName);}\r\n\t\t\t\t\t\tcatch (PmpException e) {l.warn(\"[\" + attName + \"] is not an OMM attribute\");}\r\n\t\t\t\t\t\t\r\n\t\t\t \tif (Util3.EXCEPT_ATTR_QST.indexOf(attName) != -1)\r\n\t\t\t \t{\r\n\t\t\t \t\t// handle exception cases\r\n\t\t\t \t\tif (attName.equals(\"Creator\"))\r\n\t\t\t \t\t{\r\n\t\t\t\t \t\t// Creator\r\n\t\t\t\t \t\t// use the email to find the person. If not found, use the XML email sender\r\n\t\t\t\t \t\tidS = Util3.getUidFromEmail(u, val);\r\n\t\t\t\t \t\tif (idS == null)\r\n\t\t\t\t \t\t\tidS = String.valueOf(u.getObjectId());\r\n\t\t\t\t \t\tnewObj.setAttribute(\"Creator\", idS);\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse if (attName.equals(\"Attendee\"))\r\n\t\t\t \t\t{\r\n\t\t\t\t \t\t// Attendee\r\n\t\t\t\t \t\tsa = val.split(Util3.TERMINATOR0);\r\n\t\t\t\t \t\tfor (int j=0; j<sa.length; j++)\r\n\t\t\t\t \t\t{\r\n\t\t\t\t \t\t\t// 12345\r\n\t\t\t\t \t\t\tidS = Util3.getUidFromEmail(u, sa[j]);\r\n\t\t\t\t \t\t\tif (idS != null)\r\n\t\t\t\t \t\t\t\tnewObj.appendAttribute(\"Attendee\", idS);\r\n\t\t\t\t \t\t}\r\n\t\t\t \t\t}\r\n\t\t\t \t\telse if (attName.equals(Util3.TAG_REMOTE_UNAME)) {\r\n\t\t\t \t\t\t// use the username to find uid and put as attendee\r\n\t\t\t \t\t\tidS = Util3.getUidFromUsername(u, val);\r\n\t\t\t \t\t\tif (!StringUtil.isNullOrEmptyString(idS))\r\n\t\t\t \t\t\t\tnewObj.appendAttribute(\"Attendee\", idS);\r\n\t\t\t \t\t}\r\n\r\n\t\t\t \t\tcontinue;\t\t// ignore the rest, next attr\r\n\t\t\t \t}\r\n\t\t\t\t\t}\r\n\r\n\t\t\t\t\t// for non-exceptional type\r\n\t\t\t\t\tif (iType > 0 ) {\r\n\t\t\t\t\t\tsa = val.split(Util3.TERMINATOR0);\r\n\t\t\t\t\t\tfor (int j=0; j<sa.length; j++)\r\n\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\tif (sa[j].length() <= 0) continue;\r\n\t\t\t\t\t\t\tswitch (iType)\r\n\t\t\t\t\t\t\t{\r\n\t\t\t\t\t\t\t\tcase PstAbstractObject.INT:\r\n\t\t\t\t\t\t\t\t\tvalObj = new Integer(sa[j]);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase PstAbstractObject.FLOAT:\r\n\t\t\t\t\t\t\t\t\tvalObj = new Float(sa[j]);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase PstAbstractObject.STRING:\r\n\t\t\t\t\t\t\t\t\tvalObj = new String(sa[j]);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase PstAbstractObject.DATE:\r\n\t\t\t\t\t\t\t\t\tvalObj = Util3.df0.parse(sa[j]);\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tcase PstAbstractObject.RAW:\r\n\t\t\t\t\t\t\t\t\tvalObj = sa[j].getBytes();\r\n\t\t\t\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t\t\t\tdefault:\r\n\t\t\t\t\t\t\t\t\tl.error(\"Unsupported data type.\");\r\n\t\t\t\t\t\t\t\t\tcontinue;\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\tnewObj.appendAttribute(attName, valObj);\r\n\t\t\t\t\t\t}\t// END for each value in the value array\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tcatch (Exception e) {l.error(\"exception in getting attribute value for [\" + attName + \"]\");}\r\n\t }\t// END for each attr in the XML message\r\n\r\n\t mgr.commit(newObj);\r\n\t l.info(\"Created new \" + className + \" object [\" + newObj.getObjectId() + \"]\");\r\n\t\t}\r\n\t\tcatch (Exception e)\r\n\t\t{\r\n\t\t\te.printStackTrace();\r\n\t\t\treject(m, \"Copy command failed in copy() operation. \" + e.toString());\r\n\t\t\treturn false;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public MessageWrapper[] onMsgReceive(MSGGameStatus msg, Player sender) {\n Lobby lobby = playerLobbyMap.get(sender);\n if (lobby != null && lobby.getOwner().equals(sender)) {\n lobby.prepareGame();\n\n Message sendMsg = new MSGGameStatus(\n MSGGameStatus.GameStatus.STARTED,\n lobby.getGameSession());\n\n // send back the clients the initial game state\n return MessageWrapper.prepWraps(\n new MessageWrapper(sendMsg,\n playerLobbyMap.get(sender).getPlayers()));\n }\n\n return null;\n }", "private void sendReceiveRes(){\n\t}", "@Override\n\t\t\tpublic long cursor(Cursor cursor) {\n\t\t\t\tint id = cursor.getInt(0);\n\t\t\t\tString fullName = cursor.getString(1);\n\t\t\t\tString fallback_name = cursor.getString(2);\n\t\t\t\tString body = cursor.getString(3);\n\t\t\t\tlong timestamp = cursor.getLong(4);\n\n\t\t\t\tboolean incoming = cursor.getInt(5) == 2;\n\t\t\t\tString chat_id = cursor.getString(6);\n\n\t\t\t\tString peer = fullName;\n\t\t\t\t//if (fallback_name!=null)\n\t\t\t\t//\tpeer = fallback_name;\n\n\t\t\t\t// localtime or gmt? should be converted to gmt\n\t\t\t\tDate date = new Date(timestamp / 1000);\n\n\t\t\t\tif (Cfg.DEBUG) {\n\t\t\t\t\tCheck.log(TAG + \" (cursor) peer: \" + peer + \" timestamp: \" + timestamp + \" incoming: \"\n\t\t\t\t\t\t\t+ incoming);\n\t\t\t\t}\n\n\t\t\t\tboolean isGroup = conversation.isGroup();\n\n\t\t\t\tif (Cfg.DEBUG) {\n\t\t\t\t\tCheck.log(TAG + \" (cursor) incoming: \" + incoming + \" group: \" + isGroup);\n\t\t\t\t}\n\n\t\t\t\tString from, to = null;\n\t\t\t\tString fromDisplay, toDisplay = null;\n\n\t\t\t\tfrom = incoming ? peer : conversation.account;\n\t\t\t\tfromDisplay = incoming ? peer : conversation.account;\n\n\t\t\t\tContact contact = groups.getContact(peer);\n\n\t\t\t\tif (isGroup) {\n\t\t\t\t\t// if (peer.equals(\"0\")) {\n\t\t\t\t\t// peer = conversation.account;\n\t\t\t\t\t// }\n\t\t\t\t\tto = groups.getGroupToName(from, conversation.id);\n\t\t\t\t\ttoDisplay = to;\n\t\t\t\t} else {\n\t\t\t\t\tto = incoming ? conversation.account : conversation.remote;\n\t\t\t\t\ttoDisplay = incoming ? conversation.account : conversation.remote;\n\t\t\t\t}\n\n\t\t\t\tif (!StringUtils.isEmpty(body)) {\n\t\t\t\t\tMessageChat message = new MessageChat(getProgramId(), date, from, fromDisplay, to, toDisplay,\n\t\t\t\t\t\t\tbody, incoming);\n\n\t\t\t\t\tif (Cfg.DEBUG) {\n\t\t\t\t\t\tCheck.log(TAG + \" (cursor) message: \" + message.from + \" \"\n\t\t\t\t\t\t\t\t+ (message.incoming ? \"<-\" : \"->\") + \" \" + message.to + \" : \" + message.body);\n\t\t\t\t\t}\n\t\t\t\t\tmessages.add(message);\n\t\t\t\t}\n\n\t\t\t\treturn timestamp;\n\t\t\t}", "public void setReceiverName(String receiverName) {\n this.receiverName = receiverName;\n }", "public void setReceiverName(String receiverName) {\n this.receiverName = receiverName;\n }", "public void initReceiver() {\n }", "private void getMessageSender(Model model, String[] decrList) {\n if(model instanceof Message){\n Request request = new Request(Request.RequestCode.PERSON_DATA, ((Message)model).getSenderAsPerson());\n prototype.sendRequest(serviceName,request,getNewResponseListener(decrList));\n }\n else if(model instanceof Notification){\n Request request = new Request(Request.RequestCode.PERSON_DATA, ((Notification)model).getSenderAsPerson());\n prototype.sendRequest(serviceName,request,getNewResponseListener(decrList));\n } else {L.e(\"Err, model was not instance of Message or Notification but \" + model.getClass()); }\n }", "public void setReceiverPhone(java.lang.String receiverPhone) {\r\n this.receiverPhone = receiverPhone;\r\n }", "ReadResponseMessage fetchMessagesFromUserToUser(String fromUser, String toUser);", "@Override\n public void onActivityResult(int requestCode, int resultCode, Intent data) {\n super.onActivityResult(requestCode, resultCode, data);\n if (requestCode == 0) {\n// Log.e(\"scanned isbn in task\", result);\n\n if (resultCode == Activity.RESULT_OK || resultCode == RESULT_INCOMPLETE) {\n String result = data.getStringExtra(\"isbn\");\n\n if (selectedISBN.equals(result)) {\n Intent intent = new Intent(ReturningTaskActivity.this, SuccessExchangeActivity.class);\n intent.putExtra(\"RETURNER\", result);\n intent.putExtra(\"OTHER_UID\", otherUID);\n startActivity(intent);\n } else {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN did not match selected book!\",\n Toast.LENGTH_SHORT).show();\n }\n } else if (resultCode == RESULT_INVALID) {\n Toast.makeText(ReturningTaskActivity.this, \"ISBN is not valid\",\n Toast.LENGTH_SHORT).show();\n }\n }\n }", "public ReceiverEntity actualizarReceiver (Long id, ReceiverEntity ReceiverAcualizar){\r\n ReceiverEntity receiverUpdate = persistence.update(ReceiverAcualizar);\r\n return receiverUpdate;\r\n }", "boolean hasReceiverID();", "public void blockingReceiveSenderSide() throws OOBException {\n \t}", "@Override\n\tpublic void onSendPrivateChatDone(byte result) {\n\t\tif(WarpResponseResultCode.SUCCESS==result){\n\t\t\tLog.d(\"Receiver\", \"He is Online\");\n\t\t\tChatActivity.this.runOnUiThread(new Runnable() {\n\t\t\t\t public void run() {\n\t\t\t\t\t sa = ((SharingAtts)getApplication());\n\t\t\t\t\t ItemTest it = new ItemTest();\n\t\t\t\t\t String colNames = it.printData(\"chat\")[1];\n\t\t\t\t\t DBManager dbm = new DBManager(ChatActivity.this, colNames,\"chat\",it.printData(\"chat\")[0]);\n\t\t\t\t\t dbm.openToWrite();\n\t\t\t\t\t dbm.cretTable();\n\t\t\t\t\t msg = msg.replace(\" \", \"?*\");\n\t\t\t\t\t dbm.insertQuery(sa.name+\" \"+msg+\" \"+challenged, colNames.split(\" \")[1]+\" \"+colNames.split(\" \")[2]+\" \"+colNames.split(\" \")[3]);\n\t\t\t\t\t dbm.close();\n\t\t\n\t\t\t\t }\n\t\t\t});\n\t\t\t\n\t\t\t\n\t\t}else{\n\t\t\tChatActivity.this.runOnUiThread(new Runnable() {\n\t\t\t\t public void run() {\n\t\t\t\t\t Toast.makeText(ChatActivity.this, \"Receiver is offline. Come back later\", Toast.LENGTH_SHORT).show();\t\n\t\t\t\t\t \n\t\t\t\t }\n\t\t\t});\n\t\t}\n\t}", "public void setEditingMessageObject(org.telegram.messenger.MessageObject r5) {\n /*\n r4 = this;\n r0 = r4.editingMessageObject;\n if (r0 != r5) goto L_0x0005;\n L_0x0004:\n return;\n L_0x0005:\n r4.editingMessageObject = r5;\n r5 = r4.editingMessageObject;\n r0 = 1;\n if (r5 == 0) goto L_0x000f;\n L_0x000c:\n r4.maxSelectedPhotos = r0;\n goto L_0x0012;\n L_0x000f:\n r5 = -1;\n r4.maxSelectedPhotos = r5;\n L_0x0012:\n r5 = r4.adapter;\n r5.notifyDataSetChanged();\n r5 = 0;\n r1 = 0;\n L_0x0019:\n r2 = 4;\n if (r1 >= r2) goto L_0x004e;\n L_0x001c:\n r2 = r4.attachButtons;\n r3 = r1 + 3;\n r2 = r2.get(r3);\n r2 = (org.telegram.p004ui.Components.ChatAttachAlert.AttachButton) r2;\n r3 = 2;\n if (r1 >= r3) goto L_0x0038;\n L_0x0029:\n r3 = r4.editingMessageObject;\n if (r3 == 0) goto L_0x0036;\n L_0x002d:\n r3 = r3.hasValidGroupId();\n if (r3 != 0) goto L_0x0034;\n L_0x0033:\n goto L_0x0036;\n L_0x0034:\n r3 = 0;\n goto L_0x003d;\n L_0x0036:\n r3 = 1;\n goto L_0x003d;\n L_0x0038:\n r3 = r4.editingMessageObject;\n if (r3 != 0) goto L_0x0034;\n L_0x003c:\n goto L_0x0036;\n L_0x003d:\n r2.setEnabled(r3);\n if (r3 == 0) goto L_0x0045;\n L_0x0042:\n r3 = 1065353216; // 0x3f800000 float:1.0 double:5.263544247E-315;\n goto L_0x0048;\n L_0x0045:\n r3 = 1045220557; // 0x3e4ccccd float:0.2 double:5.164075695E-315;\n L_0x0048:\n r2.setAlpha(r3);\n r1 = r1 + 1;\n goto L_0x0019;\n L_0x004e:\n r4.updatePollMusicButton();\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: org.telegram.p004ui.Components.ChatAttachAlert.setEditingMessageObject(org.telegram.messenger.MessageObject):void\");\n }", "public void setReceiverFirstName(java.lang.String receiverFirstName) {\r\n this.receiverFirstName = receiverFirstName;\r\n }", "@Override\n\t\t\tpublic void handleMessage(android.os.Message msg) {\n\t\t\t\tsuper.handleMessage(msg);\n\n\t\t\t\tswitch (msg.what) {\n\t\t\t\tcase HandleConfig.GETROOMINFO:// 获取room详情,并且1分钟更新一次\n\t\t\t\t\tdismissProcessDialog();\n\t\t\t\t\tNetEntry entry = decodePointList(msg.getData().getString(\n\t\t\t\t\t\t\t\"data\"));\n\t\t\t\t\tif (NetEntry.CODESUCESS.equals(entry.status)) {\n\t\t\t\t\t\tupdteRoomInfo(msg.getData().getString(\"data\"));\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToastError(entry.msg);\n\t\t\t\t\t}\n\t\t\t\t\tandroid.os.Message mg = android.os.Message.obtain();\n\t\t\t\t\tmg.what = HandleConfig.REFRESHROOMINFO;\n\t\t\t\t\tmHandler.sendMessageDelayed(mg, 10000);\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase HandleConfig.REFRESHROOMINFO:\n\t\t\t\t\tif(isFinishing()==false){\n\t\t\t\t\t\tgetroominfo(roomid);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase HandleConfig.QUERYROOMUSERS:// 更新room user list\n\n\t\t\t\t\tNetEntry entry1 = decodePointList(msg.getData().getString(\n\t\t\t\t\t\t\t\"data\"));\n\n\t\t\t\t\tif (NetEntry.CODESUCESS.equals(entry1.status)) {\n\t\t\t\t\t\tJSONObject jsonobj;\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tjsonobj = new JSONObject(msg.getData().getString(\n\t\t\t\t\t\t\t\t\t\"data\"));\n\n\t\t\t\t\t\t\tJSONObject tmp = jsonobj.getJSONObject(\"data\");\n\t\t\t\t\t\t\tJSONArray tmpList = tmp.getJSONArray(\"list\");\n\t\t\t\t\t\t\tperson.clear();\n\t\t\t\t\t\t\tfor (int i = 0; i < tmpList.length(); i++) {\n\t\t\t\t\t\t\t\tJSONObject t = tmpList.getJSONObject(i);\n\t\t\t\t\t\t\t\tString phone = t.getString(\"phone\");\n\t\t\t\t\t\t\t\tString id = t.getString(\"id\");\n\t\t\t\t\t\t\t\tString name = t.getString(\"name\");\n\t\t\t\t\t\t\t\tString headpic = t.getString(\"headpic\");\n\t\t\t\t\t\t\t\tif (phone.equals(owner.phone)) {// 房主\n\t\t\t\t\t\t\t\t\tcontinue;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tMessagePerson p = new MessagePerson();\n\t\t\t\t\t\t\t\tp.id = id;\n\t\t\t\t\t\t\t\tp.name=name;\n\t\t\t\t\t\t\t\tp.pic = headpic;\n\t\t\t\t\t\t\t\tp.phone = phone;\n\t\t\t\t\t\t\t\tperson.add(p);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\tbigWindow.UpdateRoomPerson(person);\n\t\t\t\t\t\t} catch (JSONException e) {\n\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\te.printStackTrace();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} else {\n\t\t\t\t\t\tshowToastError(entry1.msg);\n\t\t\t\t\t}\n\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tshowToastError(\"聊天室链接失败\");\n\t\t\t\tcase 4:\n\t\t\t\t\tdismissProcessDialog();\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}", "public void setReceiverEmail(java.lang.String receiverEmail) {\r\n this.receiverEmail = receiverEmail;\r\n }", "@Override\n\tpublic MessageVO readMessage(String userid, int mid) {\n\t\treturn null;\n\t}", "@Override\n\tpublic void onPrivateChatReceived(final String sender, final String msg) {\n\t\tChatActivity.this.runOnUiThread(new Runnable() {\n\t\t\t public void run() {\n\t\t\t\t sa = ((SharingAtts)getApplication());\n\t\t\t\t chat.append(sender+\": \"+msg+\"\\n\");\t\n\t\t\t\t ItemTest it = new ItemTest();\n\t\t\t\t String colNames = it.printData(\"chat\")[1];\n\t\t\t\t DBManager dbm = new DBManager(ChatActivity.this, colNames,\"chat\",it.printData(\"chat\")[0]);\n\t\t\t\t dbm.openToWrite();\n\t\t\t\t dbm.cretTable();\n\t\t\t\t String msg2 = msg.replace(\" \", \"?*\");\n\t\t\t\t dbm.insertQuery(sender+\" \"+msg2+\" \"+sa.name, colNames.split(\" \")[1]+\" \"+colNames.split(\" \")[2]+\" \"+colNames.split(\" \")[3]);\n\t\t\t\t dbm.close();\n\t\t\t }\n\t\t});\n\t\t\n\t\t\n\t\t\n\t}", "private void fetchChatContact(){\n chatRemoteDAO.getAllChatRequestHandler(profileRemoteDAO.getUserId());\n }", "java.lang.String getSenderId();", "public void setReceiverAddress(java.lang.String receiverAddress) {\r\n this.receiverAddress = receiverAddress;\r\n }", "private void readMessages(String myId, String userId, User user) {\n db.collection(COLLECTION)\n .orderBy(\"createdAt\", Query.Direction.ASCENDING)\n .addSnapshotListener((value, e) -> {\n if (e != null) {\n Log.w(TAG, \"Listen failed.\", e);\n loadingDialog.dismiss();\n return;\n }\n //Redraw on data change\n chats.clear();\n for (QueryDocumentSnapshot document : Objects.requireNonNull(value)) {\n if (document.getBoolean(\"isSeen\") != null) {\n Chat chat = new Chat(\n document.getString(\"sender\"),\n document.getString(\"receiver\"),\n document.getString(\"message\"),\n document.getBoolean(\"isSeen\"));\n\n //Check if the current user is the receiver or sender of the message\n if (chat.getReceiver().equals(myId) && chat.getSender().equals(userId) ||\n chat.getReceiver().equals(userId) && chat.getSender().equals(myId)) {\n //Show conversation in screen\n chats.add(chat);\n // 3. create an adapter\n messageAdapter = new MessageAdapter(chats, user);\n // 4. set adapter\n recyclerView.setAdapter(messageAdapter);\n }\n if (chat.getReceiver().equals(myId) && chat.getSender().equals(userId)) {\n seenMessage(document.getId());\n }\n }\n }\n loadingDialog.dismiss();\n });\n }", "public java.lang.Integer getReceiverAccountNumber() {\r\n return receiverAccountNumber;\r\n }", "@Override\r\n\t\t\t\t\tpublic Message getResultObject(ResultSet rs)\r\n\t\t\t\t\t\t\tthrows SQLException, DbException {\n\t\t\t\t\t\tif (rs != null) {\r\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\tmessage.setId(rs.getInt(1));\r\n\t\t\t\t\t\t\tmessage.setUserId(rs.getString(2));\r\n\t\t\t\t\t\t\tmessage.setSendUserId(rs.getString(3));\r\n\t\t\t\t\t\t\tmessage.setOrderId(rs.getString(4));\r\n\t\t\t\t\t\t\tmessage.setTitle(rs.getString(5));\r\n\t\t\t\t\t\t\tmessage.setContent(rs.getString(6));\r\n\t\t\t\t\t\t\tmessage.setcDate(rs.getTimestamp(7));\r\n\t\t\t\t\t\t\tmessage.setState(rs.getInt(8));\r\n\t\t\t\t\t\t\treturn message;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}", "@Override\r\n\t\t\t\t\tpublic Message getResultObject(ResultSet rs)\r\n\t\t\t\t\t\t\tthrows SQLException, DbException {\n\t\t\t\t\t\tif (rs != null) {\r\n\t\t\t\t\t\t\tMessage message = new Message();\r\n\t\t\t\t\t\t\tmessage.setId(rs.getInt(1));\r\n\t\t\t\t\t\t\tmessage.setUserId(rs.getString(2));\r\n\t\t\t\t\t\t\tmessage.setSendUserId(rs.getString(3));\r\n\t\t\t\t\t\t\tmessage.setOrderId(rs.getString(4));\r\n\t\t\t\t\t\t\tmessage.setTitle(rs.getString(5));\r\n\t\t\t\t\t\t\tmessage.setContent(rs.getString(6));\r\n\t\t\t\t\t\t\tmessage.setcDate(rs.getTimestamp(7));\r\n\t\t\t\t\t\t\tmessage.setState(rs.getInt(8));\r\n\t\t\t\t\t\t\treturn message;\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t\treturn null;\r\n\t\t\t\t\t}", "public Receiver getReceiver() {\n return new Receiver(this);\n }", "private void setupUiThreadBroadCastMessageReceiver() {\n uiThreadMessageReceiver = new BroadcastReceiver() {\n @Override\n public void onReceive(Context context, Intent intent) {\n //Check if the Intents purpose is to send the message.\n String action = intent.getAction();\n if (action.equals(XmppConnectionService.SEND_MESSAGE)) {\n //Send the message.\n sendMessage(intent.getStringExtra(XmppConnectionService.BUNDLE_MESSAGE_BODY),\n intent.getStringExtra(XmppConnectionService.BUNDLE_TO));\n }\n }\n };\n\n IntentFilter filter = new IntentFilter();\n filter.addAction(XmppConnectionService.SEND_MESSAGE);\n mApplicationContext.registerReceiver(uiThreadMessageReceiver, filter);\n\n }", "@Override\n protected void onReceiveResult(int resultCode, Bundle resultData) {\n // Display the address string or an error message sent from the intent service.\n //.getString(Constants.ADDRESS_RESULT_KEY);\n // Address current_location = getIntent().getExtras().getParcelable(Constants.ADDRESS_RESULT_KEY);\n mAddress = resultData;\n updateUI();\n }", "@Override\n public void handleMessage(Message msg) {\n switch (msg.what) {\n case EVENT_VOICEMAIL_CHANGED:\n handleSetVMMessage((AsyncResult) msg.obj);\n break;\n default:\n // TODO: should never reach this, may want to throw exception\n }\n }", "public void onReceiveMessageInBackground(Context context,\n Object newTag, ChatMessage message,\n List<Participant> participantList, final int id,\n boolean isStoreAndFoward) {\n Logger.d(TAG,\n \"onReceiveMessageInBackground(), the newTag is \"\n + newTag + \" isStoreAndFoward \"\n + isStoreAndFoward + \"messageid is \"\n + message.getId());\n if (mIsInChatMainActivity) {\n Logger.e(TAG,\n \"onReceiveMessageInBackground() mIsInChatMainActivity is true)\");\n return;\n }\n String ticker = null;\n String contact = getRemoteContact(message);\n if (null != contact) {\n if (Utils.isANumber(contact)) {\n contact = ContactsListManager.getInstance()\n .getDisplayNameByPhoneNumber(contact);\n } else {\n Logger.d(TAG,\n \"onReceiveMessageInBackground(), contact is null\");\n }\n }\n if (contact != null) {\n ticker = contact + \":\" + message.getMessage();\n }\n String notifyTitle = contact;\n if (participantList != null && participantList.size() > 1) {\n notifyTitle = getGroupNotificationTitle(participantList);\n }\n String description = message.getMessage();\n if (mUnReadMessagesChatInfos.containsKey(newTag)) {\n ChatReceivedInfo chatInfo = mUnReadMessagesChatInfos\n .get(newTag);\n if (chatInfo != null) {\n chatInfo.updateMessage(notifyTitle);\n }\n } else {\n mUnReadMessagesChatInfos.put(newTag,\n new ChatReceivedInfo(notifyTitle, description));\n }\n if (!isStoreAndFoward) {\n Logger.d(TAG,\n \"onReceiveMessageInBackground(), isStoreAndFoward is \"\n + isStoreAndFoward);\n updateReceiveMessageNotification(ticker, true);\n } else if (!RcsNotification.getInstance().mIsStoreAndForwardMessageNotified) {\n Logger.d(TAG, \"onReceiveMessageInBackground(), \"\n + \"mIsStoreAndForwardMessageNotified is false \");\n updateReceiveMessageNotification(ticker, true);\n RcsNotification.getInstance().mIsStoreAndForwardMessageNotified = true;\n } else {\n Logger.d(TAG, \"onReceiveMessageInBackground(), \"\n + \"mIsStoreAndForwardMessageNotified is true \");\n updateReceiveMessageNotification(ticker, false);\n }\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = RemoteInput.getResultsFromIntent(intent);\n if (bundle != null) {\n //Should actually use extractMessagingStyleFromNotification() or use database..\n CharSequence replyText = bundle.getCharSequence(KEY_REMOTE_INPUT);\n Message reply = new Message(replyText, USER_NAME);\n MainActivity.MESSAGES.add(reply);\n\n MainActivity.sendMessageChannel(context);\n }\n }", "public void action() {\n for (int i = 0; i < myAgent.friends.size(); ++i) {\n SendRequestToFriend(myAgent.friends.get(i));\n }\n\n // Crée un filtre pour lire d'abord les messages des amis et des leaders des amis\n MessageTemplate temp = MessageTemplate.MatchReceiver(myfriends);\n MessageTemplate temp2 = MessageTemplate.MatchReceiver(friendsLeader);\n MessageTemplate tempFinal = MessageTemplate.or(temp, temp2);\n\n // Réception des messages\n ACLMessage messageFriendly = myAgent.receive(tempFinal);\n // si on n'est pas dans un groupe\n if (messageFriendly != null && !inGroup) {\n \t// s'il reçoit une proposition d'un amis/ leader d'un ami, il accepte, peu importe le poste et s econsidère dans le groupe\n if (messageFriendly.getPerformative() == ACLMessage.PROPOSE) {\n AcceptProposal(messageFriendly, Group.Role.valueOf(messageFriendly.getContent()));\n inGroup = true;\n }\n // s'il reçoit un CONFIRM, il enregistre le leader\n else if (messageFriendly.getPerformative() == ACLMessage.CONFIRM) {\n myLeader = messageFriendly.getSender();\n }\n // s'il reçoit un INFORM, il enregistre l'AID du leader de son ami afin de recevoir ses messages et lui demande son poste préféré\n else if (messageFriendly.getPerformative() == ACLMessage.INFORM) {\n AddFriendsLeaderToList(messageFriendly);\n AnswerByAskingPreferedJob(messageFriendly);\n }\n // sinon, il renvoie une erreur\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFriendly );\n }\n }\n // si on est dans un groupe\n else if (messageFriendly != null && inGroup) { \n \t// s'il reçoit une requete et qu'il est déjà dans un groupe, il renvoir l'AID de son leader à son ami\n if (messageFriendly.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFriendly);\n }\n // s'il reçoit un DISCONFIRM, il se remet en quete de job\n else if (messageFriendly.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFriendly);\n }\n else {\n \t// sinon, il refuse tout offre\n RefuseOffer(messageFriendly);\n }\n }\n else {\n \t// on check ensuite les messages des inconnus, une fois ceux des amis triés\n ACLMessage messageFromInconnu = myAgent.receive();\n \n // si on n'est pas dans un groupe\n if (messageFromInconnu != null && !inGroup) {\n \n boolean offerPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent().equals((\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\"));\n boolean offerNotPreferedJob = messageFromInconnu.getPerformative() == ACLMessage.PROPOSE && messageFromInconnu.getContent() != (\"\\\"\" + myAgent.preferedRole.toString() + \"\\\"\" );\n \n //on accepte l offre s'il s'agit de notre role préféré\n if (offerPreferedJob){\n AcceptProposal(messageFromInconnu, myAgent.preferedRole);\n }\n // on refuse s'il ne s'agit pas de notre offre favorite en redemandant notre job préféré\n else if (offerNotPreferedJob){\n RefuseOffer(messageFromInconnu);\n }\n // si on reçoit une confimation, on se considère dans un groupe et on enregistre notre leader\n else if (messageFromInconnu.getPerformative() == ACLMessage.CONFIRM){\n inGroup = true;\n myLeader = messageFromInconnu.getSender();\n }\n // sinon, il s'agit d'une erreure\n else {\n System.out.println( \"Friendly received unexpected message: \" + messageFromInconnu );\n }\n }\n // si on est dans un groupe\n else if (messageFromInconnu != null && inGroup) {\n \t// si on reçoit une requete, on renvoie à notre leader\n if (messageFromInconnu.getPerformative() == ACLMessage.REQUEST) {\n SendLeaderAID(messageFromInconnu);\n }\n // si on reçoit un DISCONFIRM, on repart en quete de job\n else if (messageFromInconnu.getPerformative() == ACLMessage.DISCONFIRM) {\n inGroup = false;\n AnswerByAskingPreferedJob(messageFromInconnu);\n }\n // sinon on refuse\n else {\n RefuseOffer(messageFromInconnu);\n }\n }\n // si le message est vide, on bloque le flux\n else {\n block();\n }\n }\n }", "@Override\n public void onReceive(DataTransfer message) {\n ChatBox currentChatBox = getCurrentChat();\n final String current = currentChatBox != null ? currentChatBox.getTarget() : null;\n\n boolean isCurrentOnline = current == null;\n\n // Clear all exist chat item\n lvUserItem.getItems().clear();\n\n // Retrieve online users\n List<String> onlineUsers = (List<String>) message.data;\n\n // Clear all offline user chat messages in MessageManager\n MessageManager.getInstance().clearOffline(onlineUsers);\n MessageSubscribeManager.getInstance().clearOffline(onlineUsers);\n\n for (String user : onlineUsers) {\n // Add user (not your self) into listview\n if (!username.equals(user)) {\n ChatItem item = new UserChatItem();\n item.setName(user);\n lvUserItem.getItems().add(item);\n\n // Check whether current user still online\n if (user.equals(current))\n isCurrentOnline = true;\n else {\n String topic = String.format(\"chat/%s\", user);\n if (!MessageSubscribeManager.getInstance().containsKey(topic)) {\n // with other user listen message\n Subscriber subscriber = subscribeMessages(username, topic);\n MessageSubscribeManager.getInstance().put(topic, subscriber);\n }\n }\n }\n }\n\n // In case current user offline\n // Clear chat box\n if (!isCurrentOnline) {\n clearChatBox();\n }\n }", "public Long getReceiverAreaId() {\n return receiverAreaId;\n }", "public void reply(){\n ArrayList<String> potentialReceivers= messageController.replyOptionsForSpeaker(speaker);\n ArrayList<String> options = listBuilderWithIntegers(potentialReceivers.size());\n speakerMessageScreen.replyOptions(messageController.replyOptionsForSpeakerInString(speaker));\n if(messageController.replyOptionsForSpeakerInString(speaker).size() != 0) {\n String answerInString = scanner.nextLine();\n while(!options.contains(answerInString)){\n speakerMessageScreen.invalidInput(answerInString);\n answerInString = scanner.nextLine();\n }\n\n // now answer is valid\n\n int answerInInteger = Integer.parseInt(answerInString);\n String receiver = potentialReceivers.get(answerInInteger - 1);\n\n speakerMessageScreen.whatMessage();\n String messageContext = scanner.nextLine();\n messageController.sendMessage(speaker, receiver, messageContext);\n speakerMessageScreen.congratulations();\n }\n\n }", "@Override\r\n public boolean setResultSpecific(int taskid, Object data, String message, String sender) {\r\n String token=\"c4csecretkey\";\r\n boolean flag = false; \r\n String[] msg = message.split(\",\");\r\n HashMap<String,String> model=(HashMap<String,String>)data;\r\n //System.out.println(\"[C4C-REPLY] response received with: \"+msg[0]+ \"--\"+msg[1]+\"--\"+msg[2]);\r\n String tupleTag = msg[0];\r\n String taskType = msg[1];\r\n //double result = Double.valueOf(msg[2]);\r\n String localdisc=null;\r\n String port = msg[3];\r\n String discipline =msg[msg.length-1];\r\n if(tupleTag.equals(\"FETCH\")){\r\n synchronized(lock){\r\n if(taskType.equals(\"c4c\")){ \r\n //----PETRI\r\n System.out.println(\"[C4C-Notification] Received response from \"+\"\" + \r\n \"discipline \"+discipline );\r\n try {\r\n localdisc=C4CHelper.getDiscipline(token);\r\n if (!localdisc.equals(discipline)){ \r\n //System.out.println(\"[Notification-Reciever] Received \"+model.size()+\" objects from discipline \"+discipline);\r\n C4CHelper.models.add(model); \r\n C4CHelper.modelNames.add(discipline.substring(0,1));\r\n if (C4CHelper.models.size()>=3) {\r\n System.out.println(\"[Notification-Reciever] Merging Models\");\r\n C4CHelper.finalModels = new ArrayList<HashMap<String,String>>();\r\n C4CHelper.finalModels=C4CHelper.models;\r\n //System.out.println(\"[C4C-FECTH] merge model activated!\");\r\n \r\n } \r\n }\r\n } catch (Exception ex) {\r\n ex.printStackTrace();\r\n Logger.getLogger(FedMeteorPublisherMaster.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n \r\n }\r\n //end change way to decide winner in auction\r\n }\r\n //long stime = System.currentTimeMillis();\r\n System.out.println(\"[C4C-Notification] Fetch process finished!\");\r\n \r\n } else if(tupleTag.contains(\"EVENT\")){\r\n //long stime = System.currentTimeMillis();\r\n System.out.println(\"[C4C-Notification] Event process finished!\");\r\n \r\n } else if(tupleTag.contains(\"CONFIG\")){\r\n //long stime = System.currentTimeMillis();\r\n System.out.println(\"[C4C-Notification] Config process finished!\");\r\n }\r\n \r\n else{\r\n System.out.println(\"Result message type not found!\");\r\n }\r\n \r\n //Set task as done and increment completed tasks\r\n setTaskStatus(taskid); \r\n\r\n //System.out.println(\"Result taskid=\" + taskid + \" received \" + countFinishedTasks() + \"/\" + getNumOfTasks());\r\n FedLog.writeLog(this.getPeerIP().split(\":\")[1],\"masterLog%g-\"+this.getPeerIP().substring(2)+\".log\",\"Result taskid=\" + taskid + \" received \" + countFinishedTasks() + \"/\" + getNumOfTasks(),\"info\"); \r\n //System.out.println(\"ResultList: \"+ resultList);\r\n //check if it gets all results \r\n \r\n return true;\r\n }", "private EntityResponseToUser replyToCampaignMessage(String userId,\n String campaignUid,\n String priorMessageUid,\n CampaignActionType action,\n String userResponse) {\n log.info(\"### Initiating campaign reply sequence message for action type {}, user response {}, campaign ID: {}\", action, userResponse, campaignUid);\n if (action == null) {\n log.error(\"Null action type received, curious, return empty response\");\n return EntityResponseToUser.cannotRespond(JpaEntityType.CAMPAIGN, campaignUid);\n }\n\n // note: this action is what the user selected based on prior menu / prompt, i.e., JOIN_GROUP does not mean ask them if they want to join,\n // but means they have chosen to join, and sequence is roughly as it is usually present to user\n switch (action) {\n case SIGN_PETITION: campaignBroker.signPetition(campaignUid, userId, UserInterfaceType.WHATSAPP); break;\n case JOIN_GROUP: campaignBroker.addUserToCampaignMasterGroup(campaignUid, userId, UserInterfaceType.WHATSAPP); break;\n case TAG_ME: campaignBroker.setUserJoinTopic(campaignUid, userId, userResponse, UserInterfaceType.WHATSAPP); break;\n case SHARE_SEND: campaignBroker.sendShareMessage(campaignUid, userId, userResponse, null, UserInterfaceType.WHATSAPP); break;\n case RECORD_MEDIA: campaignBroker.recordUserSentMedia(campaignUid, userId, UserInterfaceType.WHATSAPP); break;\n default: log.info(\"No action possible for incoming user action {}, just returning message\", action); break;\n }\n\n // so this message must be set as the one for _after_ the user has decided to take the action (NB).\n List<CampaignMessage> nextMsgs = new ArrayList<>();\n // todo : move lower logic into else branch\n if (!NO_RESPONSE_CAMPAIGN_ACTIONS.contains(action)) {\n nextMsgs = campaignBroker.findCampaignMessage(campaignUid, action, null, UserInterfaceType.WHATSAPP);\n if (nextMsgs == null || nextMsgs.isEmpty()) {\n log.info(\"Could not find message from action, tracing from prior, prior uid: {}\", priorMessageUid);\n nextMsgs = Collections.singletonList(campaignBroker.findCampaignMessage(campaignUid, priorMessageUid, action));\n }\n log.info(\"Next campaign messages found: {}\", nextMsgs);\n }\n\n List<String> messageTexts = nextMsgs.stream().map(CampaignMessage::getMessage).collect(Collectors.toList());\n LinkedHashMap<String, String> actionOptions = nextMsgs.stream().filter(CampaignMessage::hasMenuOptions).findFirst()\n .map(this::getMenuFromMessage).orElse(new LinkedHashMap<>());\n messageTexts.addAll(actionOptions.values());\n\n RequestDataType requestDataType = RequestDataType.NONE;\n\n // if we have no menu, then cycle through last questions : note, really need to make this cleaner, and also\n // think of how to make it configurable (probably via next msg logic, but with a default skipping if user already set)\n log.info(\"No menu with options left, so see what can come next\");\n if (actionOptions.isEmpty()) {\n requestDataType = handleEndOfFlowStdRequests(userId, campaignUid, action, messageTexts, actionOptions);\n }\n\n return EntityResponseToUser.builder()\n .entityType(JpaEntityType.CAMPAIGN)\n .entityUid(campaignUid)\n .requestDataType(requestDataType)\n .messages(messageTexts)\n .menu(actionOptions)\n .build();\n }", "Cursor getUndeliveredOneToOneChatMessages();", "private NotificationVo setResultMsg(NotificationVo vo, MessageResult mr) {\n\t\tif (mr.getErrid().equals(TaxUtil.MESSAGE_STATUS_SUCCESS)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_SUCCESS_MSG);\r\n\t\t} else if (mr.getErrid().equals(TaxUtil.MESSAGE_STATUS_SYSTEM_ISSUE)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_SYSTEM_ISSUE_MSG);\r\n\t\t} else if (mr.getErrid().equals(TaxUtil.MESSAGE_STATUS_PASSWORD_ISSUE)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_PASSWORD_ISSUE_MSG);\r\n\t\t} else if (mr.getErrid().equals(TaxUtil.MESSAGE_STATUS_MOBILE_ISSUE)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_MOBILE_ISSUE_MSG);\r\n\t\t} else if (mr.getErrid().equals(\r\n\t\t\t\tTaxUtil.MESSAGE_STATUS_CONTENT_TOOLONG_ISSUE)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_CONTENT_TOOLONG_ISSUE_MSG);\r\n\t\t} else if (mr.getErrid().equals(\r\n\t\t\t\tTaxUtil.MESSAGE_STATUS_CONTENT_CHAR_ISSUE_MSG)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_CONTENT_CHAR_ISSUE_MSG);\r\n\t\t} else if (mr.getErrid().equals(TaxUtil.MESSAGE_STATUS_BALANCE_ISSUE)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_BALANCE_ISSUE_MSG);\r\n\t\t} else if (mr.getErrid().equals(TaxUtil.MESSAGE_STATUS_ACCOUNT_ISSUE)) {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_ACCOUNT_ISSUE_MSG);\r\n\t\t} else {\r\n\t\t\tvo.setResultMsg(TaxUtil.MESSAGE_STATUS_UNKNOW_MSG);\r\n\t\t}\r\n\t\treturn vo;\r\n\t}", "@Override\n public void onReceiveResult(int resultCode, Bundle resultData) {\n if(resultData.getString(\"serviceResult\").equals(\"noUpdate\")) {\n System.out.println(\"nothing\");\n }\n else if(resultData.getString(\"serviceResult\").equals(\"doUpdate\")) {\n System.out.println(\"something\");\n DashboardActivity tempFragment = (DashboardActivity) fragmentManager.findFragmentByTag(\"DashboardLayout\");\n if(tempFragment != null) {\n tempFragment.RefreshLayout();\n }\n else {\n System.out.println(\"in main, dashboardfragment null, will not update\");\n }\n FavEmailActivity feFragment = (FavEmailActivity) fragmentManager.findFragmentByTag(\"FavEmailLayout\");\n if(feFragment != null) {\n feFragment.RefreshLayout();\n }\n else {\n System.out.println(\"in main, favemailfragment null, will not update\");\n }\n }\n messageServiceIntent = new Intent(this, CheckEmailService.class);\n messageServiceIntent.putExtra(\"receiverTag\", mReceiver);\n System.out.println(\"another round\");\n startService(messageServiceIntent);\n //Log.d(\"sohail\",\"received result from Service=\"+resultData.getString(\"ServiceTag\"));\n\n }", "public void setReceiveObject(int receiveObject) {\n\t\tthis.receiveObject = receiveObject;\n\t}", "@Override\n public void onMessageReceived(List<EMMessage> messages) {\n for (EMMessage message : messages) {\n String username = null;\n // group message\n if (message.getChatType() == ChatType.GroupChat || message.getChatType() == ChatType.ChatRoom) {\n username = message.getTo();\n } else {\n // single chat message\n username = message.getFrom();\n }\n // if the message is for current conversation\n if (username.equals(toChatUsername) || message.getTo().equals(toChatUsername) || message.conversationId().equals(toChatUsername)) {\n messageList.refreshSelectLast();\n EaseUI.getInstance().getNotifier().vibrateAndPlayTone(message);\n conversation.markMessageAsRead(message.getMsgId());\n } else {\n EaseUI.getInstance().getNotifier().onNewMsg(message);\n }\n }\n }", "private void messageHandler(Message message, ArrayList<Message> from,\t\n\t\t\tArrayList<Message> to) {\n\t\tassert (message != null);\n\t\tassert (from != null);\n\t\tassert (to != null);\n\t\tif (from.size() > 0) {\n\t\t\tMessage responderMessage = from.remove(0);\n\t\t\ttry {\n\t\t\t\tchannel.sendMessage(\n\t\t\t\t\t\tnew Message(Message.Type.Assigned, message.getInfo(),\n\t\t\t\t\t\t\t\tresponderMessage.getClientID()).toString(),\n\t\t\t\t\t\tresponderMessage.getClientID());\n \n\t\t\t\tchannel.sendMessage(new Message(Message.Type.Assigned,\n\t\t\t\t\t\tresponderMessage.getInfo(), message.getClientID())\n\t\t\t\t\t\t.toString(), message.getClientID());\n\t\t\t\tmethods.add(responderMessage.getType().toString()); // adds the type of request to the methods array to store it \n\t\t\t \n\t\t\t\t\n\t\t\t\n\t\t\t} catch (ChannelException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t} else {\n\t\t\tto.add(message);\n\t\t\ttry {\n\t\t\t\tchannel.sendMessage(new Message(Message.Type.Searching, \"\",\n\t\t\t\t\t\tmessage.getClientID()).toString(), message\n\t\t\t\t\t\t.getClientID());\n\t\t\t} catch (ChannelException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\tSystem.exit(1);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void onBindViewHolder(ViewHolder holder, int position) {\n\n\n\n String username = SharedPrefManager.getInstance(context).getUsername();\n\n // UserCurrent usercurrent = new UserCurrent(username, context);\n\n\n\n\n //String usercurretntId = usercurrent.getId2();\n\n\n\n final MessageList messageList = mMessageList.get(position);\n\n messageList.getReciver_id();\n\n //Toast.makeText(context, messageList.getReciver_id() + \" ayo\", Toast.LENGTH_SHORT).show();\n\n //if(messageList.getSender_id())\n\n //if (messageList.getSender_id() != usercurrent.getId2() || messageList.getSender_id() != usercurrent.getId2()){\n\n // holder.tvMessageLeft.setText(messageList.getMessage());\n\n //}else{\n // holder.tvMessageRight.setText(messageList.getMessage());\n //}\n\n\n Integer currentidAYO = SharedPrefManager.getInstance(context).getKeyUserId();\n // int mCurrentID = Integer.parseInt(currentidAYO);\n\n String checkId = messageList.getReciver_id();\n int mReciverId = Integer.parseInt(checkId);\n // Toast.makeText(context, currentidAYO, Toast.LENGTH_SHORT).show();\n\n String mCurrentUsername = SharedPrefManager.getInstance(context).getUsername();\n //int mCurrentId = new UserCurrent().loadUser(mCurrentUsername);\n\n //Toast.makeText(context, mCurrentId + \"Adapter Current\", Toast.LENGTH_SHORT).show();\n //Toast.makeText(context, mReciverId + \"Adapter reciver\", Toast.LENGTH_SHORT).show();\n\n //UserCurrent userCurrent = new UserCurrent();\n\n Integer mCurrentIdint = SharedPrefManager.getInstance(context).getCurretUserIDint();\n\n if( mCurrentIdint == mReciverId){\n holder.tvMessageLeft.setText(messageList.getMessage());\n holder.tvMessageRight.setVisibility(View.GONE);\n }\n else{\n holder.tvMessageRight.setText(messageList.getMessage());\n holder.tvMessageLeft.setVisibility(View.GONE);\n holder.ivUserIcon.setVisibility(View.GONE);\n\n // Toast.makeText(context, messageList.getSender_id(), Toast.LENGTH_SHORT).show();\n //Toast.makeText(context, usercurrent.getId2() + \" sup\", Toast.LENGTH_SHORT).show();\n }\n\n\n // final String post_id = listItem.getPost_id();\n\n\n // holder.tvMessageLeft.setText(messageList.getMessage());\n // holder.tvMessageRight.setText(messageList.getMessage());\n //holder.tvPost_IDCMT.setText(messageList.getPost_id());\n\n\n }", "public Channel.Receiver getReceiver(String sName);", "@Override\r\n public void onReceive(Context context, Intent intent) {\n\r\n int thisConversationId = intent.getIntExtra(\"conversation_id\", -1);\r\n Bundle remoteInput = RemoteInput.getResultsFromIntent(intent);\r\n if (remoteInput != null){\r\n CharSequence replyText = remoteInput.getCharSequence(\"voice_reply_key\");\r\n Log.d(\"BasicNotifications\", \"Found voice reply [\" + replyText+ \"] from conversation_id\");\r\n }\r\n }", "@Override\n public void onReceive(Context context, Intent intent) {\n Bundle bundle = intent.getExtras();\n int messageCID = bundle.getInt(\"clubID\",0);\n int messageTID = bundle.getInt(\"tournamentID\",0);\n if ( tournamentID != 0 ) { // tournament chat\n if ( messageTID == tournamentID ) {\n Log.d(TAG,\"New Tournament Chat\");\n loadMoreRecentChat();\n }\n } else if ( clubID != 0) { // club chat\n if ( clubID == messageCID ) {\n Log.d(TAG,\"New Club Chat\");\n loadMoreRecentChat();\n }\n } else {\n Log.d(TAG,\"Unknown Notification\");\n loadMoreRecentChat();\n }\n\n }", "@Override\n\tpublic void execute() {\n\t\tif (!(messageText == null || messageText.isEmpty())) {\n\n\t\t\tMessage message = new Message();\n\t\t\tMessage.Type messageType;\n\t\t\tif (recipientsIds.isEmpty())\n\t\t\t\tmessageType = Type.USER_BROADCAST;\n\t\t\telse\n\t\t\t\tmessageType = Type.USER_PERSONAL;\n\n\t\t\tmessage.setSender(PlayersRegister.getInstance().getPlayerById(getUserId()));\n\t\t\tmessage.setText(messageText);\n\t\t\tmessage.setType(messageType);\n\n\t\t\tArrayList<Player> recipients = PlayersRegister.getInstance().getPlayersById(recipientsIds);\n\t\t\tif (!recipientsIds.isEmpty())\n\t\t\t\trecipients.add(message.getSender()); // echo the message to the\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// sender as well\n\n\t\t\tmessage.setRecipients(recipients);\n\t\t\tmessage.send();\n\n\t\t}\n\n\t}" ]
[ "0.6185758", "0.6156956", "0.5998454", "0.5912217", "0.5812908", "0.5737078", "0.56883514", "0.56656307", "0.5664191", "0.5626831", "0.5572187", "0.5542368", "0.5517073", "0.5501171", "0.549465", "0.5471039", "0.53852016", "0.5381891", "0.5363924", "0.52851397", "0.5282675", "0.5274372", "0.51869863", "0.51732635", "0.5132374", "0.51212066", "0.5110321", "0.5108957", "0.5104726", "0.5103213", "0.50984627", "0.508886", "0.5079885", "0.5079439", "0.50693744", "0.5053445", "0.504484", "0.5043058", "0.5032903", "0.5027796", "0.49970752", "0.4990303", "0.49900964", "0.4983216", "0.49795818", "0.49778003", "0.49771875", "0.49675658", "0.49663788", "0.49573195", "0.4954764", "0.49407086", "0.49369085", "0.4932944", "0.4932944", "0.4928512", "0.49281365", "0.49174514", "0.49170285", "0.49155304", "0.4914015", "0.4913605", "0.49067834", "0.49037415", "0.4889805", "0.48889112", "0.4881715", "0.488089", "0.4874565", "0.4873471", "0.4868342", "0.48633525", "0.48544672", "0.48489806", "0.48478243", "0.48442644", "0.48442644", "0.48438188", "0.48427677", "0.4839643", "0.48382998", "0.48371643", "0.48271236", "0.48265144", "0.48238048", "0.4822428", "0.48218334", "0.48202235", "0.48181814", "0.48169154", "0.48114806", "0.48060122", "0.48024645", "0.47970632", "0.47850594", "0.4782136", "0.47808117", "0.47715375", "0.47707197", "0.47700784" ]
0.52197975
22
dont' use now.... status = StatusEnum.STARTED_ADD_BOOK; hide search from menu
private void startAddBookFragment() { if (this.menu != null) { this.menu.findItem(R.id.menu_search).setVisible(false); this.menu.findItem(R.id.add_book).setVisible(false); } // Create new fragment and transaction AddBookFragment addBookFragment = new AddBookFragment(); // consider using Java coding conventions (upper first char class names!!!) FragmentTransaction transaction = getFragmentManager().beginTransaction(); // Replace whatever is in the fragment_container view with this fragment, // and add the transaction to the back stack transaction.replace(R.id.activityAfterLoginId, addBookFragment); transaction.addToBackStack(null); // Commit the transaction transaction.commit(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void searchMenu(){\n\t\t\n\t}", "public void setStatus(SearchStatus status) {\n this.status = status;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_item, menu);\n MenuItem searchItem = menu.findItem(R.id.action_search);\n SearchView searchView = (SearchView) searchItem.getActionView();\n searchView.setImeOptions(EditorInfo.IME_ACTION_DONE);\n try{ searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n DeliveryReturnBySupervisorAdapter.getFilter().filter(newText);\n return false;\n }\n });\n }\n catch (Exception e)\n {\n e.printStackTrace();\n Intent intent_stay = new Intent(DeliveryReturnBySupervisor.this, DeliveryWithoutStatus.class);\n Toast.makeText(this, \"Page Loading...\", Toast.LENGTH_SHORT).show();\n startActivity(intent_stay);\n }\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\tif (menu != null) {\n\t\t\tmenu.findItem(R.id.action_search).setVisible(false);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n this.menu = menu;\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n if(savedDbQuery){\n publicMenuItem.setVisible(true);\n privateMenuItem.setVisible(false);\n }else{\n publicMenuItem.setVisible(false);\n privateMenuItem.setVisible(true);\n }\n publicMenuItem = menu.findItem(R.id.action_public_invites);\n privateMenuItem = menu.findItem(R.id.action_private_invites);\n return true;\n }", "private void postSearch (String status) {\n if (status.equals(\"NO_RESULT_FOUND\")) {\n Context context = getActivity();\n CharSequence text = getString(R.string.search_artist_field_no_result_found);\n int duration = Toast.LENGTH_SHORT;\n\n Toast toast = Toast.makeText(context, text, duration);\n toast.setGravity(Gravity.TOP, (int) getActivity().findViewById(R.id.artist_detail_listview).getX(),\n (int)getActivity().findViewById(R.id.artist_detail_listview).getY());\n toast.show();\n }\n }", "@Override\n\tpublic void showmenu() {\n\t\t\n\t\tint choice;\n \n System.out.println(\"请选择1.查询 2.退出\");\n choice=console.nextInt();\n \n switch (choice){\n \n case 1:\n Menu.searchMenu();\n break;\n default:\n \tSystem.out.println(\"感谢您使用本系统 欢迎下次使用!\");\n System.exit(0);\n }\n \n \n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_search, menu);\n Statics.menuSearch = menu;\n Statics.checkedCounter = 0;\n Statics.updateMenu(this);\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n// menu.add(0, 0, 0, \"++Results\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n// menu.add(0, 1, 0, \"++Reload\").setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM);\n return true;\n }", "public void Show_only_completed()\r\n {\n if(!this.filter)\r\n {\r\n if(tableView.getItems().size()>0) {\r\n for (int i = 0; i < tableView.getItems().size(); i++) {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n this.all_items.add(selectedList);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n resettable();\r\n }\r\n this.filter = true;\r\n ArrayList<ucf.assignments.list> tmplist = new ArrayList<ucf.assignments.list>();\r\n\r\n for(int i = 0; i<tableView.getItems().size();i++)\r\n {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n if(selectedList.getstatus())\r\n tmplist.add(selectedList);\r\n }\r\n tableView.getItems().removeAll(tmplist);\r\n }", "private static void queryBook(){\n\t\tSystem.out.println(\"===Book Queries Menu===\");\n\t\t\n\t\t/*Display menu options*/\n\t\tSystem.out.println(\"1--> Query Books by Author\");\n\t\tSystem.out.println(\"2--> Query Books by Genre\");\n\t\tSystem.out.println(\"3--> Query Books by Publisher\");\n\t\tSystem.out.println(\"Any other number --> Exit To Main Menu\");\n\t\tSystem.out.println(\"Enter menu option: \");\n\t\tint menu_option = getIntegerInput(); //ensures user input is an integer value\n\t\t\n\t\tswitch(menu_option){\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByAuthor();\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByGenre();\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println();\n\t\t\t\tqueryBooksByPublisher();\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tbreak;\n\t\t}\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);\n MenuItem register = menu.findItem(R.id.nearbySearch);\n register.setVisible(true);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_commonone, menu);\n MenuItem item3 = menu.findItem(R.id.messager);\n MenuItem item4 = menu.findItem(R.id.search);\n item3.setIcon(R.drawable.openmessage);\n item4.setIcon(R.drawable.search);\n try{\n if (loggedIn.equals(\"noValue\")) {\n\n\n item3.setVisible(false);\n\n } else {\n\n item3.setVisible(true);\n\n }}\n catch (Exception e){\n\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_commissioner, menu);\n menuItem=(MenuItem) menu.findItem(R.id.search);\n return true;\n }", "private void findPopMenuItemActionPerformed(java.awt.event.ActionEvent evt) {\n if (sdd == null) {\n sdd = new SearchDialog(this);\n }\n sdd.setVisible(true);\n }", "public void hide_completed()\r\n {\n if(!this.filter)\r\n {\r\n if(tableView.getItems().size()>0) {\r\n for (int i = 0; i < tableView.getItems().size(); i++) {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n this.all_items.add(selectedList);\r\n }\r\n }\r\n }\r\n else\r\n {\r\n resettable();\r\n }\r\n this.filter = true;\r\n ArrayList<ucf.assignments.list> tmplist = new ArrayList<ucf.assignments.list>();\r\n\r\n for(int i = 0; i<tableView.getItems().size();i++)\r\n {\r\n ucf.assignments.list selectedList = tableView.getItems().get(i);\r\n if(!selectedList.getstatus())\r\n tmplist.add(selectedList);\r\n }\r\n tableView.getItems().removeAll(tmplist);\r\n }", "boolean isSearchOk() {\n return false;\n }", "public void filterRequestStatus(String _status) {\n\t\tsleep(3);\n\t\tclickByJavaScript(By.xpath(\".//*[@id='projection-management']/div[1]/div[6]/span[1]/span[1]/span[2]/span[1]\"));\n\t\tsleep(1);\n\t\tclickOnElement(driver.findElement(By.xpath(\".//li[@data-offset-index = '\"+_status+\"']\")));\t\t\n\t}", "public String search() {\r\n\t\tgetNavigationPanel(3);\r\n\t\treturn SUCCESS;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater menuInflater = getMenuInflater();\n menuInflater.inflate(R.menu.toolbar_menu, menu);\n\n // set the SearchView to be invisible\n final MenuItem searchItem = menu.findItem(R.id.action_search);\n final SearchView searchView = (SearchView) searchItem.getActionView();\n searchItem.setVisible(false);\n searchView.setVisibility(View.GONE);\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_status_list, menu);\n return true;\n }", "@Override\n public boolean onQueryTextChange(String newText) {\n if (newText.isEmpty()) {\n //show the whole list again\n //set book list status\n AfterLoginActivity.this.status = StatusEnum.STARTED_BOOK_LIST;\n AfterLoginActivity.this.databaseHandler.getBookList();\n }\n return true;\n }", "public void onSearchStarted() {\n mActivity.invalidateOptionsMenu();\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n /**\n * Instantiate the menu with an xml layout file. Display items from the menu\n * depending on the scanning state of the scanner.\n */\n getMenuInflater().inflate(R.menu.main, menu);\n if (!mScanning) {\n menu.findItem(R.id.menu_stop).setVisible(false);\n menu.findItem(R.id.menu_scan).setVisible(true);\n menu.findItem(R.id.menu_refresh).setActionView(null);\n } else {\n menu.findItem(R.id.menu_stop).setVisible(true);\n menu.findItem(R.id.menu_scan).setVisible(false);\n // menu.findItem(R.id.menu_refresh).setActionView(\n // R.layout.actionbar_indeterminate_progress);\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (item.getItemId() == R.id.action_searchBar) {\n searchView.showSearch(true);\n searchView.setVisibility(View.VISIBLE);\n }\n //noinspection SimplifiableIfStatement\n// if (id == R.id.action_settings) {\n// startActivity(new Intent(Screen1.this,ReaderActivity.class));\n// }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.search, menu);\n return true;\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.home_screen, menu);\n final MenuItem myActionMenuItem = menu.findItem(R.id.action_search);\n final SearchView searchView = (SearchView) myActionMenuItem.getActionView();\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n if (!searchView.isIconified()) {\n searchView.setIconified(true);\n }\n myActionMenuItem.collapseActionView();\n searchBeerByName(query);\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n searchString = newText;\n searchHandler.removeCallbacks(searchRunnable);\n searchHandler.postDelayed(searchRunnable, 500);\n return true;\n }\n });\n myActionMenuItem.setOnActionExpandListener(new MenuItem.OnActionExpandListener() {\n @Override\n public boolean onMenuItemActionExpand(MenuItem item) {\n return true;\n }\n\n @Override\n public boolean onMenuItemActionCollapse(MenuItem item) {\n // Clearing the existing beer list\n loadNewBeerData(new ArrayList<BeerDetails>());\n // loading new data\n presenter.getBeers(1);\n searchString = null;\n return true;\n }\n });\n return true;\n }", "public SearchStatus getStatus();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_add_friends, menu);\n\n // Associate searchable configuration with the SearchView\n SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchView searchView = (SearchView) menu.findItem(R.id.action_search).getActionView();\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n SearchManager searchManager =\n (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchView searchView =\n (SearchView) menu.findItem(R.id.search).getActionView();\n searchView.setSearchableInfo(\n searchManager.getSearchableInfo(getComponentName()));\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n if (query != null) {\n mPresenter.loadRepositories(query, false);\n }\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }\n });\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(@NonNull Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_budayawan, menu);\n\n MenuItem item = menu.findItem(R.id.search_budayawan);\n SearchView searchView = (SearchView) MenuItemCompat.getActionView(item);\n\n searchView.setQueryHint(\"Cari budayawan...\");\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n\n if (!TextUtils.isEmpty(query.trim())){\n\n searchProfileQuery(query);\n\n } else {\n\n onStart();\n }\n\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n\n if (!TextUtils.isEmpty(newText.trim())){\n\n searchProfileQuery(newText);\n\n } else {\n\n onStart();\n }\n\n return false;\n }\n });\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_search, menu);\n MenuItem searchItem = menu.findItem(R.id.action_search);\n final SearchView searchView = (SearchView) MenuItemCompat.getActionView(searchItem);\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n // When a search is made, calls fetchArticles to make new request\n @Override\n public boolean onQueryTextSubmit(String query) {\n topStories = false;\n filter.setQuery(query);\n gvResults.clearOnScrollListeners();\n setUpRecycler();\n findViewById(R.id.relativeLayout).setVisibility(View.GONE);\n findViewById(R.id.tvHeading).setVisibility(View.GONE);\n fetchArticles(0,true);\n searchView.clearFocus();\n return true;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }\n });\n\n return super.onCreateOptionsMenu(menu);\n }", "private static void menu() {\n\t\tboolean finished = false;\n\t\tdo {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"If you would like to view a current the movies on the movie list, please type \\\"all\\\" \\nIf you would like to see a list of the initial possible categories, please type \\\"categories\\\" \\n\\nTo search for films by category, please type the category, now\\nTo exit the program, just type \\\"no\\\"\");\n\t\t\tString menAns = read.nextLine();\n\t\t\tif (menAns.equalsIgnoreCase(\"all\")) {\n\t\t\t\tlistFormat();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"categories\") || menAns.equalsIgnoreCase(\"cats\")) {\n\t\t\t\tcatList();\n\t\t\t} else if (menAns.equalsIgnoreCase(\"no\")) {\n\t\t\t\tfinished = true;\n\t\t\t} else {\n\t\t\t\tseachCats(menAns);\n\t\t\t}\n\t\t} while (!finished);\n\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search_gen_menu, menu);\r\n\t\tFile savedSelectedCourses = new File(getFilesDir(),\r\n\t\t\t\t\"savedSelectedCourses.txt\");\r\n\t\tMenuItem item = menu.findItem(R.id.UserTableSearch);\r\n\t\tif (savedSelectedCourses.length() > 0) {\r\n\t\t\titem.setTitle(\"Your timetable\");\r\n\t\t} else {\r\n\t\t\titem.setTitle(\"Create Timetable\");\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n /**\n * Display items from the menu depending on the scanning state of the scanner.\n */\n if (!mScanning) {\n menu.findItem(R.id.menu_stop).setVisible(false);\n menu.findItem(R.id.menu_scan).setVisible(true);\n menu.findItem(R.id.menu_refresh).setActionView(null);\n } else {\n menu.findItem(R.id.menu_stop).setVisible(true);\n menu.findItem(R.id.menu_scan).setVisible(false);\n // menu.findItem(R.id.menu_refresh).setActionView(\n // R.layout.actionbar_indeterminate_progress);\n }\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.search, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.search, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.search, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.search, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n MenuItem menuItemSearch = menu.findItem(R.id.search);\n MenuItem menuItemCart = menu.findItem(R.id.cart);\n\n if (CURRENT_TAG.equals(TAG_SEARCH)) {\n hideMenuItem(menuItemSearch);\n showMenuItem(menuItemCart);\n return true;\n }\n\n if (CURRENT_TAG.equals(TAG_MY_CART)) {\n hideMenuItem(menuItemCart);\n showMenuItem(menuItemSearch);\n return true;\n }\n\n showMenuItem(menuItemCart);\n showMenuItem(menuItemSearch);\n\n return true;\n }", "private void showSearch() {\n\t\tonSearchRequested();\n\t}", "@Override\n\tpublic boolean onPrepareOptionsMenu(Menu menu) {\n\t\tboolean drawerOpen = mDrawerLayout.isDrawerOpen(mDrawerList);\n\t\tmenu.findItem(R.id.search).setVisible(!drawerOpen);\n\t\treturn super.onPrepareOptionsMenu(menu);\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_status_screen, menu);\r\n return true;\r\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_detail, menu);\r\n MenuItem mi=menu.findItem(R.id.action_settings);\r\n SharedPreferences commonpreference=getSharedPreferences(\"Common\",MODE_PRIVATE);\r\n if(commonpreference.contains(id_fav))\r\n mi.setTitle(\"Remove from Favorites\");\r\n else\r\n mi.setTitle(\"Add to Favorites\");\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_bead_search, menu);\n return true;\n }", "protected void setStatusSpinner() {\r\n\t\tSpinner spinner = (Spinner) mActionBar.getCustomView().findViewById(\r\n\t\t\t\tR.id.spinner_status);\r\n\t\tif (!mShowStatusFilter\r\n\t\t\t\t|| mArchiveFragmentStatePagerAdapter.getCount() == 0) {\r\n\t\t\tspinner.setVisibility(View.GONE);\r\n\t\t\treturn;\r\n\t\t}\r\n\r\n\t\t// Determine which statuses are actually used for the currently\r\n\t\t// selected size filter.\r\n\t\tGridDatabaseAdapter gridDatabaseAdapter = new GridDatabaseAdapter();\r\n\t\tfinal StatusFilter[] usedStatuses = gridDatabaseAdapter\r\n\t\t\t\t.getUsedStatuses(mArchiveFragmentStatePagerAdapter\r\n\t\t\t\t\t\t.getSizeFilter());\r\n\r\n\t\t// Load the list of descriptions for statuses actually used into the\r\n\t\t// array adapter.\r\n\t\tString[] usedStatusesDescription = new String[usedStatuses.length];\r\n\t\tfor (int i = 0; i < usedStatuses.length; i++) {\r\n\t\t\tusedStatusesDescription[i] = getResources().getStringArray(\r\n\t\t\t\t\tR.array.archive_status_filter)[usedStatuses[i].ordinal()];\r\n\t\t}\r\n\t\tArrayAdapter<String> adapterStatus = new ArrayAdapter<String>(this,\r\n\t\t\t\tandroid.R.layout.simple_spinner_item, usedStatusesDescription);\r\n\t\tadapterStatus\r\n\t\t\t\t.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\r\n\r\n\t\t// Build the spinner\r\n\t\tspinner.setAdapter(adapterStatus);\r\n\r\n\t\t// Restore selected status\r\n\t\tStatusFilter selectedStatusFilter = mArchiveFragmentStatePagerAdapter\r\n\t\t\t\t.getStatusFilter();\r\n\t\tfor (int i = 0; i < usedStatuses.length; i++) {\r\n\t\t\tif (usedStatuses[i] == selectedStatusFilter) {\r\n\t\t\t\tspinner.setSelection(i);\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Hide spinner if only two choices are available. As one of those\r\n\t\t// choices is always \"ALL\" the choices will result in an identical\r\n\t\t// selection.\r\n\t\tspinner.setVisibility((usedStatuses.length <= 2 ? View.GONE\r\n\t\t\t\t: View.VISIBLE));\r\n\r\n\t\tspinner.setOnItemSelectedListener(new OnItemSelectedListener() {\r\n\t\t\t@Override\r\n\t\t\tpublic void onItemSelected(AdapterView<?> parent, View view,\r\n\t\t\t\t\tint position, long id) {\r\n\t\t\t\t// Get the selected status\r\n\t\t\t\tStatusFilter statusFilter = usedStatuses[(int) id];\r\n\r\n\t\t\t\t// Check if value for status spinner has changed.\r\n\t\t\t\tif (statusFilter != mArchiveFragmentStatePagerAdapter\r\n\t\t\t\t\t\t.getStatusFilter()) {\r\n\t\t\t\t\t// Remember currently displayed grid id.\r\n\t\t\t\t\tint gridId = getCurrentSelectedGridId();\r\n\r\n\t\t\t\t\t// Refresh pager adapter with new status.\r\n\t\t\t\t\tmArchiveFragmentStatePagerAdapter\r\n\t\t\t\t\t\t\t.setStatusFilter(statusFilter);\r\n\r\n\t\t\t\t\t// Refresh the size spinner as the content of the spinners\r\n\t\t\t\t\t// are related.\r\n\t\t\t\t\tsetSizeSpinner();\r\n\r\n\t\t\t\t\t// If possible select the grid id which was selected before\r\n\t\t\t\t\t// changing the spinner(s). Otherwise select last page.\r\n\t\t\t\t\tselectGridId(gridId);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onNothingSelected(AdapterView<?> arg0) {\r\n\t\t\t\t// Do nothing\r\n\t\t\t}\r\n\t\t});\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_search_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_search_screen, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.learningcard_menu, menu);\n\n MenuItem searchItem = menu.findItem(R.id.action_search);\n SearchView searchView = (SearchView) searchItem.getActionView();\n // after searchView has been clicked set Listener on text change in box\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n return false;\n }\n // send new Text on textchange to adapter\n @Override\n public boolean onQueryTextChange(String newText) {\n adapter.getFilter().filter(newText);\n return false;\n }\n });\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.log_in, menu);\n getMenuInflater().inflate(R.menu.searchfile, menu);\n final MenuItem myActionMenuItem = menu.findItem(id.search);\n searchView = (SearchView) myActionMenuItem.getActionView();\n changeSearchViewTextColor(searchView);\n ((EditText) searchView.findViewById(android.support.v7.appcompat.R.id.search_src_text)).setHintTextColor(getColor(color.white));\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n if(!searchView.isIconified()){\n searchView.setIconified(true);\n }\n myActionMenuItem.collapseActionView();\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n final List<ClinicItem> filtermodelist = filter(clinicList, newText);\n adapter.setfilter(filtermodelist);\n return true;\n }\n });\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu2, menu);\n this.menu=menu;\n if(idName!=null) {menu.getItem(1).setVisible(false);\n menu.getItem(2).setVisible(true);}\n if(create) menu.getItem(0).setVisible(false);\n else menu.getItem(0).setVisible(true);\n /* if(extrasBundle!=null) if(extrasBundle.getBoolean(\"From Option\")==true) {\n menu.getItem(1).setVisible(false);\n menu.getItem(0).setVisible(true);\n\n }*/\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) \n\t{\n SearchView searchView = new SearchView(getSupportActionBar().getThemedContext());\n searchView.setQueryHint(\"Recherche simple\");\n searchView.setOnQueryTextListener(this);\n \n \n MenuItem recherche_simple = menu.add(0,0,0,\"Recherche simple\");\n {\n \trecherche_simple.setIcon(R.drawable.action_search);\n \trecherche_simple.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM | MenuItem.SHOW_AS_ACTION_COLLAPSE_ACTION_VIEW); \n \trecherche_simple.setActionView(searchView);\n }\n \n MenuItem apropos = menu.add(0,1,1,\"A propos\");\n {\n apropos.setIcon(R.drawable.action_about);\n apropos.setShowAsAction(MenuItem.SHOW_AS_ACTION_IF_ROOM); \n }\n \n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n MenuItem searchItem =menu.findItem(R.id.search);\n\n //Implement Search Activity\n SearchView searchView=(SearchView) MenuItemCompat.getActionView(searchItem);\n SearchManager searchManager= (SearchManager)getSystemService(SEARCH_SERVICE);\n ComponentName componentName=new ComponentName(this,SearchableActivity.class);\n searchView.setSearchableInfo(\n searchManager.getSearchableInfo(getComponentName()));\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n\n return false;\n }\n });\n\n return true;\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n MenuItem item = menu.findItem(R.id.action_add_to_favorites);\n item.setVisible(false);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n getMenuInflater().inflate(R.menu.menu_principal, menu);\n this.menu = menu;\n\n\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.HONEYCOMB){\n\n SearchManager manager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n SearchView search = (SearchView) menu.findItem(R.id.search).getActionView();\n search.setQueryHint(\"Busqueda de Becas..\");\n search.setSearchableInfo(manager.getSearchableInfo(getComponentName()));\n search.setIconifiedByDefault(false);\n search.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String s) {\n //mostrarMensaje(s + \" submit\");\n Intent intent = new Intent(getApplicationContext(), SearchActivity.class);\n intent.putExtra(\"idBeca\", s);\n startActivity(intent);\n return true;\n }\n @Override\n public boolean onQueryTextChange(String s) {\n //mostrarMensaje(s);\n //loadHistory(s);\n return false;\n }\n });\n }\n return true;\n }", "void stateBacktracked (Search search);", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);\n MenuItem item = menu.findItem(R.id.action_settings);\n if (menuItem.getItemId() == R.id.nav_camera) {\n item.setVisible(true);\n } else {\n item.setVisible(false);\n }\n //关联toolbar的搜索按钮\n viewSearch.setMenuItem(item);\n searchMenuItem = item;\n return true;\n }", "@UiHandler(\"status\")\n \tpublic void onStatusClicked(ClickEvent e) {\n \t\tdelegate.showApplicationLoading(true);\n \t\tLog.info(\"onStatusClicked\");\n \t\tif (proxy.getStatus() == StandardizedPatientStatus.ANONYMIZED) {\n \t\t\tstatus.setVisible(false);\n \t\t} else {\n \t\t\tdelegate.statusClicked();\n \t\t}\n \t\tdelegate.showApplicationLoading(false);\n \t}", "public boolean openSearch(){\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n //if (id == R.id.search) {\n //onSearchRequested();\n// return true;\n // }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_search) {\n\n return true;\n }\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.location_search, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //noinspection SimplifiableIfStatement\n if (id == R.id.action_search) {\n\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n\n update_status = \"false\";\n Intent intent = new Intent();\n intent.putExtra(\"status\",update_status);\n setResult(6, intent);\n finish();\n //finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_search_result, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu)\n {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n MenuItem searchItem = menu.findItem(R.id.action_search);\n final SearchView miSearch = (SearchView) MenuItemCompat.getActionView(searchItem);\n miSearch.setOnQueryTextFocusChangeListener(new View.OnFocusChangeListener()\n {\n @Override\n public void onFocusChange(View v, boolean hasFocus)\n {\n String query = etSearch.getText().toString();\n miSearch.setQuery(query, false);\n }\n });\n miSearch.setOnQueryTextListener(new SearchView.OnQueryTextListener()\n {\n @Override\n public boolean onQueryTextSubmit(String query)\n {\n etSearch.setText(query);\n onClickSearchButton(miSearch);\n return true;\n }\n\n @Override\n public boolean onQueryTextChange(String newText)\n {\n // click back also evoke\n return false;\n }\n });\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_search, menu);\n return true;\n }", "void searchUI();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_search, menu);\n mArtistSearch = (SearchView) menu.findItem(R.id.artistSearch).getActionView();\n mArtistSearch.setQueryHint(getString(R.string.artistSearchHint));\n mArtistSearch.setIconifiedByDefault(false);\n mArtistSearch.requestFocusFromTouch();\n\n // Recall the stored query text from before\n if (mLatestQuery != null) {\n mArtistSearch.setQuery(mLatestQuery, false);\n }\n\n mArtistSearch.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n\n @Override\n public boolean onQueryTextSubmit(final String query) {\n // NOTE: Android may call this twice in rapid succession\n Log.i(TAG, \"onQueryTextSubmit '\" + query + \"'\");\n mArtistSearch.clearFocus();\n mLatestQuery = query;\n\n mMusicServiceConnection.whenConnected(new Runnable() {\n @Override\n public void run() {\n mMusicServiceConnection.getService().findArtists(query);\n }\n });\n return true;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n return true;\n }\n });\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_weeklist, menu);\n progressMenu = menu.findItem(R.id.refresh_loading);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_scout_status_page, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(isSearch ? R.menu.menu_search_toolbar : R.menu.main, menu);\n\n if (isSearch) {\n //Toast.makeText(getApplicationContext(), \"Search \" + isSearch, Toast.LENGTH_SHORT).show();\n final SearchView search = (SearchView) menu.findItem(R.id.action_search).getActionView();\n search.setIconified(false);\n search.setQueryHint(\"검색어를 입력하세요.\");\n\n search.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String s) {\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String s) {\n /*switch (viewPager.getCurrentItem()) {\n case 0:\n // f_number.mAdapter.getFilter().filter(s);\n break;\n case 1:\n // f_check.mAdapter.getFilter().filter(s);\n break;\n case 2:\n // f_event.mAdapter.getFilter().filter(s);\n break;\n }*/\n return true;\n }\n });\n search.setOnCloseListener(new SearchView.OnCloseListener() {\n @Override\n public boolean onClose() {\n closeSearch();\n return true;\n }\n });\n }\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n super.onCreateOptionsMenu(menu);\n\n // MyApp myApp = MyApp.getInstance();\n\n MenuItem item = menu.findItem(R.id.action_matches);\n item.setVisible(false);\n\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.search, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_search_results, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main2, menu);\n\n SearchManager searchManager =\n (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n final SearchView searchView =\n (SearchView) menu.findItem(R.id.app_bar_search).getActionView();\n searchView.setSearchableInfo(\n searchManager.getSearchableInfo(getComponentName()));\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n //Toast.makeText(Main2Activity.this,query,Toast.LENGTH_LONG).show();\n //adapter.filter(query);\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n adapter.filter(newText);\n return false;\n }\n\n });\n\n\n\n return true;\n }", "private void visitToSearch() {\n if (search_Attendance==null) {\n search_Attendance=new Search_Attendance();\n search_Attendance.setVisible(true);\n } else {\n search_Attendance.setVisible(true);\n }\n }", "@Override\n public boolean onPrepareOptionsMenu(Menu menu) {\n // If the nav drawer is open, hide action items related to the content view\n /*boolean drawerOpen = myDrawerLayout.isDrawerOpen(myDrawerList);\n menu.findItem(R.string.action_websearch).setVisible(!drawerOpen);*/\n return super.onPrepareOptionsMenu(menu);\n }", "@Override\n public boolean onMenuItemActionExpand(MenuItem menuItem) {\n MainActivity.this.findViewById(R.id.search_list).setVisibility(View.VISIBLE);\n MainActivity.this.findViewById(R.id.nav_host_fragment_activity_main).setVisibility(View.GONE);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_with_search, menu);\n\n //initialize MenuItem with button id\n MenuItem search = menu.findItem(R.id.search_button);\n\n //initialize SearchView with action view of MenuItem\n SearchView searchView = (SearchView) search.getActionView();\n\n //set OnQueryTextListener to SearchView\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String s) {\n\n //create a ArrayList object\n ArrayList<String> visibleList = new ArrayList<>();\n\n //for every log row\n for (String visibleItem : logList){\n //contains search bar string\n if (visibleItem.toLowerCase().contains(s.toLowerCase())){\n //add item to list\n visibleList.add(visibleItem);\n }\n }\n //initialize Adapter\n logAdapter = new ArrayAdapter<>(ViewLogActivity.this, R.layout.view_student_attendance, R.id.student, visibleList);\n\n //set Adapter to ListView\n mLogList.setAdapter(logAdapter);\n\n return true;\n }\n\n @Override\n public boolean onQueryTextChange(String s) {\n return false;\n }\n });\n\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_home, menu);\n MenuItem item = menu.findItem(R.id.action_now_playing);\n item.setVisible(ServiceTools.isServiceRunning(this,StreamerService.class.getName()));\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu icon){\n\r\n MenuInflater expand = getMenuInflater();\r\n\r\n expand.inflate(R.menu.top_menu, icon); //Referencing to the specific menu\r\n\r\n MenuItem search = icon.findItem(R.id.search_bar);\r\n\r\n SearchView searchView = (SearchView) search.getActionView(); //Displays the search view button\r\n\r\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\r\n\r\n\r\n @Override\r\n public boolean onQueryTextSubmit(String s) {//Begins filtering here\r\n\r\n adapterDevices.getFilter().filter(s);\r\n\r\n return false;\r\n }\r\n //Sends typed string in search bar to trigger search\r\n\r\n\r\n //Method is triggered if there is text change\r\n @Override\r\n public boolean onQueryTextChange(String s) {\r\n\r\n if(s.equals(\"\")){ //When search bar is empty again the page is reloaded\r\n\r\n Intent refresh = new Intent(getApplicationContext(), MyDevicesActivity.class);\r\n\r\n startActivity(refresh);\r\n\r\n finish();\r\n\r\n }\r\n return false;\r\n }\r\n });\r\n\r\n\r\n return true;\r\n\r\n\r\n }", "public void searchOptions()\n {\n System.out.println(\"\\n\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| Select Options Below : |\");\n System.out.println(\"\\t\\t:::::::::::::::::::::::::::::::::\");\n System.out.println(\"\\t\\t| [1] Search by - Title |\");\n System.out.println(\"\\t\\t| [2] Search by - Directors |\");\n System.out.println(\"\\t\\t| [3] Back To Menu |\");\n System.out.println(\"\\t\\t=================================\");\n System.out.print(\"\\t\\t Input the option number : \"); \n }", "protected void updateMenuItemsVisibility(Menu menu) {\n\n MenuItem deleteItem = menu.findItem(R.id.action_delete);\n MenuItem editItem = menu.findItem(R.id.action_edit);\n MenuItem saveItem = menu.findItem(R.id.action_save);\n\n if( (deleteItem == null) || (editItem == null) || (saveItem == null) ) {\n return;\n }\n\n switch(mAction) {\n case NDEFEditorFragment.ADD_NDEF_RECORD:\n deleteItem.setVisible(false);\n editItem.setVisible(false);\n saveItem.setVisible(true);\n break;\n\n case NDEFEditorFragment.VIEW_NDEF_RECORD:\n deleteItem.setVisible(true);\n editItem.setVisible(true);\n saveItem.setVisible(false);\n break;\n\n case NDEFEditorFragment.EDIT_NDEF_RECORD:\n deleteItem.setVisible(false);\n editItem.setVisible(false);\n saveItem.setVisible(true);\n break;\n }\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_main, menu);\n\n SearchManager searchManager = (SearchManager) getSystemService(Context.SEARCH_SERVICE);\n MenuItem menuItem = menu.findItem(R.id.app_bar_search);\n SearchView searchView = (SearchView) menuItem.getActionView();\n\n searchView.setSearchableInfo(searchManager.getSearchableInfo(getComponentName()));\n\n searchView.setOnQueryTextListener(new SearchView.OnQueryTextListener() {\n @Override\n public boolean onQueryTextSubmit(String query) {\n // TODO ovde ide implementacija za search\n // https://stackoverflow.com/questions/21585326/implementing-searchview-in-action-bar\n return false;\n }\n\n @Override\n public boolean onQueryTextChange(String newText) {\n return false;\n }\n });\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(uk.echosoft.garage.opener.R.menu.menu_status, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu_status, menu);\n return true;\n }", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n getMenuInflater().inflate(R.menu.main, menu);\r\n if (userType.equalsIgnoreCase(\"TSE\")) {\r\n MenuItem item = menu.findItem(R.id.home_button);\r\n item.setVisible(false);\r\n }\r\n return true;\r\n }", "SearchServiceStatus status();", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.user_book, menu);\n return true;\n }", "@Override\r\n\tvoid setExcludedMenu() {\n\t\tthis.setMenuExclusion(OLBaseTabActivity.RANKINGS_ID);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.list_actions, menu);\n\t\tsv = (SearchView) menu.findItem(R.id.search).getActionView();\n\t\treturn true;\n\t}", "public void setStatus(String status) { this.status = status; }" ]
[ "0.6509895", "0.6150525", "0.6098588", "0.6052861", "0.5838218", "0.58380497", "0.57976556", "0.5730255", "0.5721762", "0.5702812", "0.57001525", "0.5693749", "0.56903684", "0.5665585", "0.566072", "0.5654207", "0.5638178", "0.55955786", "0.5580443", "0.5579285", "0.55711544", "0.5565334", "0.55372506", "0.55372465", "0.55308634", "0.5507548", "0.5504468", "0.5499032", "0.5495422", "0.5494977", "0.54930073", "0.5492769", "0.5492392", "0.5478249", "0.54768246", "0.54730564", "0.54718715", "0.54718715", "0.54718715", "0.54718715", "0.54679376", "0.546197", "0.54590106", "0.5453338", "0.544989", "0.54470307", "0.54457843", "0.54434323", "0.54434323", "0.54388094", "0.54343885", "0.5433072", "0.54316", "0.5422903", "0.54227316", "0.54212946", "0.541821", "0.5415822", "0.541549", "0.5414816", "0.54127914", "0.5412086", "0.54107904", "0.54093224", "0.5408666", "0.5406685", "0.5406264", "0.54062074", "0.5406089", "0.5401325", "0.540123", "0.5400205", "0.539962", "0.53874785", "0.5385261", "0.5385261", "0.5385261", "0.5385261", "0.5385261", "0.5385261", "0.5385261", "0.5385261", "0.5379782", "0.5378892", "0.53779763", "0.53736466", "0.5369453", "0.5369204", "0.5367241", "0.5367095", "0.53638446", "0.53638417", "0.53608406", "0.5357211", "0.5356453", "0.5352268", "0.5344942", "0.53386354", "0.53317463", "0.53298724", "0.53287375" ]
0.0
-1
Log.i(TAG, " must implement OnFragmentInteractionListener");
@Override public void onFragmentInteraction(MessageEnum message, Object result) { if (message == MessageEnum.ADD_BOOK) { ((Book)result).setOwnderId(user.getUserId()); ((Book)result).setOwnerName(user.getUserName()); ((Book)result).setOwnerLocation(user.getUserLocation()); //first send book information without image, //wait for answer and then send image to firebase storage!! databaseHandler.sendBookToDatabase((Book)result); } else if (message == MessageEnum.GET_BOOK_IMAGE) { databaseHandler.getBookImage((Book)result); } else if (message == MessageEnum.CHAT){ //if buyer, open chat view with owner //TODO else if owner, open chat view list with list of buyers if (!((Book)result).getOwnerId().equals(user.getUserId())) { //so not owner, open chat view //actually first get previous messages from Firebase database //regarding this bookid databaseHandler.getBookMessages((Book)result, this.user); } else { //TODO open with list of buyers..... databaseHandler.getBookMessages((Book)result, this.user); } } else if (message == MessageEnum.DELETE_BOOK) { databaseHandler.deleteBook ((Book)result); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void onFragmentInteraction();", "void onFragmentInteraction();", "void onFragmentInteraction();", "void onFragmentInteraction(View v);", "void onFragmentInteraction(int position);", "void onFragmentInteraction(String id);", "void onFragmentInteractionMain();", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction();\n }", "void onFragmentInteraction(Object ref);", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String id);\n }", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public void onFragmentInteraction(String id);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String string);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n Long onFragmentInteraction();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(View v);\n }", "public interface OnFragmentInteractionListener {\n void onMainFragmentInteraction(String string);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentMessage(String TAG, Object data);\n}", "public interface OnFragmentInteractionListener\n {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "@Override\n public void onFragmentInteraction(Uri uri){\n }", "@Override\n public void onFragmentInteraction(Uri uri){\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n}", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(String id);\n}", "Long onFragmentInteraction();", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(String key);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n //void onFragmentInteraction(Uri uri);\n }", "void onFragmentInteraction(String string);", "void onFragmentInteraction(String string);", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(String id);\n }", "void onFragmentInteraction(int spotId);", "public interface OnFragmentInteractionListener {\n // Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n /**\n * This interface's single method. The hosting Activity must implement this interface and\n * provide an implementation of this method so that this Fragment can communicate with the\n * Activity.\n *\n * @param spotId\n */\n// void onFragmentInteraction(Uri uri);\n void onFragmentInteraction(int spotId);\n// void onFragmentInteraction(LatLng spotPosition);\n\n }", "@Override\n public void onFragmentInteraction(Uri uri) {\n }", "@Override\n public void onFragmentInteraction(Uri uri) {\n }", "public interface OnFragmentInteractionListener {\n void onStartFragmentStarted();\n\n void onStartFragmentStartTracking();\n\n void onStartFragmentStopTracking();\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n public void onFragmentInteraction(String id);\n }", "void onFragmentInteraction(int cursorID);", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n public void onFragmentInteraction(Qualification q);\n }", "public interface OnFragmentInteractionListener {\n /**\n * On fragment interaction.\n *\n * @param uri the uri\n */\n// TODO: Update argument type and name\n public void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n @SuppressWarnings({\"FieldNever\", \"unused\"})\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n\n\n void onFragmentInteraction(String mId, String mProductName, String mItemRate, int minteger, int update);\n }", "public interface FragmentInteractionListener {\n int FRAG_ADD = 1;\n int FRAG_REPLACE = 2;\n int FRAG_ADD_ANIMATE = 3;\n int FRAG_DIALOG = 4;\n int FRAG_REPLACE_WITH_STACK = 5;\n int FRAG_ADD_WITH_STACK = 6;\n\n void setCurrentFragment(Bundle bundle, int fragmentType, int transType, int frameId);\n\n void popTopFragment();\n\n void popAllFromStack();\n\n String getActiveFragmentTag();\n\n}", "public interface OnFragmentInteractionListener {\n\t\t// TODO: Update argument type and name\n\t\tpublic void onFragmentInteraction(Uri uri);\n\t}", "public interface OnFragmentListener {\n\n void onAction(Intent intent);\n}", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\r\n // TODO: Update argument type and name\r\n void onFragmentInteraction(Uri uri);\r\n }", "public interface OnFragmentInteractionListener {\n // TODOS: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n\t\tvoid restUp(IGameState gameState);\n\t\tvoid restartGame();\n\t}", "public interface OnFragmentInteractionListener {\n\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }", "public interface OnFragmentInteractionListener {\n // TODO: Update argument type and name\n void onFragmentInteraction(Uri uri);\n }" ]
[ "0.89085764", "0.89085764", "0.89085764", "0.8778703", "0.8462514", "0.8355198", "0.8264822", "0.8247493", "0.8191794", "0.8182329", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.8140521", "0.80192715", "0.80109733", "0.8008111", "0.8007518", "0.8003001", "0.7987816", "0.7980498", "0.7980498", "0.79780036", "0.79633594", "0.7950632", "0.79421204", "0.79260105", "0.79240245", "0.79240245", "0.79190624", "0.7912852", "0.79047364", "0.7894027", "0.78790146", "0.78790146", "0.78780806", "0.78705275", "0.78705275", "0.78705275", "0.78705275", "0.78705275", "0.78705275", "0.78705275", "0.78705275", "0.78705275", "0.78401816", "0.7810998", "0.7810998", "0.7810998", "0.7789226", "0.7788086", "0.77834266", "0.7767319", "0.774761", "0.774761", "0.774761", "0.774761", "0.774761", "0.7737923", "0.77343786", "0.7728049", "0.7722188", "0.7718427", "0.7679871", "0.7679871", "0.7679871", "0.7679871", "0.7679871", "0.7679871", "0.7679871", "0.7677293", "0.7676956", "0.76746863", "0.76746863", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514", "0.76647514" ]
0.0
-1
fill up the rest of the message
@Override public void onChatMessageFragmentInteraction(MessageEnum message, Object result) { ((MyMessage)result).setSenderId(this.user.getUserId()); ((MyMessage)result).setReceiverId(this.receiverId); ((MyMessage)result).setBookId(this.selectedBook.getBookId()); //send message to message list databaseHandler.sendMessageToDatabase((MyMessage)result); //message should come back with reference change? }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "protected void fillContent() {\r\n appendResponse(\"ConnectTime=\");\r\n appendResponse(getConnectTime());\r\n appendResponse(\"\\n\");\r\n appendResponse(\"Billing=\");\r\n appendResponse(getBilling());\r\n appendResponse(\"\\n\");\r\n appendResponse(\"SignOffMessage=\");\r\n appendResponse(getSignOffMessage());\r\n appendResponse(\"\\n\");\r\n }", "protected abstract TMessage prepareMessage();", "private ManualMessage() {\n initFields();\n }", "public void encodeMessage() {\n for (int i = message.length() - 1; i >= 0; i--) {\n message.insert(i, String.valueOf(message.charAt(i)).repeat(2));\n }\n }", "private ExecuteMessage() {\n initFields();\n }", "public FillResult(String msg) {\n message = msg;\n }", "@Override\n protected void prepareHandshakeMessageContents() {\n }", "public void writeMassege() {\n m = ChatClient.message;\n jtaChatHistory.setText(\"You : \" + m);\n //writeMassageServer();\n }", "public void sendMessage() {\n String userMessage = textMessage.getText();\n if (!userMessage.isBlank()) {//проверяю а есть ли что то в текстовом поле\n textMessage.clear();//очищаю текстовое поле на форме\n\n //пока оставлю\n //sb.append(userMessage).append(\"\\n\");\n\n //в общее поле добавляю сообщение\n areaMessage.appendText(userMessage+\"\\n\");\n }\n\n }", "private void formWriteBegin() {\n\t\tsendData = new byte[4];\n\t\tsendData[0] = 0;\n\t\tsendData[1] = 4;\n\t\tsendData[2] = 0;\n\t\tsendData[3] = 0;\n\t\t\n\t\t// Now that the data has been set up, let's form the packet.\n\t\tsendPacket = new DatagramPacket(sendData, 4, receivePacket.getAddress(),\n\t\t\t\treceivePacket.getPort());\t\n\t}", "protected void aggregateMessage(String retMessage) {\n if (!returnImmediate) {\n if (retMessage != null && !retMessage.isEmpty()) {\n if (allMessage == null || allMessage.isEmpty()) {\n allMessage = retMessage;\n } else {\n allMessage += (NEW_LINE + retMessage);\n }\n }\n } else {\n allMessage = retMessage;\n }\n }", "void setUpwardMessage(Factor f) throws FactorScopeException {\n\t\t\tthis.setFactorData(f);\n\t\t\tSystem.out.println(\"upward message now:\\n\"+this.getLongInfo());\n\t\t}", "private static void messageConstructor(){\n msg = \"These are the ammo you can spend.\\n\" +\n \"Every time you select the corresponding color, the quantity will decrease: \\n\";\n\n paymentSB.append(msg);\n if (tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] > 0) {\n msg = red + \": Red ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.RED_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(red);\n }\n if (tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] > 0) {\n msg = blue + \": Blue ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.BLUE_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(blue);\n }\n if (tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] > 0) {\n msg = yellow + \": Yellow ammo available: \" + tmpAmmoInAmmoBox[GeneralInfo.YELLOW_ROOM_ID] + \"\\n\";\n paymentSB.append(msg);\n responeForAmmo.add(yellow);\n }\n\n for (i = 0; i < tmpAmmoInPowerUp.size(); i++) {\n msg = (i + 1) + \": \" + tmpAmmoInPowerUp.get(i).getName() + \" COLOR: \" + tmpAmmoInPowerUp.get(i).getGainAmmoColor() + \"\\n\";\n paymentSB.append(msg);\n responseForPowerUp.add(Integer.toString(i + 1));\n }\n\n if (!responeForAmmo.isEmpty()) {\n possibleChoice.addAll(responeForAmmo);\n msg = \"Chose a letter R/B/Y \\n\";\n paymentSB.append(msg);\n }\n\n if(!responseForPowerUp.isEmpty()) {\n possibleChoice.addAll(responseForPowerUp);\n msg = \"choose a number from 1 to \" + i + \": \";\n paymentSB.append(msg);\n }\n }", "private HeartBeatMessage() {\n initFields();\n }", "private void refreshInformation () {\n if (textInformation != null) {\n String messageInfo = \"\";\n\n while (!listMessageInfo.isEmpty()) {\n messageInfo = listMessageInfo.getLast() + \"\\n\" + messageInfo;\n listMessageInfo.removeLast();\n }\n\n if (textInformation.getText() != null) {\n textInformation.setText(messageInfo + textInformation.getText());\n } else {\n textInformation.setText(messageInfo);\n }\n }\n }", "private void setupMessage() {\n \tmessage = new GLabel(\"\");\n \tmessage.setFont(\"SansSerif-12\");\n }", "@Override\n\tpublic void encode() {\n\t\tbyte[] messageData = encodeStarsMessage(message);\n\t\t\n\t\t// Allocate\n byte[] res = new byte[10 + messageData.length];\n\n // Write members\n Util.write16(res, 0, unknownWord0);\n Util.write16(res, 2, unknownWord2);\n Util.write16(res, 4, senderId);\n Util.write16(res, 6, receiverId);\n Util.write16(res, 8, unknownWord8);\n \n // Copy in message data\n System.arraycopy(messageData, 0, res, 10, messageData.length);\n \n // Save as decrypted data\n setDecryptedData(res, res.length);\n\t}", "public Message() {\n message = \"\";\n senderID = \"\";\n time = 0;\n }", "@Override\n protected SimpleMessage prepareMessage() {\n SimpleMessage message = super.prepareMessage();\n message.setContent(onFailure());\n return message;\n }", "void setMessage(char msg[], char attribs[]) {\n copyString(msg, statusLine, 1, MESSAGE_LENGTH);\n notifyDisplay();\n }", "public AbstractMessage() {\n\t\t//this.idMessage = SecUtils.getHex(SecUtils.getRandomBytes(SecUtils.getSeed(), 20));\n\t\tthis.idMessage = this.hashCode();\n\t\tthis.setChallenge(new Challenge());\n\t}", "private SocketMessage() {\n initFields();\n }", "public SIPMessage() {\n this.unrecognizedHeaders = new LinkedList();\n this.headers = new LinkedList();\n nameTable = new Hashtable();\n \ttry {\n \tthis.attachHeader(new ContentLength(0),false);\n \t} catch (Exception ex) {}\n }", "private void parseCompleteReqMessage() {\r\n byte result = _partialMessage.get(0);\r\n byte opCode = _partialMessage.get(1);\r\n byte numberOfParams = _partialMessage.get(2);\r\n\r\n /* cursor of bytes within 'message'. Parameters start at position 2 */\r\n int messageIndex = 3;\r\n int availableChars = (int) _partialMessage.size();\r\n\r\n List<String> paramList = new ArrayList<>();\r\n String param;\r\n\r\n for (byte i = 0; (i < numberOfParams) && (messageIndex < availableChars); i++) {\r\n param = \"\";\r\n\r\n /* collect data up to terminator */\r\n while ((messageIndex < availableChars) &&\r\n (_partialMessage.get(messageIndex) != '\\0')) {\r\n param += (char)((byte)(_partialMessage.get(messageIndex)));\r\n ++ messageIndex;\r\n }\r\n\r\n /* skip after terminator */\r\n if (messageIndex < availableChars) {\r\n ++ messageIndex;\r\n }\r\n\r\n paramList.add( param);\r\n }\r\n\r\n _replyDispatcher.onReplyReceivedForRequest(opCode, result, paramList);\r\n }", "public void parseMessage(String input) {\n int length = input.length() - 1 + Message.HEADER_LENGTH + Message.FOOTER_LENGTH;\n String message = \"\";\n message += Message.BEGIN_CHAR;\n message += \"\"+length;\n message += input;\n message += Message.END_CHAR;\n System.out.println(message);\n s.sendLine(message);\n }", "protected void setMessage(java.lang.String newMessage)\r\n {\r\n if (message == null)\r\n {\r\n message = newMessage;\r\n }\r\n else\r\n {\r\n message += \"\\n\" + newMessage;\r\n }\r\n }", "private void initialisationChampMessage() {\n messageArea = new JTextArea();\n messageArea.setLineWrap(true);\n messageArea.setWrapStyleWord(true);\n messageArea.setOpaque(false);\n messageArea.setBackground(COULEUR_VIDE);\n messageArea.setFont(FONT_TEXTE);\n messageArea.setBorder(BorderFactory.createEmptyBorder(GRANDEUR_BORDURE_VIDE, GRANDEUR_BORDURE_VIDE,\n GRANDEUR_BORDURE_VIDE, GRANDEUR_BORDURE_VIDE));\n dimTotal = calculerDimensionTotalMessage(this.message);\n messageArea.setSize((int) dimTotal.getWidth() + GRANDEUR_BORDURE_VIDE * 2,\n (int) dimTotal.getHeight() + GRANDEUR_BORDURE_VIDE * 2);\n messageArea.append(this.message);\n }", "@Override\n protected TMessage prepareMessage() {\n return SendSuccessOrFailure.this.prepareMessage();\n }", "public Message(){\n this.body = null;\n this.contact = null;\n }", "void requestRebuildNextTime(String message);", "private void initMsgs() {\n }", "private void initMsgs() {\n }", "public static void fillFieldsFromExistingMessage(Message outgoingMessage, Message existingMessage) {\r\n \tfillFieldsFromExistingMessage(outgoingMessage, existingMessage, true);\r\n }", "protected ParseObject createMessage() {\n //format single variables appropriatly. most cases the field is an array\n ArrayList<ParseUser> nextDrinker = new ArrayList<ParseUser>();\n nextDrinker.add(mNextDrinker);\n ArrayList<String> groupName = new ArrayList<String>();\n groupName.add(mGroupName);\n\n ParseObject message = new ParseObject(ParseConstants.CLASS_MESSAGES);\n message.put(ParseConstants.KEY_SENDER_ID, ParseUser.getCurrentUser().getObjectId());\n message.put(ParseConstants.KEY_SENDER, ParseUser.getCurrentUser());\n message.put(ParseConstants.KEY_GROUP_ID, mGroupId);\n message.put(ParseConstants.KEY_GROUP_NAME, groupName);\n message.put(ParseConstants.KEY_SENDER_NAME, ParseUser.getCurrentUser().getUsername());\n message.put(ParseConstants.KEY_RECIPIENT_IDS, nextDrinker);\n message.put(ParseConstants.KEY_MESSAGE_TYPE, ParseConstants.TYPE_DRINK_REQUEST);\n\n return message;\n }", "abstract void updateMessage(String msg);", "public Message () {\n\t\tthis.setCreationtime(Calendar.getInstance().getTimeInMillis());\n\t\tsetTimestamp();\n\t}", "protected void fillInfo() {\n buffer.setLength(0);\n for (Food food : foods) {\n if (food != null) {\n buffer.append(food.toString());\n }\n }\n }", "private void viewMessage()\n {\n System.out.println( inbox );\n inbox = \"\";\n }", "private void setContent (Message message) {\n String content = \"\";\n try {\n if (message.getContent() instanceof String) {\n content = (String) message.getContent();\n msgContent.setText(content);\n } else if (message.isMimeType(\"multipart/*\")) {\n Multipart multipart = (Multipart) message.getContent();\n if (multipart.getCount() > 0) {\n int i;\n for (i = 0; i < multipart.getCount(); i++) {\n content += multipart.getBodyPart(i).getContent().toString();\n }\n msgContent.setText(content);\n }\n } else {\n msgContent.setText(\"This message is in an unsupported format.\");\n }\n } catch (IOException e) {\n e.printStackTrace();\n } catch (MessagingException e) {\n e.printStackTrace();\n }\n\n }", "@Override\n public TransponderMessage newMessage() {\n super.newMessage();\n setModule(\"somevertical\");\n return this;\n }", "public pam_message(Pointer src) {\n useMemory(src);\n read();\n }", "private void createContent() {\n\t\t// Design mail content\n\t\tview.getTxtSubject().setText(\n\t\t\t\tMessages.getString(\"SendAlertController.1\") + arr[9]);\n\t\tcontent += Messages.getString(\"SendAlertController.2\") + arr[1]\n\t\t\t\t+ Messages.getString(\"SendAlertController.3\");\n\t\tcontent += Messages.getString(\"SendAlertController.4\") + arr[12]\n\t\t\t\t+ Messages.getString(\"SendAlertController.5\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.6\");\n\t\tcontent += Messages.getString(\"SendAlertController.7\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.8\")\n\t\t\t\t+ new Date().toString()\n\t\t\t\t+ Messages.getString(\"SendAlertController.9\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.10\") + arr[9]\n\t\t\t\t+ Messages.getString(\"SendAlertController.11\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.12\") + arr[11]\n\t\t\t\t+ Messages.getString(\"SendAlertController.13\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.14\") + arr[12]\n\t\t\t\t+ Messages.getString(\"SendAlertController.15\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.16\")\n\t\t\t\t+ fee.getBorFee()\n\t\t\t\t+ Messages.getString(\"SendAlertController.17\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.18\")\n\t\t\t\t+ fee.getLateFee()\n\t\t\t\t+ Messages.getString(\"SendAlertController.19\");\n\t\tcontent += Messages.getString(\"SendAlertController.20\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.21\") + arr[1]\n\t\t\t\t+ Messages.getString(\"SendAlertController.22\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.23\") + arr[4]\n\t\t\t\t+ Messages.getString(\"SendAlertController.24\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.25\") + arr[6]\n\t\t\t\t+ Messages.getString(\"SendAlertController.26\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.27\") + arr[7]\n\t\t\t\t+ Messages.getString(\"SendAlertController.28\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.29\") + arr[5]\n\t\t\t\t+ Messages.getString(\"SendAlertController.30\");\n\t\tcontent += Messages.getString(\"SendAlertController.31\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.32\") + arr[15]\n\t\t\t\t+ Messages.getString(\"SendAlertController.33\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.34\") + arr[16]\n\t\t\t\t+ Messages.getString(\"SendAlertController.35\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.36\") + arr[17]\n\t\t\t\t+ Messages.getString(\"SendAlertController.37\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.38\") + arr[18]\n\t\t\t\t+ Messages.getString(\"SendAlertController.39\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.40\") + arr[19]\n\t\t\t\t+ Messages.getString(\"SendAlertController.41\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.42\") + arr[20]\n\t\t\t\t+ Messages.getString(\"SendAlertController.43\");\n\t\tcontent += Messages.getString(\"SendAlertController.44\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.45\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.46\");\n\t\tcontent += Messages.getString(\"SendAlertController.47\")\n\t\t\t\t+ Messages.getString(\"SendAlertController.48\");\n\t\tview.getTxtContent().setText(content);\n\t}", "@Override\n\tpublic void msgAtFrige() {\n\t\t\n\t}", "public void getMessage() {\n\r\n\t}", "@Override\n\tpublic void setInitialMessage(String message) {\n\t\tlinkedList.setToString(message);\n\t\tcurMessage = linkedList.toString();\n\t}", "private String buildMessage(String message) {\n\t\tif(message != null && message.contains(\"@record\")) {\n\t\t\tmessage = message.replaceAll(\"@record\", answerUser);\n\t\t\trecorded.put(owner.id(), answerUser);\n\t\t}\n\t\t//o sistema substitui o texto !id pelo id do usuário da conversa\n\t\tif(message != null && message.contains(\"!id\")) {\n\t\t\tmessage = message.replaceAll(\"!id\", owner.id() + \"\");\n\t\t}\n\t\t//o sistema verifica se tem alguma gravacao para o código recebido\n\t\tif(message != null && message.contains(\"#find\")) {\n\t\t\tString gravacao = recorded.get(Integer.parseInt(userLatestAnswer.get(owner.id())));\n\t\t\t//se houver gravacao, o sistema informa qual o desejo do amigo secreto\n\t\t\tif(gravacao != null)\n\t\t\t\tmessage = message.replaceAll(\"#find\", gravacao);\n\t\t\t//caso nao haja gravacao, o sistema notifica o usuário da situacao\n\t\t\telse\n\t\t\t\tmessage = \"O código informado não corresponde ao desejo de um amigo secreto... por favor tente novamente\";\n\t\t}\n\n\t\treturn message;\n\t}", "void append(final String msg) {\n Preconditions.checkState(isOpen);\r\n\r\n message.append(msg);\r\n isDirty = true;\r\n }", "public MessageClackData() {\n super();\n this.message = DEFAULT_MESSAGE;\n }", "private void fillString() {\n information = new String[4];\n information[0] = htmlConverter.fromHtml(event.getSummary()).toString();\n information[1] = event.getBeginTime() + \" - \" + event.getEndTime();\n information[2] = htmlConverter.fromHtml(event.getLocation()).toString();\n information[3] = htmlConverter.fromHtml(event.getDescription()).toString();\n }", "public void setMessage(String message){\r\n this.message = message;\r\n key = randNumber.nextInt(50) + 1; \r\n\r\n encode();\r\n }", "private void setADMsg(OL_Message msg) {\n messageid = msg.getMessageIdentifier();\n data = msg.getPayload();\n root = msg.getSourceAddress();\n }", "private void RecoverMessages()\n {\n String messages = new String();\n int nodeIndex = getNodeIndex(localport);\n int i;\n String msgToSend;\n for(i=nodeIndex+1;i<=nodeIndex+2;i++)\n {\n msgToSend = localport;\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n\n Log.i(\"current node\",Integer.toString(nodeIndex));\n for(i=nodeIndex+4;i>=nodeIndex+3;i--)\n {\n Log.i(\"replicate from\",nodes[i % 5]);\n msgToSend = nodes[i % 5];\n String temp = (sendMsg(nodes[i % 5], \"RECOVER##\" + msgToSend));\n if(temp !=null && !temp.equals(\"null\"))\n messages+=temp;\n }\n Log.i(\"messages recovered\", messages);\n if(!messages.equals(\"null\") && messages.length()>0)\n {\n Log.i(\"sasa\",Integer.toString(messages.length()));\n String msgs = messages.substring(0,messages.length()-1);\n String[] Allmessages = msgs.split(\" \");\n Log.i(\"recover\",msgs);\n for(String msg: Allmessages)\n {\n String key = msg.split(\"&&\")[0];\n String value = msg.split(\"&&\")[1];\n if(myKeys.containsKey(key))\n continue;\n myKeys.put(key,value);\n }\n\n }\n }", "@Override\n\tpublic void msgFedPart() {\n\t\t\n\t}", "public Message() {\n\t\tsuper();\n\t}", "@Override\n\tpublic void processMessage(Message message) {\n\t\t\n\t}", "protected void displayMessage() {\n \n System.out.print (\"Message:\\n\");\n userMessage = message.toString();\n\n for(int i = 0; i < userMessage.length(); i++) \n System.out.format (\"%3d\", i);\n System.out.format (\"\\n\");\n for (char c : userMessage.toCharArray()) \n System.out.format(\"%3c\",c);\n System.out.format (\"\\n\");\n }", "private void constructACLMessage()\n {\n PlayIntroAction playIntroObject = new PlayIntroAction();\n playIntroObject.setLenght(numberOfMeasures);\n playIntroObject.setNow(true);\n playIntroObject.setDuration(-1);\n msg = new ACLMessage(ACLMessage.CFP);\n msg.setLanguage(codec.getName());\n msg.setOntology(ontology.getName());\n for(int i = 0; i < receivers.size(); i++)\n {\n try\n {\n //fill the content using the Ontology concept\n myAgent.getContentManager().fillContent(msg,new Action((AID)receivers.elementAt(i),playIntroObject));\n }catch (Exception ex) { ex.printStackTrace(); }\n //Set the receiver of the message\n msg.addReceiver((AID)receivers.elementAt(i));\n\n }\n\n //Set the protocol that we gonna use\n msg.setProtocol(FIPANames.InteractionProtocol.FIPA_CONTRACT_NET);\n //We indicate the deadline of the reply\n msg.setReplyByDate(new Date(System.currentTimeMillis() + 30000));\n\n\n }", "@Override\n\t\tpublic void handleMessage(Message msg) {\n\t\t\tString reslutInfo = (String) msg.obj;\n\t\t\tLog.d(App.LOG_TAG, reslutInfo);\n\t\t\tswitch (msg.what) {\n\t\t\tcase 200:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tlayout.setVisibility(View.VISIBLE);\n\t\t\t\tclearSign();\n\t\t\t\tsaveRecodes();\n\t\t\t\tbreak;\n\t\t\tcase 201:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tcase 501:\n\t\t\t\tpb.setProgress(7);\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\ttextState.append(\"\\n\");\n\t\t\t\ttextState.append(reslutInfo);\n\t\t\t\tpb.setProgress(msg.what);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}", "ChildMessage(){\n\t\t\ttext = CLICK_TO_EDIT;\t\t\t\t\t\t\t\t// Set to Header default\n\t\t\tnamesText = CLICK_TO_ADD_NAMES;\t\t\t\t\t\t// Set to Header default\n\t\t\tnumbers = new HashMap<String,Integer>();\t\t\t// init numbers to none\n\t\t}", "@Override\r\n\tpublic void onMessage(BmobMsg message) {\n\t\trefreshNewMsg(message);\r\n\t}", "@Override\r\n\tvoid updateMessage(String msg) {\n\t\tSystem.out.println(msg);\r\n\t}", "@Override\n\tpublic MessagePojo updatemessage(MessagePojo message) {\n\t\treturn null;\n\t}", "void set_Msg(String buf, SocketChannel channel) {\n System.out.println(\"setMsg: \" + buf);\n msgBuffer = buf;\n mtype = parseMsg();\n this.channel = channel;\n }", "@Override\n public void sendEmptyMessage(final EmptyMessage message) {\n\n }", "public Text updateMessage(String msg){\r\n Text message = new Text(\"Height: \" + tree.height() + \", Vertices: \" + tree.getVertices()+\"\\t\\t Status: \"+ msg);\r\n message.setFont(Font.font(Font.getDefault().toString(), FontWeight.BOLD,20));\r\n return message;\r\n }", "private DebugMessage() {\n initFields();\n }", "@Override\r\n public void handleMessage(Message msg) {\n }", "public ReportAckMsg() {\n super(DEFAULT_MESSAGE_SIZE);\n amTypeSet(AM_TYPE);\n }", "void mo23214a(Message message);", "private void setMessage(String message){\n\t\tString msg = getMessage();\n\t\tString newMsg = msg.replace(\"</body>\", message + \"</body>\");\n\t\ttextArea.setText( newMsg );\n\t}", "public static void getMessage() {\r\n\t\tLog.i(TAG,\r\n\t\t\t\t\"+++ GOT MESSAGE FROM ARDUINO +++\" + getArduinoMessage());\r\n\t\tString[] msgSplit = getArduinoMessage().split(\":\");\r\n\t\tString keyWord = \"\";\r\n\t\tString firstVaule = \"\";\r\n\t\tString secondValue = \"\";\r\n\r\n\t\tif (msgSplit.length > 0) {\r\n\t\t\tkeyWord = msgSplit[1];\r\n\t\t\tfirstVaule = msgSplit[2];\r\n\t\t\tsecondValue = msgSplit[3];\r\n\t\t}\r\n\r\n\t\tif (keyWord.equals(\"xy\")) {\r\n\t\t\tgetTelescopeAltAz(firstVaule, secondValue);\r\n\t\t\tstartTracking();\r\n\t\t}\r\n\t\tif (keyWord.equals(\"xyt\")) {\r\n\t\t\tLog.i(TAG, \"+++ GOT TELESCOPE POSITION \" + firstVaule + \" \"\r\n\t\t\t\t\t+ secondValue);\r\n\t\t\tstar++;\r\n\t\t\tgetTelescopeAltAz(firstVaule, secondValue, star );\r\n\t\t}\r\n\t}", "void mo80453a(Message message);", "void mo80456b(Message message);", "private void setMainMessage(String message)\n\t\t{\n\t\t\tint rows = 1 + mainTextArea.getFontMetrics(mainTextArea.getFont())\n\t\t\t\t\t.stringWidth(message)\n\t\t\t\t\t/ INITIAL_LINE_LENGTH;\n\t\t\tmainTextArea.setRows(rows);\n\t\t\tmainTextArea.setText(message);\n\t\t}", "public void fillDetails(Message ack) throws ApplicationException {\n\t\ttry {\n\t\t\t// populate MSA and ERR with generic error ...\n\t\t\tSegment msa = (Segment) ack.get(\"MSA\");\n\t\t\tTerser.set(msa, 1, 0, 1, 1, \"AR\");\n\t\t\tTerser.set(\n\t\t\t\t\tmsa,\n\t\t\t\t\t3,\n\t\t\t\t\t0,\n\t\t\t\t\t1,\n\t\t\t\t\t1,\n\t\t\t\t\t\"No appropriate destination could be found to which this message could be routed.\");\n\t\t\t// this is max length\n\n\t\t\t// populate ERR segment if it exists (may not depending on version)\n\t\t\tStructure s = ack.get(\"ERR\");\n\t\t\tif (s != null) {\n\t\t\t\tSegment err = (Segment) s;\n\t\t\t\tTerser.set(err, 1, 0, 4, 1, \"207\");\n\t\t\t\tTerser.set(err, 1, 0, 4, 2, \"Application Internal Error\");\n\t\t\t\tTerser.set(err, 1, 0, 4, 3, \"HL70357\");\n\t\t\t}\n\n\t\t} catch (Exception e) {\n\t\t\tthrow new ApplicationException(\n\t\t\t\t\t\"Error trying to create Application Reject message: \"\n\t\t\t\t\t\t\t+ e.getMessage());\n\t\t}\n\t}", "public void setMessage(byte[] messageContents) {\n currentMessage = messageContents;\n }", "private String prepareEmailBody() {\n\t\tString s1 = \"Layout Name: \" + layout_name + \"\\n\";\n\t\tString s2 = \"Number of categories: \" + buttonCount + \"\\n\";\n\t\tString s3 = \"Starting time: \" + startCountTime + \"\\n\";\n\t\tDate nowTime = new Timestamp(System.currentTimeMillis());\n\t\tString s4 = \"Sending time: \" + nowTime + \"\\n\\n\";\n\t\tString s5 = \"\";\n\t\tfor (int i = 0; i < buttonCount; i++) {\n\t\t\ts5 += \"Category \" + (i+1) + \": \" + textArray.get(i) + \"\\n\";\n\t\t\ts5 += \" Count: \" + catCounters.get(i) + \"\\n\";\n\t\t}\n\t\t\n\t\t// JSON version\n\t\tString s10 = \"\\n/* ***************\\n * JSON String\\n */\\n\";\n\t\tString s20 = \"{\\n\";\n\t\tString s21 = \" \\\"layoutName\\\" : \\\"\" + layout_name + \"\\\",\\n\";\n\t\tString s22 = \" \\\"categoryCount\\\" : \" + buttonCount + \",\\n\";\n\t\tString s23 = \" \\\"startTimestamp\\\" : \\\"\" + startCountTime + \"\\\",\\n\";\n\t\tString s24 = \" \\\"sendTimestamp\\\" : \\\"\" + nowTime + \"\\\",\\n\";\n\t\tString s25 = \" \\\"data\\\" : [\\n\";\n\t\tString s30 = \"\";\n\t\tfor (int i = 0; i < buttonCount; i++) {\n\t\t\ts30 += \" {\\n\";\n\t\t\ts30 += \" \\\"categoryNumber\\\" : \" + (i+1) + \",\\n\";\n\t\t\ts30 += \" \\\"categoryName\\\" : \\\"\" + textArray.get(i) + \"\\\",\\n\";\n\t\t\ts30 += \" \\\"categoryCount\\\" : \" + catCounters.get(i) + \"\\n\";\n\t\t\tif (i < (buttonCount - 1)) {\n\t\t\t\ts30 += \" },\\n\";\n\t\t\t} else {\n\t\t\t\ts30 += \" }\\n\";\n\t\t\t}\n\t\t}\n\t\tString s32 = \" ]\\n\";\n\t\tString s33 = \"}\\n\";\n\t\tString s40 = \"/* ***************\\n * end JSON String\\n */\";\n\t\t\n\t\treturn s1 + s2 +s3 + s4 + s5 + s10 + s20 + s21 + s22 + s23 + s24 + s25 + s30 + s32 + s33 + s40;\n\t}", "private void setupHeader(Message msg) throws MessagingException {\n }", "@Override\n\tpublic void completeMsg(int msgNo) {\n\t\tsession.update(namespace + \".completeUpMsg\", msgNo);\n\t}", "@Override\n\tpublic String createMsg_request() {\n\t\treturn null;\n\t}", "protected void logParsedMessage()\n {\n if (log.isInfoEnabled())\n {\n StringBuffer buf = new StringBuffer(\"Parsed EASMessage:\");\n buf.append(\"\\n OOB alert = \").append(isOutOfBandAlert());\n buf.append(\"\\n sequence_number = \").append(this.sequence_number);\n buf.append(\"\\n protocol_version = \").append(this.protocol_version);\n buf.append(\"\\n EAS_event_ID = \").append(this.EAS_event_ID);\n buf.append(\"\\n EAS_originator_code = \").append(this.EAS_originator_code).append(\": \").append(\n getOriginatorText());\n buf.append(\"\\n EAS_event_code = \").append(this.EAS_event_code);\n buf.append(\"\\n nature_of_activation_text = \").append(getNatureOfActivationText(new String[] { \"eng\" }));\n buf.append(\"\\n alert_message_time_remaining = \").append(getAlertMessageTimeRemaining()).append(\" seconds\");\n buf.append(\"\\n event_start_time = \").append(this.event_start_time);\n buf.append(\"\\n event_duration = \").append(this.event_duration).append(\" minutes\");\n buf.append(\"\\n alert_priority = \").append(getAlertPriority());\n buf.append(\"\\n details_OOB_source_ID = \").append(this.details_OOB_source_ID);\n buf.append(\"\\n details_major_channel_number = \").append(this.details_major_channel_number);\n buf.append(\"\\n details_minor_channel_number = \").append(this.details_minor_channel_number);\n buf.append(\"\\n audio_OOB_source_ID = \").append(this.audio_OOB_source_ID);\n buf.append(\"\\n alert_text = \").append(getAlertText(new String[] { \"eng\" }));\n buf.append(\"\\n location_code_count = \").append(this.m_locationCodes.size());\n for (int i = 0; i < this.m_locationCodes.size(); ++i)\n {\n buf.append(\"\\n location[\").append(i).append(\"]: \").append(this.m_locationCodes.get(i).toString());\n }\n buf.append(\"\\n exception_count = \").append(this.m_exceptions.size());\n for (int i = 0; i < this.m_exceptions.size(); ++i)\n {\n buf.append(\"\\n exception[\").append(i).append(\"]: \").append(this.m_exceptions.get(i).toString());\n }\n buf.append(\"\\n descriptor count = \").append(this.m_descriptors.size());\n for (int i = 0; i < this.m_descriptors.size(); ++i)\n {\n buf.append(\"\\n descriptor[\").append(i).append(\"]: \").append(this.m_descriptors.get(i).toString());\n }\n buf.append(\"\\n isAudioChannelAvailable = \").append(isAudioChannelAvailable());\n buf.append(\"\\n number of audio sources = \").append(this.m_audioFileSources.size());\n for (int i = 0; i < this.m_audioFileSources.size(); ++i)\n {\n buf.append(\"\\n audio file source[\").append(i).append(\"]: \").append(\n this.m_audioFileSources.get(i).toString());\n }\n buf.append(\"\\n m_detailsChannelLocator = \").append(this.m_detailsChannelLocator);\n buf.append(\"\\n m_eventReceivedTime = \").append(new Date(this.m_eventReceivedTime));\n buf.append(\"\\n m_eventStartTime = \").append(new Date(this.m_eventStartTime));\n buf.append(\"\\n m_eventExpirationTime = \").append(new Date(this.m_eventExpirationTime));\n if (log.isInfoEnabled())\n {\n log.info(buf.toString());\n }\n }\n }", "@Override\r\n public void writeMessage(Message msg) throws IOException {\n final StringBuilder buf = new StringBuilder();\r\n msg.accept(new DefaultVisitor() {\r\n\r\n @Override\r\n public void visitNonlocalizableTextFragment(VisitorContext ctx,\r\n NonlocalizableTextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n\r\n @Override\r\n public void visitPlaceholder(VisitorContext ctx, Placeholder placeholder) {\r\n buf.append(placeholder.getTextRepresentation());\r\n }\r\n\r\n @Override\r\n public void visitTextFragment(VisitorContext ctx, TextFragment fragment) {\r\n buf.append(fragment.getText());\r\n }\r\n });\r\n out.write(buf.toString().getBytes(UTF8));\r\n }", "public void sendDataToAMQ(){\n\t\t\r\n\t\tList<String> msg = new ArrayList<>();\r\n\t\tif(offsetfollower < (prototype.followerDrivingInfo.meetingLocation - 500)) {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.followerDrivingInfo.speed;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.followerDrivingInfo.speed)+\" carSpeed>\");\t\r\n\r\n\t\t}\r\n\t\telse {\r\n\t\t\toffsetleader += prototype.leaderDrivingInfo.speed;\r\n\t\t\toffsetfollower += prototype.leaderDrivingInfo.speed ;\r\n\t\t\tmsg.add(\"<carName TestCar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (+offsetleader) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\t\r\n\t\t\tmsg.add(\"<carName Camcar carName> <segmentPosX -4 segmentPosX> <segmentPosY \"+ (offsetfollower) +\" segmentPosY> <carSpeed \" + (prototype.leaderDrivingInfo.speed)+\" carSpeed>\");\r\n\r\n\t\t}\r\n for(int i = 0; i < msg.size();i++)\r\n {\r\n \tamqp.sendMessage(msg.get(i));\r\n }\r\n// \t}\r\n }", "@Override\n\tpublic void parseBody() throws MessageParseException {\n\n\t}", "public void sendMsg(){\r\n\t\tsuper.getPPMsg(send);\r\n\t}", "public void createMessage()\n {\n System.out.println( user + \", type the message you want to send:\" );\n String userInput = sysin.nextLine();\n if( userInput.length() <= MAXLEN )\n msg = userInput;\n else\n msg = userInput.substring( 0, MAXLEN );\n\n }", "private void setACMsg(OL_Message msg) {\n messageid = msg.getMessageIdentifier();\n root = socket.createLogicalAddress(((FSM_Extension) msg.getFirstExtensionByType(Extension.FSM)).getSenderAddress(), 0);\n }", "private void clearMsg() {\n msg_ = emptyProtobufList();\n }", "private void clearMsg() {\n msg_ = emptyProtobufList();\n }", "@Override\n public byte[] getMessage() {\n jsonData = textPane.getText();\n return buildData();\n }", "public JobServiceBusMessage() {\n this.setCustomMessageProperties(new LazyHashMap<String, String>());\n }", "public TLUpdateShortSentMessage() {\n super();\n }", "public Message(String unparsedData){\n\t\theaderLines = new ArrayList<ArrayList<String>>();\n\t\tString[] headFromEntity = unparsedData.split(\"\\n\\n\", 2);\n\t\tString[] msgInfo = headFromEntity[0].split(\"\\n\");\n\t\tString[] status = msgInfo[0].split(\" \");\n\t\t\n\t\tthis.messageInfo[0]= status[0];\t\t\t\t\t// Version\n\t\tthis.messageInfo[1] = status[1];\t\t\t\t// status code\n\t\tthis.messageInfo[2] = msgInfo[0].substring(2);\t// phrase\n\t\t\n\t\tfor (int i = 1; i < msgInfo.length; i++){\n\t\t\tstatus = msgInfo[i].split(\" \");\n\t\t\theaderLines.add(new ArrayList<String>());\n\t\t\theaderLines.get(headerLines.size()-1).add(status[0]);\n\t\t\theaderLines.get(headerLines.size()-1).add(msgInfo[i].substring(status[0].length()));\n\t\t}\n\t\t\n\t\tentity = headFromEntity[1].getBytes();\n\t}", "public void putMessageWizardChannel(Message message) {\n\t\t\n\t\tint currentRoom = message.getCurrentRoom();\n\t\tString data = message.getData();\n\t\tlong tid = Thread.currentThread().getId();\n\t\t\n\t\t//mesajul ce va fi trimis pe canal\n\t\tMessage newMessage = null;\n\t\t\n\t\t//mesajele END pot fi ignorate\n\t\tif(data.equals(END)) return;\n\t\t\n\t\t//se vor pune mesaje EXIT de un singur thread pana se inchid toti Miners\n\t\t\n\t\tif(data.equals(EXIT)) {\n\t\t\tif(finishThread == -1) {\n\t\t\t\tfinishThread = tid;\n\t\t\t}else {\n\t\t\t\tif(finishThread != tid) return;\n\t\t\t}\n\t\t\t\n\t\t\tnewMessage = message;\n\t\t}\t\n\t\t//daca sunt aduse informatiile despre parinte\n\t\telse if((!map.containsKey(tid))) {\t\n\t\t\tif(data.equals(NO_PARENT)) currentRoom = -1;\n\t\t\tnewMessage = new Message(currentRoom,-1,null);\n\t\t\tmap.put(tid, newMessage);\n\t\t\treturn;\n\t\t//daca au fost aduse informatiile despre parinte si sunt adusa informatii despre un nod adiacent\n\t\t}else if(map.containsKey(tid)) {\n\t\t\tnewMessage = map.remove(tid);\n\t\t\tnewMessage.setCurrentRoom(currentRoom);\n\t\t\tnewMessage.setData(data);\n\t\t\t\n\t\t\t//nu se trimite acelasi nod de mai multe ori\n\t\t\tif(putNodes.contains(currentRoom)) return;\n\t\t\telse putNodes.add(currentRoom);\n\t\t}\n\t\t\n\t\ttry {\n\t\t\t//se pune mesajul construit in buffer\n\t\t\tbufferWizardChannel.put(newMessage);\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t}", "private void fillUsingSingleSMS() {\n\t\tString temp[] = new String[1];\n\t\ttemp[0] = messageBody;\n\t\tsmsThreadList.setAdapter(new ArrayAdapter<String>(this,\n\t\t\t\tR.layout.sms_thread_list_sender_row_new,\n\t\t\t\tR.id.sms_thread_list_row_descrip, temp));\n\n\t}", "private void sendTextInBox() {\n\t\tmodelAdapter.send(textFieldMessage.getText());\n\t textFieldMessage.setText(\"\");\n\t }", "private void constructHeartbeatMessage() {\n // build head\n MessageProtobuf.Head.Builder headBuilder = MessageProtobuf.Head.newBuilder();\n headBuilder.setMsgId(UUID.randomUUID().toString());\n headBuilder.setMsgType(MsgConstant.MsgType.HEARTBEAT_MESSAGE);\n headBuilder.setTimeStamp(System.currentTimeMillis());\n\n // build message\n MessageProtobuf.Msg.Builder builder = MessageProtobuf.Msg.newBuilder();\n builder.setHead(headBuilder.build());\n\n defaultHeartbeatMessage = builder.build();\n }", "private void processMessage(Message message) {\n log(\"\");\n log(\"\");\n// log(\"recon list: \" + reconciliation);\n log(\"message\", message);\n\n switch (message.type) {\n // Response from server when registering\n case \"accepted\":\n accepted = true;\n\n // lobby leader, this user sets the info for all users.\n if (message.stringData != null && message.stringData.equals(\"leader\")) {\n\n LobbySettings lobbySettings = new LobbySettings();\n if (requestedGameType != null)\n lobbySettings.updateType(requestedGameType);\n log(\"req points\", requestedMapCntrlPoints);\n lobbySettings.setMap(requestedMapCntrlPoints);\n\n sendLobbySettingsToServer(lobbySettings);\n }\n\n if (message.name != name) {\n name = message.name;\n System.out.println(\"Name rejected. New name: \" + name);\n }\n\n break;\n // Resend register message\n case \"rejected\":\n try {\n Thread.sleep(500);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n\n sendRegisterMessage();\n break;\n // the first game message from the server\n case \"initialUpdate\":\n EntityHandler eh = message.entityHandler;\n game.entityHandler = eh;\n game.modelLayer.setEntities(eh);\n game.lobbySettings = message.lobbySettings;\n game.timeRemaining = message.timeRemaining;\n game.teamsList = message.teamsList;\n game.tankID = message.stringData;\n game.teamID = message.teamID;\n tankToUsernameMap = message.tankToNameMap;\n log(String.format(\"We are '%s' on team %d.\", message.stringData, message.teamID));\n\n // TODO this is the shit\n game.map.loadMap(message.lobbySettings.getMap());\n game.setupTerrainFlag = true;\n\n started = true;\n\n game.postConnect();\n log(\"game started!!\");\n break;\n // main update case\n case \"update\":\n if (!started)\n return;\n\n log(\"received new entity handler\");\n\n EntityHandler serverEntityHandler = message.entityHandler;\n game.entityHandler = serverEntityHandler;\n tankToHeldLength = message.tankToHeldLength;\n game.modelLayer.setEntities(serverEntityHandler);\n\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainCrates(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n\n game.timeRemaining = message.timeRemaining;\n\n double serverPacketNumber = message.packetNum;\n log(\"server packet:\" + serverPacketNumber + \", last packet we sent:\" + packetNum);\n\n int i = 0;\n while (i < reconciliation.size()) {\n Message reconMessage = reconciliation.get(i);\n\n if (reconMessage.packetNum <= serverPacketNumber) {\n log(\"reconcile!, m packet:\" + reconMessage.packetNum + \"<= server packet:\" + serverPacketNumber);\n reconciliation.remove(i);\n } else {\n log(\"server lagging behind, apply inputs again for packet: \" + reconMessage.packetNum);\n\n Integer[] keysPressed = reconMessage.keysPressed;\n double mouseHeldTime = reconMessage.mouseHeldTime;\n reconciliationUpdate(keysPressed, mouseHeldTime);\n i++;\n }\n }\n break;\n case \"endUpdate\":\n if (!started)\n return;\n\n log(\"received final entity handler\");\n accepted = false;\n started = false;\n ended = true;\n game.entityHandler = message.entityHandler;\n game.modelLayer.setEntities(message.entityHandler);\n game.entityHandler.constrainTanks(game.map);\n game.entityHandler.constrainTurrets(game.tankID, Input.cursorPos);\n game.setEndOfGame(); // assuming we are in online mode\n break;\n case \"debug\":\n String str = message.stringData;\n log(str);\n testMessages.add(message);\n break;\n default:\n error(\"unknown type: \" + message.type);\n break;\n }\n }", "@Override\n public int getMessageSize()\n {\n return 0;\n }", "void replaceMessage(@NonNull BaseMessage message);", "private void clearHeader(){\n\t\theader = new ChildMessage();\n\t}" ]
[ "0.6651305", "0.6355262", "0.62699753", "0.623029", "0.6171132", "0.61030567", "0.6062447", "0.6040233", "0.59895664", "0.5986405", "0.59710383", "0.5934191", "0.5933982", "0.5921108", "0.5868973", "0.58677644", "0.5778916", "0.57785237", "0.5764977", "0.5764188", "0.57398105", "0.5726746", "0.57134265", "0.57102317", "0.5703552", "0.56976414", "0.56965363", "0.5681877", "0.5678847", "0.5677158", "0.5663108", "0.5663108", "0.56537926", "0.5646068", "0.5645794", "0.56415385", "0.5624118", "0.5612296", "0.5596167", "0.55851036", "0.55825126", "0.5581906", "0.55776966", "0.5570528", "0.5558013", "0.55548054", "0.55521506", "0.5543436", "0.5540478", "0.55317324", "0.5530361", "0.5521688", "0.5497398", "0.5497117", "0.5493787", "0.5490581", "0.54855466", "0.5471807", "0.5468517", "0.5459925", "0.545797", "0.5452903", "0.54414105", "0.54317975", "0.54308057", "0.5428875", "0.54286253", "0.5428275", "0.5418491", "0.5418205", "0.5417434", "0.5416884", "0.54072976", "0.54029256", "0.5402431", "0.5397063", "0.5390925", "0.53901327", "0.53891134", "0.53857636", "0.53811514", "0.53794277", "0.5372466", "0.5366847", "0.5365103", "0.5359465", "0.53544897", "0.5353661", "0.5353661", "0.5350702", "0.5346767", "0.53463477", "0.53436166", "0.5331948", "0.5330709", "0.53280044", "0.5326452", "0.5315983", "0.5314521", "0.53116935", "0.5303078" ]
0.0
-1
TODO Autogenerated method stub
public static void CreateCustomer() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
public static void Login() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
will be called by the plugin executor after properties are set. an opportunity to validate all settings
public void afterPropertiesSet() { super.afterPropertiesSet(); debug("Plugin validated"); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void afterPropertiesSet() {\n validateProperties();\n }", "protected void validateConfiguration() {}", "@Override\n public void afterPropertiesSet() {\n }", "protected void validate() throws Exception{\t\n\t\tsuper.validate();\n\t\tvalidateProperty(PROPERTY_KEY_USERNAME);\n\t}", "@Override\n public void afterPropertiesSet() throws Exception {\n }", "@Override\r\n protected boolean validateSystemSettings() {\n return true;\r\n }", "public void validateSettings() {\n \n \t\ttry {\n \t\t\tfinal String serverUrl = getServerUrl();\n \t\t\tfinal String newUserId = getUserName();\n \t\t\tfinal String newPassword = getPassword();\n \t\t\tfinal boolean isAnonymous = isAnonymousAccess();\n \t\t\tfinal String newEncoding = getCharacterEncoding();\n \t\t\tfinal String httpAuthUser = getHttpAuthUserId();\n \t\t\tfinal String httpAuthPass = getHttpAuthPassword();\n \t\t\tfinal boolean checkVersion = repositoryVersionCombo.getSelectionIndex() == 0;\n \t\t\tfinal String[] version = new String[1];\n \t\t\tgetWizard().getContainer().run(true, false, new IRunnableWithProgress() {\n \t\t\t\tpublic void run(IProgressMonitor monitor) throws InvocationTargetException, InterruptedException {\n \t\t\t\t\tif (monitor == null) {\n \t\t\t\t\t\tmonitor = new NullProgressMonitor();\n \t\t\t\t\t}\n \t\t\t\t\ttry {\n \t\t\t\t\t\tmonitor.beginTask(\"Validating server settings\", IProgressMonitor.UNKNOWN);\n \t\t\t\t\t\tBugzillaClient client = null;\n \t\t\t\t\t\tif (!isAnonymous && version != null) {\n \t\t\t\t\t\t\tclient = BugzillaClientFactory.createClient(serverUrl, newUserId, newPassword,\n \t\t\t\t\t\t\t\t\thttpAuthUser, httpAuthPass, newEncoding);\n \t\t\t\t\t\t\tclient.validate();\t\t\t\t\t\t\t\n \t\t\t\t\t\t}\n \t\t\t\t\t\tif (checkVersion && client != null) {\n \t\t\t\t\t\t\tRepositoryConfiguration config = client.getRepositoryConfiguration();\n \t\t\t\t\t\t\tif (config != null) {\n \t\t\t\t\t\t\t\tversion[0] = config.getInstallVersion();\n \t\t\t\t\t\t\t}\n \t\t\t\t\t\t}\n \t\t\t\t\t} catch (Exception e) {\n \t\t\t\t\t\tthrow new InvocationTargetException(e);\n \t\t\t\t\t} finally {\n \t\t\t\t\t\tmonitor.done();\n \t\t\t\t\t}\n \t\t\t\t}\n \t\t\t});\n \n \t\t\t// getWizard().getContainer().run(true, false, new\n \t\t\t// IRunnableWithProgress() {\n \t\t\t// public void run(IProgressMonitor monitor) throws\n \t\t\t// InvocationTargetException, InterruptedException {\n \t\t\t// monitor.beginTask(\"Validating server settings\",\n \t\t\t// IProgressMonitor.UNKNOWN);\n \t\t\t// try {\n \t\t\t//\n \t\t\t// // Check that the server exists and we can connect\n \t\t\t// // (proxy or not)\n \t\t\t// Proxy proxySettings =\n \t\t\t// TasksUiPlugin.getDefault().getProxySettings();\n \t\t\t// WebClientUtil.openUrlConnection(serverURL, proxySettings, false,\n \t\t\t// httpAuthUser, httpAuthPass);\n \t\t\t//\n \t\t\t// if (!isAnonymous) {\n \t\t\t// // Server exists, connect to service and validate\n \t\t\t// // credentials\n \t\t\t// BugzillaClient.validateCredentials(proxySettings, serverUrl,\n \t\t\t// newEncoding, newUserId,\n \t\t\t// newPassword);\n \t\t\t// }\n \t\t\t//\n \t\t\t// if (checkVersion) {\n \t\t\t// RepositoryConfiguration config =\n \t\t\t// BugzillaCorePlugin.getRepositoryConfiguration(true,\n \t\t\t// serverUrl, proxySettings, newUserId, newPassword, newEncoding);\n \t\t\t//\n \t\t\t// if (config != null) {\n \t\t\t// version[0] = config.getInstallVersion();\n \t\t\t// }\n \t\t\t// }\n \t\t\t//\n \t\t\t// } catch (Exception e) {\n \t\t\t// throw new InvocationTargetException(e);\n \t\t\t// } finally {\n \t\t\t// monitor.done();\n \t\t\t// }\n \t\t\t// }\n \t\t\t// });\n \n \t\t\tif (version[0] != null) {\n \t\t\t\tsetBugzillaVersion(version[0]);\n \t\t\t}\n \n \t\t\tif (!testing) {\n \t\t\t\tMessageDialog.openInformation(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG,\n \t\t\t\t\t\t\"Authentication credentials are valid.\");\n \t\t\t}\n \t\t} catch (InvocationTargetException e) {\n \t\t\tif (e.getCause() instanceof MalformedURLException) {\n \t\t\t\tMessageDialog.openWarning(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG, \"Server URL is invalid.\");\n \t\t\t} else if (e.getCause() instanceof LoginException) {\n \t\t\t\tMessageDialog.openWarning(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG,\n \t\t\t\t\t\t\"Unable to authenticate with server.\\n\\n\" + e.getCause().getMessage());\n \t\t\t} else if (e.getCause() instanceof IOException) {\n \t\t\t\tMessageDialog.openWarning(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG,\n \t\t\t\t\t\t\"No Bugzilla server found at url\");\n \t\t\t} else {\n \t\t\t\tMessageDialog.openWarning(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG, MESSAGE_FAILURE_UNKNOWN);\n \t\t\t}\n \t\t} catch (InterruptedException e) {\n \t\t\tMessageDialog.openWarning(null, IBugzillaConstants.TITLE_MESSAGE_DIALOG, MESSAGE_FAILURE_UNKNOWN);\n \t\t}\n \n \t\tsuper.getWizard().getContainer().updateButtons();\n \t}", "@Override\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\r\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\t\n\t}", "@Override\r\n public void afterPropertiesSet() throws Exception {\n }", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tinit();\n\t}", "public void afterPropertiesSet() throws Exception {\n Assert.notNull(templateResolver, \"Property 'templateResolver' must be set\");\n Assert.notNull(mailSender, \"Property 'mailSender' must be set\");\n Assert.notNull(emailParser, \"Property 'templateResolver' must be set\");\n Assert.notNull(templateResolver, \"Property 'templateResolver' must be set\");\n }", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tSystem.out.println(\"call afterPropertiesSet()...\");\n//\t\tadminId = env.getProperty(\"adminid\");\n//\t\tadminPw = env.getProperty(\"adminpw\");\t\t\n\t}", "public void afterPropertiesSet() {\r\n\t}", "@Override\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tloadRules2();\r\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tSystem.out.println(\"After Properties Set\");\n\t\t\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() {\n\t}", "public void afterPropertiesSet() throws Exception {\n\t\t\n\t}", "public void setupProperties() {\n // left empty for subclass to override\n }", "protected void afterPropertiesSetInternal() {\n\t\t// override this method\n\t}", "protected void checkConfiguration() {\n \tsuper.checkConfiguration();\n \t\n if (this.customizations == null) {\n this.customizations = new ArrayList<String>();\n }\n if (this.options == null) {\n this.options = new HashMap<String, String>();\n }\n if (this.sourceDirectories == null) {\n \tthis.sourceDirectories = new ArrayList<String>();\n \tthis.sourceDirectories.add(DEFAULT_SOURCE_DIRECTORY);\n }\n }", "@Override\n\tpublic void initSettings() {\n\n\t}", "void setValidSettings(boolean valid);", "protected void doExtraValidation(Properties props) {\n /* nothing by default */\n }", "@Override\n @SuppressWarnings(\"PMD.SignatureDeclareThrowsException\")\n public void afterPropertiesSet() throws Exception {\n Assert.hasText(this.projectIdKey, \"projectIdKey must not be empty\");\n }", "void validateProperties() {\n super.validateProperties();\n validatePropertySet(\"token\", getToken());\n }", "protected void validateAndSetValues()\n\t\t{\n\t\t\tif (null == eventDispatcher)\n\t\t\t{\n\t\t\t\teventDispatcher = new DefaultEventDispatcher();\n\t\t\t}\n\t\t\tif (null == sessionAttributes)\n\t\t\t{\n\t\t\t\tsessionAttributes = new HashMap<String, Object>();\n\t\t\t}\n\t\t\tif (null == reconnectPolicy)\n\t\t\t{\n\t\t\t\treconnectPolicy = ReconnectPolicy.NO_RECONNECT;\n\t\t\t}\n\t\t\tcreationTime = System.currentTimeMillis();\n\t\t}", "public void afterPropertiesSet() throws Exception {\n\t}", "public void afterPropertiesSet() throws Exception {\n\t}", "@Override\r\n public void validateParameters(PluginRequest request) {\n }", "private void check()\n {\n Preconditions.checkArgument(name != null, \"Property name missing\");\n Preconditions.checkArgument(valueOptions != null || valueMethod != null, \"Value method missing\");\n Preconditions.checkArgument(\n !(this.validationRegex != null && this.valueOptions != null && this.valueOptionsMustMatch),\n \"Cant have regexp validator and matching options at the same time\");\n\n if (required == null)\n {\n /*\n If a property has a default value, the common case is that it's required.\n However, we need to allow for redundant calls of required(): defaultOf(x).required();\n and for unusual cases where a property has a default value but it's optional: defaultOf(x).required(false).\n */\n required = this.defaultValue != null;\n }\n\n if (description == null)\n description = \"Property name: \" + name + \", required = \" + required;\n\n if (valueOptions != null && defaultValue != null)\n {\n for (PropertySpec.Value v : valueOptions)\n {\n if (v.value.equals(defaultValue.value))\n v.isDefault = true;\n }\n }\n\n if (dependsOn != null)\n {\n if (category == null)\n throw new IllegalArgumentException(\"category required when dependsOn is set \" + name);\n\n if (!dependsOn.isOptionsOnly())\n throw new IllegalArgumentException(\n \"Invalid dependsOn propertySpec (must be optionsOnly) \" + dependsOn.name());\n }\n }", "@Override\n public void afterPropertiesSet() {\n // TODO: instead of autowiring initialize page objects with proxies\n try {\n Field mapField = Validator.class.getDeclaredField(\"map\");\n mapField.setAccessible(true);\n mapField.set(validator, map);\n\n Field uiField = Validator.class.getDeclaredField(\"ui\");\n uiField.setAccessible(true);\n uiField.set(validator, ui);\n } catch (ReflectiveOperationException e) {\n throw new RuntimeException(\"Could not instantiate the page object!\", e);\n }\n }", "private DatabaseValidationProperties() {}", "private void validateProperties() throws BuildException {\r\n if (this.port == null || this.port.length() == 0) {\r\n throw new BuildException(\"Attribute 'port' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.userName == null || this.userName.length() == 0) {\r\n throw new BuildException(\"Attribute 'userName' must be set.\");\r\n }\r\n if (this.password == null || this.password.length() == 0) {\r\n throw new BuildException(\"Attribute 'password' must be set.\");\r\n }\r\n if (this.depotPath == null || this.depotPath.length() == 0) {\r\n throw new BuildException(\"Attribute 'repositoryUrl' must be set.\");\r\n }\r\n if (this.p4ExecutablePath == null || this.p4ExecutablePath.length() == 0) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' must be set.\");\r\n }\r\n File p4Executable = new File(this.p4ExecutablePath);\r\n if (!p4Executable.exists()) {\r\n throw new BuildException(\"Attribute 'p4ExecutablePath' \" + this.p4ExecutablePath +\r\n \" does not appear to point to an actual file.\");\r\n }\r\n \r\n // If default* is specified, then all should be specified. \r\n if (((this.defaultHackystatAccount != null) || \r\n (this.defaultHackystatPassword != null) ||\r\n (this.defaultHackystatSensorbase != null)) &&\r\n ((this.defaultHackystatAccount == null) || \r\n (this.defaultHackystatPassword == null) ||\r\n (this.defaultHackystatSensorbase == null))) {\r\n throw new BuildException (\"If one of default Hackystat account, password, or sensorbase \" +\r\n \"is specified, then all must be specified.\");\r\n }\r\n \r\n // Check to make sure that defaultHackystatAccount looks like a real email address.\r\n if (!ValidateEmailSyntax.isValid(this.defaultHackystatAccount)) {\r\n throw new BuildException(\"Attribute 'defaultHackystatAccount' \" + this.defaultHackystatAccount\r\n + \" does not appear to be a valid email address.\");\r\n }\r\n \r\n // If fromDate and toDate not set, we extract commit information for the previous day.\r\n if (this.fromDateString == null && this.toDateString == null) {\r\n Day previousDay = Day.getInstance().inc(-1);\r\n this.fromDate = new Date(previousDay.getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(previousDay.getLastTickOfTheDay());\r\n }\r\n else {\r\n try {\r\n if (this.hasSetToAndFromDates()) {\r\n this.fromDate = new Date(Day.getInstance(this.dateFormat.parse(this.fromDateString))\r\n .getFirstTickOfTheDay() - 1);\r\n this.toDate = new Date(Day.getInstance(this.dateFormat.parse(this.toDateString))\r\n .getLastTickOfTheDay());\r\n }\r\n else {\r\n throw new BuildException(\r\n \"Attributes 'fromDate' and 'toDate' must either be both set or both not set.\");\r\n }\r\n }\r\n catch (ParseException ex) {\r\n throw new BuildException(\"Unable to parse 'fromDate' or 'toDate'.\", ex);\r\n }\r\n\r\n if (this.fromDate.compareTo(this.toDate) > 0) {\r\n throw new BuildException(\"Attribute 'fromDate' must be a date before 'toDate'.\");\r\n }\r\n }\r\n }", "protected boolean validateProperties() throws IOException, Throwable {\n return (disableDNS() &&\n rebootAndWait(\"all\") &&\n changeProps() &&\n enableDNS() &&\n rebootAndWait(\"all\"));\n }", "@PostConstruct\n protected void checkInitialization() {\n ValidationUtility.checkNotNullNorEmpty(profileTaskCheckers, \"profileTaskCheckers\",\n ProfileActionConfigurationException.class);\n ValidationUtility.checkNotNullElements(profileTaskCheckers, \"profileTaskCheckers\",\n ProfileActionConfigurationException.class);\n }", "@PostLoad\n private void settingsAfterLoad()\n {\n\n productInfo = pis != null && pis.size() > 0;\n\n /* [2] setup transient : type */\n\n boolean clIsTransfer = cluster.getName().equals(R.CLNAME_TRANSFER);\n boolean catransferIsNone = catransfer.getName().equals(R.CANAME_NONE);\n\n Assert.assertEquals(MSG_PREF + \"pivot iff cluster = \" + R.CLNAME_PIVOT,\n pivot, cluster.getName().equals(R.CLNAME_PIVOT));\n\n Assert.assertTrue(MSG_PREF + \"RULE: cl=\" + R.CLNAME_TRANSFER + \" ==> catransfer!=\" + R.CANAME_NONE\n + \"; GOT: \" + cluster + \", \" + catransfer + \"; clIsTransfer=\" + clIsTransfer\n + \" catransferIsNone=\" + catransferIsNone, !clIsTransfer || !catransferIsNone);\n\n if (pivot) type = TTransactionType.pivot;\n else if (clIsTransfer) type = TTransactionType.transfer;\n else type = TTransactionType.simple;\n // TODO TTransactionType.exchange\n\n }", "private void processPropValidators() {\n getMethodsWithAnnotation(component, PropValidator.class).forEach(method -> {\n PropValidator propValidator = method.getAnnotation(PropValidator.class);\n\n if (!TypeName.get(method.getReturnType()).equals(TypeName.BOOLEAN)) {\n printError(\"Method \"\n + method.getSimpleName()\n + \" annotated with PropValidator must return a boolean.\");\n }\n\n String exposedMethodName = exposeExistingJavaMethodToJs(method);\n String propertyName = propValidator.value();\n optionsBuilder.addStatement(\"options.addJavaPropValidator(p.$L, $S)\",\n exposedMethodName,\n propertyName);\n });\n }", "@Override\n\tpublic void checkPropertyConfiguration() throws IOException, CustomizedException {\n\t\tString conf=PropertyReader.getProperty(\"configuration\");\n\t\tString\tfileName=\"\";\n\t\tconfiguration=conf;\n\t\tif(conf == null || conf.isEmpty())\n\t\t{\n\t\t\tthrow new CustomizedException(\"Configuration property is not set,it must be set to 1 or 2 \");\n\n\t\t}\n\t\tif(conf.equals(\"1\"))\n\t\t{\n\t\t\titeration=1;\n\t\t\tfileName=PropertyReader.getProperty(\"anagram_file\");\n\t\t\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be set to sample against the key anagramFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\telse if(conf.equals(\"2\"))\n\t\t{\n\t\t\titeration=Integer.parseInt(PropertyReader.getProperty(\"load_testing_iteration\"));\n\t\t\tfileName=PropertyReader.getProperty(\"large_file\");\n\t\t\tif(fileName == null || fileName.isEmpty())\n\t\t\t{\n\t\t\t\tthrow new CustomizedException(\"Filename property is not set,it must be bigFile against the key largeFile \");\n\n\t\t\t}\n\t\t\t\n\t\t}\n\t\tthis.fileName=fileName;\n\t\t\n\t}", "public void validate() throws org.apache.thrift.TException {\n if (config != null) {\n config.validate();\n }\n }", "private static synchronized void init() {\n if (CONFIG_VALUES != null) {\n return;\n }\n\n CONFIG_VALUES = new Properties();\n processLocalConfig();\n processIncludedConfig();\n }", "@PostConstruct\n public void init() {\n hasLength(env.getProperty(\"grouperClient.webService.url\"),\n \"property 'grouperClient.webService.url' is required\");\n hasLength(env.getProperty(\"grouperClient.webService.login\"),\n \"property 'grouperClient.webService.login' is required\");\n hasLength(env.getProperty(\"grouperClient.webService.password\"),\n \"property 'grouperClient.webService.password' is required\");\n }", "public abstract void initialSettings();", "public void validate() {\n Validate.notEmpty(filePath, \"Configuration file path not specified\");\n Validate.notEmpty(fileEncoding, \"Configuration file encoding not specified\");\n Validate.notEmpty(syntaxCheckCommand, \"Syntax check command not specified\");\n Validate.notEmpty(restartCommand, \"Restart command not specified\");\n Validate.notNull(hostName, \"Host name not specified\");\n Validate.isTrue(port > 0, \"Port must be greater than zero\");\n Validate.isTrue(checkInterval > 0, \"Health check interval must be greater than zero\");\n Validate.isTrue(checkTimeout > 0, \"Health check timeout must be greater than zero\");\n }", "public void validate() throws org.apache.thrift.TException {\n if (conf != null) {\n conf.validate();\n }\n }", "public void IntialProperties() {\r\n Properties prop = new Properties();\r\n try (FileInputStream input = new FileInputStream(\"./config.properties\")) {\r\n prop.load(input);\r\n generate = prop.getProperty(\"generate\");\r\n solve = prop.getProperty(\"algorithm\");\r\n setChanged();\r\n notifyObservers(\"prop\");\r\n } catch (FileNotFoundException e) {\r\n e.printStackTrace();\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n\r\n }", "public void afterPropertiesSet()\r\n/* 40: */ throws SchedulerException\r\n/* 41: */ {\r\n/* 42: 82 */ if (this.scheduler == null) {\r\n/* 43: 83 */ if (this.schedulerName != null) {\r\n/* 44: 84 */ this.scheduler = findScheduler(this.schedulerName);\r\n/* 45: */ } else {\r\n/* 46: 87 */ throw new IllegalStateException(\"No Scheduler specified\");\r\n/* 47: */ }\r\n/* 48: */ }\r\n/* 49: 90 */ registerListeners();\r\n/* 50: 91 */ registerJobsAndTriggers();\r\n/* 51: */ }", "protected void validate() throws ConfigurationException\n {\n\n }", "protected void setupParameters() {\n \n \n\n }", "private static void checkRequiredProperties()\n\t{\n\t\tfor (ServerProperty prop : ServerProperty.values())\n\t\t{\n\t\t\tif (prop.isRequired())\n\t\t\t{\n\t\t\t\t// TODO\n//\t\t\t\tswitch (prop)\n//\t\t\t\t{\n//\t\t\t\t\tcase GERMINATE_AVAILABLE_PAGES:\n//\t\t\t\t\t\tSet<Page> availablePages = getSet(prop, Page.class);\n//\t\t\t\t\t\tif (CollectionUtils.isEmpty(availablePages))\n//\t\t\t\t\t\t\tthrowException(prop);\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_USE_AUTHENTICATION:\n//\t\t\t\t\t\tboolean useAuthentication = getBoolean(prop);\n//\t\t\t\t\t\tif (useAuthentication)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_SERVER)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_SERVER);\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(get(ServerProperty.GERMINATE_GATEKEEPER_NAME)))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_NAME);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tcase GERMINATE_GATEKEEPER_REGISTRATION_ENABLED:\n//\t\t\t\t\t\tboolean registrationNeedsGatekeeper = getBoolean(prop);\n//\n//\t\t\t\t\t\tif (registrationNeedsGatekeeper)\n//\t\t\t\t\t\t{\n//\t\t\t\t\t\t\tString gatekeeperUrl = get(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\n//\t\t\t\t\t\t\tif (StringUtils.isEmpty(gatekeeperUrl))\n//\t\t\t\t\t\t\t\tthrowException(ServerProperty.GERMINATE_GATEKEEPER_URL);\n//\t\t\t\t\t\t}\n//\t\t\t\t\t\tbreak;\n//\n//\t\t\t\t\tdefault:\n\t\t\t\tif (StringUtils.isEmpty(get(prop)))\n\t\t\t\t\tthrowException(prop);\n//\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "@Override\n public void checkConfiguration() {\n }", "protected void validate() {\n // no op\n }", "protected void validateConfig() {\n A.notNull(getStreamer(), \"Streamer\");\n A.notNull(getIgnite(), \"Ignite\");\n A.notNull(endpointUrl, \"Twitter Streaming API endpoint\");\n\n A.ensure(getSingleTupleExtractor() != null || getMultipleTupleExtractor() != null, \"Twitter extractor\");\n\n String followParam = apiParams.get(SITE_USER_ID_KEY);\n\n A.ensure(followParam != null && followParam.matches(\"^(\\\\d+,? ?)+$\"),\n \"Site streaming endpoint must provide 'follow' param with value as comma separated numbers\");\n }", "protected void applySettings() {\n af_.SIZE_FIRST = Double.parseDouble(sizeFirstField_.getText());\n af_.NUM_FIRST = Double.parseDouble(numFirstField_.getText());\n af_.SIZE_SECOND = Double.parseDouble(sizeSecondField_.getText());\n af_.NUM_SECOND = Double.parseDouble(numSecondField_.getText());\n af_.CROP_SIZE = Double.parseDouble(cropSizeField_.getText());\n af_.THRES = Double.parseDouble(thresField_.getText());\n af_.CHANNEL1 = channelField1_.getText();\n af_.CHANNEL2 = channelField2_.getText();\n }", "@Override\n public void postConfig() throws PropertyException{\n if (salt == null) {\n throw new PropertyException(\"\",\"salt\",\"Salt not set in HashCodeHasher.\");\n } else if (!Hasher.validateSalt(salt)) {\n throw new PropertyException(\"\",\"salt\",\"Salt does not meet the requirements for a salt.\");\n }\n }", "@Override\r\n\t//InitializingBean 인터페이스 메소드 <= 스프링에서 제공하는 초기화 메소드\r\n\t//스프링컨테이너에 의해서 빈 객체가 생성되고, 빈 객체에 프로퍼티에 의존하는 객체, 혹은 값의 주입이 완료된 후 수행된다.\r\n\t//따라서, 프로퍼티에 값들이 제대로 주입되었는지 확인할 목적으로 사용할 수 있다.\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tSystem.out.println(\"afterPropertiesSet() 실행...\");\r\n\t}", "public void initialiseValues() {\n\t\tif (validationRule == null) { // NOSONAR\n\t\t\tvalidationRule = Optional.empty();\n\t\t}\n\t}", "@Override\r\n\tpublic void setProperties(Properties arg0) {\n\r\n\t}", "@Override\n public void validate() {\n LOG.ok(\"Validating configuration {0}\", this);\n\n if (CONNECTION_TYPE_SSH.equals(connectionType)) {\n if (StringUtil.isBlank(hostName))\n throw new ConfigurationException(\"The hostName configuration property is mandatory for SSH connections\");\n if (StringUtil.isBlank(userName))\n throw new ConfigurationException(\"The userName configuration property is mandatory for SSH connections\");\n if ((StringUtil.isBlank(privateKey)) && (password == null))\n throw new ConfigurationException(\"The password configuration property is mandatory for SSH connections if no private key is set\");\n }\n\n if (StringUtil.isBlank(method)) {\n throw new ConfigurationException(\"The method configuration property is mandatory\");\n } else if (!Arrays.asList(METHOD_PW, METHOD_USERADD + \":\" + SUBMETHOD_BSD, METHOD_USERADD + \":\" + SUBMETHOD_LINUX).contains(method)) {\n throw new ConfigurationException(\"Unsupported value in configuration property method\");\n }\n\n if (!Arrays.asList(BECOME_METHOD_DOAS, BECOME_METHOD_NONE, BECOME_METHOD_SUDO).contains(becomeMethod)) {\n throw new ConfigurationException(\"Unsupported value in configuration property becomeMethod\");\n }\n }", "protected void check() throws IOException, ServletException {\n if(value.length()==0)\n error(\"please specify a configuration\");\n else {\n \t\t//TODO add more checks\n \t\tok();\n }\n }", "private void validateParameters() {\r\n if (command == null) {\r\n throw new BuildException(\r\n \"'command' parameter should not be null for coverity task.\");\r\n }\r\n\r\n }", "@Override\r\n\tpublic void setProperties(Properties properties) \r\n\t{\n\t}", "@Override\n\tpublic void afterPropertiesSet() throws Exception {\n\t\tAssert.notNull(dataSource, \"DataSource must be provided\");\n\t}", "public void verifyConfig() {\r\n if (getSpecialHandlingManager() == null)\r\n throw new ConfigurationException(\"The required property 'specialHandlingManager' is missing.\");\r\n }", "@PostConstruct\n private void postConstruct() {\n if (customValue == null) {\n throw new RuntimeException(\"[customValue] property is not set \");\n }\n if (customSecondValue == null) {\n throw new RuntimeException(\"[customSecondValue] property is not set \");\n }\n }", "@Override\r\n\tprotected void validate() {\n\t}", "public void verifyConfig() {\r\n if (getProcessErpManager() == null)\r\n throw new ConfigurationException(\"The required property 'processErpManager' is missing.\");\r\n if (getAnchorColumnName() == null)\r\n throw new ConfigurationException(\"The required property 'anchorColumnName' is missing.\");\r\n }", "@Override\n\tpublic void validate() {\n\t\tsuper.validate();\n\t}", "@Override\n public void afterPropertiesSet() throws Exception {\n System.out.println(\"After Properties Set Method is called and Properties are set for \" + triangle.toString()\n + \" And \" + shapeService.toString());\n name = \"Vedika\";\n }", "@Override\r\n\tpublic void afterPropertiesSet() throws Exception {\n\t\ttry {\r\n\t\t\tfileServerAccessKey = helperRemote\r\n\t\t\t\t\t.getProperty(FILESERVER_ACCESS_KEY);\r\n\t\t\tfileServerSecretKey = helperRemote\r\n\t\t\t\t\t.getProperty(FILESERVER_SECRET_KEY);\r\n\t\t\tfileServerBucket = helperRemote.getProperty(FILESERVER_BUCKET);\r\n\t\t\tmediaBucket = helperRemote.getProperty(MADIA_BUCKET);\r\n\t\t\tcallbackUrl = helperRemote.getProperty(FILESERVER_CALLBACK_URL);\r\n\t\t\tcallbackHost = helperRemote.getProperty(FILESERVER_CALLBACK_HOST);\r\n\t\t\tfileServerUrl = helperRemote.getProperty(FILESERVER_URL);\r\n\t\t} catch (Exception ee) {\r\n\r\n\t\t}\r\n\t}", "public void afterPropertiesSet() throws Exception {\n\t\tstartTask();\r\n\t}", "public static void main(String[] args){\n PropertiesDemo.check();\n }", "protected void loadTestProperties() throws BuilderException {\n\t}", "public void testProperties(){\n \n if (parent == null)\n return;\n \n tests(parent);\n \n if (testSettings.AP_mnemonics){\n \n //- LOG ONLY - list of conflicts before cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n cleanMnemonicsConflict();\n \n // LOG ONLY - list of conflicts after cleaning\n if(debugLog) {\n System.err.println(LOG_CAPTION+\" - <testProperties()> - CONFLICTS after clean up = \");\n Enumeration conf = mnemonicConflict.elements();\n while(conf.hasMoreElements()) System.err.println(LOG_CAPTION+\" - <testProperties()> - \"+conf.nextElement().toString());\n } // LOG ONLY -/\n \n }\n \n if (testSettings.AP_noLabelFor)\n checkLabelTextComponentPairs();\n }", "private void setValidators() {\n getUtils().addNoNumbers(getOriginTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getDestinationTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getCollectionPlaceTxt(), getValidatorTxt());\n getUtils().addNoNumbers(getDeliveryPlaceTxt(), getValidatorTxt());\n getUtils().eurosListener(getTravelValueTxt(), getValidatorTxt());\n getUtils().eurosListener(getMoneyforDriverTxt(), getValidatorTxt());\n getUtils().eurosListener(getCustomsTxt(), getValidatorTxt());\n getUtils().eurosListener(getOtherExpensesTxt(), getValidatorTxt());\n getUtils().eurosListener(getShippingExpensesTxt(), getValidatorTxt());\n //No listenerValidator for distance because, finally it is a string\n// getUtils().distanceListener(getDistanceTxt(), getValidatorTxt());\n getUtils().dateValidator(getDateTxt(), getValidatorTxt());\n getUtils().timeListener(getArriveHourTxt(), getValidatorTxt());\n getUtils().timeListener(getExitHourTxt(), getValidatorTxt());\n getUtils().timeListener(getProvidedHourTxt(), getValidatorTxt());\n\n }", "private void checkLanguagePreferences() {\n if (submitter.languagePref == null) {\n if (rootValidator.autorepair) {\n submitter.languagePref = new ArrayList<StringWithCustomTags>();\n addInfo(\"Submitter language preference collection was null - autorepaired\", submitter);\n } else {\n addInfo(\"Submitter language preference collection is null\", submitter);\n }\n } else {\n if (submitter.languagePref.size() > 3) {\n addError(\"Submitter exceeds limit on language preferences (3)\", submitter);\n }\n for (StringWithCustomTags s : submitter.languagePref) {\n checkRequiredString(s, \"language pref\", submitter);\n }\n }\n }", "@Test\n public final void testValidate() {\n final CmdConfiguration config = new CmdConfiguration();\n try {\n config.validate();\n fail();\n } catch (RuntimeException e) {\n // expected because configuration is incomplete\n assertNotNull(e);\n }\n }", "@Override\n protected void updateProperties() {\n }", "void setupPropertiesPostDeserialization() {\n initLayout();\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Properties) {\n ((Properties) prop).setupPropertiesPostDeserialization();\n } else {\n prop.setI18nMessageFormater(getI18nMessageFormater());\n }\n }\n\n }", "@Override\r\n\t@BeforeMethod\r\n\tpublic void initSetting() {\n\t\tSystem.out.println(\"start\");\r\n\t\toTest.initSetting();\r\n\t}", "public ValidateConfiguration() {\n super();\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }", "public void validate() throws org.apache.thrift.TException {\n if (options != null) {\n options.validate();\n }\n }" ]
[ "0.76638156", "0.6558557", "0.64797413", "0.6433139", "0.6405398", "0.64046884", "0.6402772", "0.6397014", "0.6384191", "0.6384191", "0.6384191", "0.6351837", "0.63301855", "0.63301855", "0.63164914", "0.62842", "0.62513393", "0.62434745", "0.6220302", "0.6188249", "0.6147067", "0.6147067", "0.6147067", "0.6147067", "0.6147067", "0.6147067", "0.6147067", "0.6147067", "0.6135732", "0.61319554", "0.6066726", "0.60444456", "0.6038387", "0.6010491", "0.5988961", "0.59760725", "0.59745157", "0.5961987", "0.59583", "0.59583", "0.5958073", "0.59541595", "0.594605", "0.59017324", "0.5894023", "0.5891232", "0.5873304", "0.5869402", "0.58691096", "0.58469474", "0.58450294", "0.5832507", "0.58209175", "0.58001184", "0.5795476", "0.57732725", "0.57696825", "0.5745781", "0.5744986", "0.57273656", "0.5724249", "0.5704972", "0.5688759", "0.5683465", "0.5678339", "0.5672499", "0.5652995", "0.56326985", "0.5623841", "0.5604189", "0.5601994", "0.55938053", "0.55893135", "0.5587327", "0.5583679", "0.55831385", "0.557916", "0.5568939", "0.5566757", "0.5563036", "0.55579364", "0.555779", "0.5535993", "0.5533126", "0.55310255", "0.5531025", "0.5518883", "0.55155176", "0.54998046", "0.54988855", "0.5497633", "0.5495342", "0.54932576", "0.54932576", "0.54932576", "0.54932576", "0.54932576", "0.54932576", "0.54932576", "0.54932576" ]
0.8057729
0
Returns corresponding image object from given token string
public Image getImage(String token) { Image image = spriteMap.get(token); if (image == null) { System.out.println("null image on input " + token); } return image; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Bitmap getBitmapFromString(String jsonString) {\n byte[] decodedString = Base64.decode(jsonString, Base64.DEFAULT);\n\n return BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\n }", "private Image makeAnImage(String s) throws IOException {\n //String imageName = s.substring(s.indexOf(\"\\\\(\") + 1, s.indexOf(\"\\\\)\"));\n String[] parts = s.split(\"\\\\(\");\n String imageName = parts[1].substring(0, parts[1].length() - 1);\n // load the image data into an java.awt.Image object.\n Image img = null;\n InputStream is = ClassLoader.getSystemClassLoader().getResourceAsStream(imageName);\n try {\n img = ImageIO.read(is);\n } catch (IOException e) {\n System.out.println(\"Error: failed to load image\");\n } finally {\n if (is != null) {\n try {\n is.close();\n } catch (IOException e) {\n System.out.println(\"Failing closing the image\");\n }\n }\n }\n return img;\n }", "public Bitmap getBitmap(char objectType){\n int index;\n\n switch (objectType){\n\n case '.': index = 0; break;\n case '1': index = 1; break;\n case 'p': index = 2; break;\n default: index = 0; break;\n }\n\n return bitmapsArray[index];\n }", "java.lang.String getImage();", "void setImage(TokenEntry entry, @NonNull String newImage);", "private String extractImageNameFromIdentifier(String image) {\n String[] tokens = image.split(\"/\");\n\n String imageName = tokens[tokens.length-1];\n if(imageName.contains(\":\")) {\n return imageName.split(\":\")[0];\n } else {\n return imageName;\n }\n }", "public static Image getImage(String string) {\n\t Bundle bundle = FrameworkUtil.getBundle(Activator.class);\n\t URL url = FileLocator.find(bundle, new Path(\"icons/\" + string), null);\n\t ImageDescriptor image = ImageDescriptor.createFromURL(url);\n\t return image.createImage();\n\t}", "public Object parseImage(int rssType, Document doc) throws Exception;", "Bitmap mo27481a(String str);", "DetectionResult getObjInImage(Mat image);", "public static String getImageId(WebElement image) {\n String imageUrl = image.getAttribute(\"src\");\n\n int indexComparisonStart = imageUrl.indexOf(START_TOKEN) + START_TOKEN.length();\n int indexComparisonFinish = imageUrl.substring(indexComparisonStart).indexOf(STOP_TOKEN);\n\n return imageUrl.substring(indexComparisonStart, indexComparisonStart + indexComparisonFinish);\n }", "String getImage();", "public Bitmap fromStringToImage(String photo){\n byte[] decodedString = Base64.decode(photo, Base64.DEFAULT);\n Bitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\n return decodedByte;\n }", "protected Token newToken(TokenPattern pattern,\n String image,\n int line,\n int column) {\n\n return new Token(pattern, image, line, column);\n }", "public native Object parse( Object json, String texturePath );", "public Image getImage(URL paramURL, String paramString) {\n/* */ try {\n/* 298 */ return getImage(new URL(paramURL, paramString));\n/* 299 */ } catch (MalformedURLException malformedURLException) {\n/* 300 */ return null;\n/* */ } \n/* */ }", "public static void main(String[] args) {\nScanner sc=new Scanner(System.in);\r\nSystem.out.println(\"Enter the String:\");\r\nString str=sc.nextLine();\r\nString r=getImage(str);\r\n\r\n}", "public static Bitmap getBitmapFromString(String string) {\n \n \t\tbyte[] decodedString = Base64.decode(string, Base64.DEFAULT);\n \t\tBitmap decodedByte = BitmapFactory.decodeByteArray(decodedString, 0, decodedString.length);\n \t\treturn decodedByte;\n \t}", "byte[] token();", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n try { input_stream.backup(0);\n while (curChar <= 12 && (0x1000L & (1L << curChar)) != 0L)\n curChar = input_stream.BeginToken();\n }\n catch (java.io.IOException e1) { continue EOFLoop; }\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n TokenLexicalActions(matchedToken);\n return matchedToken;\n }\n else\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n continue EOFLoop;\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n}", "public static Bitmap getBitmapFromStringBase64(String imageString){\n byte[] imageAsBytes = Base64.decode(imageString, Base64.DEFAULT);\n Bitmap bitmap = BitmapFactory.decodeByteArray(imageAsBytes, 0, imageAsBytes.length);\n return bitmap;\n }", "public native String getImageAttribute(String key) throws MagickException;", "SecurityToken loadByTokenValue(String tokenValue);", "private static Element string2Element(String token) {\r\n\t\tif (token.equals(\"+\")) {\r\n\t\t\treturn Operator.plusSign();\r\n\t\t} else if (token.equals(\"-\")) {\r\n\t\t\treturn Operator.minusSign();\r\n\t\t} else if (token.equals(\"*\")) {\r\n\t\t\treturn Operator.timesSign();\r\n\t\t} else if (token.equals(\"/\")) {\r\n\t\t\treturn Operator.dividedBySign();\r\n\t\t} else if (token.equals(\"(\")) {\r\n\t\t\treturn Parenthesis.leftParenthesis();\r\n\t\t} else if (token.equals(\")\")) {\r\n\t\t\treturn Parenthesis.rightParenthesis();\r\n\t\t} else {\r\n\t\t\treturn new Number(Double.parseDouble(token));\r\n\t\t}\r\n\t}", "Bitmap load(String id);", "public static BufferedImage decodeToImage(String imageString) {\n\n\t\tBufferedImage image = null;\n\t\tbyte[] imageByte;\n\t\ttry {\n\t\t\tBASE64Decoder decoder = new BASE64Decoder();\n\t\t\timageByte = decoder.decodeBuffer(imageString);\n\t\t\tByteArrayInputStream bis = new ByteArrayInputStream(imageByte);\n\t\t\timage = ImageIO.read(bis);\n\t\t\tbis.close();\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "public static Token getNextToken()\n{\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 8)\n {\n jjmatchedKind = 8;\n }\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 8)\n {\n jjmatchedKind = 8;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n TokenLexicalActions(matchedToken);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else\n {\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n}", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n jjmatchedPos = -1;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedPos == 0 && jjmatchedKind > 204)\n {\n jjmatchedKind = 204;\n }\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n case 3:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_3();\n if (jjmatchedPos == 0 && jjmatchedKind > 12)\n {\n jjmatchedKind = 12;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n MoreLexicalActions();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "public Token(BattleGrid grid, int positionX, int positionY, String image) {\n this.grid = grid;\n this.image = grid.getImage(image);\n buffered = grid.toBufferedImage(this.image.getImage());\n lastMovement = System.currentTimeMillis();\n orientation = 0;\n this.positionX = positionX;\n this.positionY = positionY;\n grid.addTokenAt(this, positionX, positionY);\n takeAction();\n }", "private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }", "private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }", "private String getTokenName(int token) {\n try {\n java.lang.reflect.Field [] classFields = sym.class.getFields();\n for (int i = 0; i < classFields.length; i++) {\n if (classFields[i].getInt(null) == token) {\n return classFields[i].getName();\n }\n }\n } catch (Exception e) {\n e.printStackTrace(System.err);\n }\n\n return \"UNKNOWN TOKEN\";\n }", "private Image createImage(String image_file) {\n\t\tImage img = new Image(image_file);\n\t\treturn img;\n\t}", "private static String getImage(String str) {\n\t\tStringBuffer bff=new StringBuffer(str);\r\n\t\treturn bff.reverse().toString();\r\n\t}", "public Image getImage(String key)\n {\n return imageRegistry.get(key);\n }", "String getImaginary_lit();", "public interface LogoParserConstants {\r\n\r\n /** End of File. */\r\n int EOF = 0;\r\n /** RegularExpression Id. */\r\n int PROC = 6;\r\n /** RegularExpression Id. */\r\n int END = 7;\r\n /** RegularExpression Id. */\r\n int MAKE = 8;\r\n /** RegularExpression Id. */\r\n int VARNAME = 9;\r\n /** RegularExpression Id. */\r\n int RPT = 10;\r\n /** RegularExpression Id. */\r\n int RT = 11;\r\n /** RegularExpression Id. */\r\n int FD = 12;\r\n /** RegularExpression Id. */\r\n int ID = 13;\r\n /** RegularExpression Id. */\r\n int DECPOINT = 14;\r\n /** RegularExpression Id. */\r\n int PLUS = 15;\r\n /** RegularExpression Id. */\r\n int MINUS = 16;\r\n /** RegularExpression Id. */\r\n int TIMES = 17;\r\n /** RegularExpression Id. */\r\n int DIVIDE = 18;\r\n /** RegularExpression Id. */\r\n int COLON = 19;\r\n /** RegularExpression Id. */\r\n int COMMA = 20;\r\n /** RegularExpression Id. */\r\n int LBRACKET = 21;\r\n /** RegularExpression Id. */\r\n int RBRACKET = 22;\r\n /** RegularExpression Id. */\r\n int LSQR = 23;\r\n /** RegularExpression Id. */\r\n int RSQR = 24;\r\n /** RegularExpression Id. */\r\n int NUMBER = 25;\r\n /** RegularExpression Id. */\r\n int DIGIT = 26;\r\n /** RegularExpression Id. */\r\n int ALPHA = 27;\r\n\r\n /** Lexical state. */\r\n int DEFAULT = 0;\r\n\r\n /** Literal token values. */\r\n String[] tokenImage = {\r\n \"<EOF>\",\r\n \"\\\" \\\"\",\r\n \"\\\"\\\\t\\\"\",\r\n \"\\\"\\\\n\\\"\",\r\n \"\\\"\\\\r\\\"\",\r\n \"\\\"\\\\r\\\\n\\\"\",\r\n \"\\\"proc\\\"\",\r\n \"\\\"end\\\"\",\r\n \"\\\"make\\\"\",\r\n \"<VARNAME>\",\r\n \"\\\"rpt\\\"\",\r\n \"\\\"rt\\\"\",\r\n \"\\\"fd\\\"\",\r\n \"<ID>\",\r\n \"\\\".\\\"\",\r\n \"\\\"+\\\"\",\r\n \"\\\"-\\\"\",\r\n \"\\\"*\\\"\",\r\n \"\\\"/\\\"\",\r\n \"\\\":\\\"\",\r\n \"\\\",\\\"\",\r\n \"\\\"(\\\"\",\r\n \"\\\")\\\"\",\r\n \"\\\"[\\\"\",\r\n \"\\\"]\\\"\",\r\n \"<NUMBER>\",\r\n \"<DIGIT>\",\r\n \"<ALPHA>\",\r\n };\r\n\r\n}", "public static UserIdentity parseToken(String token) {\n try {\n Claims body = Jwts.parser()\n .setSigningKey(JwtUtils.jwtSecret)\n .parseClaimsJws(token)\n .getBody();\n \n if( log.isDebugEnabled() ) \n {\n \tlog.debug( body.toString() );\n }\n \n System.out.println( body.toString() );\n \n UserIdentity domainUser = new UserIdentity( (String)body.get(\"idmToken\"), body.getSubject() );\n return domainUser;\n\n } catch ( JwtException | ClassCastException e ) { \t\n \tlog.error( e.getMessage() );\n throw e;\n }\n }", "public void LiteralsToPixels(String token) {\n\t\tString[] tempSplit = token.split(\"(?<!^)\");\n\t\tfor (String temp: tempSplit) {\n\t\t\tTokenizedPixel pixel = new TokenizedPixel(temp, ColorPalette.PALETTE.get(temp));\n\t\t\tif (ColorPalette.PALETTE.get(temp) == null) {\n\t\t\t\tpixel.setColor(Color.BLACK);\n\t\t\t}\n\t\t\tpixelList.add(pixel);\n\t\t}\n\t}", "private String getTokenValue(final Specimen objSpecimen, String token)\r\n\t\t\tthrows NameGeneratorException\r\n\t{\r\n//\t\tif(\"SYS_UID\".equals(token))\r\n//\t\t{\r\n//\t\t\tcurrentLabel = currentLabel+1;\r\n//\t\t}\r\n\t\tString mylable = \"\";\r\n\t\ttry\r\n\t\t{\r\n\t\t\tmylable = TokenFactory.getInstance(token).getTokenValue(objSpecimen);\r\n\r\n\t\t}\r\n\t\tcatch(TokenNotFoundException exp)\r\n\t\t{\r\n\t\t\tmylable = token;\r\n\t\t}\r\n\t\tcatch(ApplicationException excep)\r\n\t\t{\r\n\t\t\tthrow new NameGeneratorException(excep.getMsgValues());\r\n\t\t}\r\n\t\tif (mylable == null)\r\n\t\t{\r\n\t\t\tmylable = \"\";\r\n\t\t}\r\n\t\treturn mylable;\r\n\t}", "public int getBitmapIndex(char objectType){\n int index;\n switch (objectType){\n case '.': index = 0; break;\n case '1': index = 1; break;\n case 'p': index = 2; break;\n default: index = 0; break;\n }\n return index;\n }", "TokenRule get(String iisnBin);", "public Token getNextToken() \n{\n Token specialToken = null;\n Token matchedToken;\n int curPos = 0;\n\n EOFLoop :\n for (;;)\n {\n try\n {\n curChar = input_stream.BeginToken();\n }\n catch(java.io.IOException e)\n {\n jjmatchedKind = 0;\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n return matchedToken;\n }\n image = jjimage;\n image.setLength(0);\n jjimageLen = 0;\n\n for (;;)\n {\n switch(curLexState)\n {\n case 0:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_0();\n if (jjmatchedPos == 0 && jjmatchedKind > 121)\n {\n jjmatchedKind = 121;\n }\n break;\n case 1:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_1();\n break;\n case 2:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_2();\n if (jjmatchedPos == 0 && jjmatchedKind > 9)\n {\n jjmatchedKind = 9;\n }\n break;\n case 3:\n jjmatchedKind = 0x7fffffff;\n jjmatchedPos = 0;\n curPos = jjMoveStringLiteralDfa0_3();\n if (jjmatchedPos == 0 && jjmatchedKind > 9)\n {\n jjmatchedKind = 9;\n }\n break;\n }\n if (jjmatchedKind != 0x7fffffff)\n {\n if (jjmatchedPos + 1 < curPos)\n input_stream.backup(curPos - jjmatchedPos - 1);\n if ((jjtoToken[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n matchedToken.specialToken = specialToken;\n TokenLexicalActions(matchedToken);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n return matchedToken;\n }\n else if ((jjtoSkip[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n if ((jjtoSpecial[jjmatchedKind >> 6] & (1L << (jjmatchedKind & 077))) != 0L)\n {\n matchedToken = jjFillToken();\n if (specialToken == null)\n specialToken = matchedToken;\n else\n {\n matchedToken.specialToken = specialToken;\n specialToken = (specialToken.next = matchedToken);\n }\n SkipLexicalActions(matchedToken);\n }\n else\n SkipLexicalActions(null);\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n continue EOFLoop;\n }\n MoreLexicalActions();\n if (jjnewLexState[jjmatchedKind] != -1)\n curLexState = jjnewLexState[jjmatchedKind];\n curPos = 0;\n jjmatchedKind = 0x7fffffff;\n try {\n curChar = input_stream.readChar();\n continue;\n }\n catch (java.io.IOException e1) { }\n }\n int error_line = input_stream.getEndLine();\n int error_column = input_stream.getEndColumn();\n String error_after = null;\n boolean EOFSeen = false;\n try { input_stream.readChar(); input_stream.backup(1); }\n catch (java.io.IOException e1) {\n EOFSeen = true;\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n if (curChar == '\\n' || curChar == '\\r') {\n error_line++;\n error_column = 0;\n }\n else\n error_column++;\n }\n if (!EOFSeen) {\n input_stream.backup(1);\n error_after = curPos <= 1 ? \"\" : input_stream.GetImage();\n }\n throw new TokenMgrError(EOFSeen, curLexState, error_line, error_column, error_after, curChar, TokenMgrError.LEXICAL_ERROR);\n }\n }\n}", "Picture identifyComponentImage() throws Exception;", "abstract public String getImageKey();", "String getItemImage();", "public Image getOne();", "String getUsernameFromToken(String token);", "public AuthorizationToken retrieveToken(String token);", "private BufferedImage imageFromBase64(final String imageString) {\r\n\t\ttry {\r\n\t\t\tfinal boolean useCache=ImageIO.getUseCache();\r\n\t\t\ttry {\r\n\t\t\t\tImageIO.setUseCache(false); /* Wird benötigt, wenn im Stream nicht gesprungen werden kann, was bei einem ByteArrayInputStream nun definitiv möglich ist. */\r\n\t\t\t\treturn ImageIO.read(new ByteArrayInputStream(Base64.getDecoder().decode(imageString)));\r\n\t\t\t} finally {\r\n\t\t\t\tImageIO.setUseCache(useCache);\r\n\t\t\t}\r\n\t\t} catch (IOException | IllegalArgumentException e) {return null;}\r\n\t}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByTransform();", "File resolveImage(Box box);", "SymbolImageType createSymbolImageType();", "public Token toToken(String s);", "Imagem getImagem();", "public C6992d mo21844d(String str) {\n InputStream e = mo21851e(str);\n if (e == null) {\n PrintStream printStream = System.err;\n StringBuilder sb = new StringBuilder();\n sb.append(\"Could not find the image \");\n sb.append(str);\n sb.append(\".\");\n printStream.println(sb.toString());\n return null;\n }\n try {\n Bitmap decodeStream = BitmapFactory.decodeStream(e);\n if (decodeStream == null) {\n System.err.println(\"Could not load the image because the bitmap was empty.\");\n return null;\n }\n C6992d dVar = new C6992d(decodeStream);\n dVar.f24755cj = this;\n return dVar;\n } finally {\n try {\n e.close();\n } catch (IOException unused) {\n }\n }\n }", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "String getToken();", "public Bitmap stringToBitMap(String encodedString){\n try {\n byte [] encodeByte= Base64.decode(encodedString,Base64.DEFAULT);\n Bitmap bitmap = BitmapFactory.decodeByteArray(encodeByte, 0, encodeByte.length);\n return bitmap;\n } catch(Exception e) {\n e.getMessage();\n return null;\n }\n }", "public byte[] getNewMatch(String token) throws RemoteException {\n return mainScreenProvider.getNewMatch(token);\n }", "public interface IOcr {\n\n Ticket recognitionPic(String path);\n\n Ticket recognitionPic(byte[] bytes);\n}", "com.yahoo.xpathproto.TransformTestProtos.ContentImage getImageByHandler();", "private BufferedImage getImage(String f) {\n BufferedImage image = null;\n File file = new File(f);\n\n try {\n image = ImageIO.read(file);\n }\n catch (Exception ex) {\n JOptionPane.showMessageDialog(\n null,\n \"Image could not be read!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "@SuppressWarnings(\"unchecked\")\n public T decodeIdentifier() throws IOException {\n Class<? extends TokenIdentifier> cls = getClassForIdentifier(getKind());\n if (cls == null) {\n return null;\n }\n TokenIdentifier tokenIdentifier = ReflectionUtils.newInstance(cls, null);\n ByteArrayInputStream buf = new ByteArrayInputStream(identifier);\n DataInputStream in = new DataInputStream(buf);\n tokenIdentifier.readFields(in);\n in.close();\n return (T) tokenIdentifier;\n }", "public static Image getImageFromRegistry(String key){\r\n\t\treturn getDefault().getImageRegistry().get(key);\r\n\t}", "public String GetCameraModel(String img){\n String console = null;\n String c_arg = null;\n String command = null;\n\n if( this.OS.contains(\"Windows\") ){\n console = \"cmd\";\n c_arg = \"/c\";\n command = PATH_TO_EXIFTOOL + \" \" + \"\\\"\"+img+\"\\\"\";\n }else{\n console = \"sh\";\n c_arg = \"-c\";\n command = PATH_TO_EXIFTOOL + \" \" + \"\\'\"+img+\"\\'\";\n }\n\n\n String line = null;\n try{\n IJ.log(PATH_TO_EXIFTOOL);\n IJ.log(command);\n IJ.log(this.OS);\n ProcessBuilder bob = new ProcessBuilder(console, c_arg, command);\n bob.redirectErrorStream(true);\n final Process proc = bob.start();\n\n BufferedReader proc_out = new BufferedReader( new InputStreamReader(proc.getInputStream()));\n\n do{\n line = proc_out.readLine();\n //IJ.log(line);\n\n\n if( line != null ){\n if( line.matches( \".*Survey2_(BLUE|RED|GREEN|RGB|IR|NDVI)\" )){\n break;\n }\n }\n\n //IJ.log(line);\n }while( line != null );\n\n }catch( IOException e){\n e.printStackTrace();\n }\n\n\n if( line.matches(\".*Survey2_BLUE\") ){\n return \"Survey2_BLUE\";\n }else if( line.matches(\".*Survey2_RED\") ){\n return \"Survey2_RED\";\n }else if( line.matches(\".*Survey2_GREEN\") ){\n return \"Survey2_GREEN\";\n }else if( line.matches(\".*Survey2_RGB\") ){\n return \"Survey2_RGB\";\n }else if( line.matches(\".*Survey2_IR\") ){\n return \"Survery2_IR\";\n }else if( line.matches(\".*Survery2_NDVI\") ){\n return \"Survey2_NDVI\";\n }else{\n return \"CAMERA_NOT_SUPPORTED\";\n }\n }", "protected abstract Image loadImage();", "@Override\r\n\tpublic Token getToken(String token) {\n\t\treturn null;\r\n\t}", "static Image bityNaObraz(String image) throws IOException\n {\n byte[] rysunek = DatatypeConverter.parseBase64Binary(image); \n BufferedImage img = ImageIO.read(new ByteArrayInputStream(rysunek));\n return img;\n }", "Bitmap mo6659a(Context context, String str, C1492a aVar);", "public static Image getImage(Images img)\n {\n return plugin.getImageRegistry().get(img.getKey());\n }", "Authentication findByToken(String token);", "IMG createIMG();", "public static TokenType getType(final String token) {\n\t\tif (isFLOAT(token))\n\t\t\treturn TokenType.FLOAT;\n\t\tif (isINT(token))\n\t\t\treturn TokenType.INT;\n\t\tif (isVAR(token))\n\t\t\treturn TokenType.VAR;\n\t\treturn TokenType.INVALID;\n\t}", "static Bitmap getImage(byte[] image) {\n return BitmapFactory.decodeByteArray(image, 0, image.length);\n }", "private static Bitmap getBitmap(String imageURL){\n\t\tBitmap bmp = null;\n\n\t\ttry {\n\t\t\tbmp = BitmapFactory.decodeStream((InputStream) new URL(imageURL).getContent());\n\t\t} catch (MalformedURLException e) {\n\t\t} catch (IOException e) {\n\t\t}\n\n\t\treturn bmp;\n\t}", "public BufferedImage GetImage(String name) { return ImageList.get(name); }", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "java.lang.String getToken();", "private String getTipoImage(String nameImage) {\n\t\tString retorno = \"\";\n\t\tString[] textoSeparado = nameImage.split(\"\\\\.\");\n\n\t\tif (textoSeparado != null && textoSeparado.length != 0)\n\t\t\tswitch (textoSeparado[textoSeparado.length - 1]) {\n\t\t\tcase \"jpg\":\n\t\t\t\tretorno = \"image/jpeg\";\n\t\t\t\tbreak;\n\t\t\tcase \"png\":\n\t\t\t\tretorno = \"image/png\";\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tretorno = \"image/\" + textoSeparado[textoSeparado.length - 1];\n\t\t\t}\n\n\t\treturn retorno;\n\t}", "@Override\n public ApiSession getApiSessionToken(String token) {\n // log.debug(\"getApiSessionToken({})\", token);\n if (null == this.hashOperations) {\n log.warn(\"hash is null\");\n return null;\n }\n if (null == token) {\n log.warn(\"token is null\");\n return null;\n }\n try {\n return (ApiSession) hashOperations.get(HASH_KEY, token);\n } catch (Exception e) {\n log.warn(\"Exception, msg: {}\", e.getMessage(), e);\n return null;\n }\n }", "public interface Image {\n /**\n * @return the image ID\n */\n String getId();\n\n /**\n * @return the image ID, or null if not present\n */\n String getParentId();\n\n /**\n * @return Image create timestamp\n */\n long getCreated();\n\n /**\n * @return the image size\n */\n long getSize();\n\n /**\n * @return the image virtual size\n */\n long getVirtualSize();\n\n /**\n * @return the labels assigned to the image\n */\n Map<String, String> getLabels();\n\n /**\n * @return the names associated with the image (formatted as repository:tag)\n */\n List<String> getRepoTags();\n\n /**\n * @return the digests associated with the image (formatted as repository:tag@sha256:digest)\n */\n List<String> getRepoDigests();\n}", "public static BufferedImage iconMaker(String s){\n BufferedImage buttonIcon;\n try{\n buttonIcon = ImageIO.read(new File(FILE_PATH + s));\n }catch(IOException e){\n buttonIcon = null;\n System.out.println(\"BooHOO\");\n }\n return buttonIcon;\n }", "public static Bitmap get(String key) {\n Bitmap bitmap = getFromMemory(key);\n if (bitmap == null) {\n bitmap = getFromDisk(key);\n }\n return bitmap;\n }", "public TokenizedPixel getPixel(int index) {\n\t\treturn this.pixelList.get(index);\n\t}", "String getTokenString();", "byte[] getRecipeImage(CharSequence query);", "public static boolean tokenToBool(Token i) {\n return Boolean.valueOf(i.image);\n }", "public SbMatrix\ngetObjectToImage( SoNode node) \n//\n////////////////////////////////////////////////////////////////////////\n{\n getMatrix(node);\n return matrixAction.getTextureMatrix();\n}", "public BufferedImage getImage(String word) throws CaptchaException\n {\n int wordLenght;\n //check word\n wordLenght = checkWordLenght(word);\n //create attribute string from word\n AttributedString attributedWord = getAttributedString(word, wordLenght);\n\n //create backgound\n BufferedImage background = getBackround();\n //apply text on background\n return pasteText(background, attributedWord);\n\n }", "public interface IClassifierService {\n\n List<String> detectImage(byte[] pixels) throws IOException;\n}", "static String extractSpriteImageDirectiveString(String cssLine)\n {\n final Matcher matcher = SPRITE_IMAGE_DIRECTIVE.matcher(cssLine);\n\n if (matcher.find())\n {\n return matcher.group(1).trim();\n }\n else\n {\n return null;\n }\n }", "public BoundObject getBoundObjFromStr(final String textInput, final boolean movable, int imCount, final MediaTracker m,\n \t\t\t\t\t\t\t\t\t final Font font, final FontRenderContext frc, final Point defP) throws Exception\n {\n \tfinal String[] tokens = textInput.split(\"::\");\n \tString hotSpotLabel = \"\";\n\n \tint maxAssociations = 0;\n\n \tif(tokens.length < 2)\n \t\tthrow new Exception(\"Error: insufficient arguements, applet cannot perform properly\");\n \tObject label = tokens[1];\n\n \tint[] coords = null;\n\n// \tTODO debug, remove\n \tfor(int i=0; i < tokens.length; i++)\n \t\tSystem.out.println(\"Token [\"+i+\"] is : -->\"+tokens[i]+\"<--\");\n\n \tif(tokens[1].contains(\".png\") || tokens[1].contains(\".gif\") || tokens[1].contains(\".jpg\"))\n \t{\n \t\tfinal Image img = getImage(getCodeBase(), (String)label);\n\t\t\tm.addImage(img, ++imCount);\n\t\t\ttry\n\t\t\t{\n\t\t\t\tm.waitForAll();\n\t\t\t}\n\t\t\t/* Catch the exception */\n\t\t\tcatch( final InterruptedException e )\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Loading of the image was interrupted\" );\n\t\t\t}\n\t\t\tlabel = img;\n\t\t\tcoords = new int[4];\n\t\t\tcoords[0] = coords[1] = 0;\n\t\t\tcoords[2] = img.getWidth(this);\n\t\t\tcoords[3] = img.getHeight(this);\n\n \t}\n\n \tString shape = \"rect\";\n \tHashMap<String, Boolean> legitimateLinks = null;\n \tif(tokens.length > 2)\n \t{\n\t \tint check = 2;\n\t \tif(tokens[2].equals(\"circle\") || tokens[2].equals(\"rect\") || tokens[2].equals(\"ellipse\") || tokens[2].equals(\"poly\"))\n\t \t{\n\t \t\tshape = tokens[2];\n\t \t\t//split up the coordinates into the int array\n\t \t\tfinal String[] cordStrs = tokens[3].split(\",\");\n\t \t\tcoords = new int[cordStrs.length];\n\t \t\tfor(int i=0; i < cordStrs.length; i++)\n\t \t\t\tcoords[i] = Integer.parseInt(cordStrs[i]);\n\t \t\tcheck = 4;\n\t \t\tif(tokens[2].equals(\"rect\"))\n\t \t\t{\n\t \t\t\tcoords[2] -= coords[0];\n\t \t\t\tcoords[3] -= coords[1];\n\t \t\t}\n\t \t}\n\n\t \tif(check < tokens.length)\n\t \t{\n\t\t \tlegitimateLinks = new HashMap<String,Boolean>();\n\n\t\t \tfor(int i=check; i < tokens.length; i++)\n\t\t \t{\n\t\t \t\tif(tokens[i].contains(\"hotSpotLabel:\"))\n\t\t \t\t{\n\t\t \t\t\thotSpotLabel = tokens[i].substring(13);\n\t\t \t\t}else if(tokens[i].contains(\"maxAssociations:\"))\n\t\t \t\t{\n\t\t \t\t\tSystem.out.println(\"sub string is : \"+tokens[i].substring(16));\n\t\t \t\t\tmaxAssociations = Integer.parseInt(tokens[i].substring(16));\n\t\t \t\t}else\n\t\t \t\t\tlegitimateLinks.put(tokens[i], new Boolean(true));\n\t\t \t}\n\t \t}\n \t}\n \tif(legitimateLinks == null || legitimateLinks.keySet().size() == 0)\n \t\tlegitimateLinks = null;\n \telse\n \t{\n \t\tfinal Iterator<String> keySet = legitimateLinks.keySet().iterator();\n \t\twhile(keySet.hasNext())\n \t\t\tSystem.out.println(\" there is an element called : \"+keySet.next());\n \t}\n \tSystem.out.println(\"here with coords = \"+coords);\n \tif(coords == null)\n \t{\n \t\tfinal Rectangle2D bounds = (new TextLayout((String)label,font,frc)).getBounds();\n \t\tcoords = new int[4];\n \t\tcoords[2] =(int)bounds.getWidth();\n \t\tcoords[3] = (int)bounds.getHeight();\n \t\tcoords[0] = defP.x-(coords[2]/2);\n \t\tcoords[1] = defP.y-(coords[3]/2);\n \t}\n \tif(movable)\n \t{\n \t\tmovObjCount.put(tokens[0], new Integer(0));\n \t\tmovObjMaxCount.put(tokens[0], new Integer(maxAssociations));\n \t\treturn new MovableObject(tokens[0],label,shape,coords,legitimateLinks,hotSpotLabel,maxAssociations);\n \t}\n \telse\n \t{\n \t\treturn new BoundObject(tokens[0],label,shape,coords,legitimateLinks,hotSpotLabel,maxAssociations);\n \t}\n }" ]
[ "0.5511989", "0.5438371", "0.5352217", "0.52553356", "0.5189622", "0.5167026", "0.51665515", "0.5154963", "0.5133878", "0.5064965", "0.5023363", "0.5018117", "0.49857017", "0.49708605", "0.4946194", "0.49286026", "0.49133062", "0.48918283", "0.48784682", "0.48743963", "0.48607153", "0.48547643", "0.48409232", "0.4831485", "0.4830354", "0.48287037", "0.48158652", "0.48151633", "0.48100996", "0.4805862", "0.4805862", "0.4805862", "0.47819135", "0.47791412", "0.47730872", "0.47393283", "0.4733847", "0.47297406", "0.47191978", "0.47081307", "0.47056156", "0.46951264", "0.46750945", "0.46717787", "0.4667319", "0.46468815", "0.46151346", "0.46095717", "0.4606277", "0.45983878", "0.45928204", "0.4584157", "0.45711", "0.45665672", "0.45623824", "0.45584083", "0.45406714", "0.45406714", "0.45406714", "0.45406714", "0.45406714", "0.45374212", "0.45297274", "0.4523169", "0.45223063", "0.45193747", "0.45103425", "0.4499771", "0.44932207", "0.44827724", "0.44662073", "0.44624358", "0.44616637", "0.44592863", "0.44503933", "0.4449296", "0.44349605", "0.44341555", "0.44325694", "0.44294637", "0.4428464", "0.4428464", "0.4428464", "0.4428464", "0.4428464", "0.4428464", "0.4427895", "0.4427323", "0.44216037", "0.44063377", "0.44017938", "0.43967587", "0.43924132", "0.43793124", "0.43738198", "0.43713358", "0.43636727", "0.4350831", "0.43454325", "0.43410736" ]
0.6956526
0
Load an image from the file system, using a given filename.
public static Image loadImage(String filename) { // using the URL means the image loads when stored // in a jar or expanded into individual files. java.net.URL imageURL = SpriteMap.class.getResource(IMAGE_PATH + filename); try { Image img = ImageIO.read(imageURL); return img; } catch (IOException e) { // we've encountered an error loading the image. There's not much we // can actually do at this point, except to abort the game. throw new RuntimeException("Unable to load image: " + filename); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void loadPhoto(String filename) throws IOException;", "protected BufferedImage loadImage(String nameOfFile)\n {\n BufferedImage img;\n try{\n img= ImageIO.read(new File(\"\"+nameOfFile));\n return img;\n }\n catch(IOException e)\n {\n System.out.println(e);\n }\n return null;\n }", "public static Image loadImageFromResourceFile(String filename) {\n try {\n ClassLoader classloader = Thread.currentThread().getContextClassLoader();\n InputStream is = classloader.getResourceAsStream(filename);\n return new Image(is);\n } catch (Exception e) {\n return null;\n }\n \n }", "static BufferedImage loadImage(String filename){\r\n\t\t\r\n\t\tBufferedImage image = null;\r\n\t\ttry{\r\n\t\t\timage = ImageIO.read(View.class.getResource(filename));\r\n\t\t}catch(Exception e){\r\n\t\t\te.printStackTrace(System.err);\r\n\t\t}\r\n\t\t\r\n\t\treturn image;\r\n\t}", "public static Image loadImage(String fileName) {\n\t\treturn new ImageIcon(fileName).getImage(); \n\t}", "static public Image read(String filename) throws IOException\n {\n MyBMPFile reader = new MyBMPFile();\n \n return reader.loadBitmap(filename);\n }", "private BufferedImage loadPic(String name) {\n\t\tBufferedImage pic=null;\n\t\ttry {\n\t\t\tpic = ImageIO.read(new File(\"store/\"+name));\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(ex);\n\t\t}\n\t\treturn pic;\n\t}", "public Image loadImage(String name) {\n String filename = \"images/\" + name;\n return new ImageIcon(filename).getImage();\n }", "public static Image loadImage(String name) {\r\n Image result = null;\r\n try {\r\n result = ImageIO.read(IO.class.getClassLoader().getResourceAsStream(\"data/\" + name));\r\n } catch (Exception ex) {\r\n } \r\n return result;\r\n }", "public BufferedImage getImage(String fileName){\r\n\t\tClassLoader classLoader = Thread.currentThread().getContextClassLoader();\r\n\t\tInputStream input = classLoader.getResourceAsStream(fileName);\r\n\t\tBufferedImage image = null;\r\n\t\ttry {\r\n\t\t\timage = ImageIO.read(input);\r\n\t\t} catch (IOException e1) {\r\n\t\t\tSystem.out.println(\"invalid image file name\");\r\n\t\t}\r\n\t\t//System.out.println(image);\r\n\t\treturn image;\r\n\t}", "public static ImageBuffer load(String filename) {\n Image img = getImage(filename);\n return extract(img, filename);\n }", "public static Image getImage(String filename) \r\n \t{\r\n \r\n \t\tInputStream is = cl.getResourceAsStream(AA_RESOURCE_FILE_PATH + filename);\r\n \t\t\r\n \t\tif(is == null){\r\n \t\t\tSystem.out.println(\"Input stream is null\");\r\n \t\t}\r\n \t\t\r\n \t\ttry {\r\n \t\t\treturn (ImageIO.read(is));\r\n \t\t} catch (Exception e) {\r\n \t\t\tlog.error(\"An exception occurred while reading the file: \"+filename);\r\n \t\t\tlog.error(e.getMessage());\r\n \t\t\te.printStackTrace();\r\n \t\t\treturn null;\r\n \t\t}\r\n \t}", "private BufferedImage getImage(String filename) {\n\t\ttry {\n\t\t\t// Grab the InputStream for the image.\n\t\t\tInputStream in = getClass().getResourceAsStream(filename);\n\t\t\t\n\t\t\t// Then read it in.\n\t\t\treturn ImageIO.read(in);\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"The image was not loaded.\");\n\t\t\tSystem.exit(1);\n\t\t}\n\t\treturn null;\n\t}", "public static ImageIcon loadImage(String name) throws FileNotFoundException {\n ImageIcon image = null;\n URL url = StitchingGuiUtils.getFigureResource(name);\n if (url != null) {\n java.awt.Image img = java.awt.Toolkit.getDefaultToolkit().createImage(url);\n if (img != null) {\n image = new ImageIcon(img);\n }\n }\n\n if (image == null)\n throw new FileNotFoundException(\"ERROR: Loading image \" + name + \" not found.\");\n\n return image;\n }", "public void loadImage() {\n\t\tif (images.containsKey(name)) {\n\t\t\treturn;\n\t\t}\n\n\t\ttry {\n\t\t\tString fullPath = BASE_PATH + this.sprite_sheet;\n\t\t\tFile imageFile = new File(fullPath);\n\t\t\tImage initialImage = ImageIO.read(imageFile);\n\t\t\tImage scaledImage = initialImage.getScaledInstance(\n\t\t\t\t\tMainPanel.TILE_SIZE, MainPanel.TILE_SIZE, 0);\n\n\t\t\tBufferedImage image = new BufferedImage(scaledImage.getWidth(null),\n\t\t\t\t\tscaledImage.getHeight(null), BufferedImage.TYPE_INT_ARGB);\n\t\t\tGraphics2D imageGraphicsContext = image.createGraphics();\n\t\t\timageGraphicsContext.drawImage(scaledImage, 0, 0, null);\n\t\t\timageGraphicsContext.dispose();\n\t\t\timages.put(name, image);\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Could not load image for\" + this.name);\n\t\t}\n\t}", "public Bitmap loadImageFully(final String filename) throws IOException {\n\t\tBitmap myBitmap = BitmapFactory.decodeStream(this.getAssets().open(filename));\n\t\tif (myBitmap != null) return myBitmap;\n\t\tthrow new IOException(\"cannot load file: \" + filename);\n\t}", "private BufferedImage readImage(String fileName) {\n BufferedImage image = null;\n\n try {\n InputStream inputFile = getClass().getResourceAsStream(fileName);\n image = ImageIO.read(inputFile);\n } catch (IIOException fnfexc) {\n System.err.println(\"Bitmap file '\" + fileName + \"' cannot be found\");\n } catch (IOException ioexp) {\n System.err.println(\"No contact with outside world\");\n }\n\n return image;\n }", "protected abstract Image loadImage();", "private ImageIcon loadImage(String filename) {\r\n\t\tImageIcon MyImage = new ImageIcon (filename);\r\n\t\tImage img = MyImage.getImage();\r\n\r\n\t\tImage newImg = img.getScaledInstance(800,800, Image.SCALE_SMOOTH);\r\n\t\tImageIcon image = new ImageIcon(newImg);\r\n\t\treturn image;\r\n\r\n }", "public BufferedImage loadImage(String path){\n\t\ttry {\n\t\t\timage = ImageIO.read(getClass().getResource(path));\n\t\t\tSystem.out.println(\"Sprite Sheet Loaded\");\n\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "void setImageFromFile(File imageFile);", "public void\tload(String fileName) throws IOException;", "public static BufferedImage load(String name) {\r\n\t\ttry {\r\n\t\t\tfinal BufferedImage org = ImageIO.read(Art.class.getResource(name));\r\n\t\t\tfinal BufferedImage res = new BufferedImage(org.getWidth(),\r\n\t\t\t\t\torg.getHeight(), BufferedImage.TYPE_INT_ARGB);\r\n\t\t\tfinal Graphics g = res.getGraphics();\r\n\t\t\tg.drawImage(org, 0, 0, null, null);\r\n\t\t\tg.dispose();\r\n\t\t\treturn res;\r\n\t\t} catch (final Exception e) {\r\n\t\t\tthrow new RuntimeException(e);\r\n\t\t}\r\n\t}", "@Override\n public void loadImage(String filename) throws IllegalArgumentException {\n BufferedImage img;\n try {\n img = ImageIO.read(new File(filename));\n this.width = img.getWidth();\n this.height = img.getHeight();\n this.pixels = new int[width][height][3];\n for (int x = 0; x < this.width; x++) {\n for (int y = 0; y < this.height; y++) {\n int pixel = img.getRGB(x, y);\n Color color = new Color(pixel, true);\n int red = color.getRed();\n int green = color.getGreen();\n int blue = color.getBlue();\n int [] singlePixel = new int [] {red, green, blue};\n this.pixels[x][y] = singlePixel;\n }\n }\n this.maxColorValue = 255;\n } catch (IOException error) {\n throw new IllegalArgumentException(\"File does not exist.\");\n }\n }", "private void setImage() throws FileNotFoundException {\n\t\timage = new Image(new FileInputStream(path));\n\t}", "private void loadFromDisk(String filename) throws IOException {\n Reader r = new FileReader(filename);\r\n load(r);\r\n }", "public void loadImg(String pic)\n\t{\n\t\ttry\n\t\t{\n\t\t\timg = ImageIO.read( getClass().getResourceAsStream( pic + \".png\" ) );\n\t\t}\n\t\tcatch (IOException e)\n\t\t{\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private BufferedImage loadImage(String path) {\n try {\n return ImageIO.read(getClass().getClassLoader().getResource(path));\n } catch (IOException e) {\n e.printStackTrace();\n System.exit(1);\n }\n\n return null;\n }", "public HTColorImage(String filename)\n\t{\n\t\ttry {\n\t\t\timg = ImageIO.read(new File(filename));\n\t\t} catch (IOException e) {\n\t\t\tJOptionPane.showMessageDialog(null, filename + \"could not be loaded\");\n\t\t\tthrow new IllegalStateException();\n\t\t}\n\t}", "public Bitmap LoadImage(String filename, Context ctx) {\n\n Bitmap bmp = null;\n String folder = \"\";\n String sdState = android.os.Environment.getExternalStorageState(); //Получаем состояние SD карты (подключена она или нет) - возвращается true и false соответственно\n if (sdState.equals(android.os.Environment.MEDIA_MOUNTED)) {\n folder = ctx.getCacheDir().toString();\n }\n else {\n folder = ctx.getExternalCacheDir().toString();\n }\n\n try {\n String filePath = folder + \"/\" + filename;\n bmp = BitmapFactory.decodeFile(filePath);\n\n } catch (Exception e) {\n return null;\n }\n\n return bmp;\n }", "public void load( File file )\n {\n try\n {\n if ( _core.getImageFile() != null )\n _core.reset( true );\n\n _core.setImageFile(\n file );\n\n setDirectoryEntries(\n _core.getImageFileDirectory() );\n }\n catch ( Exception e )\n {\n throw new RuntimeException( e );\n }\n }", "private Image loadImage (String path) {\n\t\tImageIcon imageicon = new ImageIcon (path);\r\n\t\tImage newImage = imageicon.getImage();\r\n\t\treturn newImage;\r\n\t}", "public static Image loadImage(String path) {\n File file = new File(path);\n String imagePath = file.getAbsolutePath();\n //Modify based on OS\n if (File.separatorChar == '\\\\') {\n // From Windows to Linux/Mac\n imagePath=imagePath.replace('/', File.separatorChar);\n imagePath = imagePath.replace(\"\\\\\", \"\\\\\\\\\");\n } else {\n // From Linux/Mac to Windows\n imagePath=imagePath.replace('\\\\', File.separatorChar);\n\n }\n \n //Add file: to work with JavaFX\n imagePath=\"file:\"+imagePath;\n\n return new Image(imagePath);\n }", "public void setImageAsset(String filename)\r\n {\r\n new LoadAssetTask().execute(filename);\r\n }", "private synchronized static native int nativeLoadImage( String fileName ) \n throws UnsatisfiedLinkError;", "public static Image getImage(String fileName) {\n Image image = null;\n try {\n image = ImageIO.read(new File(fileName));\n } catch (IOException ioe) {\n System.out.println(\"Error: Cannot open image:\" + fileName);\n JOptionPane.showMessageDialog(null, \"Error: Cannot open image:\" + fileName);\n }\n return image;\n }", "private void loadFromFile(String filename) {\n\t\tFile file = new File(filename);\n\t\tif (file.exists()) {\n\t\t\ttry {\n\t\t\t\tScanner scan = new Scanner(file);\n\t\t\t\twhile (scan.hasNextLine()) {\n\t\t\t\t\tString photoName = scan.nextLine().trim();\n\t\t\t\t\tFile photoFile = new File(scan.nextLine().trim());\n\t\t\t\t\tPhoto photo = new Photo(photoName, photoFile);\n\t\t\t\t\tphotos.add(photo);\n\t\t\t\t}\n\t\t\t\tscan.close();\n\t\t\t} catch (FileNotFoundException e) {\n\t\t\t\tSystem.err.println(\"Could not read album file: \" + e.getMessage());\n\t\t\t}\n\t\t} else {\n\t\t\tSystem.err.println(\"Album not found:: \" + file);\n\t\t}\n\t}", "public void load (String argFileName) throws IOException;", "public static BufferedImage loadImage(String ref) {\n BufferedImage b1 = null;\n try {\n b1 = ImageIO.read(new File(ref));\n } catch (IOException e) {\n System.out.println(\"error loading the image: \" + ref + \" : \" + e);\n }\n return b1;\n }", "public Resource load(String filename) throws MalformedURLException;", "@Override\n\tpublic Image loadEntity() {\n\t\ttry {\n\t\t\tImage entityImage = new Image(new FileInputStream(IMAGE_LOCATION));\n\t\t\treturn entityImage;\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.println(\"Image file not found\");\n\t\t\treturn null;\n\t\t}\n\t}", "private void openFile(File file)\n {\n String imagePath = file.toURI().toString();\n Image image = new Image(imagePath);\n if ( image == null || image.isError())\n {\n showInvalidFileFormatError();\n } else\n {\n bufferImage = image;\n changeAvatarCircle.setFill(new ImagePattern(image));\n imagePathLabel.setText(imagePath);\n }\n }", "private void loadJPEG( String fileName )\n {\n Bitmap bmp = BitmapFactory.decodeFile( fileName );\n if( bmp != null && bmp.getConfig() == Bitmap.Config.RGB_565 ) {\n\n ShortBuffer rgbBuf =\n ShortBuffer.allocate( bmp.getWidth()*bmp.getHeight() );\n\n bmp.copyPixelsToBuffer( rgbBuf );\n\n convertToLum( rgbBuf.array(), bmp.getWidth(), bmp.getHeight() );\n }\n }", "public void load(String filename) throws IOException\n {\n FileInputStream input;\n\n try {\n input = new FileInputStream(new File(filename));\n }\n catch (Exception e)\n {\n throw new IOException(\"Cannot open input file \" + filename + \":\" + e.getMessage());\n }\n load(input);\n input.close();\n }", "public static BufferedImage loadImage(String imageName) {\n try {\n InputStream inputStream = TextureRegistry.class.getClassLoader().getResourceAsStream(\"images/\" + imageName);\n if (inputStream == null) {\n System.err.println(\"Image file '\" + imageName + \"' could not be found.\");\n System.exit(1);\n }\n\n return ImageIO.read(inputStream);\n } catch (IOException ex) {\n System.err.println(\"Failed to load image '\" + imageName + \"'.\");\n ex.printStackTrace();\n System.exit(1);\n return null;\n }\n }", "public void load(String filename) throws IOException\n {\n DataInputStream input;\n\n try\n {\n input = new DataInputStream(new BufferedInputStream(new FileInputStream(new File(filename))));\n }\n catch (Exception e)\n {\n throw new IOException(\"Cannot open input file \" + filename + \":\" + e.getMessage());\n }\n load(input);\n input.close();\n }", "public static ImageIcon loadImage(String name, int width, int height)\n throws FileNotFoundException {\n ImageIcon image = null;\n URL url = StitchingGuiUtils.getFigureResource(name);\n if (url != null) {\n java.awt.Image img = java.awt.Toolkit.getDefaultToolkit().createImage(url);\n if (img != null) {\n img = img.getScaledInstance(width, height, Image.SCALE_AREA_AVERAGING);\n image = new ImageIcon(img);\n\n }\n }\n\n if (image == null)\n throw new FileNotFoundException(\"ERROR: Loading image \" + name + \" not found.\");\n\n\n return image;\n }", "public Bitmap LoadFromFile(String _fullFilename) {\n\t //if (bmp != null) { bmp.recycle(); }\n\t BitmapFactory.Options bo = new BitmapFactory.Options();\t\t\n\t\t\n\t if( bo == null ) return null;\n\t \n\t if( controls.GetDensityAssets() > 0 )\n\t bo.inDensity = controls.GetDensityAssets();\n\t \n\t return BitmapFactory.decodeFile(_fullFilename, bo);\n }", "public void load(String path) {\n try {\n texId = new TextureId(path);\n BufferedImage image = ImageIO.read(new FileInputStream(\"resources\" + texId.getPath()));\n createImage(image);\n } catch (Exception e) {\n e.printStackTrace();\n unload();\n }\n }", "public ImageComponent fetchImageComponent(String filename)\n throws IOException\n {\n ImageComponent ret_val = (ImageComponent)componentMap.get(filename);\n \n if(ret_val == null)\n {\n ret_val = load2DImage(filename);\n componentMap.put(filename, ret_val);\n }\n \n return ret_val;\n }", "public static Image getImage(String filename) {\n Image img = Toolkit.getDefaultToolkit().getImage(filename);\n MediaTracker mediaTracker = new MediaTracker(new Container());\n mediaTracker.addImage(img, 0);\n try {\n mediaTracker.waitForID(0);\n } catch (InterruptedException e) {\n return null;\n }\n return img;\n }", "private BufferedImage getImage(String f) {\n BufferedImage image = null;\n File file = new File(f);\n\n try {\n image = ImageIO.read(file);\n }\n catch (Exception ex) {\n JOptionPane.showMessageDialog(\n null,\n \"Image could not be read!\",\n \"Error\",\n JOptionPane.ERROR_MESSAGE);\n }\n return image;\n }", "@Override\n\tpublic void load(String fileName) throws IOException\n\t{\n\t\tBufferedImage i;\n\t\t\n\t\tFile f = new File(fileName);\n\t\ti = ImageIO.read(f);\n\t\t\n\t\ttry {\n\t\t\tmethodRGBA(f,fileName);\n//\t\t\tmethodRGB(f,fileName);\n\t\t} catch (Exception e) {}\n\t\t\n\t\tgl.glPixelStorei(GL.GL_UNPACK_ALIGNMENT, 1);\n\t\tgl.glGenTextures(1, id);\n\t\tgl.glBindTexture(GL.GL_TEXTURE_2D, id.get(0));\n\n\t\tw = i.getWidth();\n\t\th = i.getHeight();\n\t\tIntBuffer buf = getData(i);\n\t\tgl.glTexImage2D(GL.GL_TEXTURE_2D, 0, GL.GL_RGBA, w, h, 0, GL.GL_RGBA, GL.GL_UNSIGNED_BYTE, buf);\t\t\t\n\t}", "private static BufferedImage loadImage(File parFile) throws IOException\n\t{\n\t\treturn ImageIO.read(parFile);\n\t}", "private BufferedImage readImageDataFromClasspath(String fileName)\n\t\t\tthrows IOException {\n\t\tInputStream in = this.getClass().getClassLoader().getResourceAsStream(\n\t\t\t\tfileName);\n\n\t\treturn ImageIO.read(in);\n\t}", "public void changeImage(String fileName) {\n\n\t\timageList.add(image);\n\n\t\ttry {\n\t\t\timage = new Image(new FileInputStream(fileName), 0, 50, true, false);\n\t\t\tscreen.updateBox();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tnew ErrorBox(\"Invalid Image\", \"Please Choose a Valid Image\");\n\t\t}\n\n\t}", "public static BufferedImage loadImage(String path) {\r\n try {\r\n return ImageIO.read(ImageLoader.class.getResource(path));\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n System.exit(1);\r\n }\r\n return null;\r\n }", "public Icon loadIcon(String fileName){\n\t\tURL imageURL = getClass().getResource(fileName);\n\t\tIcon icon = null;\n\t\t\n\t\tif (imageURL != null) { \n\t icon = new ImageIcon(imageURL);\n\t } else { \n\t System.err.println(\"Resource not found: \" + fileName);\n\t }\n\n\t\treturn icon;\n\t}", "public static Image loadImage(String imagePath)\n {\n File imFile = new File(imagePath);\n Image image = null;\n\n //load the image. Hopefully doesn't actually throw exceptions\n try\n {\n //load up the image if it exists - this hopefully prevents exceptions\n if (imFile != null && imFile.exists())\n image = ImageIO.read(imFile);\n else System.out.println(\"Image not loaded! \" + imagePath + \" does not exist\");\n }\n catch (IOException e)\n {\n System.out.println(\"Exception: String Image not loaded! \" + imagePath + \"\\n\" + e);\n }\n\n return image;\n }", "protected static ImageIcon readImageIcon(String filename) {\r\n URL url = Main.class.getResource(\"resources/images/\" + filename);\r\n return new ImageIcon(url);\r\n }", "public void loadImage() {\r\n // creates a new image icon with the characters array and the count as a file path\r\n ImageIcon ii = new ImageIcon(game.characters[count]);\r\n // load the image\r\n image = ii.getImage(); \r\n \r\n // sets width\r\n w = image.getWidth(null);\r\n // sets height\r\n h = image.getHeight(null);\r\n }", "public void openFile()\n { \n JFileChooser chooser = new JFileChooser();\n chooser.setCurrentDirectory(new File(\".\"));\n \n chooser.setFileFilter(new\n javax.swing.filechooser.FileFilter()\n { \n public boolean accept(File f)\n { \n String name = f.getName().toLowerCase();\n return name.endsWith(\".gif\") || name.endsWith(\".jpg\") || name.endsWith(\".jpeg\")\n || f.isDirectory();\n }\n public String getDescription() { return \"Image files\"; }\n });\n\n int r = chooser.showOpenDialog(this);\n if(r != JFileChooser.APPROVE_OPTION) return;\n\n try\n {\n image = ImageIO.read(chooser.getSelectedFile());\n }\n catch (IOException e)\n {\n JOptionPane.showMessageDialog(this, e);\n }\n repaint();\n }", "public static BufferedImage readImage(String imageName) {\n\t\tBufferedImage image = null;\n\t\ttry {\n\t\t\tURL url = Main.class.getResource(\"/\"+imageName);\n\t\t\tString file = (url.getPath());\n\t\t\tSystem.out.println(url);\n\t\t\timage = ImageIO.read(new File(file));\n\t\t} catch (IOException e) {\n\t\t\tSystem.out.println(\"[Error in DisplayObject.java:readImage] Could not read image \" + imageName);\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn image;\n\t}", "public static Game loadGame(String fileName){\n Game game = null;\n try {\n File file1 = new File(fileName);\n FileInputStream fileInputStream = new FileInputStream(file1);\n ObjectInputStream objectInputStream = new ObjectInputStream(fileInputStream);\n game = (Game) objectInputStream.readObject();\n game.makeGUIVisible();\n }catch (Exception e){\n System.err.println(\"Error when loading file\");\n }\n return game;\n }", "public Bitmap loadImageFromStorage(String name) {\n\n try {\n ContextWrapper cw = new ContextWrapper(getApplicationContext());\n File directory = cw.getDir(\"imageProfile\", Context.MODE_PRIVATE);\n\n File f=new File(directory.getAbsolutePath(), name);\n Bitmap b = BitmapFactory.decodeStream(new FileInputStream(f));\n return b;\n }\n catch (FileNotFoundException e) {\n e.printStackTrace();\n return null;\n }\n }", "public void loadImage() {\n\t\ttry {\n\t\t\tcurrImage = ImageIO.read(new File(INPUT_DIR,fileNames.get(fileCounter)));\n\t\t\tcurrImageOrigDim = new Dimension(currImage.getWidth(), currImage.getHeight());\n\t\t\tlabel4.setText(\"Processing: \" + fileNames.get(fileCounter));\n\t\t}\n\t\tcatch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// Resize to Frame\n\t\tdouble imgHt = currImage.getHeight();\n\t\tdouble imgWt = currImage.getWidth();\n\t\tdouble wRatio = FRAME_SIZE/imgWt;\n\t\tdouble hRatio = FRAME_SIZE/imgHt;\n\t\taspectR = Math.min(wRatio,hRatio);\n\t\tcurrImage = getScaledInstance(currImage, (int)(aspectR*imgWt), (int)(aspectR*imgHt));\n\t\tcurrImageBounds = new Rectangle(0, 0, currImage.getWidth(), currImage.getHeight());\n\t\trepaint();\n\t}", "public static com.jme.image.Image loadImage(InputStream fis) throws\n IOException {\n return loadImage(fis,false);\n }", "public void load (File file) throws Exception;", "public void setImage(String file){ \n try {\n image = ImageIO.read(new File(file));\n } catch (IOException ex) {\n Logger.getLogger(GridSquarePanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "Bitmap load(String id);", "private void loadGame(String fileName){\n\n }", "private void loadFromFile(String fileName) {\n try {\n InputStream inputStream = this.openFileInput(fileName);\n if (inputStream != null) {\n ObjectInputStream input = new ObjectInputStream(inputStream);\n boardManager = (BoardManager) input.readObject();\n inputStream.close();\n }\n } catch (FileNotFoundException e) {\n Log.e(\"login activity\", \"File not found: \" + e.toString());\n } catch (IOException e) {\n Log.e(\"login activity\", \"Can not read file: \" + e.toString());\n } catch (ClassNotFoundException e) {\n Log.e(\"login activity\", \"File contained unexpected data type: \" + e.toString());\n }\n }", "private Image getImage(String name) {\n InputStream in =\n getClass().getResourceAsStream(\"/canfield/resources/\" + name);\n try {\n return ImageIO.read(in);\n } catch (IOException excp) {\n return null;\n }\n }", "public static Mat imread(String filename)\n {\n\n Mat retVal = new Mat(imread_1(filename));\n\n return retVal;\n }", "public static ImageIcon getIconImage(String filename){\t\r\n\t\tImageIcon image = new ImageIcon(ServerMain.RUTA+\"img/\"+filename);\r\n\t\tif(image.getImageLoadStatus()==4) return null;\r\n\t\treturn image;\r\n\t}", "public static Image loadActor(String name) {\n\t\treturn loadBitmap(ACTORS_DIR + name);\n\t}", "public Texture fetchTexture(String filename)\n throws IOException\n {\n Texture texture = (Texture)textureMap.get(filename);\n \n if(texture == null)\n {\n ImageComponent img = (ImageComponent)componentMap.get(filename);\n \n if(img == null)\n {\n img = load2DImage(filename);\n componentMap.put(filename, img);\n }\n \n int format = getTextureFormat(img);\n \n if(img instanceof ImageComponent2D)\n {\n texture = new Texture2D(Texture.BASE_LEVEL,\n format,\n img.getWidth(),\n img.getHeight());\n }\n else\n {\n texture = new Texture3D(Texture.BASE_LEVEL,\n format,\n img.getWidth(),\n img.getHeight(),\n ((ImageComponent3D)img).getDepth());\n }\n \n texture.setImage(0, img);\n \n textureMap.put(filename, texture);\n }\n \n return texture;\n }", "public void fileLoaderMethod(String filename) {\n\t\t\n\t\tString fileloc = \"\";\n\t\tif(!prf.foldername.getText().equals(\"\"))\n\t\t\tfileloc += prf.foldername.getText()+\"/\";\n\t\t\n\t\tfileloc += filename;\n\t\tFile fl = new File(fileloc);\n\t\t\n\t\tString code = \"\";\n\t\t\n\t\tif(!fl.exists()) {\n\t\t\tJOptionPane.showMessageDialog(null, \"The specified file doesnt exist at the given location.\");\n\t\t} else {\t\n\t\t\ttry {\n\t\t\t\tFileReader flrd = new FileReader(fileloc);\n\t\t\t\tBufferedReader bufread = new BufferedReader(flrd);\t\t\n\t\t\t\tString str;\n\t\t\t\twhile((str = bufread.readLine()) != null) {\n\t\t\t\t\tcode += str + \"\\n\";\n\t\t\t\t}\t\t\n\t\t\t\tbufread.close();\n\t\t\t\tflrd.close();\t\t\t\n\t\t\t} catch (IOException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\t\n\t\tinterpretorMainMethod(code, 0);\n\t}", "private static Image fileToImage(File file) throws MalformedURLException {\r\n\r\n String localUrl = file.toURI().toURL().toString(); // Get URL of file\r\n Image image = new Image(localUrl); // Create new image\r\n return image;\r\n }", "void load(File file);", "public static void loadFileIntoImageView(ImageView pictureImageView, String path){\n int targetW = pictureImageView.getWidth();\n int targetH = pictureImageView.getHeight();\n\n // Get the dimensions of the bitmap\n BitmapFactory.Options bmOptions = new BitmapFactory.Options();\n bmOptions.inJustDecodeBounds = true;\n BitmapFactory.decodeFile(path, bmOptions);\n int photoW = bmOptions.outWidth;\n int photoH = bmOptions.outHeight;\n\n // Determine how much to scale down the image\n int scaleFactor = Math.min(photoW/targetW, photoH/targetH);\n\n // Decode the image file into a Bitmap sized to fill the View\n bmOptions.inJustDecodeBounds = false;\n bmOptions.inSampleSize = scaleFactor;\n\n Bitmap bitmap = BitmapFactory.decodeFile(path, bmOptions);\n pictureImageView.setImageBitmap(bitmap);\n }", "public static BufferedImage loadSpriteSheet(String name) {\n\n\t\tBufferedImage sprite = null;\n\n\t\ttry {\n\n\t\t\tsprite = ImageIO\n\t\t\t\t\t.read(new File(System.getProperty(\"user.dir\").replace(\"\\\\\", \"//\") + \"//Assets//\" + name + \".png\"));\n\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\treturn sprite;\n\t}", "public void addImage(String fileName) {\n\t\taddImage(BitmapFactory.decodeFile(fileName), fileName);\n\t}", "public void openimagefile(String fn,int sno)\n {\n\t try\n\t {\n\t i=0;\n\t FileInputStream fis = new FileInputStream(fn);\n\t DataInputStream dis=new DataInputStream(fis);\n\t while((ch=dis.readUnsignedByte())!=-1)\n\t {\n\t\tp[i]=ch;\n p1[i]=ch;\n\t\ti++;\n\t }\n fis.close();\n dis.close();\n }\n catch(Exception e)\n\t{\n maxp=i;\n switch(p[28])\n\t {\n \t case 24:\n \t\t{\n init24();\n\t \tbreak;\n } //case 24 ends\n\t } // switchp[28] ends\n\t} //catch() ends\n img=createImage(new MemoryImageSource(width,height,pixels,0,width));\n img1=createImage(new MemoryImageSource(width,height,pixels1,0,width));\n }", "public Bitmap getLocalImage(String fileName){\n\t\t\tBitmap img = null;\n\t\t\ttry{\n\t\t\t\tFileInputStream fin = openFileInput(fileName);\n\t\t\t\tif(fin != null){\n\t\t\t\t\timg = BitmapFactory.decodeStream(fin);\n\t\t\t\t\tfin.close();\n\t\t\t\t}\n\t\t\t}catch (Exception je){\n\t\t\t\timg = null;\n\t\t\t\tLog.i(\"ZZ\", \"AppDelegate:getLocalImage: ERROR: \" + je.getMessage()); \n\t\t\t}\n \t\t//Log.i(\"ZZ\", \"AppDelegate:getLocalImage: \" + fileName); \n\t\t\treturn img;\n\t\t}", "public void loadimage(File file) {\n\t\tthis.transformedImageIcon = new ImageIcon(file.getAbsolutePath()); //Here we are fetching the Image from the File into an ImageIcon \n\t\tImage image = transformedImageIcon.getImage(); //Here we are getting the Actual Concrete Image from the ImageIcon which fetched the Image from the File \n\t\tupdateImage(image); //Here it will Set the Image to the JLabel after calling the Scaling Method \n\t}", "public void loadImage(String str) {\r\n\t\t// sets file into BufferedImage\r\n\t\ttry {\r\n\r\n\t\t\t// if type == 1: draw the first type of tree\r\n\t\t\tif (type == 1) {\r\n\t\t\t\tBufferedImage imgOne = ImageIO.read(Vegetation.class.getResource(str));\r\n\t\t\t\t// calls resize method to resize image\r\n\t\t\t\timg1 = imageResize(imgOne, 130, 170);\r\n\r\n\t\t\t}\r\n\t\t\t// if type == 2: draw the second type of tree\r\n\t\t\tif (type == 2) {\r\n\t\t\t\tBufferedImage imgTwo = ImageIO.read(Vegetation.class.getResource(str));\r\n\t\t\t\t// calls resize method to resize image\r\n\t\t\t\timg2 = imageResize(imgTwo, 130, 170);\r\n\t\t\t}\r\n\t\t\t// if type == 3: draw bush\r\n\t\t\tif (type == 3) {\r\n\t\t\t\tBufferedImage imgThree = ImageIO.read(Vegetation.class.getResource(str));\r\n\t\t\t\t// calls resize method to resize image\r\n\t\t\t\timg3 = imageResize(imgThree, 100, 140);\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}", "public static InputStream getImageWithName(String name) {\n\t\tResourceHandler resourceHandler = getResourceHandler(IMAGES_DIR);\n\t\treturn resourceHandler.getResource(resourceHandler.resourceLookup(name));\n\t\t\n\t}", "public static void openPictureJFrame(String fileName) {\n\t SwingUtilities.invokeLater(new Runnable() {\n\t\t \n\t\t @Override\n\t\t public void run() {\n\t\t\t JFrame frame = new JFrame(fileName); \n\t\t\t frame.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\t\t BufferedImage img = null;\n\t\t\t //attempt to open file\n\t\t\t try {\n\t\t\t\t img = ImageIO.read(new File(fileName));\n\t\t\t }catch(Exception e ) { e.printStackTrace(); }\n\t\t\t \n\t\t\t //add image to img icon and jlabel\n\t\t\t JLabel lbl = new JLabel();\n\t\t\t lbl.setIcon(new ImageIcon(img));\n\t\t\t frame.getContentPane().add(lbl, BorderLayout.CENTER);\n\t\t\t //set size if you want\n\t\t\t frame.setSize(1920, 1080);\n\t\t\t frame.pack();\n\t\t\t frame.setLocationRelativeTo(null);\n\t\t\t frame.setVisible(true);\n\t\t }\n\t });\n }", "public ImageFile(BufferedImage img) throws ImageException{\r\n\tloadImage(img);\r\n}", "private BufferedImage loadImage(File dat) {\n\t\tBufferedImage img = null;\n\n\t\tint orientation = -1;\n\t\ttry {\n\t\t\torientation = readExifData(dat);\n\t\t} catch (ImageReadException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IOException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\n\t\ttry {\n\t\t\timg = ImageIO.read(dat); // Loads image to memory\n\t\t} catch (IOException e) {\n\t\t\t// error code\n\t\t\tSystem.out.println(\"Problem reading an image!\");\n\t\t\tSystem.out.println(e.getMessage());\n\t\t}\n\n\t\tBufferedImage newImage = null;\n\n\t\tif (orientation != -1) {\n\t\t\t// rotate image\n\n\t\t\tswitch (orientation) {\n\t\t\tcase 6:\n\t\t\t\t// rotate right for 90 degress\n\t\t\t\tnewImage = rotateRightFor90(img);\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\t// rotate left for 90 degress\n\t\t\t\tnewImage = rotateLeftFor90(img);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tnewImage = img;\n\t\t\t}\n\n\t\t} else {\n\t\t\treturn img;\n\t\t}\n\n\t\treturn newImage;\n\t}", "public static Image loadImage(URL imagePath)\n {\n Image image = new ImageIcon(imagePath).getImage();\n\n if (image == null)\n System.out.println(\"URL Image not loaded! \" + imagePath);\n\n return image;\n }", "public static BufferedImage readImageFromFile() {\r\n BufferedImage img = null;\r\n final JFileChooser fileChooser = new JFileChooser();\r\n File selectedFile = null;\r\n fileChooser.setCurrentDirectory(new File(System.getProperty(\"user.home\")));\r\n\r\n int result = fileChooser.showOpenDialog(null);\r\n if (result == JFileChooser.APPROVE_OPTION) {\r\n selectedFile = fileChooser.getSelectedFile();\r\n System.out.println(\"Selected file: \" + selectedFile.getAbsolutePath());\r\n }\r\n try {\r\n img = ImageIO.read(selectedFile);\r\n } catch (IOException e) {\r\n }\r\n return img;\r\n }", "public static ImageIcon create(String filename) {\r\n ImageIcon icon = null;\r\n URL imageURL = MoGridImage.class.getResource(MOGRID_IMAGE + filename);\r\n if (imageURL != null) {\r\n icon = new ImageIcon(imageURL);\r\n } \r\n return icon;\r\n }", "public void setImage2(String file){ \n try {\n player = ImageIO.read(new File(file));\n } catch (IOException ex) {\n Logger.getLogger(GridSquarePanel.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public static BufferedImage getBufferedImage(String name) {\n try {\n URL url = getURL(name);\n marg.util.Log.GlobalLogger.info(\"Loaded image from \"+ url);\n return ImageIO.read(url);\n } catch (Exception e) {\n e.printStackTrace();\n return new BufferedImage(20, 20, BufferedImage.TYPE_INT_RGB);\n }\n }", "public void readImage(File f) {\r\n try {\r\n //JFrame f2 = new JFrame();\r\n images.add(ImageIO.read(f));\r\n //JLabel lb = new JLabel(new ImageIcon(images.get(0)));\r\n //f2.add(lb);\r\n //f2.setVisible(true);\r\n } catch(Exception e) {\r\n JOptionPane.showMessageDialog(null, \"read image failed.\", \"System Message\", JOptionPane.ERROR_MESSAGE);\r\n e.printStackTrace();\r\n }\r\n }", "public void load(String filename) {\n\t\tsetup();\n\t\tparseOBJ(getBufferedReader(filename));\n\t}", "public void loadFile(String fname) \n\t{\n\t\t// use Scanner used to read the file\n\t\ttry{\n\t\t\tScanner scan = new Scanner(new FileReader(fname));\n\t\t\t//read in number of row and column in the first line\n\t\t\treadRC(scan);\n\t\t\treadMaze(scan);\n\t\t\t//close the scanner\n\t\t\tscan.close();\t\t\t\t\t\t\t\t\n\t\t}catch(FileNotFoundException e){\n\t\t\tSystem.out.println(\"FileNotFound\"+e.getMessage());\n\t\t}\n\t}", "public void load(File source);" ]
[ "0.7892826", "0.75313574", "0.73135453", "0.7279423", "0.7105059", "0.6937301", "0.6925455", "0.68509525", "0.6760889", "0.67149913", "0.6683019", "0.667393", "0.66725117", "0.66272116", "0.6599248", "0.6565827", "0.6553152", "0.65520996", "0.65399307", "0.65392137", "0.64114404", "0.6404768", "0.63980395", "0.6370127", "0.63698214", "0.63591397", "0.6346149", "0.63268083", "0.6318464", "0.63102317", "0.6308026", "0.63069135", "0.628758", "0.62784785", "0.6233647", "0.62113214", "0.61821884", "0.61645067", "0.6158474", "0.6145912", "0.61306274", "0.6113875", "0.6106439", "0.61001927", "0.61000484", "0.6088043", "0.6077305", "0.6072173", "0.603323", "0.6033227", "0.6026179", "0.60079587", "0.6005025", "0.6001078", "0.59971637", "0.5988452", "0.5976576", "0.59589565", "0.59267145", "0.5918529", "0.5874319", "0.5872553", "0.5869608", "0.58520865", "0.58436936", "0.5837397", "0.5837283", "0.58213305", "0.5811939", "0.5773113", "0.5769839", "0.57666", "0.5766303", "0.5761274", "0.5728879", "0.57262754", "0.57181954", "0.5708841", "0.56995517", "0.56978", "0.5694601", "0.5694385", "0.5693668", "0.5689039", "0.56852347", "0.5684802", "0.5682061", "0.56571597", "0.56452405", "0.5638832", "0.5616653", "0.5613251", "0.5611162", "0.55960596", "0.55860776", "0.55840206", "0.5582515", "0.55793893", "0.55656576", "0.55648774" ]
0.75884825
1
accept property value visitor
@Override public void accept(IPropertyValueVisitor visitor) { // relations _acceptList(cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.services.javamodel.IPortService.class, cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.access.AccessPackage.AccessCommunicationType_servicesForAccess, visitor); _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Object visitValue(ValueNode node, Object state);", "public interface IValueVisitor\n{\n\n\t/**\n\t * a text value\n\t * @param value the value\n\t */\n\tvoid text(String value);\n\n\t/**\n\t * a null value\n\t */\n\tvoid nullValue();\n\n\t/**\n\t * an long value\n\t * @param value the value\n\t */\n\tvoid longValue(long value);\n\t\n\t/**\n\t * an integer value\n\t * @param value the value\n\t */\n\tvoid integer(int value);\n}", "@Override\n public void accept(IPropertyValueVisitor visitor) {\n // attributes\n _acceptSingleAttribute(java.lang.String.class, ch.actifsource.core.CorePackage.NamedResource_name, visitor);\n // relations\n _acceptList(com.actifsource.simpleservice.generic.javamodel.IMyParameter.class, com.actifsource.simpleservice.generic.GenericPackage.myCall_parameter, visitor);\n _acceptSingle(com.actifsource.simpleservice.generic.javamodel.IMyType.class, com.actifsource.simpleservice.generic.GenericPackage.myCall_returnType, visitor);\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\n }", "public interface IValueVisitor {\n\n /**\n * This method is used for visiting ConstraintValue.<br/>\n * \n * @param value One ConstraintValue which should be visited.\n */\n void visitConstraintValue(ConstraintValue value);\n \n /**\n * This method is used for visiting EnumValue.<br/>\n * \n * @param value One EnumValue which should be visited.\n */\n void visitEnumValue(EnumValue value);\n \n /**\n * This method is used for visiting StringValue.<br/>\n * \n * @param value One StringValue which should be visited.\n */\n void visitStringValue(StringValue value);\n \n /**\n * This method is used for visiting CompoundValue.<br/>\n * \n * @param value One CompoundValue which should be visited.\n */\n void visitCompoundValue(CompoundValue value);\n\n /**\n * This method is used for visiting ContainerValue.<br/>\n * \n * @param value One CompoundValue which should be visited.\n */\n void visitContainerValue(ContainerValue value);\n \n /**\n * This method is used for visiting IntValue.<br/>\n * \n * @param value One IntValue which should be visited.\n */\n void visitIntValue(IntValue value);\n \n /**\n * This method is used for visiting RealValue.<br/>\n * \n * @param value One RealValue which should be visited.\n */\n void visitRealValue(RealValue value);\n \n /**\n * This method is used for visiting BooleanValue.<br/>\n * \n * @param value One BooleanValue which should be visited.\n */\n void visitBooleanValue(BooleanValue value);\n\n /**\n * This method is used for visiting referenceValue.<br/>\n * \n * @param referenceValue One referenceValue which should be visited.\n */\n void visitReferenceValue(ReferenceValue referenceValue);\n\n /**\n * This method is used for visiting meta type value.<br/>\n * \n * @param value a value which should be visited.\n */\n void visitMetaTypeValue(MetaTypeValue value);\n\n /**\n * This method is used for visiting a null value.<br/>\n * \n * @param value a value which should be visited (actually {@link NullValue#INSTANCE}).\n */\n void visitNullValue(NullValue value);\n\n /**\n * This method is used for visiting a version value.<br/>\n * \n * @param value a value which should be visited.\n */\n void visitVersionValue(VersionValue value);\n\n}", "public abstract Object getValue(Context context) throws PropertyException;", "public abstract void setValue(Context c, Object v) throws PropertyException;", "public void setValueEvaluator(PropertyValueEvaluator ve) {\n List<NamedThing> properties = getProperties();\n for (NamedThing prop : properties) {\n if (prop instanceof Property) {\n ((Property) prop).setValueEvaluator(ve);\n } else if (prop instanceof Properties) {\n ((Properties) prop).setValueEvaluator(ve);\n }\n }\n }", "<R> R accept(ValueVisitor<R> visitor);", "Property addValue(PropertyValue<?, ?> value);", "boolean visit(IPropertyDescriptor pd, Object value);", "public ParseTreeNode visit(PropertyValueNode propertyValueNode) {\n return null;\n }", "public PropertyVisitor visitProperty(BeanProperty p) {\n\t\treturn null;\r\n\t}", "public interface PropertyHandler<T, V> {\n\n void set(T instance, V value);\n\n V get(T instance);\n\n String property();\n\n Class<V> type();\n}", "@Override\n\t\t\tpublic void setPropertyValue(Object value) {\n\t\t\t\t\n\t\t\t}", "@Override\r\n public void accept(IPropertyValueVisitor visitor) {\r\n // attributes\r\n _acceptSingleAttribute(java.lang.String.class, cleon.projectmethods.hermes.metamodel.spec.modules.projectmanagement.planning.scope.workpackage.backlog.BacklogPackage.Text_date, visitor);\r\n _acceptSingleAttribute(java.lang.String.class, cleon.projectmethods.hermes.metamodel.spec.modules.projectmanagement.planning.scope.workpackage.backlog.BacklogPackage.Text_text, visitor);\r\n // relations\r\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\r\n _acceptSingle(cleon.projectmethods.hermes.metamodel.spec.modules.projectmanagement.resource.persons.javamodel.IPerson.class, cleon.projectmethods.hermes.metamodel.spec.modules.projectmanagement.planning.scope.workpackage.backlog.BacklogPackage.Text_writer, visitor);\r\n }", "@Override\r\n public void accept(IPropertyValueVisitor visitor) {\r\n // attributes\r\n _acceptSingleAttribute(java.lang.String.class, ch.actifsource.core.CorePackage.NamedResource_name, visitor);\r\n // relations\r\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\r\n }", "@Override\r\n public void accept(IPropertyValueVisitor visitor) {\r\n // attributes\r\n _acceptListAttribute(java.lang.String.class, cleon.common.resources.metamodel.spec.descriptions.DescriptionsPackage.SimpleDescription_descriptions, visitor);\r\n _acceptSingleAttribute(java.lang.Boolean.class, cleon.common.resources.metamodel.spec.active.ActivePackage.EnabledWithDefaultTrueAware_isEnabled, visitor);\r\n // relations\r\n _acceptList(cleon.common.doc.metamodel.spec.paragraph.javamodel.IParagraph.class, cleon.common.doc.metamodel.spec.chapter.ChapterPackage.ParagraphAware_paragraphs, visitor);\r\n _acceptMap(cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.security.identity.authz.deployment.role.javamodel.IRoleSiteGroup.class, cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.security.identity.authz.deployment.role.RolePackage.RoleRootGroups_roleForSite, visitor);\r\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\r\n }", "@Override\n public void accept(IPropertyValueVisitor visitor) {\n // attributes\n _acceptSingleAttribute(java.lang.String.class, ch.actifsource.core.CorePackage.Commentable_comment, visitor);\n _acceptListAttribute(java.lang.String.class, cleon.doc.spec.SpecPackage.SimpleDescription_descriptions, visitor);\n _acceptSingleAttribute(java.lang.String.class, ch.actifsource.core.CorePackage.NamedResource_name, visitor);\n // relations\n _acceptList(cleon.doc.spec.chapter.javamodel.IChapterOwnDocumentElementComposite.class, cleon.doc.spec.chapter.ChapterPackage.ChapterOwnDocumentElementComposite_chapters, visitor);\n _acceptList(cleon.doc.spec.javamodel.IDocumentElement.class, cleon.doc.spec.SpecPackage.OwnDocumentElementComposite_ownDocumentElements, visitor);\n _acceptList(cleon.doc.spec.paragraph.javamodel.IParagraph.class, cleon.doc.spec.paragraph.ParagraphPackage.ParagraphOwnDocumentElementComposite_paragraphes, visitor);\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\n }", "DefinedProperty graphChangeProperty( int propertyKey, Object value );", "@Override\n public boolean visit(JsPropertyInitializer x,\n JsContext<JsPropertyInitializer> ctx) {\n x.setValueExpr(accept(x.getValueExpr()));\n return false;\n }", "public abstract Object getValue(ELContext context,\n Object base,\n Object property);", "public interface Property<T> {\n T value();\n}", "public interface ValueProcessor {\n public void process(Object original, String type, String value);\n }", "<T> T getValue(Property<T> property);", "@Override\r\n public void accept(IPropertyValueVisitor visitor) {\r\n // attributes\r\n _acceptListAttribute(java.lang.String.class, cleon.common.resources.metamodel.spec.descriptions.DescriptionsPackage.SimpleDescription_descriptions, visitor);\r\n _acceptSingleAttribute(java.lang.String.class, ch.actifsource.core.CorePackage.NamedResource_name, visitor);\r\n // relations\r\n _acceptList(cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.services.javamodel.IFWStandardService.class, cleon.architecturemethods.systemarc42.metamodel.spec._08_concepts.services.ServicesPackage.FWStandardServiceGroup_fwservices, visitor);\r\n _acceptSingle(ch.actifsource.core.javamodel.IClass.class, ch.actifsource.core.CorePackage.Resource_typeOf, visitor);\r\n }", "public static Object visit(IPropertySource propertySource, Visitor visitor) {\r\n\t\tObject result = null;\r\n\t\tIPropertyDescriptor[] pds = propertySource.getPropertyDescriptors();\r\n\t\tfor (IPropertyDescriptor pd : pds) {\r\n\t\t\tObject pv = propertySource.getPropertyValue(pd.getId());\r\n\t\t\tboolean recurse = visitor.visit(pd, pv);\r\n\t\t\tresult = visitor.getCompletionResult();\r\n\t\t\tif (result != null) {\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tif (recurse) {\r\n\t\t\t\tif (pv instanceof IPropertySource) {\r\n\t\t\t\t\tresult = visit((IPropertySource)pv, visitor);\r\n\t\t\t\t\tif (result != null) {\r\n\t\t\t\t\t\tbreak;\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn result;\r\n\t}", "@Override\n\tpublic void visit(NextValExpression arg0) {\n\t\t\n\t}", "protected void sequence_PropertyValue(ISerializationContext context, PropertyValue semanticObject) {\n\t\tif (errorAcceptor != null) {\n\t\t\tif (transientValues.isValueTransient(semanticObject, SiddhiPackage.eINSTANCE.getPropertyValue_Sv()) == ValueTransient.YES)\n\t\t\t\terrorAcceptor.accept(diagnosticProvider.createFeatureValueMissing(semanticObject, SiddhiPackage.eINSTANCE.getPropertyValue_Sv()));\n\t\t}\n\t\tSequenceFeeder feeder = createSequencerFeeder(context, semanticObject);\n\t\tfeeder.accept(grammarAccess.getPropertyValueAccess().getSvStringValueParserRuleCall_0(), semanticObject.getSv());\n\t\tfeeder.finish();\n\t}", "boolean hasValue(PropertyValue<?, ?> value);", "public interface ElPropertyValue extends ElPropertyDeploy {\r\n\r\n /**\r\n * Return the Id values for the given bean value.\r\n */\r\n public Object[] getAssocOneIdValues(Object bean);\r\n\r\n /**\r\n * Return the Id expression string.\r\n * <p>\r\n * Typically used to produce id = ? expression strings.\r\n * </p>\r\n */\r\n public String getAssocOneIdExpr(String prefix, String operator);\r\n\r\n /**\r\n * Return the logical id value expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInValueExpr(int size);\r\n \r\n /**\r\n * Return the logical id in expression taking into account embedded id's.\r\n */\r\n public String getAssocIdInExpr(String prefix);\r\n \r\n /**\r\n * Return true if this is an ManyToOne or OneToOne associated bean property.\r\n */\r\n public boolean isAssocId();\r\n\r\n /**\r\n * Return true if any path of this path contains a Associated One or Many.\r\n */\r\n public boolean isAssocProperty();\r\n\r\n /**\r\n * Return true if the property is encrypted via Java.\r\n */\r\n public boolean isLocalEncrypted();\r\n \r\n /**\r\n * Return true if the property is encrypted in the DB.\r\n */\r\n public boolean isDbEncrypted();\r\n\r\n /**\r\n * Return the deploy order for the property.\r\n */\r\n public int getDeployOrder();\r\n \r\n /**\r\n * Return the default StringParser for the scalar property.\r\n */\r\n public StringParser getStringParser();\r\n\r\n /**\r\n * Return the default StringFormatter for the scalar property.\r\n */\r\n public StringFormatter getStringFormatter();\r\n\r\n /**\r\n * Return true if the last type is \"DateTime capable\" - can support\r\n * {@link #parseDateTime(long)}.\r\n */\r\n public boolean isDateTimeCapable();\r\n\r\n /**\r\n * Return the underlying JDBC type or 0 if this is not a scalar type.\r\n */\r\n public int getJdbcType();\r\n \r\n /**\r\n * For DateTime capable scalar types convert the long systemTimeMillis into\r\n * an appropriate java time (Date,Timestamp,Time,Calendar, JODA type etc).\r\n */\r\n public Object parseDateTime(long systemTimeMillis);\r\n\r\n /**\r\n * Return the value from a given entity bean.\r\n */\r\n public Object elGetValue(Object bean);\r\n\r\n /**\r\n * Return the value ensuring objects prior to the top scalar property are\r\n * automatically populated.\r\n */\r\n public Object elGetReference(Object bean);\r\n\r\n /**\r\n * Set a value given a root level bean.\r\n * <p>\r\n * If populate then\r\n * </p>\r\n */\r\n public void elSetValue(Object bean, Object value, boolean populate, boolean reference);\r\n\r\n /**\r\n * Make the owning bean of this property a reference (as in not new/dirty).\r\n */\r\n public void elSetReference(Object bean);\r\n\r\n /**\r\n * Convert the value to the expected type.\r\n * <p>\r\n * Typically useful for converting strings to the appropriate number type\r\n * etc.\r\n * </p>\r\n */\r\n public Object elConvertType(Object value);\r\n}", "@Override\n public void visit(final OpPropFunc opPropFunc) {\n if (LOG.isDebugEnabled()) {\n LOG.debug(\"Starting visiting OpPropFunc\");\n }\n addOp(new OpPropFunc(opPropFunc.getProperty(), opPropFunc.getSubjectArgs(), opPropFunc.getObjectArgs(),\n rewriteOp1(opPropFunc)));\n }", "public abstract void setValue(ELContext context,\n Object base,\n Object property,\n Object value);", "public abstract void visit(V v) throws VisitorException;", "private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}", "private Property(String value) {\n\t\t\tthis.value = value;\n\t\t}", "protected abstract Property createProperty(String key, Object value);", "interface PropertyInfo {}", "void handle(final MetaProperty<T> property, final T entityPropertyValue);", "PropertyCallExp createPropertyCallExp();", "public interface Property {\n\n\t/**\n\t * <p>\n\t * Retrieves the name of the property.\n\t * </p>\n\t * \n\t * @return The property's name\n\t */\n\tPropertyName getName();\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty addValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Adds the specified values to the statements of this property, after\n\t * removing all current values.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be added\n\t * @return A reference to the updated property\n\t */\n\tProperty clearAndAddValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Removes the specified value from the statements of this property.\n\t * <p>\n\t * \n\t * @param value\n\t * The value to be removed\n\t * @return A reference to the updated property\n\t */\n\tProperty removeValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Modifies a property statement changing its value.\n\t * </p>\n\t * \n\t * @param oldValue\n\t * The value that the property currently has\n\t * @param newValue\n\t * The new value that will replace the actual one\n\t * @return A reference to the updated property\n\t */\n\tProperty changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);\n\n\t/**\n\t * <p>\n\t * Lists all the values associated to this property.\n\t * </p>\n\t * \n\t * @return All values that this property has\n\t */\n\tPropertyValue<?, ?>[] values();\n\n\t/**\n\t * <p>\n\t * Check if the provided value is associated to this property.\n\t * </p>\n\t * \n\t * @param value\n\t * The value to be checked\n\t * @return True if associated, false otherwise\n\t */\n\tboolean hasValue(PropertyValue<?, ?> value);\n\n\t/**\n\t * <p>\n\t * Clones this entity.\n\t * </p>\n\t * \n\t * @return The clone entity\n\t */\n\tProperty clone();\n\n\t/**\n\t * <p>\n\t * Checks if this property extends the provided one.\n\t * </p>\n\t * \n\t * @param other\n\t * Another property to be checked against\n\t * @return True if extends, false otherwise\n\t */\n\tboolean isExtensionOf(Property other);\n\n\t/**\n\t * <p>\n\t * Pattern VISITOR.\n\t * </p>\n\t * \n\t * @param visitor\n\t * The visitor\n\t */\n\tvoid accept(LSAVisitor visitor);\n\n\t/**\n\t * <p>\n\t * Checks if the property is synthetic.\n\t * </p>\n\t * <p>\n\t * Synthetic Properties cannot be modified by a user agent.\n\t * </p>\n\t * \n\t * @return True if synthetic, false otherwise\n\t */\n\tboolean isSynthetic();\n}", "public native final Value property(final String name)/*-{\n\t\treturn {\n\t\t\tdatum : this.property(name)\n\t\t};\n\t}-*/;", "DefinedProperty graphAddProperty( int propertyKey, Object value );", "@Override\n public void accept(ExtractedParameterValueVisitor visitor) throws FHIRPersistenceException {\n// visitor.visit(this);\n }", "private void processProperty(String name, Object value)\n\t{\n\t\tif (name.equals(TiC.PROPERTY_DATA) || name.equals(TiC.PROPERTY_SECTIONS)) {\n\t\t\tsetData((Object[]) value);\n\n\t\t} else if (name.equals(TiC.PROPERTY_EDITING) || name.equals(TiC.PROPERTY_REQUIRES_EDITING_TO_MOVE)) {\n\t\t\tfinal TiViewProxy parent = getParent();\n\n\t\t\tif (parent != null) {\n\n\t\t\t\t// Due to Android limitations, selection trackers cannot be removed.\n\t\t\t\t// Re-create TableView with new selection tracker.\n\t\t\t\tparent.recreateChild(this);\n\t\t\t}\n\n\t\t} else if (name.equals(TiC.PROPERTY_MOVING)\n\t\t\t|| name.equals(TiC.PROPERTY_SHOW_SELECTION_CHECK)) {\n\n\t\t\t// Update and refresh table.\n\t\t\tupdate(true);\n\t\t}\n\t}", "protected abstract void setValue(V value);", "@Override\n public void visit(Properties properties, Properties parent) {\n }", "public void setValue (Context c, Object v) throws PropertyException\n {\n throw new PropertyException(\"Cannot set the value of a function: \" + _vname);\n }", "public void setProperty(String prop, Object value)\r\n {\r\n\tswitch(prop)\r\n\t{\r\n\t case \"name\":\r\n\t\tname = value.toString();\r\n\t\tbreak;\r\n\t case \"description\":\r\n\t\tdesc = value.toString();\r\n\t\tbreak;\r\n\t case \"type\":\r\n\t\tsetType(value.toString());\r\n\t\tbreak;\r\n\t case \"level\":\r\n\t\tlevel = (Integer) value;\r\n\t\tbreak;\r\n\t case \"rarity\":\r\n\t\trare = Rarity.valueOf(value.toString().toUpperCase());\r\n\t\tbreak;\r\n\t case \"vendor_value\":\r\n\t\tvendorValue = (Integer) value;\r\n\t\tbreak;\r\n\t case \"game_types\":\r\n\t\taddGameType(value.toString());\r\n\t\tbreak;\r\n\t case \"flags\":\r\n\t\taddFlag(value.toString());\r\n\t\tbreak;\r\n\t case \"restrictions\":\r\n\t\taddRestriction(value.toString());\r\n\t\tbreak;\r\n\t case \"id\":\r\n\t\tid = (Integer) value;\r\n\t\tbreak;\r\n\t case \"icon\":\r\n\t\ttry {\r\n\t\t icon = new URL(value.toString());\r\n\t\t}\r\n\t\tcatch(MalformedURLException e) {\r\n\t\t e.printStackTrace();\r\n\t\t}\r\n\t\tbreak;\r\n\t}\r\n }", "public abstract V getValue();", "Property getProperty();", "Property getProperty();", "Property changeValue(PropertyValue<?, ?> oldValue,\n\t\t\tPropertyValue<?, ?> newValue);", "boolean visit(T value);", "DefinedProperty nodeChangeProperty( long nodeId, int propertyKey, Object value );", "void setValue(V value);", "@Override\n\tpublic void setProperty(String propertyName, Object value) {\n\t\t\n\t}", "PropertyValue<?, ?>[] values();", "public V setValue(V value);", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "Object getValue();", "public interface PropertyProcessor extends Processor {\n\n /**\n * Reads primitive or complex property from entity.\n * If the property is single-valued and has the null value, the service responds with 204 No Content.\n * If the property is not available, for example due to permissions, the service responds with 404 Not Found\n *\n * @param request - OData request object containing raw HTTP information\n * @param response - OData response object for collecting response data\n * @param uriInfo - information of a parsed OData URI\n * @param format - requested content type after content negotiation\n * @throws ODataApplicationException if service implementation encounters a failure\n * @throws SerializerException if serialization failed\n */\n void readProperty(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format)\n throws ODataApplicationException, SerializerException;\n\n /**\n * Reads value for primitive property from entity.\n * If the property is single-valued and has the null value, the service responds with 204 No Content.\n * If the property is not available, for example due to permissions, the service responds with 404 Not Found\n *\n * @param request - OData request object containing raw HTTP information\n * @param response - OData response object for collecting response data\n * @param uriInfo - information of a parsed OData URI\n * @param format - requested content type after content negotiation\n * @throws ODataApplicationException if service implementation encounters a failure\n * @throws SerializerException if serialization failed\n */\n void readPropertyValue(ODataRequest request, ODataResponse response, UriInfo uriInfo, ContentType format)\n throws ODataApplicationException, SerializerException;\n}", "@Override\n\t\tpublic void setProperty(String key, Object value) {\n\n\t\t}", "void visitContainerValue(ContainerValue value);", "void visit(ArithmeticValue value);", "public void processWith(IVariableVisitor iVariableVisitor);", "public interface Property extends Assignable\n{\n\t/**\n\t * Property name\n\t */\n\tString getName();\n\n\t/**\n\t * Type.\n\t * \n\t * If this is a getter, the returned value is the getter's return type.\n\t * If this is a setter, the returned value is the type of the input argument of the setter.\n\t */\n\tType getType();\n\n /**\n * [InstanceType]\n *\n * @return null if the instance type metadata is not available or if the\n * instance type is not specified.\n */\n Type getInstanceType();\n\n\t/**\n\t * Is this read only?\n\t */\n\tboolean readOnly();\n\n /**\n\t *\n\t */\n\tboolean hasPublic();\n\n // metadata\n\n\t/**\n\t * [Inspectable]\n\t */\n\tInspectable getInspectable();\n\n\t/**\n\t * [CollapseWhiteSpace]\n\t */\n\tboolean collapseWhiteSpace();\n\n /**\n * [RichTextContent]\n */\n boolean richTextContent();\n\n\t/**\n\t * [Deprecated]\n\t */\n\tDeprecated getDeprecated();\n\n\t/**\n\t * [ChangeEvent]\n\t */\n\tboolean hasChangeEvent(String name);\n\n\n\t/**\n\t * [PercentProxy]\n\t */\n\tString getPercentProxy();\n}", "Object getPropertytrue();", "public void setProperty(String propertyId, Object value)\n throws SAXNotRecognizedException, SAXNotSupportedException\n {\n // see if the property is recognized\n getProperty(propertyId);\n \n // Properties with a defined value, we just change it if we can.\n \n if ((PROPERTY + \"declaration-handler\").equals(propertyId))\n {\n if (value == null)\n {\n declHandler = base;\n }\n else if (!(value instanceof DeclHandler))\n {\n throw new SAXNotSupportedException(propertyId);\n }\n else\n {\n declHandler = (DeclHandler) value;\n }\n return ;\n }\n \n if ((PROPERTY + \"lexical-handler\").equals(propertyId))\n {\n if (value == null)\n {\n lexicalHandler = base;\n }\n else if (!(value instanceof LexicalHandler))\n {\n throw new SAXNotSupportedException(propertyId);\n }\n else\n {\n lexicalHandler = (LexicalHandler) value;\n }\n return;\n }\n \n throw new SAXNotSupportedException(propertyId);\n }", "public void setProperty(String name,Object value);", "protected ContainerValueOperationEvaluator(ContainerValueOperation op) {\r\n this.op = op;\r\n }", "public Object accept(FEVisitor v)\n {\n return v.visitExprVar(this);\n }", "protected abstract IMapProperty<S, K, V> doGetDelegate(S source);", "V getValue();", "V getValue();", "V getValue();", "void visitRealValue(RealValue value);", "public interface Value extends Formula {\n\n /**\n * Accepts a value visitor and gets the corresponding value/output to be used.\n *\n * @param visitor type of ValueVisitor (SumVisitor/ProductVisitor/etc)\n * @return evaluated output that will be used in other objects (namely in Product/Sum/etc.)\n */\n <R> R accept(ValueVisitor<R> visitor);\n\n}", "V setValue(final V value) {\n\t setMethod.accept(value);\n\n\t return value;\n\t}", "public Value makePolymorphic(ObjectProperty prop) {\n Value r = new Value();\n r.var = prop;\n r.flags |= flags & (ATTR | ABSENT | PRESENT_DATA | PRESENT_ACCESSOR | EXTENDEDSCOPE);\n if (isMaybePresentData())\n r.flags |= PRESENT_DATA;\n if (isMaybePresentAccessor())\n r.flags |= PRESENT_ACCESSOR;\n return canonicalize(r);\n }", "public abstract Object getValue();", "public abstract Object getValue();", "public abstract Object getValue();", "@Override\n\tpublic void accept(Visitor visitor) {\n\t\t\n\t}", "DefinedProperty nodeAddProperty( long nodeId, int propertyKey, Object value );", "public void accept(ExpressionNodeVisitor visitor);", "public Object accept(ExpressionNodeVisitor visitor) {\n\t\t\n\t\treturn visitor.visit(this);\n\t\t\n\t}", "void setMyProperty1(Integer a) {}", "public PropertySpecBuilder<T> parser(Function<Object, T> valueMethod)\n {\n Preconditions.checkArgument(this.valueMethod == null, \"value method already set\");\n this.valueMethod = valueMethod;\n\n return this;\n }", "<T> boolean containsValue(Property<T> property);", "public T caseProperty(Property object) {\r\n\t\treturn null;\r\n\t}", "void visit(final NextVal nextVal);", "public Object getValue();", "public Object getValue();", "public Object getValue();", "public Object getValue();" ]
[ "0.66205716", "0.6508962", "0.6387742", "0.62866104", "0.624947", "0.62238216", "0.62233335", "0.6214885", "0.62139857", "0.6207682", "0.6189939", "0.6145921", "0.612924", "0.6123416", "0.6102788", "0.59997475", "0.59444815", "0.5934527", "0.5897661", "0.5834459", "0.5833385", "0.58246225", "0.5786138", "0.5767479", "0.5760285", "0.5723605", "0.5716813", "0.5716391", "0.57028645", "0.56838816", "0.5654373", "0.5618954", "0.559813", "0.555201", "0.555201", "0.5551737", "0.5519222", "0.5518589", "0.55138415", "0.55125314", "0.5508235", "0.55053324", "0.5500949", "0.5497667", "0.54835474", "0.54696345", "0.54555255", "0.5450254", "0.54401225", "0.5417842", "0.5417842", "0.5413306", "0.5406958", "0.5392715", "0.53864545", "0.5376102", "0.53735363", "0.5365431", "0.5353572", "0.5353572", "0.5353572", "0.5353572", "0.5353572", "0.5353572", "0.5353572", "0.53446066", "0.53404915", "0.5302026", "0.52898735", "0.5287368", "0.5285972", "0.52851653", "0.52776945", "0.52775085", "0.5276957", "0.5276807", "0.5274503", "0.526336", "0.526336", "0.526336", "0.52610344", "0.52536875", "0.52534187", "0.52356994", "0.52298254", "0.52298254", "0.52298254", "0.5219772", "0.52074665", "0.5206321", "0.52015626", "0.51941526", "0.5193471", "0.5172279", "0.5166261", "0.51643014", "0.51584136", "0.51584136", "0.51584136", "0.51584136" ]
0.53556544
58
Created by Amadey on 6/29/2018.
public interface Specification { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void perish() {\n \n }", "public final void mo51373a() {\n }", "private stendhal() {\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "public void mo38117a() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "private void m50366E() {\n }", "@Override\n public int describeContents() { return 0; }", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "private void poetries() {\n\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n\tprotected void interr() {\n\t}", "protected boolean func_70814_o() { return true; }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "private static void cajas() {\n\t\t\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "private Rekenhulp()\n\t{\n\t}", "protected MetadataUGWD() {/* intentionally empty block */}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "@Override\n protected void initialize() {\n }", "public void mo12930a() {\n }", "public final void mo91715d() {\n }", "public void mo6081a() {\n }", "@Override\n public void init() {\n\n }", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "public void m23075a() {\n }", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "protected void mo6255a() {\n }", "private TMCourse() {\n\t}", "@Override\n public void init() {\n }", "@Override\n protected void initialize() \n {\n \n }", "@Override\n protected void initialize() {\n\n \n }", "private MetallicityUtils() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n void init() {\n }", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "private void m50367F() {\n }", "Petunia() {\r\n\t\t}", "public Pitonyak_09_02() {\r\n }", "@Override\n\tpublic int mettreAJour() {\n\t\treturn 0;\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "public abstract void mo70713b();", "@Override public int describeContents() { return 0; }", "@Override\n public void init() {}", "public void mo12628c() {\n }", "public void mo1531a() {\n }", "public void mo21779D() {\n }", "public void mo9848a() {\n }", "public void mo21877s() {\n }", "@Override\n protected void init() {\n }", "private void kk12() {\n\n\t}", "public abstract void mo56925d();", "@Override\n\tprotected void initialize() {\n\n\t}", "Consumable() {\n\t}", "private void init() {\n\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\r\n\tprotected void doF4() {\n\t\t\r\n\t}", "@Override\n public int retroceder() {\n return 0;\n }", "public void mo23813b() {\n }", "@SuppressWarnings(\"unused\")\n\tprivate void version() {\n\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "public void mo55254a() {\n }", "@Override\r\n\tpublic void init() {}", "private final zzgy zzgb() {\n }", "public void mo21878t() {\n }", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "public void mo115190b() {\n }" ]
[ "0.6041169", "0.5956614", "0.5871804", "0.5770518", "0.5689114", "0.5672451", "0.5672451", "0.5637282", "0.56132424", "0.561181", "0.5602261", "0.55993545", "0.5591186", "0.5509398", "0.55000114", "0.54940754", "0.54874605", "0.5482931", "0.54812515", "0.5479365", "0.54635006", "0.54543346", "0.5444042", "0.5433133", "0.54272234", "0.54212314", "0.5414511", "0.54092324", "0.5399533", "0.5398082", "0.5398082", "0.5398082", "0.5398082", "0.5398082", "0.5398082", "0.5398082", "0.53919786", "0.53815603", "0.53815603", "0.53815603", "0.53815603", "0.53815603", "0.53815603", "0.5377235", "0.53672767", "0.5357242", "0.5351247", "0.5346346", "0.53318524", "0.532567", "0.53236043", "0.53151095", "0.5312141", "0.5309321", "0.53020895", "0.52991366", "0.5296268", "0.52853966", "0.52853966", "0.52832204", "0.5277755", "0.52728206", "0.52728206", "0.52728206", "0.52728206", "0.52728206", "0.5268274", "0.52654403", "0.52615285", "0.5250634", "0.52456623", "0.5237869", "0.52366644", "0.52366644", "0.5235632", "0.52348995", "0.52281195", "0.522676", "0.5225245", "0.52230906", "0.521994", "0.521964", "0.5216801", "0.52157915", "0.52136016", "0.5211635", "0.52111936", "0.5210474", "0.5204936", "0.5203479", "0.5201611", "0.5201387", "0.5199403", "0.51927894", "0.5191937", "0.51914024", "0.5181292", "0.5174809", "0.5165583", "0.516313", "0.5159212" ]
0.0
-1
Returns error message corresponding to type of error thrown
public String getErrorMessage() { return ERROR_MESSAGE; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getError();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrorMessage();", "java.lang.String getErrmsg();", "public String getErrorType() {\n return errorType;\n }", "java.lang.String getErr();", "String getErrorMessage();", "String getErrorMessage();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "java.lang.String getErrorInfo();", "public java.lang.String getError() {\n java.lang.Object ref = error_;\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 error_ = s;\n }\n return s;\n }\n }", "public java.lang.String getError() {\n java.lang.Object ref = error_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n error_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrmsg() {\n java.lang.Object ref = errmsg_;\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 errmsg_ = s;\n }\n return s;\n }\n }", "public java.lang.String getError() {\n java.lang.Object ref = error_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n error_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getInvalidMessage();", "public String toString() {\n return \"Error on line \" + lineNum + \": \" + errorMessage;\n }", "String errorMessage();", "public String error();", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public String getError() {\n return error != null ? error : \"An unknown error occurred.\";\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n }\n return s;\n }\n }", "protected <M> M validationError(Class<M> type) {\n Option<Object> err = actual.getValidationError(0);\n if (err.isEmpty()) {\n throwAssertionError(new BasicErrorMessageFactory(\"Expected a Result with validation errors, but instead was %s\",\n actualToString()));\n }\n return type.cast(err.get());\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrmsg() {\n java.lang.Object ref = errmsg_;\n if (!(ref instanceof java.lang.String)) {\n java.lang.String s = ((com.google.protobuf.ByteString) ref)\n .toStringUtf8();\n errmsg_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getErrorMessage(E input);", "@Override\n\tpublic String getMessage()\n\t{\n\t\treturn errMessage;\n\t}", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorMessage_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getError() {\n java.lang.Object ref = error_;\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 error_ = s;\n return s;\n }\n }", "public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "public String throwErrorMessage(String taskType) {\n switch (taskType) {\n case \"todo\":\n return \"∑(゜Д゜;) Description of a todo can't be empty.\\n\";\n case \"event\":\n return \"∑(゜Д゜;) Description of an event can't be empty.\\n\";\n case \"deadline\":\n return \"∑(゜Д゜;) Description of a deadline can't be empty.\\n\";\n case \"done\":\n return \"I've done nothing productive all day...you too? (⊃◜⌓◝⊂)\\n\";\n case \"delete\":\n return \"One does not simply delete nothing.( ̄ ︶  ̄;)\\n\";\n default:\n return \"ಠ_ಠ OOPS!!! I'm sorry, but I don't know what that means.\\n\";\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n errorInfo_ = s;\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "public JDBFException (String message, Object type){\r\n super(Messages.format(message, type));\r\n }", "public String getErrorString()\r\n\t{\r\n\t\t\r\n\t\treturn ERROR_STRING;\r\n\t}", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "public java.lang.String getErrorInfo() {\n java.lang.Object ref = errorInfo_;\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 errorInfo_ = s;\n return s;\n }\n }", "String getGetErrorMessage();", "public String getMessage() {\n return super.getMessage()+\"\\n error code=\"+error_code+\" error value=\"+error_value; //$NON-NLS-1$ //$NON-NLS-2$\n }", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "java.lang.String getMessage();", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "@java.lang.Override\n public java.lang.String getErrorMessage() {\n java.lang.Object ref = errorMessage_;\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 errorMessage_ = s;\n return s;\n }\n }", "public int getErrorType() {\r\n\t\treturn errorType;\r\n\t}", "private String getErrorString() {\n\t\treturn \"GUID:ERROR:\" + mErrors[0][0]\n\t\t + \":\" + mErrors[1][0]\n\t\t + \":\" + mErrors[2][0]\n\t\t + \":\" + mErrors[3][0];\n\t}", "public static String exceptionTypeAndMsg(Exception e) {\n return e.getClass() + \" : \" + e.getMessage();\n }", "public static String getErrorDescription(int errCode) {\n switch (errCode) {\n case ERROR_PACKET_HEADER:\n return \"Invalid packet header\";\n case ERROR_PACKET_TYPE:\n return \"Invalid packet type\";\n case ERROR_PACKET_LENGTH:\n return \"Invalid packet length\";\n case ERROR_PACKET_ENCODING:\n return \"Unsupported packet encoding\";\n case ERROR_PACKET_PAYLOAD:\n return \"Invalid packet payload\";\n case ERROR_PACKET_CHECKSUM:\n return \"Invalid checksum\";\n case ERROR_PACKET_ACK:\n return \"Invalid ACL sequence\";\n case ERROR_PROTOCOL_ERROR:\n return \"Protocol error\";\n case ERROR_PROPERTY_READ_ONLY:\n return \"Property is read-only\";\n case ERROR_PROPERTY_WRITE_ONLY:\n return \"Property is write-only\";\n case ERROR_PROPERTY_INVALID_ID:\n return \"Invalid/Unrecognized property key\";\n case ERROR_PROPERTY_INVALID_VALUE:\n return \"Invalid propery value\";\n case ERROR_PROPERTY_UNKNOWN_ERROR:\n return \"Unknown property error\";\n case ERROR_COMMAND_INVALID:\n return \"Invalid/Unsupported command\";\n case ERROR_COMMAND_ERROR:\n return \"Command error\";\n case ERROR_UPLOAD_TYPE:\n return \"Invalid upload type\";\n case ERROR_UPLOAD_LENGTH:\n return \"Invalid upload length\";\n case ERROR_UPLOAD_OFFSET_OVERLAP:\n return \"Upload offset overlap\";\n case ERROR_UPLOAD_OFFSET_GAP:\n return \"Upload offset gap\";\n case ERROR_UPLOAD_OFFSET_OVERFLOW:\n return \"Upload offset overflow\";\n case ERROR_UPLOAD_FILE_NAME:\n return \"Invalid uploaded filename\";\n case ERROR_UPLOAD_CHECKSUM:\n return \"Invalid uploaded checksum\";\n case ERROR_UPLOAD_SAVE:\n return \"Unable to save uploaded file\";\n case ERROR_GPS_EXPIRED:\n return \"GPS fix expired\";\n case ERROR_GPS_FAILURE:\n return \"GPS failure\";\n }\n if ((errCode >= ERROR_INTERNAL_ERROR_00) && (errCode <= ERROR_INTERNAL_ERROR_0F)) {\n return \"Internal error\";\n }\n return \"Unknown [\" + StringTools.toHexString(errCode, 16) + \"]\";\n }", "public WorldUps.UErr getError(int index) {\n if (errorBuilder_ == null) {\n return error_.get(index);\n } else {\n return errorBuilder_.getMessage(index);\n }\n }", "public java.lang.String getErr() {\n java.lang.Object ref = err_;\n if (!(ref instanceof java.lang.String)) {\n com.google.protobuf.ByteString bs =\n (com.google.protobuf.ByteString) ref;\n java.lang.String s = bs.toStringUtf8();\n if (bs.isValidUtf8()) {\n err_ = s;\n }\n return s;\n } else {\n return (java.lang.String) ref;\n }\n }", "String getErrorsString();", "public java.lang.String getErr() {\n java.lang.Object ref = err_;\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 err_ = s;\n }\n return s;\n }\n }", "public void error(String message);" ]
[ "0.76196694", "0.76196694", "0.76196694", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.72202426", "0.7194392", "0.7008618", "0.6904479", "0.6901221", "0.6901221", "0.68015516", "0.68015516", "0.68015516", "0.68015516", "0.6779739", "0.6767564", "0.67509514", "0.67507625", "0.6745861", "0.67386", "0.673742", "0.67370504", "0.67234343", "0.6722609", "0.6720498", "0.671309", "0.6711822", "0.6708753", "0.6705443", "0.67041886", "0.6688608", "0.6688608", "0.6688608", "0.6688608", "0.6688608", "0.6688608", "0.6688608", "0.6688557", "0.6688557", "0.6688557", "0.6681848", "0.6643565", "0.6601342", "0.6596514", "0.6596514", "0.6596514", "0.6596514", "0.6576227", "0.6566756", "0.656492", "0.656492", "0.656492", "0.656492", "0.65446794", "0.6528051", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6518245", "0.6515877", "0.6515877", "0.6515877", "0.65155095", "0.65155095", "0.65155095", "0.65155095", "0.65155095", "0.65155095", "0.65155095", "0.6512266", "0.650318", "0.64382774", "0.6434904", "0.6417501", "0.6393928", "0.63642293", "0.63581353", "0.63527226" ]
0.0
-1
X and Y in drawText are the BOTTOMLEFT coordinates
@Override public void onDraw(Canvas canvas){ int titleDescent = (int)titleTextPaint.getFontMetrics().descent; int drawTitleY = getPaddingTop() + (titleTextRect.height() - titleDescent); canvas.drawText((String)titleText, titleTextStartX, drawTitleY, titleTextPaint); int drawSecondaryValueX = getWidth() - getPaddingRight() - secondaryValueTextRect.width(); int drawSecondaryValueY = getPaddingTop() + (int)(secondaryValueTextRect.height() - secondaryValueTextPaint.getFontMetrics().descent); canvas.drawText((String)secondaryValueText, drawSecondaryValueX, drawSecondaryValueY, secondaryValueTextPaint); int drawDescY = drawTitleY + textPadding + (int)(descriptionTextRect.height() - descriptionTextPaint.getFontMetrics().descent); canvas.drawText((String)descriptionText, titleTextStartX, drawDescY, descriptionTextPaint); int drawPrimaryTextX = titleTextStartX + titleTextRect.width(); int drawPrimaryTextY = drawDescY + textPadding + (int)(primaryValueTextRect.height() - primaryValueTextPaint.getFontMetrics().descent); canvas.drawText((String)primaryValueText, drawPrimaryTextX, drawPrimaryTextY, primaryValueTextPaint); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void drawCenteredText(String text, int x, int y);", "private void drawXYZText() {\n\t\t//Draw text X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"X\");\n\t\tgl.glEnd();\n\t\t//Draw text -X - red\n\t\tgl.glColor3f(1.0f, 0.0f, 0.0f);\n\t\tgl.glRasterPos3f(-1,0,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-X\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Y\");\n\t\tgl.glEnd();\n\t\t//Draw text -Y - Green\n\t\tgl.glColor3f(0.0f, 1.0f, 0.0f);\n\t\tgl.glRasterPos3f(0,-1,0);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Y\");\n\t\tgl.glEnd();\n\t\t\n\t\t//Draw text Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"Z\");\n\t\tgl.glEnd();\n\t\t//Draw text -Z - Blue\n\t\tgl.glColor3f(0.0f, 0.0f, 1.0f);\n\t\tgl.glRasterPos3f(0,0,-1);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_18, \"-Z\");\n\t\tgl.glEnd();\n\t}", "@Override\r\n public void draw(Canvas canvas) {\r\n if (text == null) {\r\n throw new IllegalStateException(\"Attempting to draw a null text.\");\r\n }\r\n\r\n // Draws the bounding box around the TextBlock.\r\n RectF rect = new RectF(text.getBoundingBox());\r\n rect.left = translateX(rect.left);\r\n rect.top = translateY(rect.top);\r\n rect.right = translateX(rect.right);\r\n rect.bottom = translateY(rect.bottom);\r\n canvas.drawRect(rect, rectPaint);\r\n\r\n // Log.d(\"area\", \"text: \" + text.getText() + \"\\nArea: \" + Area);\r\n /**Here we are defining a Map which takes a string(Text) and a Integer X_Axis.The text will act as key to the X_Axis.\r\n Once We Got the X_Axis we will pass its value to a SparseIntArray which will Assign X Axis To Y Axis\r\n .Then We might Create another Map which will Store Both The text and the coordinates*/\r\n int X_Axis = (int) rect.left;\r\n int Y_Axis = (int) rect.bottom;\r\n\r\n // Renders the text at the bottom of the box.\r\n Log.d(\"PositionXY\", \"x: \"+X_Axis +\" |Y: \"+ Y_Axis);\r\n canvas.drawText(text.getText(), rect.left, rect.bottom, textPaint); // rect.left and rect.bottom are the coordinates of the text they can be used for mapping puposes\r\n\r\n\r\n }", "private float drawText(Graphics2D g2d) {\n float yOffset = 0; // 1\" top margin\r\n for (TextLayout tl : textLayouts) {\r\n yOffset += tl.getAscent();\r\n tl.draw(g2d, 0, yOffset);\r\n yOffset += tl.getDescent();\r\n yOffset += tl.getLeading();\r\n }\r\n return yOffset;\r\n }", "public void displayLeft(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font \n\t\tgc.setFill(Color.WHITE); //set the color of the text\n\t\tgc.fillText(text, x, y); //draw the text\n\t}", "private void draw_text() {\n\t\tcopy_text_into_buffer();\n\t\tVoteVisApp.instance().image(text_buffer_, frame_height_ / 2,\n\t\t\t-text_graphics_.height / 2);\n\t}", "public void centerText() {\r\n int theHeight = window.getGraphPanelHeight() / 2;\r\n int theWidth = window.getGraphPanelWidth() / 2;\r\n int writingHeight = textShape.getHeight() / 2;\r\n int writingWidth = textShape.getWidth() / 2;\r\n textShape.setY(theHeight - writingHeight);\r\n textShape.setX(theWidth - writingWidth);\r\n }", "@Override\n protected void onDraw(Canvas canvas) {\n mTextPain.setColor(mColor);\n canvas.drawText(mText,getWidth() / 2-mTextBound.width()/2,getHeight()/2+mTextBound.height()/2,mTextPain);\n }", "private void draw(){\n\t\t\t Point level = new Point(txtBoard_top_left.x, txtBoard_top_left.y);\n\t\t\t level_info = new TextInfo(g, level, txt_width, size*4, LEVEL, this.level);\n\t\t\t level_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 2nd text info\n\t\t\t Point lines = new Point(level.x, level.y+size*2);\n\t\t\t lines_info = new TextInfo(g, lines, txt_width, size*4, LINES, this.lines);\n\t\t\t lines_info.drawTextInfo();\n\t\t\t \n\t\t\t // draw 3rd text info\n\t\t\t Point score = new Point(lines.x, lines.y+size*2);\n\t\t\t score_info = new TextInfo(g, score, txt_width, size*4, SCORE, this.score);\n\t\t\t score_info.drawTextInfo();\t\t\n\t\t}", "private static void drawOutlineText(Canvas canvas, Paint textPaint, String str,\n float x, float y) {\n // Is there a better way to do this?\n textPaint.setColor(0xff000000);\n canvas.drawText(str, x-1, y, textPaint);\n canvas.drawText(str, x+1, y, textPaint);\n canvas.drawText(str, x, y-1, textPaint);\n canvas.drawText(str, x, y+1, textPaint);\n canvas.drawText(str, x-0.7f, y-0.7f, textPaint);\n canvas.drawText(str, x+0.7f, y-0.7f, textPaint);\n canvas.drawText(str, x-0.7f, y+0.7f, textPaint);\n canvas.drawText(str, x+0.7f, y+0.7f, textPaint);\n textPaint.setColor(0xffffffff);\n canvas.drawText(str, x, y, textPaint);\n }", "public void paint(MapCanvas canvas, Point insertPoint) {\n Graphics2D graphics = null;\n if ((this.text != null) && (insertPoint != null) && (canvas != null) && \n ((graphics = canvas.graphics) != null)) {\n Font curFont = graphics.getFont();\n Color curColor = graphics.getColor();\n AffineTransform curTransForm = graphics.getTransform();\n try {\n TextStyle style = this.getTextStyle();\n FontMetrics fontMetrics = this.textFont.setCanvas(canvas);\n int textHeight = fontMetrics.getHeight();\n int x = insertPoint.x;\n int y = insertPoint.y;\n int textWidth = fontMetrics.stringWidth(this.text);\n// if ((style.orientation == TextStyle.Orientation.VerticalDn) || \n// (style.orientation == TextStyle.Orientation.VerticalUp)) {\n// if (style.hAlign == TextStyle.Horizontal.Center) {\n// y -= textWidth/2;\n// } else if (style.hAlign == TextStyle.Horizontal.Right) {\n// y -= textWidth;\n// }\n//\n// if (style.vAlign == TextStyle.Vertical.Middle) {\n// x += textHeight/2;\n// } else if (style.vAlign == TextStyle.Vertical.Top) {\n// x += textHeight;\n// }\n// } else {\n if (style.hAlign == TextStyle.Horizontal.Center) {\n x -= textWidth/2;\n } else if (style.hAlign == TextStyle.Horizontal.Right) {\n x -= textWidth;\n }\n\n if (style.vAlign == TextStyle.Vertical.Middle) {\n y += textHeight/2;\n } else if (style.vAlign == TextStyle.Vertical.Top) {\n y += textHeight;\n }\n //} \n float rotate = style.orientation.rotate;\n if (rotate != 0.0f) {\n AffineTransform transform = new AffineTransform();\n transform.translate(0.0d, 0.0d);\n transform.rotate(rotate, insertPoint.x, insertPoint.y);\n graphics.transform(transform);\n }\n \n graphics.drawString(this.text, x, y - fontMetrics.getDescent());\n } catch (Exception exp) {\n LOGGER.log(Level.WARNING, \"{0}.paint Error:\\n {1}\",\n new Object[]{this.getClass().getSimpleName(), exp.getMessage()});\n } finally {\n if (curFont != null) {\n graphics.setFont(curFont);\n }\n if (curColor != null) {\n graphics.setColor(curColor);\n }\n if (curTransForm != null) {\n graphics.setTransform(curTransForm);\n }\n }\n }\n }", "@Override\n\tpublic void render(Canvas c) {\n\t\tc.drawText(text,(float)x+width,(float)y+height , paint);\n\t\t\n\t}", "@Override\n public String getTextAlign() {\n return graphicsEnvironmentImpl.getTextAlign(canvas);\n }", "public void displayText(String message,float x, float y, boolean bottom) {\n\t\tif (! bottom) {\n\t\t\tGlyphLayout layout = new GlyphLayout(bitmapFont, message);\n\t\t\tfloat fontWidth = layout.width;\n\t\t\tfloat fontHight = layout.height;\n\t\t\tfloat position_x = (screenWidth / 2 - fontWidth / 2) + x;\n\t\t\tfloat position_y = (screenHeight / 2 - fontHight / 2) + y;\n\t\t\tbitmapFont.draw(batch, message, position_x, position_y);\n\n\t\t} else {\n\t\t\tbitmapFont.draw(batch, message, x, y);\n\t\t}\n\t}", "@Override\n public String getTextBaseline() {\n return graphicsEnvironmentImpl.getTextBaseline(canvas);\n }", "private static Rect drawText(final Canvas canvas, final Paint paint, final float x,\n final float y, final String text, final boolean isLeftAlignment) {\n\n float textVerticalMargin = 0;\n float maxWidth = 0;\n float textHeight = 0;\n float textX = 0;\n float minTextX = x;\n for (String token : text.split(\"\\n\")) {\n final Rect textBound = new Rect();\n final int textLength = token.length() > 1 ? token.length() - 1 : 0;\n paint.getTextBounds(token, 0, textLength, textBound);\n float textWidth = paint.measureText(token);\n textHeight = textBound.height();\n textX = isLeftAlignment ? x : x - textWidth;\n float textY = y + textVerticalMargin;\n canvas.drawText(token, textX, textY, paint);\n textVerticalMargin += textHeight + 5;\n if (textWidth > maxWidth) {\n maxWidth = textWidth;\n }\n if (minTextX > textX) {\n minTextX = textX;\n }\n }\n return new Rect(\n Math.round(minTextX),\n Math.round(y - textHeight),\n Math.round(minTextX + maxWidth),\n Math.round(y + textVerticalMargin - textHeight));\n }", "void draw_text(int x, int y, char[][] _display, String txt) {\n for (int i = 0; i < txt.length(); i++)\n {\n draw_char(x + i, y, _display, txt.charAt(i));\n }\n }", "public abstract void drawString(String str, int x, int y);", "static void setTextMousePoint(int i,int j){tmpx=i;tmpy=j;}", "private void showPopText(Canvas canvas, String content, float x, float y) {\n int heightOffSet = 40;\n int margin = 10;\n int rectRadius = 4;\n\n //draw rounded rectangle\n Rect popupTextRect = new Rect();\n Paint paint = new Paint();\n paint.getTextBounds(content + \" \", 0, content.length() + 2, popupTextRect);\n paint.setAntiAlias(true);\n paint.setColor(Color.BLACK);\n paint.setTextSize(heightOffSet / 2);\n RectF r =\n new RectF(x - popupTextRect.width() - margin, y - (mFontSize * heightOffSet + 0.5f),\n x + popupTextRect.width() / 6 + (mFontSize * margin + 0.5f),\n y - (mFontSize * heightOffSet * 2 / 5));\n canvas.drawRoundRect(r, (mFontSize * rectRadius), (mFontSize * rectRadius), paint);\n\n //draw triangle.\n Path path = new Path();\n path.moveTo(x, y - (mFontSize * heightOffSet * 2 / 5));\n path.lineTo(x, y - (mFontSize * 10));\n path.lineTo(x - (mFontSize * 5), y - (mFontSize * heightOffSet / 2));\n path.close();\n canvas.drawPath(path, paint);\n\n //draw text\n paint.setColor(Color.WHITE);\n FontMetricsInt fontMetrics = paint.getFontMetricsInt();\n int baseline =\n (int) (r.top + (r.bottom - r.top - fontMetrics.bottom + fontMetrics.top) / 2 -\n fontMetrics.top);\n paint.setTextAlign(Paint.Align.CENTER);\n canvas.drawText(content, r.centerX(), baseline, paint);\n }", "public abstract double drawString(AEColor clr, double font_size, String str, double mid_x, double mid_y);", "public interface IText extends ISinglePoint {\n\n /**\n * Defines whether the text rotation is relative to the screen or geographic\n * north\n * \n * @author sgilbert\n * \n */\n public static enum TextRotation {\n SCREEN_RELATIVE, NORTH_RELATIVE\n }\n\n /**\n * Defines the text justification options\n * \n * @author sgilbert\n * \n */\n public static enum TextJustification {\n LEFT_JUSTIFY, CENTER, RIGHT_JUSTIFY\n }\n\n /**\n * Defines available font styles\n * \n * @author sgilbert\n * \n */\n public static enum FontStyle {\n REGULAR, BOLD, ITALIC, BOLD_ITALIC\n }\n\n public static enum DisplayType {\n NORMAL, BOX, UNDERLINE, OVERLINE\n }\n\n /**\n * Gets the text to draw\n * \n * @return Array of text strings\n */\n public String[] getString();\n\n /**\n * Gets the name of the font to use\n * \n * @return font name\n */\n public String getFontName();\n\n /**\n * Gets the size of the font\n * \n * @return font size\n */\n public float getFontSize();\n\n /**\n * Gets the font style to use\n * \n * @return font style\n */\n public FontStyle getStyle();\n\n /**\n * Gets the lat/lon refernce position for the text display\n * \n * @return lat/lon coordinate\n */\n public Coordinate getPosition();\n\n /**\n * Gets the color to use for the text\n * \n * @return text color\n */\n public Color getTextColor();\n\n /**\n * Gets the specified justification\n * \n * @return the text justification\n */\n public TextJustification getJustification();\n\n /**\n * Gets the rotation angle to use\n * \n * @return rotation angle\n */\n public double getRotation();\n\n /**\n * Gets how the rotation angle is applied\n * \n * @return the rotation relativity\n */\n public TextRotation getRotationRelativity();\n\n /**\n * Determines whether the text should be displayed with an outline box\n * \n * @return true, if outline box should be displayed\n */\n public DisplayType getDisplayType();\n\n /**\n * Determines whether text background should be masked out.\n * \n * @return true, if background is to be masked\n */\n public Boolean maskText();\n\n /**\n * Gets the offset in the x direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The x direction offset\n */\n public int getXOffset();\n\n /**\n * Gets the offset in the y direction for the text location. The offset is\n * specified in half-characters.\n * \n * @return The y direction offset\n */\n public int getYOffset();\n\n public Boolean getHide();\n\n public Boolean getAuto();\n\n public int getIthw();\n\n public int getIwidth();\n\n}", "private void getTextBounds(CharSequence text, Paint paint, float[] p) {\n if (p == null || p.length < 3) {\n return;\n }\n float textWidth = paint.measureText(text.toString());\n Paint.FontMetrics fontM = paint.getFontMetrics();\n //baseLine:一行文字的底线。\n //Ascent: 字符顶部到baseLine的距离。\n //Descent: 字符底部到baseLine的距离。\n //Leading: 字符行间距。\n float bottom = fontM.bottom;\n float top = fontM.top;\n p[0] = textWidth;// text width\n p[1] = bottom - top;// text height\n p[2] = top;\n Log.i(TAG, \"fontM.ascent=\"+fontM.ascent + \" fontM.bottom=\"+fontM.bottom+\" fontM.descent=\"+fontM.descent+\" fontM.top=\"+fontM.top);\n }", "public GLGraphics drawText(String text, float x, float y, float w, float h) {\n\t\treturn drawText(text, x, y, w, h, VAlign.LEFT);\n\t}", "@Override\n public void render(Graphics g) {\n\n int x = g.repositionX((int) _coordOrigin._x + (int) _pos._x);\n int y = g.repositionY((int) _coordOrigin._y + ((int) _pos._y * (-1)));\n\n g.newFont(_f, g.repositionX(_lineThickness), _b);\n g.setColor(_c);\n g.drawText(_t, g.getCanvas().getX() + x, g.getCanvas().getY() + y);\n }", "public void paintComponent(Graphics g) {\n super.paintComponent(g);\n g.drawString(\"(\" + p.x + \", \" + p.y + \")\", p.x, p.y);\n }", "public void strokeString(float x, float y, String text);", "public void displayCenter(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font of the text\n\t\tgc.setFill(Color.WHITE); //set the color of the text \n\t\tgc.setTextAlign(TextAlignment.CENTER); //set text alignment to center \n\t\tgc.fillText(text, x, y); //draw the text \n\t}", "public void renderText(float x ,float y ){\n ttf.drawString(x, y, text);\n }", "public void renderText(String text, int x, int y)\n {\n renderText(text, x, y, 0x00000000);\n }", "private float drawTextUsingCurrentVertLoc ( \r\n\t String text,\r\n\t Graphics2D g2\r\n\t )\r\n\t{\n\t\tif ( ( text == null ) || text.equals ( \"\" ) )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif ( horizontalLocationOfRelation <= 0 )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tTextLayout tl = new TextLayout( text, SYMBOL_FONT, FONT_RENDER_CTXT );\r\n\t\tRectangle2D.Float bound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\tfloat xAdjustment = bound.width / 2.0f;\r\n\r\n\t\t//int yAdjustment = ( int ) ( bound.height / 2.0f );\r\n\t\ttl.draw ( \r\n\t\t g2,\r\n\t\t horizontalLocationOfRelation + xAdjustment,\r\n\t\t currentVertLocationOfSymbol - WORM_LINE_THICKNESS - 1 - SYMBOL_LINE_LENGTH\r\n\t\t );\r\n\r\n\t\t//tl.draw(g2, 100.0f, 100.0f);\r\n\t\t//return bound.height;\r\n\t\ttl = new TextLayout( text, NUMBER_FONT, FONT_RENDER_CTXT );\r\n\t\tbound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\t//Util.info(\"bound = \" + bound);\r\n\t\treturn bound.width;\r\n\t}", "public Position getTextPosition()\n {\n int hpos = getComponent().getHorizontalTextPosition();\n int vpos = getComponent().getVerticalTextPosition();\n return Position.get(hpos, vpos);\n }", "public void displayRight(String text, int x, int y) {\n\t\tgc.setFont(vector); //set the font of the text \n\t\tgc.setFill(Color.WHITE); //set the color of the text\n\t\tgc.setTextAlign(TextAlignment.RIGHT); //set the alignment to right \n\t\tgc.fillText(text, x, y); //draw the text \n\t}", "public void draw(SpriteBatch batch, String text, float x, float y, GameContainer c, StyledText style);", "@Override\r\n\tpublic void onCustomDraw(Graphics2D g) {\n\t\tg.setColor(Color.black);\r\n\t\tg.fillRect(x, y, width, height);\r\n\t\tg.setColor(Color.green);\r\n\t\tfor(int i = 0; i < 50; i++){\r\n\t\t\tif(text[i] != null){\r\n\t\t\t\tg.drawString(text[i], 11, (i*10)+20);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\tpublic void render(Canvas canvas) {\n\t\tPaint paint = new Paint();\n\t\tpaint.setColor(Color.parseColor(\"#D95B43\"));\n\t\tpaint.setTextSize(50 * Globals.scaleY);\n\t\tint width = (int)paint.measureText(this.toString(), 0, this.toString().length());\n\t\t\n\t\tthis.x = (int) ((gamePanel.width - width) / 2.0f);\n\t\t\n\t\tcanvas.drawText(this.toString(), x, y, paint);\n\t}", "private void drawTxt(Canvas canvas, Rect gridRange){\n\n int length = points.size();\n int gridNumber = 5;\n int step = (gridRange.right - gridRange.left) / gridNumber;\n\n //draw digits\n float max = getMaxX();\n float min = getMinX();\n\n if(length == 1)\n min = 0;\n\n float dis = (max - min) / gridNumber;\n\n tetxPaint.setTextSize(textSize);\n\n\n //draw x digits\n for(int i = 0; i < gridNumber + 1; i++){\n\n String txt = Float.toString(round(min, 1));\n\n Rect bounds = getTxtBounds(tetxPaint, txt);\n canvas.drawText(txt, (gridRange.left + i*step) - (bounds.width()/2), gridRange.bottom + bounds.height(), tetxPaint);\n min += dis;\n }\n\n step = (gridRange.bottom - gridRange.top) / gridNumber;\n\n max = maxVal;\n min = minVal;\n\n if(length == 1)\n min = 0;\n\n dis = (max - min) / gridNumber;\n\n //draw y digits\n for(int i = 0; i < gridNumber + 1; i++){\n\n String txt = Float.toString(round(min, 1));\n\n Rect bounds = getTxtBounds(tetxPaint, txt);\n canvas.drawText(txt, gridRange.left - bounds.width(), gridRange.bottom - step*i, tetxPaint);\n min += dis;\n }\n }", "@Override\r\n\tpublic void draw() {\n\t\tPoint p = this.getP();\r\n\t\tint start_point = p.getX();\r\n\t\tint end_point = p.getY();\r\n\t\t\r\n\t\tint width = this.getWidth();\r\n\t\tint height = this.getHeight();\r\n\t\t\r\n\t\tSystem.out.println(\"�l�p�`��`�� �_(\" + start_point +\",\"+ end_point + \")����Ƃ��āA��\"+ width +\"����\"+ height +\"�̎l�p�`\");\r\n\t}", "public Point getLabelPosition();", "private float drawText ( \r\n\t String text,\r\n\t Graphics2D g2\r\n\t )\r\n\t{\n\t\tif ( ( text == null ) || text.equals ( \"\" ) )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tif ( horizontalLocationOfRelation <= 0 )\r\n\t\t{\r\n\t\t\treturn 0;\r\n\t\t}\r\n\r\n\t\tTextLayout tl = new TextLayout( text, SYMBOL_FONT, FONT_RENDER_CTXT );\r\n\t\tRectangle2D.Float bound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\t//Util.info(\"bound = \" + bound);\r\n\t\tfloat xAdjustment = bound.width / 2.0f;\r\n\r\n\t\t//int yAdjustment = ( int ) ( bound.height / 2.0f );\r\n\t\ttl.draw ( \r\n\t\t g2,\r\n\t\t horizontalLocationOfRelation + xAdjustment,\r\n\t\t vertLocationOfLine - WORM_LINE_THICKNESS - 1 - SYMBOL_LINE_LENGTH\r\n\t\t );\r\n\r\n\t\t//tl.draw(g2, 100.0f, 100.0f);\r\n\t\t//return bound.height;\r\n\t\ttl = new TextLayout( text, NUMBER_FONT, FONT_RENDER_CTXT );\r\n\t\tbound = ( Rectangle2D.Float ) tl.getBounds ( );\r\n\r\n\t\t//Util.info(\"bound = \" + bound);\r\n\t\treturn bound.width;\r\n\t}", "@Override\n public int drawString(String text, float x, float y, int color, boolean dropShadow) {\n super.enableAlpha();\n int textXPos;\n \n if (dropShadow) {\n drawNewString(color, true);\n textXPos = renderString(text, x + 1.0F, y + 1.0F, color, true);\n drawNewString(color, false);\n textXPos = Math.max(textXPos, renderString(text, x, y, color, false));\n } else {\n drawNewString(color, false);\n textXPos = renderString(text, x, y, color, false);\n }\n \n return textXPos;\n }", "private void drawTextMarker(Graphics g, String[] messages, int yLine, Player owner) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPixels() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[0], position0Inverted, owner, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(messages[1], position1NonInverted, owner, false));\n\t}", "public void setDrawString(int drawStringX, int drawStringY){\n this.drawStringX = drawStringX;\n this.drawStringY = drawStringY;\n }", "private void drawCenteredText(Canvas canvas, PointF loc, Paint paint, String text) {\n float width = paint.measureText(text) / 2;\n canvas.drawText(text, loc.x - width, loc.y, paint);\n }", "public GraphicsText(String text, float x, float y){\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n textColor = Color.BLACK;\r\n font = new Font(\"SanSerif\", Font.PLAIN, 14);\r\n }", "private void drawTextMarker(Graphics g, String message, int yLine) {\n\t\tint xCenter = getGameWidthPixels() / 2;\n\t\tVector2DLong position0Inverted = new Vector2DLong(xCenter, yLine),\n\t\t\t\tposition1NonInverted = new Vector2DLong(xCenter, getGameHeightPhysics() - yLine);\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position0Inverted, null, true));\n\t\tdrawScoreMarker(g, new ScoreMarker(message, position1NonInverted, null, false));\n\t}", "private void drawStringX(String s, int x, int y, Graphics g)\r\n {\r\n int strW = fm.stringWidth( s );\r\n int strH = 10; //right?\r\n g.drawString( s, x - strW/2, y + strH);\r\n }", "@Override\r\n\tprotected void paintComponent(Graphics g) {\n\t\tsuper.paintComponent(g);\r\n\t\tg.drawString(str, 10, 10);\r\n\t\tg.drawLine(10, 20, 110, 20);\r\n\t\tg.drawRect(pX, 30, 100, 100);\r\n\t\t\r\n\t}", "@Override\r\n\tprotected void draw(PGraphics pg) {\r\n\t\tif(font == null) {\r\n\t\t\tfont = rootContainer.getPApplet().createFont(\"Arial\", ((int)this.height * 0.8F));\r\n\t\t}\r\n\t\tpg.stroke(0);\r\n\t\tpg.strokeWeight(3);\r\n\t\tpg.noFill();\r\n\t\tif(activated == false) {\r\n\t\t}else {\r\n\t\t\tpg.line(x, y, x+height, y+height);\r\n\t\t\tpg.line(x+height, y, x, y+height);\r\n\t\t}\r\n\t\tpg.rect(x, y, height, height);\r\n\t\tpg.textAlign(PApplet.LEFT, PApplet.CENTER);\r\n\t\tpg.textFont(font);\r\n\t\tpg.fill(this.textColor.red, textColor.green, textColor.blue, textColor.alpha);\r\n\t\tpg.text(this.text, x+height+(height/2), y-3, width-height, height);\r\n\t}", "public void drawMultiLine(SpriteBatch batch, String text, float x, float y);", "@Override\n public void drawString(String str, int x, int y) {\n graphics.drawString(str, x, y - descent);\n if (bold) {\n graphics.drawString(str, x + 1, y - descent);\n }\n\n if (underline) {\n graphics.drawLine(x, y - 1, x + str.length() * char_width, y - 1);\n }\n\n }", "private void drawCenteredString(Graphics g2d, String text, Rectangle rect, Font font) {\r\n FontMetrics metrics = g2d.getFontMetrics(font);\r\n int x = rect.x + (rect.width - metrics.stringWidth(text)) / 2;\r\n int y = rect.y + ((rect.height - metrics.getHeight()) / 2) + metrics.getAscent();\r\n g2d.setFont(font);\r\n g2d.drawString(text, x, y);\r\n }", "private void drawPosition(Position pos, TextColor color, char c, boolean wide) {\n TextGraphics text = screen.newTextGraphics();\n text.setForegroundColor(color);\n text.putString(pos.getX() * 2, pos.getY() + 1, String.valueOf(c));\n\n if (wide) {\n text.putString(pos.getX() * 2 + 1, pos.getY() + 1, String.valueOf(c));\n }\n }", "@Override\n\tpublic void draw3dText(Vector3f location, String textString) {\n\n\t}", "public void drawMultiLine(SpriteBatch batch, String text, float x, float y, float alignWidth, HAlignment alignment);", "private void drawnPoints(Canvas canvas) {\n int height;\n String itemText;\n Paint temporaryPaint;\n Rect textBound;\n\n // TODO refactor left and right to avoid duplicated code\n if (left.size() > 0) {\n height = HEIGHT / left.size();\n for (int i = 0; i < left.size(); i++) {\n Object item = left.get(i);\n\n Bitmap itemBitmap = adapter.getNotNullBitmap(item);\n itemText = adapter.getLabel(item);\n temporaryPaint = adapter.getLabelPaint(item);\n textBound = new Rect();\n float textMaxWidth = getMaximumWidth(itemText, temporaryPaint);\n temporaryPaint.getTextBounds(itemText, 0, itemText.length() - 1, textBound);\n\n if (item != null) {\n PointF location = getLocation(item);\n\n int positionY = (height / 2) + (height * i);\n\n\n float itemHeight = itemBitmap.getHeight() / (scaleToBackground ? ratio : 1);\n float itemWidth = itemBitmap.getWidth() / (scaleToBackground ? ratio : 1);\n\n labelClickable.put(drawText(canvas, temporaryPaint, 0, positionY, itemText, true), item);\n\n PointF anchor = adapter.getAnchor(item);\n canvas.drawLine(\n textMaxWidth + TEXT_MARGIN,\n positionY - (textBound.height() / 2),\n location.x + (itemWidth * anchor.x) - (itemWidth / 2),\n location.y + (itemHeight * anchor.y) - (itemHeight / 2),\n adapter.getLinePaint(item));\n }\n }\n }\n if (right.size() > 0) {\n height = HEIGHT / right.size();\n for (int i = 0; i < right.size(); i++) {\n Object item = right.get(i);\n\n itemText = adapter.getLabel(item);\n textBound = new Rect();\n\n temporaryPaint = adapter.getLabelPaint(item);\n\n temporaryPaint.getTextBounds(itemText, 0, itemText.length() - 1, textBound);\n\n\n if (item != null) {\n PointF location = getLocation(item);\n\n int positionY = (height / 2) + (height * i);\n\n\n Rect rect = drawText(canvas, temporaryPaint, WIDTH, positionY, itemText, false);\n labelClickable.put(rect, item);\n drawLine(canvas, textBound, item, location, positionY, rect.width());\n }\n }\n }\n }", "public void drawText(Font theFont, String str, int x, int y)\r\n\t{\n\t\tFont ft = g.getFont();\r\n\r\n\t\tg.setFont(theFont);\r\n\r\n\t\t// @@@ IM ignore the WMFGraphics method, since it relies on JDK1.2 code\r\n\t\t// (AttributedIterator)\r\n\t\t// g.drawString(str, x, y);\r\n\t\twmf.textOut(x, y, str);\r\n\r\n\t\t// restore the font\r\n\t\tg.setFont(ft);\r\n\t\tif (DEBUG_OUTPUT)\r\n\t\t\tMWC.Utilities.Errors.Trace.trace(\"drawText\");\r\n\t}", "private void drawCenteredString(Graphics g, String text, Rectangle rect, Font font) {\n // Get the FontMetrics\n FontMetrics metrics = g.getFontMetrics(font);\n // Determine the X coordinate for the text\n int x = (rect.width - metrics.stringWidth(text)) / 2;\n // Determine the Y coordinate for the text (note we add the ascent, as\n // in java 2d 0 is top of the screen)\n int y = ((rect.height - metrics.getHeight()) / 2) + metrics.getAscent();\n // Set the font\n g.setFont(font);\n // Draw the String\n g.drawString(text, x, y);\n }", "private void drawText(Graphics2D g2, String text, String fontName) {\n\n int fontSize = Math.round(getHeight() * factor);\n\n Font baseFont = new Font(fontName, Font.PLAIN, fontSize);\n Font font = baseFont.deriveFont(attr);\n\n GlyphVector gv = font.createGlyphVector(frc, text);\n Rectangle pixelBounds = gv.getPixelBounds(frc, 0, 0);\n\n int centerX = getWidth() / 2;\n int centerY = getHeight() / 2;\n\n float offsetX = pixelBounds.x + (pixelBounds.width / 2);\n float offsetY = pixelBounds.y + (pixelBounds.height / 2);\n\n AffineTransform at = new AffineTransform();\n at.translate(centerX - offsetX, centerY - offsetY);\n Shape outline = gv.getOutline();\n outline = at.createTransformedShape(outline);\n g2.fill(outline);\n }", "public void drawBitmapText(Canvas c)\r\n\t{\r\n c.drawBitmap(frames[this.getcurrentFrame()], this.getX(),this.getY(),null);\r\n\tc.drawText(this.text, this.getX()+this.getWidth()+10,this.getY()+this.getHeight()+10, this.p);\t\r\n\t}", "public String toString(){\n\t\treturn topleft.x + \",\"+topleft.y+\",\"+bottomright.x+\",\"+bottomright.y;\n\t}", "private void drawText(Canvas canvas, char[] src, int index, int count, float offX, float offY){\n int end = index + count;\n int st = index;\n for(int i = index;i < end;i++) {\n if(src[i] == '\\t') {\n canvas.drawText(src,st,i - st,offX,offY,mPaint);\n offX = offX + measureText(src,st,i - st + 1);\n st = i + 1;\n }\n }\n if(st < end) {\n canvas.drawText(src,st,end - st,offX,offY,mPaint);\n }\n }", "@Override\n\tprotected void draw() {\n\t\tif(p != null) {\n\t\t\tp.pushStyle();\n\t\t\tp.noStroke();\n\t\t\tp.textAlign(PApplet.CENTER,PApplet.CENTER);\n\t\t\tp.textSize(12);\n\t\t\tif(this.isPressed) {\n\t\t\t\tp.fill(122, 138, 153);\n\t\t\t\tp.rect(x,y,width,height);\n\t\t\t\tp.fill(181, 206, 228);\n\t\t\t\tp.rect(x+2,y+2,width-4,height-4);\n\t\t\t\tp.fill(Color.BLACK.getRGB());\n\t\t\t\tp.text(text, x, y,width,height);\n\t\t\t}else {\n\t\t\t\tif(this.isHovered) {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+2,y+2,width-5,height-5,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}else {\n\t\t\t\t\tthis.p.fill(122, 138, 153);\n\t\t\t\t\tthis.p.rect(x, y, width, height);\n\t\t\t\t\tsetGradient(x+1,y+1,width-3,height-3,new Color(255,255,255),new Color(190, 211, 231));\n\t\t\t\t\tthis.p.fill(Color.BLACK.getRGB());\n\t\t\t\t\tthis.p.text(text, x, y,width,height);\n\t\t\t\t}\n\t\t\t}\n\t\t\tp.popStyle();\n\t\t}\n\t}", "String getPosY();", "private void drawNumber(Font f,String s,int x,int y){\r\n // finds width of the string when drawn\r\n FontMetrics metrics=g.getFontMetrics(f);\r\n int n=(int)metrics.stringWidth(s); \r\n g.drawString(s,x-n/2,y); \r\n \r\n }", "public void setOrigin(){\n // draw X-axis\n graphics2D.draw(new Line2D.Double(leftMiddle, rightMiddle));\n\n // draw string \"+X\" and \"-X\"\n graphics2D.drawString(\"+X\", (int) rightMiddle.getX() - 10, (int) rightMiddle.getY() - 5);\n graphics2D.drawString(\"-X\", (int) leftMiddle.getX() + 10, (int) leftMiddle.getY() + 10);\n\n // draw Y-axis\n graphics2D.draw(new Line2D.Double(topMiddle, bottomMiddle));\n\n // draw string \"+Y\" and \"-Y\"\n graphics2D.drawString(\"+Y\", (int) topMiddle.getX() + 5, (int) topMiddle.getY() + 10);\n graphics2D.drawString(\"-Y\", (int) bottomMiddle.getX() - 15, (int) bottomMiddle.getY());\n\n }", "public void fillString(float x, float y, String text);", "private void drawScoreText(Canvas canvas) {\n paint.setTextSize(bodyTextSize);\n paint.setTextAlign(Paint.Align.CENTER);\n\n int bodyWidthHighScore = (int) (paint.measureText(\"\" + game.highScore));\n int bodyWidthScore = (int) (paint.measureText(\"\" + game.score));\n\n int textWidthHighScore = Math.max(titleWidthHighScore, bodyWidthHighScore) + textPaddingSize * 2;\n int textWidthScore = Math.max(titleWidthScore, bodyWidthScore) + textPaddingSize * 2;\n\n int textMiddleHighScore = textWidthHighScore / 2;\n int textMiddleScore = textWidthScore / 2;\n\n int eXHighScore = endingX;\n int sXHighScore = eXHighScore - textWidthHighScore;\n\n int eXScore = sXHighScore - textPaddingSize;\n int sXScore = eXScore - textWidthScore;\n\n //Outputting high-scores box\n backgroundRectangle.setBounds(sXHighScore, sYAll, eXHighScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.high_score), sXHighScore + textMiddleHighScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.highScore), sXHighScore + textMiddleHighScore, bodyStartYAll, paint);\n\n\n //Outputting scores box\n backgroundRectangle.setBounds(sXScore, sYAll, eXScore, eYAll);\n backgroundRectangle.draw(canvas);\n paint.setTextSize(titleTextSize);\n paint.setColor(getResources().getColor(R.color.text_brown));\n canvas.drawText(getResources().getString(R.string.score), sXScore + textMiddleScore, titleStartYAll, paint);\n paint.setTextSize(bodyTextSize);\n paint.setColor(getResources().getColor(R.color.text_white));\n canvas.drawText(String.valueOf(game.score), sXScore + textMiddleScore, bodyStartYAll, paint);\n }", "public void drawText(final String text, final int xPos, final int yPos, final Color color){\n font.setColor(Color.BLACK);\n font.setScale(0.51f);\n batch.begin();\n setDrawmode(GL10.GL_MODULATE);\n font.drawMultiLine(batch, text, xPos, yPos);\n batch.end();\n \n font.setColor(Color.WHITE);\n font.setScale(0.5f);\n batch.begin();\n font.drawMultiLine(batch, text, xPos, yPos);\n batch.end();\n font.setScale(1f);\n }", "private void drawText(Graphics2D g2)\n\t{\n\t\tfinal int PADDING = 5;\n\t\tfinal Rectangle bounds = getBounds();\n\t\tfinal String[] texts = getText().split(\"\\\\ \");\n\n\t\tfinal Font effectiveFont = font.deriveFont(font.getSize() * parent.getZoom());\n\n\t\tfinal FontMetrics metrics = g2.getFontMetrics(effectiveFont);\n\n\t\tfinal int hgt = metrics.getHeight();\n\t\tint adv, offsetY = bounds.y + PADDING + hgt, offsetX = PADDING;\n\t\tg2.setFont(effectiveFont);\n\n\t\tfor (final String text2 : texts)\n\t\t{\n\t\t\tfinal String currentText = text2 + \" \";\n\t\t\tadv = metrics.stringWidth(currentText);\n\n\t\t\tif (offsetX + adv > bounds.width - PADDING * 2)\n\t\t\t{\n\t\t\t\toffsetY += hgt; // new line\n\t\t\t\toffsetX = PADDING;\n\t\t\t}\n\n\t\t\tg2.drawString(currentText, bounds.x + offsetX, offsetY);\n\t\t\toffsetX += adv;\n\t\t}\n\t}", "public Point2D.Double getTextCenter() {\n\t\treturn new Point2D.Double(_parent.getTxtLocPinX(), _parent.getTxtLocPinY());\n\t}", "protected void drawCenterString(String s,int y,Graphics g,Font font){\n Dimension size = getSize();\n FontMetrics metrics = g.getFontMetrics(font);\n int x = (size.width - metrics.stringWidth(s))/2;\n g.setFont(font);\n g.drawString(s,x,y - (properties.buttonHeight - metrics.getHeight())/2);\n\n }", "private void drawString( Graphics2D g2, String str, Point2D.Double p, Color colour )\r\n {\r\n double x = translateX( p.getX() );\r\n double y = translateY( p.getY() );\r\n \r\n Font f = g2.getFont().deriveFont( FONT_SIZE );\r\n g2.setFont( f );\r\n \r\n g2.setColor( colour );\r\n g2.drawString( str, (float)x, (float)y );\r\n }", "private void drawText(final String translationKey, Object...parameters) {\n\t\tfinal String[] translated = new TranslationTextComponent(translationKey, parameters).getFormattedText().split(\"\\\\n\");\n\t\tint totalHeight = 0;\n\t\tfor(final String line : translated) {\n\t\t\ttotalHeight += this.font.getWordWrappedHeight(line, TEXT_WIDTH);\n\t\t}\n\t\t\n\t\t// determine the scale required to fit all lines inside the box (0.5 or 1.0)\n\t\tfloat scale = (totalHeight > TEXT_HEIGHT * 0.9F) ? 0.5F : 1.0F;\n\t\t// scale everything as needed\n\t\tGlStateManager.pushMatrix();\n\t\tGlStateManager.scalef(scale, scale, scale);\n\t\t// draw the translated text lines in the box with the appropriate scale\n\t\tint offsetY = 0;\n\t\tfor(int stanzaNum = 0, numStanzas = translated.length; stanzaNum < numStanzas; stanzaNum++) {\n\t\t\t// get the current stanza (may take up multiple lines on its own)\n\t\t\tfinal String stanza = translated[stanzaNum];\n\t\t\t// determine where to start the stanza\n\t\t\tint startX = (int) ((BG_START_X + TEXT_START_X) / scale);\n\t\t\tint startY = (int) ((BG_START_Y + TEXT_START_Y) / scale) + offsetY;\n\t\t\t// draw split (wrapped) stanza\n\t\t\tthis.font.drawSplitString(stanza, startX, startY, (int)(TEXT_WIDTH / scale), 0);\n\t\t\toffsetY += this.font.getWordWrappedHeight(stanza, (int)(TEXT_WIDTH / scale)) / scale;\n\t\t}\n\t\t// unscale text\n\t\tGlStateManager.popMatrix();\n\t}", "protected void drawHoveringText( List<String> descriptionLines, int posX, int posY, FontRenderer fontrenderer )\n\t{\n\t\tif( !descriptionLines.isEmpty() )\n\t\t{\n\t\t\tGL11.glDisable( GL_RESCALE_NORMAL );\n\n\t\t\tGL11.glDisable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glDisable( GL11.GL_DEPTH_TEST );\n\n\t\t\tint maxStringLength = 0;\n\n\t\t\tfor( String string : descriptionLines )\n\t\t\t{\n\n\t\t\t\tint stringLen = fontrenderer.getStringWidth( string );\n\n\t\t\t\tif( stringLen > maxStringLength )\n\t\t\t\t{\n\t\t\t\t\tmaxStringLength = stringLen;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint offsetX = posX + 12;\n\n\t\t\tint offsetY = posY - 12;\n\n\t\t\tint tooltipHeight = 8;\n\n\t\t\tif( descriptionLines.size() > 1 )\n\t\t\t{\n\t\t\t\ttooltipHeight += 2 + ( ( descriptionLines.size() - 1 ) * 10 );\n\t\t\t}\n\n\t\t\tthis.zLevel = 300.0F;\n\n\t\t\tint drawColor = 0xF0100010;\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 4, offsetX + maxStringLength + 3, offsetY - 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 4, drawColor,\n\t\t\t\tdrawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 4, offsetY - 3, offsetX - 3, offsetY + tooltipHeight + 3, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 3, offsetY - 3, offsetX + maxStringLength + 4, offsetY + tooltipHeight + 3, drawColor,\n\t\t\t\tdrawColor );\n\n\t\t\tdrawColor = 0x505000FF;\n\t\t\tint fadeColor = ( ( drawColor & 0xFEFEFE ) >> 1 ) | ( drawColor & 0xFF000000 );\n\t\t\tthis.drawGradientRect( offsetX - 3, ( offsetY - 3 ) + 1, ( offsetX - 3 ) + 1, ( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX + maxStringLength + 2, ( offsetY - 3 ) + 1, offsetX + maxStringLength + 3,\n\t\t\t\t( offsetY + tooltipHeight + 3 ) - 1, drawColor, fadeColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY - 3, offsetX + maxStringLength + 3, ( offsetY - 3 ) + 1, drawColor, drawColor );\n\t\t\tthis.drawGradientRect( offsetX - 3, offsetY + tooltipHeight + 2, offsetX + maxStringLength + 3, offsetY + tooltipHeight + 3, fadeColor,\n\t\t\t\tfadeColor );\n\n\t\t\tfor( int descriptionIndex = 0; descriptionIndex < descriptionLines.size(); descriptionIndex++ )\n\t\t\t{\n\t\t\t\tString s1 = descriptionLines.get( descriptionIndex );\n\t\t\t\tfontrenderer.drawStringWithShadow( s1, offsetX, offsetY, -1 );\n\t\t\t\tif( descriptionIndex == 0 )\n\t\t\t\t{\n\t\t\t\t\toffsetY += 2;\n\t\t\t\t}\n\t\t\t\toffsetY += 10;\n\t\t\t}\n\t\t\tthis.zLevel = 0.0F;\n\n\t\t\tGL11.glEnable( GL11.GL_LIGHTING );\n\n\t\t\tGL11.glEnable( GL11.GL_DEPTH_TEST );\n\n\t\t\tGL11.glEnable( GL_RESCALE_NORMAL );\n\t\t}\n\t}", "public final void drawHoveringText(Minecraft mc, List<String> textLines, int x, int y)\n\t{\n\t\tif (!textLines.isEmpty())\n\t\t{\n\t\t\tGlStateManager.disableRescaleNormal();\n\t\t\tGlStateManager.disableDepth();\n\t\t\tint i = 0;\n\n\t\t\tfor (String s : textLines)\n\t\t\t{\n\t\t\t\tint j = mc.fontRendererObj.getStringWidth(s);\n\n\t\t\t\tif (j > i)\n\t\t\t\t{\n\t\t\t\t\ti = j;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\tint l1 = x + 12;\n\t\t\tint i2 = y - 12;\n\t\t\tint k = 8;\n\n\t\t\tif (textLines.size() > 1)\n\t\t\t{\n\t\t\t\tk += 2 + (textLines.size() - 1) * 10;\n\t\t\t}\n\n\t\t\tif (l1 + i > guiScreenParent.width)\n\t\t\t{\n\t\t\t\tl1 -= 28 + i;\n\t\t\t}\n\n\t\t\tif (i2 + k + 6 > guiScreenParent.height)\n\t\t\t{\n\t\t\t\ti2 = guiScreenParent.height - k - 6;\n\t\t\t}\n\n\t\t\tthis.zLevel = 300.0F;\n\t\t\tint l = -267386864;\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 4, l1 + i + 3, i2 - 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 + k + 3, l1 + i + 3, i2 + k + 4, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3, l1 + i + 3, i2 + k + 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 - 4, i2 - 3, l1 - 3, i2 + k + 3, -267386864, -267386864);\n\t\t\tthis.drawGradientRect(l1 + i + 3, i2 - 3, l1 + i + 4, i2 + k + 3, -267386864, -267386864);\n\t\t\tint i1 = 1347420415;\n\t\t\tint j1 = 1344798847;\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3 + 1, l1 - 3 + 1, i2 + k + 3 - 1, 1347420415, 1344798847);\n\t\t\tthis.drawGradientRect(l1 + i + 2, i2 - 3 + 1, l1 + i + 3, i2 + k + 3 - 1, 1347420415, 1344798847);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 - 3, l1 + i + 3, i2 - 3 + 1, 1347420415, 1347420415);\n\t\t\tthis.drawGradientRect(l1 - 3, i2 + k + 2, l1 + i + 3, i2 + k + 3, 1344798847, 1344798847);\n\n\t\t\tfor (int k1 = 0; k1 < textLines.size(); ++k1)\n\t\t\t{\n\t\t\t\tString s1 = textLines.get(k1);\n\t\t\t\tmc.fontRendererObj.drawStringWithShadow(s1, (float)l1, (float)i2, -1);\n\n\t\t\t\tif (k1 == 0)\n\t\t\t\t{\n\t\t\t\t\ti2 += 2;\n\t\t\t\t}\n\n\t\t\t\ti2 += 10;\n\t\t\t}\n\n\t\t\tthis.zLevel = 0.0F;\n\t\t\tGlStateManager.enableDepth();\n\t\t\tGlStateManager.enableRescaleNormal();\n\t\t}\n\t}", "public void draw(GL2 gl)\r\n\t{\r\n\t\tdouble width = menu.getController().getWidth(), height = menu.getController().getHeight();\r\n\t\ttextRenderer.beginRendering((int)width, (int)height);\r\n\t\tif (mouseInBounds())\r\n\t\t\ttextRenderer.setColor(1f, 1f, 0f, 1f);\r\n\t\telse\r\n\t\t\ttextRenderer.setColor(1f, 1f, 1f, 1f);\r\n\t\tif (align == 0)\r\n\t\t\tdrawStringLeft(textRenderer, message, (int)(width*x), (int)(height*y));\r\n\t\tif (align == 1)\r\n\t\t\tdrawStringCenter(textRenderer, message, (int)(width*x), (int)(height*y));\r\n\t\tif (align == 2)\r\n\t\t\tdrawStringRight(textRenderer, message, (int)(width*x), (int)(height*y));\r\n\t\ttextRenderer.endRendering();\r\n\t}", "private static void drawText(Canvas canvas, String text, int left, int top, int width, int maxWidth, Paint paint)\n\t{\n\t\tcanvas.save();\n\t\tint offset = Math.max(0, maxWidth - width) / 2;\n\t\tcanvas.clipRect(left, top, left + maxWidth, top + paint.getTextSize() * 2);\n\t\tcanvas.drawText(text, left + offset, top - paint.ascent(), paint);\n\t\tcanvas.restore();\n\t}", "@Override\n\tprotected void onDraw(Canvas canvas) {\n\t\tsuper.onDraw(canvas);\n\t\tint w = getMeasuredWidth();\n\t\tint h = getMeasuredHeight();\n\t\tint h1 = h/letter.length;\n\t\tLog.e(\"huang\", \"w:\"+w+\" h:\"+h);\n\t\t\n\t\tPaint paint = new Paint();\n\t\tpaint.setTextSize(12);\n\t\tpaint.setStyle(Style.FILL);\t\t\n\t\tpaint.setTextAlign(Align.CENTER);\n\t\tpaint.setColor(color);\n\t\tfor(int t=0; t<27; ++t){\n\t\t\tif(t==0){\n\t\t\t\tcanvas.drawBitmap(bm, w/2-20, h1*t+h1/2-10, paint);\n\t\t\t} else {\n\t\t\t\tString temp = String.valueOf(letter[t]);\n\t\t\t\tcanvas.drawText(temp, w/2-8, h1/2+h1*t, paint);\n\t\t\t}\n\t\t}\n\t\t\n\t}", "public int getTextPosition() {\r\n return TextPosition;\r\n }", "@Override\n public int drawString(String text, int x, int y, int color) {\n return this.drawString(text, x, y, color, false);\n }", "public void setTextBaseline(TEXT_BASELINE baseline);", "protected int drawSelectedText(Graphics g, int x, int y, int p0, int p1) throws BadLocationException {\n g.setColor(selected);\n Container c = getContainer();\n if (c instanceof JPasswordField) {\n JPasswordField f = (JPasswordField) c;\n if (!f.echoCharIsSet()) {\n return super.drawSelectedText(g, x, y, p0, p1);\n }\n char echoChar = f.getEchoChar();\n int n = p1 - p0;\n for (int i = 0; i < n; i++) {\n x = drawEchoCharacter(g, x, y, echoChar);\n }\n }\n return x;\n }", "public void displayText() {\n\n // Draws the border on the slideshow aswell as the text\n image(border, slideshowPosX - borderDisplace, textPosY - textMargin - borderDisplace);\n\n // color of text background\n fill(textBackground);\n\n //background for text\n rect(textPosX - textMargin, textPosY - textMargin, textSizeWidth + textMargin * 2, textSizeHeight + textMargin * 2);\n\n //draw text\n image(texts[scene], textPosX, textPosY, textSizeWidth, textSizeHeight, 0, 0 + scrolled, texts[scene].width, textSizeHeight + scrolled);\n }", "public String toString(){\n return (\"TextShape \"+x+\" \"+y+\" \"+col.getRed()+\" \"+col.getGreen()+\" \"+col.getBlue()+\" \"+str);\n }", "@Override\n public void draw(PApplet pApplet) {\n // Setzt die dicke der Aussenlinien auf 1px\n pApplet.strokeWeight(1);\n // Setz die Füllfarbe\n pApplet.fill(235);\n pApplet.rect(x, y, width, height);\n // Setz die Füllfarbe\n pApplet.fill(0);\n // Setzt das Verhalten der Methode pApplet.text()\n pApplet.textAlign(PConstants.CENTER, PConstants.CENTER);\n pApplet.text(text, x + width / 2, y + height / 2);\n }", "private void addText(Graphics g, Font font, Color frontColor, Rectangle rectangle, Color backColor, String str, int xPos, int yPos) {\n g.setFont(font);\n g.setColor(frontColor);\n if (rectangle != null) {\n g.drawRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(backColor);\n if (rectangle != null) {\n g.fillRect(rectangle.x, rectangle.y, rectangle.width, rectangle.height);\n }\n g.setColor(frontColor);\n g.drawString(str, xPos, yPos);\n }", "public void draw(Graphics2D gc){\r\n\r\n Font curFont = gc.getFont();\r\n gc.setFont(font);\r\n Paint curColor = gc.getPaint();\r\n gc.setPaint(textColor);\r\n //gc.drawString(text, x, y); // This would look better but doesn't seem to work with hit testing.\r\n\r\n FontRenderContext frc = gc.getFontRenderContext();\r\n TextLayout textLayout = new TextLayout(text, font, frc);\r\n AffineTransform moveTo = AffineTransform.getTranslateInstance(x, y);\r\n textShape = textLayout.getOutline(moveTo);\r\n gc.fill(textShape);\r\n gc.setFont(curFont);\r\n gc.setPaint(curColor);\r\n }", "void draw(Annotation annotation, GC gc, StyledText textWidget, int offset, int length, Color color);", "@Override\n\tpublic void paint(Graphics e) {\n\t\tsuper.paint(e);\n\t\te.drawString(text, 20, 20);\n\t}", "public void draw() {\n\t\tGL11.glColor3f(0.5f,0.5f,1.0f);\n\t\n\t\t// draw quad\n\t\tGL11.glBegin(GL11.GL_QUADS);\n\t\t\tGL11.glVertex2f(x,y);\n\t\t\tGL11.glVertex2f(x+width,y);\n\t\t\tGL11.glVertex2f(x+width,y+height);\n\t\t\tGL11.glVertex2f(x,y+height);\n\t\tGL11.glEnd();\n\t\t\n\t\tif(text != null || !text.equals(\"\"))\n\t\t\tfont.drawString(text, x, y);\n\t\n\t}", "private void drawCenteredString(String text, float x, float y, int color)\n {\n this.getFontRenderer().drawStringWithShadow(text, (x - this.getFontRenderer().getStringWidth(text) / 2), y, color);\n }", "public void drawNoticeText(int h){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,15); \r\n g.setColor(Color.red);\r\n g.setFont(font);\r\n String t=\"NOTE: All players cannot be on the same team.\";\r\n g.drawString(t,50,265);\r\n t=\"Use WASD to move.\";\r\n g.drawString(t,50,48); \r\n t=\"Press SPACE on the Start Button to Begin!\";\r\n g.drawString(t,120,h-5); \r\n \r\n font=new Font(\"SanSerif\",Font.BOLD,40); \r\n g.setColor(Color.black);\r\n g.setFont(font); \r\n t=\"Settings\";\r\n g.drawString(t,330,40); \r\n }", "public Text(int x, int y, String text, int size) {\r\n this.x = x;\r\n this.y = y;\r\n this.text = text;\r\n this.font = Font.SANS_SERIF;\r\n this.size = size;\r\n \r\n }", "public static final void drawBitmapString( SpriteBatch batch, String str, float x, float y, LibAnchor ank, float alpha )\n {\n int frame = 0;\n int frameWidth = NUMBERS.getImage().getFrameWidth();\n int stringWidth = ( str.length() * frameWidth );\n float drawX = x;\n float drawY = y;\n\n //consider anchor\n switch( ank )\n {\n case ELeftTop: { drawX -= 0; drawY -= 0; break; }\n case ECenterTop: { drawX -= stringWidth / 2; drawY -= 0; break; }\n case ERightTop: { drawX -= stringWidth; drawY -= 0; break; }\n case ELeftMiddle: { drawX -= 0; drawY -= NUMBERS.getImage().getTotalHeight() / 2; break; }\n case ECenterMiddle: { drawX -= stringWidth / 2; drawY -= NUMBERS.getImage().getTotalHeight() / 2; break; }\n case ERightMiddle: { drawX -= stringWidth; drawY -= NUMBERS.getImage().getTotalHeight() / 2; break; }\n case ELeftBottom: { drawX -= 0; drawY -= NUMBERS.getImage().getTotalHeight(); break; }\n case ECenterBottom: { drawX -= stringWidth / 2; drawY -= NUMBERS.getImage().getTotalHeight(); break; }\n case ERightBottom: { drawX -= stringWidth; drawY -= NUMBERS.getImage().getTotalHeight(); break; }\n }\n\n //browse all chars\n for ( int i = 0; i < str.length(); ++i )\n {\n switch ( str.charAt( i ) )\n {\n case ' ': frame = -1; break;\n case '%': frame = 10; break;\n default: frame = 0 + Integer.parseInt( String.valueOf( str.charAt( i ) ) ); break;\n }\n\n //draw frame if desired\n if ( frame == -1 )\n {\n drawX += frameWidth / 2;\n }\n else\n {\n NUMBERS.setCurrentFrameIndex( frame );\n NUMBERS.draw\n (\n batch,\n drawX,\n drawY,\n LibAnchor.ELeftTop,\n alpha,\n false,\n LibUI.SCALATION_NONE,\n LibUI.SCALATION_NONE,\n LibUI.ROTATION_NONE\n );\n\n drawX += frameWidth;\n }\n }\n }", "public void drawIconText(Graphics g, int mouseX, int mouseY) {\n super.drawIconText(g, mouseX, mouseY);\n\n if (!isEmpty()) {\n Icon intent = enemy.getIntent();\n if (intent.getBoundingBox().contains(mouseX, mouseY)) {\n intent.drawText(g, 25, 0, 150);\n }\n }\n }", "private void drawDistanceText(float[] fishPosition, float[] fishRotation) {\n\t\t//Draw distance texts\n\t\tgl.glColor3f(0.0f, 0.0f, 0.0f);\n\t\t//Draw X text\n\t\t\tgl.glRasterPos3f(fishPosition[0]/2,0.002f,fishPosition[2]);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, fishPosition[0]+\"\");\n\t\t\tgl.glEnd();\n\t\t//Draw Y text\n\t\t\tgl.glRasterPos3f(fishPosition[0]-0.002f,fishPosition[1]/2,fishPosition[2]-0.002f);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, fishPosition[1]+\"\");\n\t\t\tgl.glEnd();\n\t\t//Draw Z text\n\t\t\tgl.glRasterPos3f(fishPosition[0],0.002f,fishPosition[2]/2);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, fishPosition[2]+\"\");\n\t\t\tgl.glEnd();\n\t\t//Draw Angle text\n\t\t\tgl.glRasterPos3f(fishPosition[0],fishPosition[1]+0.06f,fishPosition[2]);\n\t\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, \"Rotation: \"+fishRotation[0]+\" °\");\n\t\t\tgl.glEnd();\n\t\t\t\n\t\t//Draw text of distance from 0,0,0 to fish\n\t\tfloat distanceBetween = (float)Math.sqrt((Math.pow((fishPosition[0]-0f), 2f))+(Math.pow((fishPosition[1]-0f), 2f))+(Math.pow((fishPosition[2]-0f), 2f)));\n\t\tgl.glRasterPos3f(fishPosition[0]/2, fishPosition[1]/2, fishPosition[2]/2);\n\t\tglut.glutBitmapString(GLUT.BITMAP_HELVETICA_10, distanceBetween+\"\");\n\t\tgl.glEnd();\n\t}", "@Override\n public void updateDrawState(TextPaint ds) {\n }", "public void cbDisplayPointText()\n {\n \tif (!m_white.wasSuccess()) \n \t return;\n \n \tString str = m_white.getResponse();\n Vector<Pair<String, String> > pairs = \n StringUtils.parseStringPairList(str);\n \n m_guiboard.clearMarks();\n \n for (int i=0; i<pairs.size(); i++) {\n \t HexPoint point = HexPoint.get(pairs.get(i).first);\n String value = pairs.get(i).second;\n m_guiboard.setText(point, value);\n \t}\n \tm_guiboard.repaint();\n }", "private void drawTextBySpans(Canvas canvas, float offsetX, TextColorProvider.TextColors colors){\n mPaint.setTypeface(mTypefaceText);\n ColorScheme cs = mColors;\n List<Span> spans = colors.getSpans();\n int first = getFirstVisibleLine();\n int last = getLastVisibleLine();\n int index = 0,copy;\n if(mMinModifiedLine != -1 && mMinModifiedLine <= first) {\n index = binarySearchByIndex(spans,mText.getCharIndex(first,0));\n drawTextBySpansModified(canvas,offsetX,first,last,index,spans);\n return;\n }\n for(int i = first;i <= last;i++){\n index = seekTo(spans, i, index);\n if(mMinModifiedLine != -1 && mMinModifiedLine <= i) {\n drawTextBySpansModified(canvas,offsetX,i,last,binarySearchByIndex(spans,mText.getCharIndex(i,0)),spans);\n break;\n }\n copy = index;\n float off = offsetX;\n prepareLine(i);\n float y = getLineBaseLine(i) - getOffsetY();\n try{\n while(true){\n Span span = spans.get(copy),next = null;\n if(copy + 1 < spans.size()){\n next = spans.get(copy + 1);\n }\n int st = span.getLine() == i ? span.getColumn() : 0;\n int ed = next == null ? mText.getColumnCount(i) : (next.getLine() == i ? next.getColumn() : mText.getColumnCount(i));\n float width = measureText(mChars, st, ed - st);\n if(off + width > 0 && off < getWidth()) {\n mPaint.setColor(cs.getColor(span.colorId));\n drawText(canvas, mChars, st, ed - st, off, y);\n if(span.colorId == ColorScheme.HEX_COLOR) {\n int color = parseColor(st,ed);\n mRect.bottom = getLineBottom(i) - getOffsetY() - mDpUnit * 1;\n mRect.top = mRect.bottom - mDpUnit * 4;\n mRect.left = off;\n mRect.right = off + width;\n drawColor(canvas,color,mRect);\n }\n }\n off += width;\n if(off - offsetX > mMaxPaintX){\n mMaxPaintX = off - offsetX;\n }\n if(next == null || next.getLine() != i){\n break;\n }\n copy++;\n }\n }catch(IndexOutOfBoundsException e){\n drawTextDirect(canvas, offsetX, mColors.getColor(ColorScheme.TEXT_NORMAL), i);\n break;\n }\n }\n }", "private void drawLeftColoumnText(SettingsClass s){\r\n Font font=new Font(\"SanSerif\",Font.BOLD,40);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n\r\n g.drawString(\"Players\",50,40+50*1);\r\n g.drawString(\"Match Point\",50,40+50*2);\r\n g.drawString(\"Time Limit\",50,40+50*3);\r\n g.drawString(\"Sudden Death\",50,40+50*4);\r\n \r\n // draws player numbers\r\n font=new Font(\"SanSerif\",Font.BOLD,30);\r\n g.setColor(Color.black);\r\n g.setFont(font);\r\n for(int i=0;i<s.getNumPlayers();i++){\r\n String text=\"Player \"+(char)(i+1+'0');\r\n g.drawString(text,50,300+40*i); \r\n }\r\n }" ]
[ "0.7066903", "0.69960463", "0.6989962", "0.6989952", "0.6834045", "0.6771671", "0.6597867", "0.648986", "0.64773405", "0.64178526", "0.63838917", "0.6381443", "0.63617307", "0.6341382", "0.63344514", "0.63094544", "0.63007736", "0.6283077", "0.62687397", "0.62494165", "0.6245984", "0.62039065", "0.62020075", "0.61964154", "0.61841494", "0.61737466", "0.6170022", "0.6164326", "0.6162687", "0.6159665", "0.61484724", "0.6124704", "0.60916936", "0.60916114", "0.609063", "0.6083728", "0.6056576", "0.6055837", "0.60238063", "0.6010843", "0.5990659", "0.5990223", "0.5961065", "0.5956123", "0.5954324", "0.5929324", "0.59258777", "0.59232414", "0.59063977", "0.5905456", "0.59042513", "0.5899011", "0.58805233", "0.5872341", "0.5861587", "0.586", "0.58582926", "0.58574975", "0.5852963", "0.5844474", "0.58434105", "0.58385175", "0.5832345", "0.5816137", "0.5814323", "0.58074796", "0.5803855", "0.5800166", "0.5794631", "0.5793812", "0.57776767", "0.577208", "0.575427", "0.5753442", "0.5742232", "0.574166", "0.5732619", "0.5726391", "0.5720355", "0.5713173", "0.5706337", "0.57012266", "0.5700232", "0.57001615", "0.5690925", "0.5688316", "0.5688201", "0.56831", "0.5670483", "0.5668837", "0.5666967", "0.56617755", "0.56589174", "0.5656566", "0.56545347", "0.56452507", "0.56418556", "0.56365764", "0.56248975", "0.56206995", "0.56148016" ]
0.0
-1
Builds & send registration email with verification token
public void sendRegistrationEmail(User user, HttpServletRequest request) { try { VerificationToken token = new VerificationToken(user); verificationTokenRepo.save(token); String appUrl = request.getScheme() + Constants.SERVER_URL + "register/confirm/" + token.getToken(); UserDTO userDTO = new UserDTO(); userDTO.setFirstName(user.getFirstName()); userDTO.setUsername(user.getUsername()); // Build message body String subject = ""; String template = ""; Map<String, Object> modelObject = null; subject = Constants.REGISTRATIONSUBJECT; template = Constants.REGISTRATIONTEMPLATE; modelObject = ImmutableMap.of( "name", userDTO.getFirstName(), "appUrl", appUrl ); // Send email with required info sendMimeEmailWithFreemarker(subject, template, userDTO, modelObject); } catch (UnsupportedEncodingException | CannotSendEmailException | URISyntaxException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void sendMail(RegistrationData d) {}", "private void sendRegistrationToServer(String token) {\n String json =\"{'email' : '\"\n + device_id\n + \"' ,'firebase_token': '\" + token + \"'}\";\n\n try {\n JSONObject jObj = new JSONObject(json);\n responseId = doPostRequest(\"https://iot-api.herokuapp.com/users\", jObj.toString());\n } catch (IOException e) {\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }", "private void sendEmailVerification() {\n showProgressDialog();\n\n // [START send_email_verification]\n final FirebaseUser user = mAuth.getCurrentUser();\n assert user != null;\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // [START_EXCLUDE]\n // Re-enable button\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\n \"Verification email sent to \" + user.getEmail(),\n Toast.LENGTH_SHORT).show();\n } else {\n Log.e(TAG, \"sendEmailVerification\", task.getException());\n Toast.makeText(getApplicationContext(),\n \"Failed to send verification email.\",\n Toast.LENGTH_SHORT).show();\n }\n hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n // [END send_email_verification]\n }", "private void sendEmailVerification() {\n final FirebaseUser user = mAuth.getCurrentUser();\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // [START_EXCLUDE]\n // Re-enable button\n\n if (task.isSuccessful()) {\n Toast.makeText(LoginCombActivity.this,\n \"Verification email sent to \" + user.getEmail(),\n Toast.LENGTH_SHORT).show();\n } else {\n Log.e(TAG, \"sendEmailVerification\", task.getException());\n Toast.makeText(LoginCombActivity.this,\n \"Failed to send verification email.\",\n Toast.LENGTH_SHORT).show();\n }\n // [END_EXCLUDE]\n }\n });\n // [END send_email_verification]\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "private void sendRegistrationToServer(String token) {\n }", "public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }", "private void sendRegistrationRequestToServer() {\r\n\t\tnew ServerAsyncTask(ApplicationConstant.appurl\r\n\t\t\t\t+ ApplicationConstant.registrationRequestType + \"&userid=62\"\r\n\t\t\t\t+ \"&email=\" + emailAddress.getText().toString().trim()\r\n\t\t\t\t+ \"&firstname=\" + firstName.getText().toString().trim()\r\n\t\t\t\t+ \"&lastname=\" + lastName.getText().toString().trim()\r\n\t\t\t\t+ \"&password=\" + password.getText().toString().trim()\r\n\t\t\t\t+ \"&roles=1\" + \"access=20\", context, new ResponseCallback() {\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onSuccessRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage(\"Successfully register on app\");\r\n\t\t\t\tfinish();\r\n\t\t\t}\r\n\r\n\t\t\t@Override\r\n\t\t\tpublic void onErrorRecieve(Object object) {\r\n\r\n\t\t\t\tloadingProgress.setVisibility(View.GONE);\r\n\t\t\t\tshowToastMessage((String) object);\r\n\t\t\t}\r\n\t\t}, ApplicationConstant.registrationRequestType).execute();\r\n\r\n\t}", "private void sendEmailVerification(){\n FirebaseUser firebaseUser = mfirebaseAuth.getCurrentUser();\n if(firebaseUser!=null){\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(SignUpActivity.this, \"Successfully Registered, Verification E-mail sent!\", Toast.LENGTH_SHORT).show();\n mfirebaseAuth.signOut();\n finish();\n startActivity(new Intent(SignUpActivity.this, LoginActivity.class));\n }else {\n Toast.makeText(SignUpActivity.this, \"Verification email could not be sent, please try again later\", Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n\n }", "private void registration() {\n\t\tif (ur_name.getText().length() > 0 && email.getText().length() > 0\r\n\t\t\t\t&& pass.getText().length() > 0\r\n\t\t\t\t&& re_pass.getText().length() > 0) {\r\n\t\t\tif (pass.getText().toString()\r\n\t\t\t\t\t.equalsIgnoreCase(re_pass.getText().toString())) {\r\n\t\t\t\tString postEntity = \"user_name=\" + ur_name.getText().toString()\r\n\t\t\t\t\t\t+ \"&email=\" + email.getText().toString() + \"&password=\"\r\n\t\t\t\t\t\t+ pass.getText().toString() + \"&gcm_id=\"\r\n\t\t\t\t\t\t+ GlobalDeclares.getGcmId();\r\n\t\t\t\tnew ServerUtilities(getApplicationContext(),\r\n\t\t\t\t\t\tGlobalDeclares.NEW_REGISTRATION, postEntity, delegate);\r\n\r\n\t\t\t} else {\r\n\t\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\t\"Password does not match!\", Toast.LENGTH_LONG).show();\r\n\t\t\t}\r\n\r\n\t\t} else {\r\n\t\t\tToast.makeText(getApplicationContext(),\r\n\t\t\t\t\t\"You need to fill all the fields!\", Toast.LENGTH_LONG)\r\n\t\t\t\t\t.show();\r\n\t\t}\r\n\r\n\t}", "private void userRegister(String email, String password)\n {\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>()\n {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task)\n {\n // if successful, send email verification\n String TAG = \"LoginActivity.userRegister\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"createUserWithEmailAndPassword:success\");\n FirebaseUser user = mAuth.getCurrentUser();\n\n user.sendEmailVerification()\n .addOnCompleteListener(new OnCompleteListener<Void>()\n {\n @Override\n public void onComplete(@NonNull Task<Void> task)\n {\n String TAG = \"LoginActivity.userRegister.EmailVerify\";\n if (task.isSuccessful())\n {\n Log.d(TAG, \"sendEmailVerification:success\");\n Toast.makeText(getActivity(),\n \"Please check Email for Verification\",Toast.LENGTH_SHORT).show();\n }\n else\n {\n Log.w(TAG, \"sendEmailVerification:failure\", task.getException());\n Toast.makeText(getActivity(),\"Unable to Verify: \"\n + task.getException().getMessage(),Toast.LENGTH_SHORT).show();\n\n }\n }\n });\n }\n else\n {\n Log.w(TAG, \"createUserWithEmailAndPassword:failure\", task.getException());\n Toast.makeText(getActivity(), \"Unable to Register: \"\n + task.getException().getMessage(), Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void callRegisterByEmailToGoogleFirebase(){\n mFirebaseAuth = FirebaseAuth.getInstance();\n\n String userEmail = mEmailAddress.getText().toString();\n String userPassword = mPassword.getText().toString();\n\n // create the user with email and password\n mFirebaseAuth.createUserWithEmailAndPassword(userEmail,userPassword).addOnCompleteListener(getActivity(), new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if(task.isSuccessful()){\n showBottomSnackBar(\"Corresponding Firebase User Created\");\n }else{\n showBottomSnackBar(\"Firebase User Creation Fails\");\n }\n\n replaceActivity(MainActivity.class, null);\n }\n });\n\n }", "private void registerEmailAddr() {\r\n\t\t\t\tWindow.setTitle(Common.APPNAME);\r\n\t\t\t\tmanualRegisterBtn.setEnabled(false);\r\n\t\t\t\tfinal String emailAddrProvided = emailAddrField.getText();\r\n\t\t\t\tserverResponseLabel.setText(\"\");\r\n\t\t\t\tregisterService.manualRegister(emailAddrProvided,\r\n\t\t\t\t\tnew AsyncCallback<String>() {\r\n\t\t\t\t\t\tpublic void onFailure(Throwable caught) {\r\n\t\t\t\t\t\t\t// Show the RPC error message to the user\r\n\t\t\t\t\t\t\tdialogBox.setText(\"Email Address Registration - Failure\");\r\n\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\tcloseButton.setFocus(true);\r\n\t\t\t\t\t\t\tdialogBox.show();\r\n\t\t\t\t\t\t}\r\n\r\n\t\t\t\t\t\tpublic void onSuccess(String result) {\r\n\t\t\t\t\t\t\tif (\"Verified\".equalsIgnoreCase(result)) {\r\n\t\t\t\t\t\t\t\tString registerReturnUri = GWT.getHostPageBaseURL() + REGISTER_RETURN_URI;\r\n\t\t\t\t\t\t\t\tWindow.open(registerReturnUri, \"_self\", \"\"); \r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t\telse {\r\n\t\t\t\t\t\t\t\temailAddrField.setText(\"\");\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\tWindow.alert(result);\r\n\t\t\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\t\tdialogBox.center();\r\n\t\t\t\t\t\t\t\tdialogBox.setAnimationEnabled(true);\r\n\t\t\t\t\t\t\t\tdialogBox.setWidth(\"320px\");\r\n\t\t\t\t\t\t\t\tdialogBox.setText(result);\r\n\t\t\t\t\t\t\t\tcloseButton.setFocus(true);\r\n\t\t\t\t\t\t\t\t/*\r\n\t\t\t\t\t\t\t\tmanualRegisterBtn.setEnabled(true);\r\n\t\t\t\t\t\t\t\t*/\r\n\t\t\t\t\t\t\t}\r\n\t\t\t\t\t\t}\r\n\t\t\t\t\t}\r\n\t\t\t\t);\r\n\t\t\t}", "@Override\n public void onRegistrationSuccess(RegistrationResponse response) {\n if (response.isStatus()) {\n\n startActivityForResult(new Intent(this,VerifyEmailActivity.class)\n .putExtra(getString(R.string.from_sign_up_key),true)\n .putExtra(getString(R.string.email_id_key),model.getEmail().getValue()),VERIFY_EMAIL_REQUEST_CODE);\n\n\n } else {\n StringBuilder errorMsg = new StringBuilder();\n if (null != response.getErrors()) {\n for (Error e : response.getErrors()) {\n if (e.getCode().equalsIgnoreCase(\"REG005\")) {\n signUpBinding.txtEmailId.setErrorEnabled(true);\n signUpBinding.txtEmailId.setError(e.getMessage());\n } else {\n errorMsg.append(e.getMessage()).append(\"\\n\");\n }\n }\n } else {\n errorMsg.append(getString(R.string.server_error));\n }\n signUpBinding.txtError.setText(errorMsg);\n signUpBinding.txtError.setVisibility(View.VISIBLE);\n }\n }", "private void sendRegistrationToServer(String token) {\n // TODO: Implement this method to send token to your app server.\n }", "private void sendRegistrationToServer(String token) {\n // TODO: Implement this method to send token to your app server.\n }", "public void sendregisteruser(registerDTO register) {\n MimeMessagePreparator preparator = new MimeMessagePreparator()\n {\n public void prepare(MimeMessage mimeMessage) throws Exception\n {\n mimeMessage.setRecipient(Message.RecipientType.TO, new InternetAddress(register.getEmail()));\n mimeMessage.setSubject(\"Welcome to The Indian Bus Service\");\n\n MimeMessageHelper helper = new MimeMessageHelper(mimeMessage, true);\n\n helper.setText(\"<html><body>\"\n + \"<br>\"\n + \"<h2>Hello \"+register.getFirstname()+\" \"+register.getLastname()+\"</h2>\"\n + \"<p>Welcome to <b>Indian Bus Service</b></p>\"\n + \"<br>\"\n + \"<p>Username:- \"+register.getEmail()+\"</p>\"\n + \"<p>Hope you are doing well in this lockdown.</b></p>\"\n + \"<p>Date your login : </p>'\"+new Date()+\"'</body></html>\", true);\n }\n };\n\n try {\n mailSender.send(preparator);\n }\n catch (MailException ex) {\n // simply log it and go on...\n System.err.println(ex.getMessage());\n }\n }", "private String sendConfirmationEmail(UserEntity user) {\n try {\n Properties emailAccountProperties = new Properties();\n try {\n emailAccountProperties.load(getClass().getResourceAsStream(\"/registration.properties\"));\n } catch (IOException e) {\n logger.warn(\"Cannot open registration properties file to send email:\", e);\n return null;\n }\n\n final String username = emailAccountProperties.getProperty(\"username\");\n final String password = emailAccountProperties.getProperty(\"password\");\n\n Properties prop = new Properties();\n prop.put(\"mail.smtp.auth\", \"true\");\n prop.put(\"mail.smtp.starttls.enable\", \"true\");\n prop.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n prop.put(\"mail.smtp.port\", \"587\");\n\n Session session = Session.getInstance(prop, new javax.mail.Authenticator() {\n @Override\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n\n try {\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(\"cityconteam@gmail.com\"));\n message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(user.getEmail()));\n message.setSubject(\"Welcome to CityCon!\");\n String reglink = RandomStringUtils.random(30, true, true);\n message.setContent(\"You received this email because you tried to register at <a href=http://citycon.ml>citycon.ml</a>.\" +\n \" Go <a href=http://citycon.ml/registration?reglink=\" + reglink + \">here</a>\" +\n //\" or <a href=http://localhost:8080/registration?reglink=\" + reglink + \"> here </a>\" +\n \" to complete your registration.\" +\n \"<br><br>If you didn't ask for registration, just ignore this message.\" +\n \"<br><br><hr>With love,<br>your CityCon team.\",\n \"text/html; charest=utf-8\");\n Transport.send(message);\n logger.trace(\"Sent reglink {}\", reglink);\n return reglink;\n } catch (MessagingException e) {\n logger.warn(\"Exception during sending email\", e);\n return null;\n }\n } catch (Exception e) {\n logger.warn(\"Unexpected exception\", e);\n return null;\n }\n }", "private void sendRegistrationToServer(String token) {\n LoginManager loginManager = new LoginManager(this);\n loginManager.setFCM_KEY(token);\n }", "public void signUpNew(String mail,String password){\n SimpleDateFormat simpleDateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n String dateTime = simpleDateFormat.format(Calendar.getInstance().getTime());\n\n //device ID\n String deviceId = Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ANDROID_ID);\n\n headers = new HashMap<>();\n headers.put(\"mail\",mail);\n headers.put(\"password\",password);\n headers.put(\"subscriptionDateTime\",dateTime);\n headers.put(\"deviceId\",deviceId);\n\n String url = serverUrl + \"/sign_up\";\n sendRequestNew(url,headers);\n }", "void onSignUpEmailRegistered();", "private void sendRegistrationRequest(AccountCredentials credentials) {\n final String url = API_BASE_URL + \"register/send\";\n\n GsonRequest<AuthenticationResponse> request = new GsonRequest<>(\n Request.Method.POST, url, credentials, AuthenticationResponse.class,\n\n new Response.Listener<AuthenticationResponse>() {\n\n @Override\n public void onResponse(AuthenticationResponse authenticationResponse) {\n Intent intent = new Intent(RegisterActivity.this, EmailNotConfirmedActivity.class);\n startActivity(intent);\n }\n },\n\n new Response.ErrorListener() {\n\n @Override\n public void onErrorResponse(VolleyError error) {\n HttpRequestHelper.handleErrorResponse(error.networkResponse, RegisterActivity.this);\n }\n });\n VolleyController.getInstance(this).addToRequestQueue(request);\n }", "UserRegistrationResponse registrationPost(RegistrationForm registrationForm);", "@Transactional//to interacting with the relational database\n //Create method called signup inside this class which take RegisterRequest as input\n /*1*/ public void signup(RegisterRequest registerRequest) throws SpringRedditException {\n //the first thing we create an object for the user class\n User user = new User();\n //and we will map the data we have from the register request object to the user object\n user.setUsername(registerRequest.getUsername());\n user.setEmail(registerRequest.getEmail());\n user.setPassword(passwordEncoder.encode(registerRequest.getPassword()));\n /*pass in value as instant.now => this is java class took at current time\n and lastly we will disable and set it false\n */\n user.setEnabled(false);\n //save\n userRepository.save(user);\n /*5*/ //create verified user via email using UUID to generate\n String token = generateVerificationToken(user);\n //after that, create mailTemp.html\n /*6*/ //right after generate verification token method\n\n mailService.sendMail(new NotificationEmail(\"Please Active Your Account\", user.getEmail(), \"Thank you for signing up to Spring Reddit,\" +\n \" please click on the below url to activate your account : \"\n + \"http://localhost:8080/api/auth/accountVerification\" + \"/\" + token));\n }", "private void sendRegistrationIdToBackend()\n {\n\tLog.d(Globals.TAG, \"REGISTER USERID: \" + regid);\n\tString name = ((EditText)findViewById(R.id.name_edittext)).getText().toString();\n\tnew AsyncTask<String, Void, String>()\n\t{\n\t @Override\n\t protected String doInBackground(String... 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(\"name\", params[0]);\n\t\t data.putString(\"action\", \"com.antoinecampbell.gcmdemo.REGISTER\");\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 registration\";\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\tToast.makeText(context, msg, Toast.LENGTH_SHORT).show();\n\t }\n\t}.execute(name);\n }", "public void signUpUser(RegistrationRequest request) {\n String requestEmail = request.getEmail();\n\n // sign up user through user service and get token UUID\n String token = applicationUserService.signUpUser(\n // convert request to client user\n convertRegistrationRequestToApplicationUser(request));\n\n // create confirmation link\n String host = \"localhost:8080\";\n String link = \"http://\" + host + \"/registration/confirm?token=\" + token;\n\n // send email with link to the user's email address\n emailSender.send(requestEmail,\n // build email message\n EmailMessageHelper.buildEmailMessage(request.getUsername(), link));\n\n }", "private void sendRegistrationToServer(String token) {\n EventBuilder.withItemAndType(\n Item.PUSH_NOTIFICATION, Event.EVT_SEND)\n .addParam(EventParam.PRM_VALUE, token)\n .send();\n }", "private void sendRegistrationToServer(String token) {\n // Add custom implementation, as needed.\n }", "public String createRegisterVerificationCode() {\n\t\tregisterVerification = VerificationCode.generateWord();\r\n\t\treturn registerVerification;\r\n\t}", "private void sendRegistrationToServer(final String token) {\n Log.e(TAG, \"sendRegistrationToServer: \" + token);\n }", "private void sendRegistrationToServer(String token) {\n CustomerApp.e.putString(\"fcm_token\",token);\n CustomerApp.e.putBoolean(\"fcm_token_sync\",false);\n CustomerApp.e.apply();\n\n //Displaying token on logcat\n Log.v(Constants.TAG, \"Refreshed token: \" + token);\n }", "private void sendVerificationCode() {\n\n PhoneAuthProvider.getInstance().verifyPhoneNumber(\n \"+91\" + phoneNumber, // Phone number to verify\n 60, // Timeout and unit\n TimeUnit.SECONDS,\n this,\n mCallbacks\n );\n }", "public void attemptRegistration(final Context context, final RegistrationListener listener) {\n final String registrationType;\n if (mRegistrationResponse != null && !TextUtils.isEmpty(mRegistrationResponse.session)) {\n AuthParams authParams = null;\n if (mPhoneNumber != null && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN) && !TextUtils.isEmpty(mPhoneNumber.getSid())) {\n Uri identityServerUri = mHsConfig.getIdentityServerUri();\n if (identityServerUri == null) {\n listener.onIdentityServerMissing();\n return;\n } else {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_MSISDN;\n authParams = getThreePidAuthParams(mPhoneNumber.getClientSecret(), identityServerUri.getHost(),\n mPhoneNumber.getSid(), LoginRestClient.LOGIN_FLOW_TYPE_MSISDN);\n }\n } else if (mEmail != null && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY)) {\n if (TextUtils.isEmpty(mEmail.getSid())) {\n // Email token needs to be requested before doing validation\n Log.d(LOG_TAG, \"attemptRegistration: request email validation\");\n requestValidationToken(context, mEmail, new ThreePidRequestListener() {\n @Override\n public void onIdentityServerMissing() {\n listener.onIdentityServerMissing();\n }\n\n @Override\n public void onThreePidRequested(ThreePid pid) {\n if (!TextUtils.isEmpty(pid.getSid())) {\n // The session id for the email validation has just been received.\n // We trigger here a new registration request without delay to attach the current username\n // and the pwd to the registration session.\n attemptRegistration(context, listener);\n\n // Notify the listener to wait for the email validation\n listener.onWaitingEmailValidation();\n }\n }\n\n @Override\n public void onThreePidRequestFailed(String errorMessage) {\n listener.onThreePidRequestFailed(errorMessage);\n }\n });\n return;\n } else {\n Uri identityServerUri = mHsConfig.getIdentityServerUri();\n if (identityServerUri == null) {\n listener.onIdentityServerMissing();\n return;\n } else {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY;\n authParams = getThreePidAuthParams(mEmail.getClientSecret(), identityServerUri.getHost(),\n mEmail.getSid(), LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY);\n }\n }\n } else if (!TextUtils.isEmpty(mCaptchaResponse) && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_RECAPTCHA)) {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_RECAPTCHA;\n authParams = getCaptchaAuthParams(mCaptchaResponse);\n } else if (mTermsApproved && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_TERMS)) {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_TERMS;\n authParams = new AuthParams(LoginRestClient.LOGIN_FLOW_TYPE_TERMS);\n } else if (supportStage(LoginRestClient.LOGIN_FLOW_TYPE_DUMMY)) {\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_DUMMY;\n authParams = new AuthParams(LoginRestClient.LOGIN_FLOW_TYPE_DUMMY);\n } else if (isPasswordBasedFlowSupported()) {\n // never has been tested\n registrationType = LoginRestClient.LOGIN_FLOW_TYPE_PASSWORD;\n authParams = new AuthParamsLoginPassword();\n\n if (null != mUsername) {\n ((AuthParamsLoginPassword) authParams).user = mUsername;\n }\n\n if (null != mPassword) {\n ((AuthParamsLoginPassword) authParams).password = mPassword;\n }\n } else {\n // others\n registrationType = \"\";\n }\n\n if (TextUtils.equals(registrationType, LoginRestClient.LOGIN_FLOW_TYPE_MSISDN)\n && mEmail != null && !isCaptchaRequired()) {\n // Email will not be processed\n mShowThreePidWarning = true;\n mEmail = null;\n }\n\n final RegistrationParams params = new RegistrationParams();\n if (!registrationType.equals(LoginRestClient.LOGIN_FLOW_TYPE_RECAPTCHA)\n && !registrationType.equals(LoginRestClient.LOGIN_FLOW_TYPE_TERMS)) {\n if (mUsername != null) {\n params.username = mUsername;\n }\n if (mPassword != null) {\n params.password = mPassword;\n }\n }\n\n if (authParams != null) {\n // Always send the current session\n authParams.session = mRegistrationResponse.session;\n\n params.auth = authParams;\n }\n\n register(context, params, new InternalRegistrationListener() {\n @Override\n public void onRegistrationSuccess() {\n if (mShowThreePidWarning) {\n // An email was entered but was not attached to account\n listener.onRegistrationSuccess(context.getString(R.string.auth_threepid_warning_message));\n } else {\n listener.onRegistrationSuccess(null);\n }\n }\n\n @Override\n public void onRegistrationFailed(String message) {\n if (TextUtils.equals(ERROR_MISSING_STAGE, message)\n && (mPhoneNumber == null || isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_MSISDN))) {\n if (mEmail != null && !isCompleted(LoginRestClient.LOGIN_FLOW_TYPE_EMAIL_IDENTITY)) {\n attemptRegistration(context, listener);\n } else if (isTermsRequired()) {\n listener.onWaitingTerms(getLocalizedLoginTerms(context));\n } else {\n // At this point, only captcha can be the missing stage\n listener.onWaitingCaptcha(getCaptchaPublicKey());\n }\n } else {\n listener.onRegistrationFailed(message);\n }\n }\n\n @Override\n public void onResourceLimitExceeded(MatrixError e) {\n listener.onResourceLimitExceeded(e);\n }\n });\n }\n }", "@Override\n\tpublic void createDigestEmail() {\n\n\t}", "public static void sendMail(UserInformation userInformation, JavaMailSenderImpl mailSenderImplementation, String jwtToken) {\n\t\ttry {\n\t\t\tSimpleMailMessage simpleMsg = new SimpleMailMessage();\n\t\t\tsimpleMsg.setTo(userInformation.getEmail());\n\t\t\tsimpleMsg.setSubject(\"Verify mail\");\n\t\t\tsimpleMsg.setText(\"Hii..!\"+userInformation.getName()+\"verify the user:\\n\"+\"http://8080/verify/\"+jwtToken);\n\t\t\tmailSenderImplementation.send(simpleMsg);\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void RegisterGoogleSignup() {\n\n\t\ttry {\n\t\t\tLocalData data = new LocalData(SplashActivity.this);\n\n\t\t\tArrayList<String> asName = new ArrayList<String>();\n\t\t\tArrayList<String> asValue = new ArrayList<String>();\n\n\t\t\tasName.add(\"email\");\n\t\t\tasName.add(\"firstname\");\n\t\t\tasName.add(\"gender\");\n\t\t\tasName.add(\"id\");\n\t\t\tasName.add(\"lastname\");\n\t\t\tasName.add(\"name\");\n\t\t\t// asName.add(\"link\");\n\n\t\t\tasName.add(\"device_type\");\n\t\t\tasName.add(\"device_id\");\n\t\t\tasName.add(\"gcm_id\");\n\t\t\tasName.add(\"timezone\");\n\n\t\t\tasValue.add(data.GetS(LocalData.EMAIL));\n\t\t\tasValue.add(data.GetS(LocalData.FIRST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.GENDER));\n\t\t\tasValue.add(data.GetS(LocalData.ID));\n\t\t\tasValue.add(data.GetS(LocalData.LAST_NAME));\n\t\t\tasValue.add(data.GetS(LocalData.NAME));\n\t\t\t// asValue.add(data.GetS(LocalData.LINK));\n\n\t\t\tasValue.add(\"A\");\n\n\t\t\tString android_id = Secure\n\t\t\t\t\t.getString(SplashActivity.this.getContentResolver(),\n\t\t\t\t\t\t\tSecure.ANDROID_ID);\n\n\t\t\tasValue.add(android_id);\n\n\t\t\tLocalData data1 = new LocalData(SplashActivity.this);\n\t\t\tasValue.add(data1.GetS(\"gcmId\"));\n\t\t\tasValue.add(Main.GetTimeZone());\n\t\t\tString sURL = StringURLs.getQuery(StringURLs.GOOGLE_LOGIN, asName,\n\t\t\t\t\tasValue);\n\n\t\t\tConnectServer connectServer = new ConnectServer();\n\t\t\tconnectServer.setMode(ConnectServer.MODE_POST);\n\t\t\tconnectServer.setContext(SplashActivity.this);\n\t\t\tconnectServer.setListener(new ConnectServerListener() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onServerResponse(String sJSON, JSONObject jsonObject) {\n\t\t\t\t\t// TODO Auto-generated method stub\n\n\t\t\t\t\tLog.d(\"JSON DATA\", sJSON);\n\n\t\t\t\t\ttry {\n\n\t\t\t\t\t\tif (sJSON.length() != 0) {\n\t\t\t\t\t\t\tJSONObject object = new JSONObject(sJSON);\n\t\t\t\t\t\t\tJSONObject response = object\n\t\t\t\t\t\t\t\t\t.getJSONObject(JSONStrings.JSON_RESPONSE);\n\t\t\t\t\t\t\tString sResult = response\n\t\t\t\t\t\t\t\t\t.getString(JSONStrings.JSON_SUCCESS);\n\n\t\t\t\t\t\t\tif (sResult.equalsIgnoreCase(\"1\") == true) {\n\n\t\t\t\t\t\t\t\tString user_id = response.getString(\"userid\");\n\n\t\t\t\t\t\t\t\tLocalData data = new LocalData(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this);\n\t\t\t\t\t\t\t\tdata.Update(\"userid\", user_id);\n\t\t\t\t\t\t\t\tdata.Update(\"name\", response.getString(\"name\"));\n\n\t\t\t\t\t\t\t\tGetNotificationCount();\n\n\t\t\t\t\t\t\t} else if (sResult.equalsIgnoreCase(\"0\") == true) {\n\n\t\t\t\t\t\t\t\tString msgcode = jsonObject.getJSONObject(\n\t\t\t\t\t\t\t\t\t\t\"response\").getString(\"msgcode\");\n\n\t\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, msgcode),\n\t\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t} else {\n\n\t\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t\t}\n\n\t\t\t\t\t} catch (Exception exp) {\n\n\t\t\t\t\t\tToast.makeText(\n\t\t\t\t\t\t\t\tSplashActivity.this,\n\t\t\t\t\t\t\t\tMain.getStringResourceByName(\n\t\t\t\t\t\t\t\t\t\tSplashActivity.this, \"c100\"),\n\t\t\t\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t});\n\n\t\t\tconnectServer.execute(sURL);\n\n\t\t} catch (Exception exp) {\n\n\t\t\tToast.makeText(SplashActivity.this,\n\t\t\t\t\tMain.getStringResourceByName(SplashActivity.this, \"c100\"),\n\t\t\t\t\tToast.LENGTH_LONG).show();\n\t\t}\n\t}", "private void registerForEmail(final String email, final String name, final String facebookId, final String token, final String imageUrl, final boolean isFb){\n// String url = Router.User.getWIthEmailComplete(email);\n// JSONObject params = new JSONObject();\n// try {\n// params.put(\"name\",name);\n// params.put(\"isFb\",isFb);\n// params.put(\"token\",token);\n// params.put(\"email\",email);\n// params.put(\"profilepic\",imageUrl);\n// params.put(\"facebookId\",facebookId);\n// } catch (JSONException e) {e.printStackTrace();}\n// JsonObjectRequest jsonObjectRequest = new JsonObjectRequest(Request.Method.POST, url, params, new Response.Listener<JSONObject>() {\n//\n// @Override\n// public void onResponse(JSONObject jsonObject) {\n// try {\n// JSONObject result = jsonObject.getJSONObject(\"result\");\n// String userId = result.getString(\"userId\");\n// userMain.userId = userId;\n// userMain.token = token;\n// userMain.email = email;\n// userMain.authProvider = (isFb)?\"facebook\":\"google\";\n// updateLoginTokens();\n// userMain.saveUserDataLocally();\n//\n// loginWithUserId(userId);\n// } catch (JSONException e) {\n// e.printStackTrace();\n// }\n// }\n// }, new Response.ErrorListener() {\n// @Override\n// public void onErrorResponse(VolleyError volleyError) {\n// Log.e(\"ERROR\",\"error in registerForEmail\");\n// }\n// });\n// MainApplication.getInstance().getRequestQueue().add(jsonObjectRequest);\n }", "private void sendVerificationEmail(FirebaseUser user) {\n if (user == null) {\n Toast.makeText(LoginActivity.this,\n \"Error occurred. Please try again later.\",\n Toast.LENGTH_SHORT).show();\n return;\n }\n\n user.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LoginActivity.this,\n \"Verification email sent!\",\n Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(LoginActivity.this,\n \"Email couldn't be sent at this time. Please try again later.\",\n Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void uponSuccessfulRegistration(String[] emailCCList){\n \tSimpleMailMessage[] mailMessageArray = new SimpleMailMessage[1];\r\n Iterator iterator = userEmailIds.iterator();\r\n // for (int index = 0; iterator.hasNext(); index ++){\r\n SimpleMailMessage message = new SimpleMailMessage();\r\n String toAddress = (String)iterator.next();\r\n message.setFrom(\"thotaparvathidevi@gmail.com\");\r\n message.setTo(\"durgasridevi.salugu@mntsoft.co.in\");\r\n message.setSubject(\"With CC\");\r\n message.setCc(emailCCList);\r\n message.setText(\"Mail Sent from @parvathi@gmail.com\");\r\n mailMessageArray[0] = message;\r\n// }\r\n mailSender.send(mailMessageArray);\r\n }", "private String generateVerificationToken(User user) {\n String token = UUID.randomUUID().toString();\n VerificationToken verificationToken = new VerificationToken();\n verificationToken.setToken(token);\n verificationToken.setUser(user);// after that we save it to repository\n verificationTokenRepository.save(verificationToken);\n return token;\n }", "private void sendBookingConfirmMailWithMailtrapProvider(String userEmail, String token) throws MessagingException {\n String to = userEmail;//change accordingly \n// Gmail’s SMTP account,\n\n String userName = \"91c28c9b77f112\";//from mailtrap\n String password = \"9d4d7fbf411267\";\n\n //Get the session object \n //1. sets SMTP server properties\n Properties properties = new Properties();\n properties.put(\"mail.smtp.auth\", true);\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.host\", \"smtp.mailtrap.io\");\n properties.put(\"mail.smtp.port\", \"25\");\n properties.put(\"mail.smtp.ssl.trust\", \"smtp.mailtrap.io\");\n //2. creates a new session with an authenticator\n Authenticator auth = new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(userName, password);\n }\n };\n\n Session session = Session.getInstance(properties, auth);\n\n //3. Creates a new e-mail message\n Message msg = new MimeMessage(session);\n\n msg.setFrom(new InternetAddress(\"hungbsse130615@fpt.edu.vn\"));\n InternetAddress[] toAddresses = {new InternetAddress(to)};\n msg.setRecipients(Message.RecipientType.TO, toAddresses);\n msg.setSubject(\"Test send mail\");\n msg.setSentDate(new Date());\n msg.setText(\"Hello, this is example of sending email. ?token=\" + token);\n\n// MimeMessage message = new MimeMessage(session);\n// message.setFrom(new InternetAddress(from));\n// message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n //4. Send the message\n Transport.send(msg);\n System.out.println(\"message sent successfully....\");\n\n }", "@Override\n public void onClick(View view) {\n if (validate()) {\n String user_email = create_email.getText().toString().trim();\n String user_password = create_password.getText().toString().trim();\n firebaseAuth.createUserWithEmailAndPassword(user_email, user_password).addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n\n if (task.isSuccessful()) {\n //sendEmailVerification();\n //sendUserData();\n firebaseAuth.signOut();\n Toast.makeText(CreateNewSurvey.this, \"Successfully Registered, Upload complete!\", Toast.LENGTH_SHORT).show();\n finish();\n startActivity(new Intent(CreateNewSurvey.this, Main2Activity.class));\n } else {\n Toast.makeText(CreateNewSurvey.this, \"Registration Failed\", Toast.LENGTH_SHORT).show();\n }\n\n }\n\n });\n }\n }", "private void createRequest() {\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(getString(default_web_client_id))\n .requestEmail()\n .build();\n\n mGoogleSignInClient = GoogleSignIn.getClient(Signup.this, gso);\n\n\n }", "public void sendEmail(String recipient,String password);", "public void sendTokenEmailToUser(Long userid, String email, String token, Tokentype type) throws MessagingException;", "private void sendRegistrationToServer(final String fcmToken) {\n Log.e(TAG, \"sendRegistrationToServer: \" + fcmToken);\n final String token= QueryPreferences.getToken(this);\n AsyncTask<Void, Void, Void> task= new AsyncTask<Void, Void, Void>() {\n @Override\n protected Void doInBackground(Void... voids) {\n\n RequestQueue requestQueue = Volley.newRequestQueue(MyFirebaseInstanceIDService.this);\n\n Map<String, String> params= new HashMap<>();\n params.put(\"token\", token);\n params.put(\"fcmToken\", \"\" + fcmToken);\n JsonObjectRequest jor= new JsonObjectRequest(Request.Method.POST, URL, new JSONObject(params), new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject jsonObject) {\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError volleyError) {\n }\n });\n requestQueue.add(jor);\n return null;\n }\n };\n if(token!=null)\n task.execute();\n }", "private void createAccount(String email, String password) {\n if (!validateForm()) {\n return;\n }\n\n // showProgressDialog();\n\n // [START create_user_with_email]\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n // Sign in success, update UI with the signed-in user's information\n //Log.d(TAG, \"createUserWithEmail:success\");\n //Toast.makeText(RegistrarActivity.this, \"Usuario creado correctamente, acepte su email de verificación para continuar\", Toast.LENGTH_SHORT).show();\n FirebaseUser user=FirebaseAuth.getInstance().getCurrentUser();\n user.sendEmailVerification();\n ConstraintLayout constraintLayout=(ConstraintLayout)findViewById(R.id.layoutRegistrar);\n Snackbar snackbar=Snackbar.make(constraintLayout,\"Usuario creado correctamente, acepte su email de verificación\",Snackbar.LENGTH_LONG);\n snackbar.setAction(\"Ir a Login\", new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n Intent intent=new Intent(getApplicationContext(),LoginActivity.class);\n startActivity(intent);\n }\n });\n snackbar.show();\n //updateUI(user);\n } else {\n // If sign in fails, display a message to the user.\n //Log.w(TAG, \"createUserWithEmail:failure\", task.getException());\n Toast.makeText(RegistrarActivity.this, \"Autenticación fallida.\",\n Toast.LENGTH_SHORT).show();\n //updateUI(null);\n }\n\n // [START_EXCLUDE]\n //hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n // [END create_user_with_email]\n }", "public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }", "@PostMapping(value = \"/sendUserRegistrationMailForExtUser\")\n\tpublic RestResponse<Integer> sendUserRegistrationMailForExtUser(@RequestParam Long stgExtUserInfoKey) {\t\n\t\tlogInfo(LOG, true, \"User info key : {}\", stgExtUserInfoKey);\t\t\n\t\tRestResponse<Integer> restResponse = new RestResponse<>(SUCCESS);\n\t\ttry {\n\t\t\tint responseCode = userRegistrationService.sendUserRegistrationMailForExtUser(stgExtUserInfoKey, null);\n\t\t\trestResponse.setResult(responseCode);\n\t\t\tif(responseCode == 115) {\n\t\t\t\trestResponse.setStatus(SUCCESS);\n\t\t\t}else if(responseCode == 113) {\n\t\t\t\trestResponse.setStatus(ERROR);\n\t\t\t\trestResponse.setErrorMessage(\"Subject is not available to send User Registration mail\");\n\t\t\t}else if(responseCode == 112) {\n\t\t\t\trestResponse.setStatus(ERROR);\n\t\t\t\trestResponse.setErrorMessage(\"Mail Content is not available to send User Registration mail\");\n\t\t\t}else if(responseCode == 114) {\n\t\t\t\trestResponse.setStatus(ERROR);\n\t\t\t\trestResponse.setErrorMessage(\"FROM configuration not available to send User Registration mail\");\n\t\t\t}\n\t\t}catch(Exception e) {\n\t\t\tLOG.error(\"Exception : \", e);\n\t\t}\n\t\treturn restResponse;\t\t\n\t}", "public void registerNewEmail(String email, String password){\n\n showProgressDialog();\n FirebaseAuth.getInstance().createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if (task.isSuccessful()){\n Log.d(TAG, \"onComplete: AuthState: \" + FirebaseAuth.getInstance().getCurrentUser().getUid());\n\n // TODO(\"send verification email\")\n // sendVerificationEmail();\n\n //insert some default user data\n String selectedLanguage = mUserRegBinding.spinnerLanguage.getSelectedItem().toString();\n String selectedCountry = mUserRegBinding.spinnerCountry.getSelectedItem().toString();\n String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n PrivateUser user = new PrivateUser();\n user.setFirstName(mUserRegBinding.editTextFirstName.getText().toString());\n user.setLastName(mUserRegBinding.editTextLastName.getText().toString());\n user.setTelephone(mUserRegBinding.editTextPrivTelephone.getText().toString());\n user.setCountry(selectedCountry);\n user.setLanguage(selectedLanguage);\n user.setUser_id(userId);\n\n\n // get the document reference for private users\n FirebaseFirestore db = FirebaseFirestore.getInstance();\n DocumentReference privateUserRef = db\n .collection(getString(R.string.private_user))\n .document(userId);\n\n privateUserRef.set(user).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n hideProgressDialog();\n Snackbar.make(getCurrentFocus().getRootView(), \"Registration Successful :)\", Snackbar.LENGTH_SHORT).show();\n\n // sign current user out\n FirebaseAuth.getInstance().signOut();\n\n // send user to login screen on successful registration\n Bundle bundle = new Bundle();\n bundle.putString(\"TYPE_OF_USER\", getString(R.string.private_user));\n redirectLoginScreen(bundle);\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n hideProgressDialog();\n Log.e( \"Db Creation Failed\", \"Failed\", e );\n Snackbar.make(getCurrentFocus().getRootView(), e.getMessage(), Snackbar.LENGTH_SHORT).show();\n }\n });\n\n }\n if (!task.isSuccessful()) {\n FirebaseAuthException e = (FirebaseAuthException) task.getException();\n Snackbar.make(getCurrentFocus().getRootView(), e.getMessage(), Snackbar.LENGTH_LONG).show();\n Log.e( \"User Registration: \" , \"Failed\", e );\n }\n hideProgressDialog();\n }\n });\n }", "Task<Void> signUp(String email, String password);", "private void createUserInFirebaseHelper(final String encodedEmail) {\n }", "protected void createRegistrationInfo() {\n registrationInfo.put(\"email\", email.getText().toString());\n registrationInfo.put(\"password\", password.getText().toString());\n }", "@OnClick(R.id.register_email_register_button)\n void onClickRegister(){\n if(isInfoValidate()){\n //Call Register Http, first put the information into bundle\n// Bundle bundle = new Bundle();\n// bundle.putString(Constant.REGISTER_PHONE_NUM, mEmailAddress.getText().toString());\n// bundle.putString(Constant.REGISTER_PASSWORD, mPassword.getText().toString());\n// bundle.putInt(Constant.REGISTER_REGION, mRegionSpinner.getSelectedItemPosition());\n//\n// callRegisterHttp(mEmailAddress.getText().toString(),\n// mRegionSpinner.getSelectedItemPosition(),\n// bundle);\n\n //\n\n\n JSONObject jsonParams = new JSONObject();\n JSONObject outerJsonParams = new JSONObject();\n try {\n// jsonParams.put(\"username\", \"michael_firebasechat_1\");\n // String userNameString = mEmailAddress.getText().toString().split(\"@\")[0];\n jsonParams.put(\"username\", mUsername.getText().toString());\n jsonParams.put(\"email\", mEmailAddress.getText().toString());\n jsonParams.put(\"password\", mPassword.getText().toString());\n outerJsonParams.put(\"user\",jsonParams);\n StringEntity entity = new StringEntity(outerJsonParams.toString());\n callRegisterByEmailHttp(entity);\n } catch (JSONException e) {\n e.printStackTrace();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }\n else {\n //Show the warning text\n new SweetAlertDialog(getContext(), SweetAlertDialog.WARNING_TYPE)\n .setTitleText(getString(R.string.warning_title))\n .setContentText(errorText)\n .setConfirmText(getString(R.string.warning_confirm))\n .show();\n }\n }", "private void registerByEmail() {\n\n String username = editUsername.getText().toString();\n String email = editEmail.getText().toString();\n String password = editPassword.getText().toString();\n\n AVUser person = new AVUser();\n person.setUsername(username);\n person.setEmail(email);\n person.setPassword(password);\n person.put(Person.NICK_NAME,username);\n\n person.signUpInBackground(new SignUpCallback() {\n @Override\n public void done(AVException e) {\n if (e == null) {\n ShowMessageUtil.tosatFast(\"register successful!\", EmailRegisterActivity.this);\n openValidateDialog();\n } else {\n ShowMessageUtil.tosatSlow(\"fail to register:\" + e.getMessage(), EmailRegisterActivity.this);\n }\n }\n });\n }", "private void signUp() {\n final String email = ((EditText) findViewById(R.id.etSignUpEmail))\n .getText().toString();\n final String password = ((EditText) findViewById(R.id.etSignUpPassword))\n .getText().toString();\n\n mAuth.createUserWithEmailAndPassword(email, password)\n .addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:success\");\n sendVerificationEmail(mAuth.getCurrentUser());\n updateUI();\n } else {\n Log.d(\"SIGN_UP_USER\", \"createUserWithEmail:failure\");\n Toast.makeText(LoginActivity.this,\n \"Failed to create a new user.\",\n Toast.LENGTH_LONG).show();\n }\n }\n });\n }", "public void generateAndSendEmail(EmailSendingParameters emailParameters) throws AddressException, MessagingException {\r\n \r\n\t\t//Step1\t\t\r\n\t\tSystem.out.println(\"Setup Mail Server Properties..\");\r\n\t\tmailServerProperties = System.getProperties();\r\n\t\tmailServerProperties.put(\"mail.smtp.port\", \"587\");\r\n\t\tmailServerProperties.put(\"mail.smtp.auth\", \"true\");\r\n\t\tmailServerProperties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n\t\tSystem.out.println(\"Mail Server Properties have been setup successfully..\");\r\n \r\n\t\t//Step2\r\n\t\tSystem.out.println(\"Get Mail Session..\");\r\n\t\tgetMailSession = Session.getDefaultInstance(mailServerProperties, null);\r\n\t\tgenerateMailMessage = new MimeMessage(getMailSession);\r\n\t\tgenerateMailMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(emailParameters.getEmailReceiverAdress()));\r\n\t\tgenerateMailMessage.setSubject(\"Greetings from Crunchify..\");\r\n\t\tString emailBody = \"EMAIL CONTENT (with html tags)\";\r\n\t\tgenerateMailMessage.setContent(emailBody, \"text/html\");\r\n\t\tSystem.out.println(\"Mail Session has been created successfully..\");\r\n \r\n\t\t//Step3\t\t\r\n\t\tSystem.out.println(\"Get Session\tand Send mail\");\r\n\t\tTransport transport = getMailSession.getTransport(\"smtp\");\r\n\r\n\t\tSystem.out.println(\"Sending message\");\r\n\t\ttransport.connect(/*smtp.gmail.com\", emailReceiverAdress* emailReceiverPassword*/); \r\n\t\ttransport.sendMessage(generateMailMessage, generateMailMessage.getAllRecipients());\r\n\t\tSystem.out.println(\"Message sended properly\");\r\n\t\ttransport.close();\r\n\t}", "public void onSendRegistrationToServer(final String token){\n DatabaseReference databaseReference = FirebaseDatabase.getInstance().getReference();\n databaseReference.child(Constants.ARG_USERS)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .child(Constants.ARG_FIREBASE_TOKEN)\n .setValue(token);\n }", "public void resendVerificationEmail(){\n progressDialog.setMessage(\"Please wait...\");\n progressDialog.show();\n mAuth.getCurrentUser().sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()){\n alertDialogBuilderSentSuccessMessage(SignInActivity.this);\n Toast.makeText(SignInActivity.this,\"Sent email successfully.\",Toast.LENGTH_LONG).show();\n }else{\n Toast.makeText(SignInActivity.this,task.getException().getLocalizedMessage(),Toast.LENGTH_LONG).show();\n }\n\n progressDialog.dismiss();\n }\n });\n }", "public static void signUp(String username, String password, String alternativeEmail, String firstName, String lastName) {\n click(REGISTRATION_LINK);\n type(REG_FLOW_USERNAME_FIELD, username);\n click(REG_FLOW_CHECK_BUTTON);\n// if (!REG_FLOW_USERNAME_FREE_MESSAGE.toString().contains(\"Потребителското име е свободно\")) {\n// System.out.println(\"Try another username - the entered one is already in use\");\n// }\n type(REG_FLOW_PASSWORD_FIELD, password);\n type(REG_FLOW_PASSWORD_REENTER_FIELD, password);\n WebElement phoneCheckbox = Browser.driver.findElement(REG_FLOW_PHONE_CHECKBOX);\n if (phoneCheckbox.isEnabled()) {\n phoneCheckbox.click(); //that's how we disable it\n }\n type(REG_FLOW_ALTERNATIVE_EMAIL_FIELD, alternativeEmail);\n type(REG_FLOW_QUESTION_FIELD, \"To be or not to be?\");\n type(REG_FLOW_ANSWER_FIELD, \"To beeee.\");\n type(REG_FLOW_FNAME_FIELD, firstName);\n type(REG_FLOW_LNAME_FIELD, lastName);\n Browser.driver.switchTo().frame(\"abv-GDPR-frame\").manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\n // Manually to tap ACCEPT on the GDPR window\n Browser.driver.switchTo().defaultContent();\n click(REG_FLOW_GENDER_RADIOBUTTON); //to choose male\n click(REG_FLOW_DAY_DROPDOWN);\n click(REG_FLOW_DAY_3); // to choose 3th\n click(REG_FLOW_MONTH_DROPDOWN);\n click(REG_FLOW_MONTH_5); // to choose May\n click(REG_FLOW_YEAR_DROPDOWN);\n click(REG_FLOW_YEAR_1998); // to choose 1998\n\n findElement(REG_FLOW_CAPTCHA_FIELD);\n click(REG_FLOW_CAPTCHA_FIELD);\n // Timeout to enter the CAPTCHA manually\n // EXPLICIT WAIT DA MU TURYA\n click(REG_FLOW_CREATE_BUTTON);\n String successfulRegMessage = Browser.driver.findElement(REG_SUCCESS_MESSAGE).getText().trim();\n assertTrue(successfulRegMessage.contains(\"Успешна регистрация.\"), \"No SUCCESS message\");\n click(LOGIN_TO_YOUR_EMAIL_BUTTON);\n }", "@Override\n public Response emailotpGeneratePost(OTPGenerationRequest otpGenerationRequest) {\n\n String userId = StringUtils.trim(otpGenerationRequest.getUserId());\n try {\n GenerationResponseDTO responseDTO = EndpointUtils.getEmailOTPService().generateEmailOTP(userId);\n OTPGenerateResponse response = new OTPGenerateResponse()\n .transactionId(responseDTO.getTransactionId())\n .emailOtp(responseDTO.getEmailOTP());\n return Response.ok(response).build();\n } catch (EmailOtpClientException e) {\n return EndpointUtils.handleBadRequestResponse(e, log);\n } catch (EmailOtpException e) {\n return EndpointUtils.handleServerErrorResponse(e, log);\n } catch (Throwable e) {\n return EndpointUtils.handleUnexpectedServerError(e, log);\n }\n }", "@Override\n protected void onSubmit()\n {\n final ApplicationUser appUser = (ApplicationUser) getModelObject();\n UserRegistration userRegistration = new UserRegistration(appUser.getBusinessUser());\n paramUserId = userRegistration.getUserId();\n //paramDateTime = userRegistration.getRequestTimeAsString();\n //paramToken = userRegistration.getMailToken();\n\n // Note: Dccd does not use a validation Page!\n\n\t\t\t// Construct the url for the activation of member and/or organisation\n\t\t\tMap<String, String> parameterMap = new HashMap<String, String>();\n\t\t\tparameterMap.put(\"userId\", paramUserId);\n\t\t\tparameterMap.put(\"inEditMode\", \"0\"); // activation button is placed on non-edit page!\n\t\t\tparameterMap.put(\"enableModeSwitch\", \"1\");\n\t\t\tfinal String activationUrl = createPageURL(MemberPage.class, parameterMap);\n\t\t\tuserRegistration.setActivationUrl(activationUrl);\n\t\t\tlogger.debug(\"activationUrl: \" + activationUrl);\n\n if (isOrganisationEdit())\n {\n \tlogger.debug(\"new Organisation must now be registered\");\n \tassert(null != newOrganisation);\n \t// Also register the new organisation\n \tlogger.debug(\"New organistation: \" + newOrganisation.getId());\n \tOrganisationRegistration organisationRegistration =\n \t\tnew OrganisationRegistration(newOrganisation);\n\n \tuserRegistration.setOrganisation(newOrganisation);\n \tDccdUserService.getService().handleRegistrationRequest(userRegistration, organisationRegistration);\n\n \tif (!organisationRegistration.isCompleted())\n \t{\n \t\t// something went wrong!\n \tlogger.debug(\"Could not complete organisation registration\");\n for (String stateKey : organisationRegistration.getAccumulatedStateKeys())\n {\n //error(getString(stateKey));\n \t// allow for substitution\n error(getString(stateKey, new Model(organisationRegistration)));\n }\n \t}\n }\n else\n {\n \tuserRegistration.setOrganisation(selectedOrganisation);\n \tuserRegistration = DccdUserService.getService().handleRegistrationRequest(userRegistration);\n }\n\n if (userRegistration.isCompleted())\n {\n disableForm(new String[] {});\n info(getString(\"missionAccomplished\", new Model(appUser)));\n //setResponsePage(new InfoPage(getString(\"registrationpage.header\")));\n // use specific page for the confirmation\n setResponsePage(new RegistrationConfirmPage(appUser));\n }\n else\n {\n \tlogger.debug(\"Could not complete user registration\");\n for (String stateKey : userRegistration.getAccumulatedStateKeys())\n {\n error(getString(stateKey));\n }\n }\n logger.debug(\"End onSubmit: \" + userRegistration.toString());\n }", "private void sendRegistrationToServer(String regId, String authToken) {\n\n try {\n // Send authToken to the server\n HttpHelper http = new HttpHelper(null, null, 7000);\n JSONObject data = new JSONObject();\n try {\n data.put(\"service\", \"AndroidGCM\");\n data.put(\"regId\", regId);\n data.put(\"name\", \"TODO: Nom\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n http.setUser(null);\n http.setPassword(null);\n ArrayList<String[]> headers = new ArrayList<>();\n headers.add(new String[]{\"authentication_token\", authToken});\n headers.add(new String[]{\"Content-Type\", \"application/json\"});\n HttpResultHelper httpResult = http.post(\"https://ioPush.net/app/api/addDevice\", data.toString(), headers);\n BufferedReader in = new BufferedReader(new InputStreamReader(httpResult.getResponse()));\n String result = \"\";\n String inputLine;\n while ((inputLine = in.readLine()) != null) {\n result += inputLine;\n }\n if (httpResult.getStatusCode() == 200) {\n Log.i(TAG, \"Send regId result : \" + result);\n } else {\n Log.i(TAG, \"Failed to send regId, error code : \" + httpResult.getStatusCode());\n Log.i(TAG, \"Error message : \" + result);\n }\n } catch (Exception e) {\n Log.d(TAG, \"Failed to issue post request\", e);\n }\n\n }", "@Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n if (task.isSuccessful()) {\n FirebaseUser firebaseUser = firebaseOps.getCurrentFirebaseUser();\n if (firebaseUser.isEmailVerified()) {\n createUserObjectInDatabase(firebaseUser.getUid());\n\n } else {\n Toast.makeText(MainActivity.this, \"Please verify your email first\", Toast.LENGTH_SHORT).show();\n }\n }\n }", "@OnClick(R.id.activity_register_button_register)\n public void onRegisterClick(View mView) {\n if (!isFinishing()) {\n mUtility.hideKeyboard(RegisterActivity.this);\n mStringUsername = mEditTextUsername.getText().toString().trim();\n mStringAccountName = mEditTextAccountName.getText().toString().trim();\n mStringEmail = mEditTextEmail.getText().toString().trim();\n mStringMobileNO = mEditTextMobileNO.getText().toString().trim();\n mStringPassword = mEditTextPassword.getText().toString().trim();\n mStringDevicesUIDFCMToken = FirebaseInstanceId.getInstance().getToken();\n mPreferenceHelper.setDeviceToken(mStringDevicesUIDFCMToken);\n if (mStringUsername.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_name), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringAccountName.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_account_name), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringCountryCode.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_select_country_code), getResources().getString(R.string.str_ok));\n return;\n }\n\n if (mStringMobileNO.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_mobile_no), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringMobileNO.length() < 10 || mStringMobileNO.length() > 15) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_mobile_no), getResources().getString(R.string.str_ok));\n return;\n }\n if (!mStringEmail.equalsIgnoreCase(\"\")) {\n if (!mUtility.isValidEmail(mStringEmail)) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_email_address), getResources().getString(R.string.str_ok));\n return;\n }\n }\n if (mStringPassword.equalsIgnoreCase(\"\")) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_password), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringPassword.length() < 6 || mStringPassword.length() > 15) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_enter_valid_password), getResources().getString(R.string.str_ok));\n return;\n }\n if (!mCheckBoxTermNCondition.isChecked()) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_sign_up_agree_terms_condition), getResources().getString(R.string.str_ok));\n return;\n }\n if (mStringDevicesUIDFCMToken == null || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"null\") || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"\")) {\n mStringDevicesUIDFCMToken = FirebaseInstanceId.getInstance().getToken();\n }\n if (mStringDevicesUIDFCMToken == null || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"null\") || mStringDevicesUIDFCMToken.equalsIgnoreCase(\"\")) {\n mStringDevicesUIDFCMToken = System.currentTimeMillis() + \"\";\n }\n\n console.log(\"asxasxasxasx_token\",mStringDevicesUIDFCMToken);\n\n if (!mUtility.haveInternet()) {\n showMessageRedAlert(mRelativeLayoutMain, getResources().getString(R.string.str_no_internet_connection), getResources().getString(R.string.str_ok));\n } else {\n checkUserRegister();\n }\n }\n }", "@Override\n public void onClick(View v) {\n\n mAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(TAG, \"Email sent.\");\n messageDisplay.setText(\"Reset Email Sent Successfully!\");\n Toast.makeText(ForgotPasswordActivity.this, \"Reset Email Sent Successfully!\", Toast.LENGTH_SHORT).show();\n }\n\n else {\n //display some message here\n messageDisplay.setText(\"User Does Not Exist\");\n Toast.makeText(ForgotPasswordActivity.this, \"User Does Not Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "SendEmailResponse sendEmail(String templateId, String emailAddress, Map<String, String> personalisation, String reference) throws NotificationClientException;", "@Test \n\tpublic void testRegisterValidUser() throws Exception {\n\t\tapp.getMailinatorHelper().getEmailsNumber();\n//\t\tbasePage.fillInRegistrationForm();\n\t\t\n\t\t//Step 1: Register valid user\n\t\t//\t\tStep 1-1: Fill and send form\n\t\t//\t\tStep 1-2: Get confirm email\n\t\t//\t\tStep 1-3: Confirm registration\n\t\t//\t\tStep 1-4: Check relogin\n\t\t//\t\tStep 1-1: Register valid user\n\t\t//\t\tStep 1-1: Register valid user\n\t\t//Step 2: Check that user successfully registered\n\t\t\n\t}", "@Override\n\t\t\tprotected String doInBackground(String... params) {\n\t\t\t\tHashMap<String,String> data=new HashMap<String,String>();\n\n\t\t\t\tdata.put(\"email\",params[0]);\n\t\t\t\n\t\t\t\t\n\t\t\t\tString result=ruc.sendPostRequest(REGISTER_URL, data);\n\t\t\t\t\n\t\t\t\tif(isNetworkAvailable()==false)\n\t\t\t\t{\n\t\t\t\t\tresult=\"Maaf, anda sedang tidak terhubung ke jaringan.\";\n\t\t\t\t}\n\t\t\t\treturn result;\n\t\t\t}", "@Override\n\n public void onVerificationCompleted(PhoneAuthCredential phoneAuthCredential) {\n\n\n Toast.makeText(otpsignin.this,\"Code send to your phone\",Toast.LENGTH_SHORT).show();\n\n signInWithPhoneAuthCredential(phoneAuthCredential);\n\n }", "entities.Torrent.RegistrationRequestOrBuilder getRegistrationRequestOrBuilder();", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n firebaseUser.sendEmailVerification().addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n\n // make the progressBar invisible\n pd.cancel();\n\n // store the user name\n SharedPreferences.Editor editor = sharedPreferences.edit();\n editor.putBoolean(\"isNotVerified\",true);\n editor.putString(\"userName\",name_of_user);\n editor.putString(\"userEmail\",emailId);\n editor.putString(\"password\",userPin);\n editor.apply();\n\n // call an intent to the user verification activity\n startActivity(new Intent(LoginActivity.this,\n UserVerificationActivity.class));\n // finish this activity, so that user can't return\n LoginActivity.this.finish();\n }\n });\n\n }", "private void sendRegistrationToServer(String token, boolean status) {\n Intent intent = new Intent();\n intent.setAction(ADM_TOKEN_MESSAGE);\n intent.putExtra(ADM_TOKEN_MESSAGE_SUCCESS, status);\n intent.putExtra(ADM_TOKEN_FILTER_EXTRA, token);\n LocalBroadcastManager.getInstance(this).sendBroadcast(intent);\n }", "@Step\r\n\tpublic void fillOutRegistration(String email, String password, String fName, String lName, String phone) {\r\n\t\tenterEmail(email);\r\n\t\tenterPassword(password);\r\n\t\tenterConfirmPassword(password);\r\n\t\tenterFirstName(fName);\r\n\t\tenterLastName(lName);\r\n\t\tenterPhone(phone);\r\n\t\tclickSubmit();\r\n\t\tsleep(1000);\r\n\t}", "public void createSignUpSession(Registration registration, RegResult regResult) {\n editor.putString(KEY_ID, String.valueOf(regResult.getAUId()));\n editor.putString(KEY_EMAIL, registration.getEmail());\n editor.putString(KEY_NAME, registration.getName());\n editor.putString(KEY_NUMBER,registration.getMobile());\n //editor.putString(KEY_CARDNO,registration.getCardno());\n // Storing login value as TRUE\n editor.putBoolean(IS_LOGIN, true);\n editor.commit();\n }", "public void sendVerificationCode(int code,String mail,String password) {\n\n headers = new HashMap<>();\n headers.put(\"code\", String.valueOf(code));\n headers.put(\"mail\",mail);\n headers.put(\"password\",password);\n headers.put(\"Content-Type\", \"application/json\");\n try {\n databaseURL = \"http://ec2-18-216-46-195.us-east-2.compute.amazonaws.com:6868/verifiication_complete\";\n sendRequest(databaseURL);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Test\r\n\tpublic void TC_08_verify_Existing_Email_Address() {\r\n\r\n\t\thomePgObj = new Page_Home(driver);\r\n\t\tregPgObj = homePgObj.click_RegistrationLink();\r\n\t\t\r\n\t\t// Step 1: Verify the registration page is displayed\r\n\t\t\r\n\t\tflag = regPgObj.registrationPgDisplay();\r\n\t\tAssert.assertTrue(flag, \"Registration page is displayed\");\r\n\t\t\r\n\t\t// Step 2: Enter valid/mandatory registration details with valid email address already taken\r\n\t\t\r\n\t\tregPgObj.enterRegistrationDetails(\"firstName\", firstName);\r\n\t\tregPgObj.enterRegistrationDetails(\"lastName\", lastName);\r\n\t\tregPgObj.enterRegistrationDetails(\"email\", email);\r\n\t\tregPgObj.enterRegistrationDetails(\"password\", password);\r\n\t\tregPgObj.enterRegistrationDetails(\"confirmPassword\", confirmPassword);\r\n\t\t\r\n\t\t// Step 3: Click on Sign in button\r\n\t\t\r\n\t\tregPgObj.clickSignInButton();\r\n\t\t\r\n\t\t// Step 4: Verify user should NOT be able to proceed further with registration as proper validation message regarding already registered\r\n\t\t//email address is displayed\r\n\t\terrMsg = Page_Registration.getMandatoryFieldErrMsg();\r\n\t\tAssert.assertEquals(errMsg, \"Username already taken.\");\r\n\r\n\t}", "private McSignUp(Builder builder) {\n super(builder);\n }", "SendEmail() {\t\n\t}", "public void testSendEmail2()\n throws Exception\n {\n Gitana gitana = new Gitana();\n\n // authenticate\n Platform platform = gitana.authenticate(\"admin\", \"admin\");\n\n // create a domain and a principal\n Domain domain = platform.createDomain();\n DomainUser user = domain.createUser(\"test-\" + System.currentTimeMillis(), TestConstants.TEST_PASSWORD);\n user.setEmail(\"buildtest@gitanasoftware.com\");\n user.update();\n\n // create an application\n Application application = platform.createApplication();\n\n // create an email provider\n EmailProvider emailProvider = application.createEmailProvider(\n JSONBuilder.start(EmailProvider.FIELD_HOST).is(\"smtp.gmail.com\")\n .and(EmailProvider.FIELD_USERNAME).is(\"buildtest@gitanasoftware.com\")\n .and(EmailProvider.FIELD_PASSWORD).is(\"buildt@st11\")\n .and(EmailProvider.FIELD_SMTP_ENABLED).is(true)\n .and(EmailProvider.FIELD_SMTP_IS_SECURE).is(true)\n .and(EmailProvider.FIELD_SMTP_REQUIRES_AUTH).is(true)\n .and(EmailProvider.FIELD_SMTP_STARTTLS_ENABLED).is(true)\n .get()\n );\n\n // create an email\n Email email = application.createEmail(\n JSONBuilder.start(Email.FIELD_BODY).is(\"Here is a test body\")\n .and(Email.FIELD_FROM).is(\"buildtest@gitanasoftware.com\")\n .get()\n );\n email.setToDomainUser(user);\n email.update();\n\n // send the email\n emailProvider.send(email);\n\n // check to ensure was marked as sent, along with some data\n email.reload();\n assertTrue(email.getSent());\n assertNotNull(email.dateSent());\n assertNotNull(email.getSentBy()); \n }", "@Test\n public void testConfirmationEmail() throws Exception {\n User user = new User(username, password);\n user = userService.save(user);\n String token = registerController.generateUserToken(user);\n assert !user.isEnabled();\n\n String response = restTemplate.getForObject(url + \"/token/\" + token, String.class);\n user = userService.getUser(username);\n assert user.isEnabled();\n }", "public void verifyEmail(java.lang.String unregisteredUserEmail, java.lang.String userID, java.lang.String password, java.lang.String email, int timeout, com.strikeiron.www.holders.SIWsOutputOfVerifyEmailRecordHolder verifyEmailResult, com.strikeiron.www.holders.SISubscriptionInfoHolder SISubscriptionInfo) throws java.rmi.RemoteException;", "public void resendConfirmationToken(RegistrationRequest request) {\n String requestEmail = request.getEmail();\n\n // delete old token and create new through user service\n // and get token UUID\n String token = applicationUserService.resendConfirmationToken(\n // convert request to client user\n convertRegistrationRequestToApplicationUser(request));\n\n // create confirmation link\n String host = \"localhost:8080\";\n String link = \"http://\" + host + \"/registration/confirm?token=\" + token;\n // send email with link to the user's email address\n emailSender.send(requestEmail,\n // build email message\n EmailMessageHelper.buildEmailMessage(request.getUsername(), link));\n\n }", "private void configureSignup() {\n\n GoogleSignInOptions gso = new GoogleSignInOptions.Builder(GoogleSignInOptions.DEFAULT_SIGN_IN)\n .requestIdToken(this.getResources().getString(R.string.web_client_id))\n .requestEmail().build();\n\n // Build a GoogleApiClient with access to GoogleSignIn.API and the options above.\n mGoogleApiClient = new GoogleApiClient.Builder(this)\n .enableAutoManage(this /* FragmentActivity */, this /* OnConnectionFailedListener */)\n .addApi(Auth.GOOGLE_SIGN_IN_API, gso)\n .build();\n\n\n mGoogleApiClient.connect();\n }", "private void gcmRegister() {\n\t\taController = (Controller) getApplicationContext();\n\n\t\t// Check if Internet present\n\t\tif (!aController.isConnectingToInternet()) {\n\n\t\t\t// Internet Connection is not present\n\t\t\taController.showAlertDialog(RegisterActivity.this,\n\t\t\t\t\t\"Internet Connection Error\",\n\t\t\t\t\t\"Please connect to Internet connection\", false);\n\t\t\t// stop executing code by return\n\t\t\treturn;\n\t\t}\n\t\t// Make sure the device has the proper dependencies.\n\t\tGCMRegistrar.checkDevice(this);\n\n\t\t// Make sure the manifest permissions was properly set\n\t\tGCMRegistrar.checkManifest(this);\n\t\t// Register custom Broadcast receiver to show messages on activity\n\t\tregisterReceiver(mHandleMessageReceiver, new IntentFilter(\n\t\t\t\tConfig.DISPLAY_MESSAGE_ACTION));\n\n\t\t// Get GCM registration id\n\t\tfinal String regId = GCMRegistrar.getRegistrationId(this);\n\t\tLog.i(\"regId\", regId);\n\n\t\t// Check if regid already presents\n\t\tif (regId.equals(\"\")) {\n\n\t\t\t// Register with GCM\n\t\t\tGCMRegistrar.register(getApplicationContext(),\n\t\t\t\t\tConfig.GOOGLE_SENDER_ID);\n\n\t\t} else {\n\n\t\t\t// Device is already registered on GCM Server\n\t\t\tif (GCMRegistrar.isRegisteredOnServer(this)) {\n\t\t\t\t// Try to register again, but not in the UI thread.\n\t\t\t\t// It's also necessary to cancel the thread onDestroy(),\n\t\t\t\t// hence the use of AsyncTask instead of a raw thread.\n\n\t\t\t\tfinal Context context = this;\n\t\t\t\tmRegisterTask = new AsyncTask<Void, Void, Void>() {\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected Void doInBackground(Void... params) {\n\n\t\t\t\t\t\t// Register on our server\n\t\t\t\t\t\t// On server creates a new user\n\n\t\t\t\t\t\taController.register(context, email, regId);\n\t\t\t\t\t\treturn null;\n\t\t\t\t\t}\n\n\t\t\t\t\t@Override\n\t\t\t\t\tprotected void onPostExecute(Void result) {\n\t\t\t\t\t\tmRegisterTask = null;\n\t\t\t\t\t}\n\n\t\t\t\t};\n\n\t\t\t\t// execute AsyncTask\n\t\t\t\tmRegisterTask.execute(null, null, null);\n\n\t\t\t} else {\n\n\t\t\t}\n\t\t}\n\t}", "@Override\n\n public void onVerificationFailed(FirebaseException e) {\n\n Toast.makeText(otpsignin.this,\"Something went wrong\",Toast.LENGTH_SHORT).show();\n\n }", "@Override\n public void onComplete(@NonNull Task<String> task) {\n if (!task.isSuccessful()) {\n Log.w(TAG, \"Fetching FCM registration token failed\", task.getException());\n return;\n } else {\n Log.i(TAG, \"onComplete: firbaSE GOT A TOKEN\");\n }\n\n // Get new FCM registration token\n String token = task.getResult();\n\n\n }", "public void posaljiRegistracioniEmail(final RegistracijaDto dto) {\n final Context context = popuniKontextRegistracionogEmaila(dto);\n sendEmail.pripremiIPosaljiEmail(dto.EMAIL_ZA_PRIMANJE, dto.NASLOV, dto.TEMPLATE, context);\n }", "private void createRegistrationAnswer(boolean existEMail, boolean existUser, boolean registrationCompleted) {\n\t\tUserAuthenticationAckMessage uaaMessage = new UserAuthenticationAckMessage(MIDs.REGISTRATION);\n\t\tuaaMessage.setAuthentication(registrationCompleted);\n\t\tuaaMessage.setUserExists(existUser);\n\t\tuaaMessage.setEMailExists(existEMail);\n\t\tthis.mesController.sendMessage(uaaMessage);\n\t}", "public String fbWebSignup(String accessToken, String expires, String msoString, HttpServletRequest req, HttpServletResponse resp) {\r\n log.info(\"msoString:\" + msoString);\r\n FacebookMe me = new FacebookLib().getFbMe(accessToken);\r\n return this.fbSignup(me, expires, msoString, req, resp);\r\n }", "@When(\"^I fill in valid Email address and click on create an account$\")\n\tpublic void I_fill_in_valid_Email_address_and_click_on_create_an_account() throws Throwable {\n\n\t\trandomNumber r = new randomNumber();\n\t\tString emailString = \"Example\" + r.gen();\n\t\tString emailAddress = emailString + \"@gmail.com\";\n\t\tdriver.findElement(By.id(\"email_create\")).sendKeys(emailAddress);\n\t\tdriver.findElement(By.id(\"SubmitCreate\")).submit();\n\t}", "private void registerBackground() {\n new AsyncTask<Void,Void,Boolean>() {\n @Override\n protected Boolean doInBackground(Void... params) {\n try {\n if (gcm == null) {\n gcm = GoogleCloudMessaging.getInstance(context);\n }\n mregistrationGCMMessageView.setText(R.string.looking_for_regid);\n regid = gcm.register(SENDER_ID);\n \n // Save the regid - no need to register again.\n setRegistrationId(context, regid);\n\n } catch (IOException ex) {\n \tLog.v(\"RegisterGCM\", \"Registration not found. \" + ex);\n \treturn false;\n }\n return true;\n }\n\n @Override\n protected void onPostExecute(Boolean result) {\n if(!result)\n \tmregistrationGCMMessageView.setText(R.string.failed_regid);\n else\n \taskForUserAndPassword();\n }\n }.execute(null, null, null);\n }", "@Test(priority=1, dataProvider=\"User Details\")\n\t\tpublic void registration(String firstname,String lastname,String emailAddress,\n\t\t\t\tString telephoneNum,String address1,String cityName,String postcodeNum,\n\t\t\t\tString country,String zone,String pwd,String confirm_pwd) throws Exception{\n\t\t\t\n\t\t\thomePage = new HomePage(driver);\n//'**********************************************************\t\t\t\n//Calling method to click on 'Create Account' link\n\t\t\tregistraionPageOC = homePage.clickCreateAccount();\n//'**********************************************************\t\t\t\n//Calling method to fill user details in Registration page and verify account is created\n\t\t\tregistraionPageOC.inputDetails(firstname,lastname,emailAddress,telephoneNum,address1,cityName,postcodeNum,country,zone,pwd,confirm_pwd);\n\t\t\ttry{\n\t\t\tAssert.assertEquals(\"Your Account Has Been Created!\", driver.getTitle(),\"Titles Not Matched: New Account Not Created\");\n\t\t\textentTest.log(LogStatus.PASS, \"Registration: New User Account is created\");\n\t\t\t}catch(Exception e){\n\t\t\t\textentTest.log(LogStatus.FAIL, \"Registration is not successful\");\n\t\t\t}\n\t\t}", "public void verifyCodePressed(View view) {\r\n emailTo = String.valueOf(etEmail.getText());\r\n //Generate the random verify code\r\n verifyCode = (int)((Math.random() * 9 + 1) * 100000);\r\n Toast.makeText(ForgetPswActivity.this,\"Sending..... the verify code\", Toast.LENGTH_LONG).show();\r\n Thread thread = new Thread(){\r\n @Override\r\n public void run() {\r\n EmailUtil.getInstance().sendEmail(emailTo,\"Verify Code from Digital Learner Logbook\",\r\n \"DLL send a verify code: \" + verifyCode +\r\n \", This code is for reset the password only!\" );\r\n\r\n Looper.prepare();\r\n Toast.makeText(ForgetPswActivity.this,\"Sent the verify code\", Toast.LENGTH_LONG).show();\r\n Looper.loop();\r\n }\r\n };\r\n thread.start();\r\n\r\n }", "private void createAccount() {\n mAuth.createUserWithEmailAndPassword(mTextEmail.getText().toString(), mTextPassword.getText().toString()).addOnCompleteListener(this, new OnCompleteListener<AuthResult>() {\n @Override\n public void onComplete(@NonNull Task<AuthResult> task) {\n Log.d(TAG, \"createUserWithEmail:onComplete:\" + task.isSuccessful());\n\n if(!task.isSuccessful()){\n Toast.makeText(SignInActivity.this, \"Account creation failed!\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, \"Account creation success!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "public void sendMail(String to) throws URISyntaxException, IOException {\n final String username = \"kicsikacsacodecool\";//change accordingly\n final String password = \"codecool\";//change accordingly\n\n // Assuming you are sending email through relay.jangosmtp.net\n String host = \"relay.jangosmtp.net\";\n\n Properties props = new Properties();\n props.put(\"mail.smtp.auth\", \"true\");\n props.put(\"mail.smtp.starttls.enable\", \"true\");\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.port\", \"587\");\n\n // Get the Session object.\n Session session = Session.getInstance(props,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n\n try {\n // Create a default MimeMessage object.\n Message message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(\"kicsikacsacodecool@gmail.com\"));\n\n // Set To: header field of the header.\n message.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(to));\n\n // Set Subject: header field\n message.setSubject(\"Webshop Registration\");\n\n // Now set the actual message\n message.setText(\"Welcome to the codecool webshop !!\");\n\n // Send message\n try {\n Transport.send(message);\n } catch (Exception e) {\n System.out.println(e);\n }\n\n System.out.println(\"Sent message successfully....\");\n\n } catch (MessagingException e) {\n throw new RuntimeException(e);\n }\n }", "public static void RegisterPhone(final Activity activity,final String phoneNumber,final Dialog dialog,final EditText input,final Button send,final Button resend,final GifImageView counter){\n smsCode = phoneVerificationId;\n\n\n FirebaseAuth firebaseAuth = FirebaseAuth.getInstance();\n FirebaseAuthSettings firebaseAuthSettings = firebaseAuth.getFirebaseAuthSettings();\n\n// Configure faking the auto-retrieval with the whitelisted numbers.\n firebaseAuthSettings.setAutoRetrievedSmsCodeForPhoneNumber(phoneNumber, smsCode);\n\n PhoneAuthProvider phoneAuthProvider = PhoneAuthProvider.getInstance();\n phoneAuthProvider.verifyPhoneNumber(\n phoneNumber,\n 60L,\n TimeUnit.SECONDS,\n activity, /* activity */\n mCallbacks = new PhoneAuthProvider.OnVerificationStateChangedCallbacks() {\n @Override\n public void onVerificationCompleted(PhoneAuthCredential credential) {\n // Instant verification is applied and a credential is directly returned.\n // ...\n //SignInWithPhoneAuthCredential(activity,credential,dialog,input,send,resend,counter);\n Toast.makeText(activity, \"credentials : \"+credential, Toast.LENGTH_SHORT).show();\n Toast.makeText(activity, \"Sms : \"+smsCode, Toast.LENGTH_SHORT).show();\n Toast.makeText(activity, \"phone verification Id : \"+phoneVerificationId, Toast.LENGTH_SHORT).show();\n smsMessage = credential.getSmsCode();\n }\n\n @Override\n public void onVerificationFailed(FirebaseException e) {\n Log.e(TAG, \"Error adding document\", e);\n if (e instanceof FirebaseAuthInvalidCredentialsException) {\n Log.d(constants.PhoneRegTag, \"Invalid Credentials\");\n } else if (e instanceof FirebaseTooManyRequestsException) {\n Log.d(constants.PhoneRegTag, \"SMS Verification Pin needed\");\n }\n }\n\n @Override\n public void onCodeSent(String verificationId, PhoneAuthProvider.ForceResendingToken token) {\n phoneVerificationId = verificationId;\n resendingToken = token;\n //PhoneAuthCredential credential = PhoneAuthProvider.getCredential(phoneVerificationId,token.toString());\n //smsMessage = credential.getSmsCode();\n counter.setVisibility(View.GONE);\n input.setVisibility(View.VISIBLE);\n input.requestFocus();\n send.setVisibility(View.VISIBLE);\n resend.setVisibility(View.VISIBLE);\n // The SMS verification code has been sent to the provided phone number, we\n // now need to ask the user to enter the code and then construct a credential\n //and then execute your method if number entered is correct.\n }\n\n\n });\n\n }" ]
[ "0.6713119", "0.64450157", "0.6356734", "0.63211626", "0.6318775", "0.6318775", "0.6318775", "0.6318775", "0.63083875", "0.62657595", "0.62194866", "0.61766994", "0.6129938", "0.60953665", "0.6024301", "0.60018164", "0.59783745", "0.5973599", "0.5973599", "0.5949516", "0.59444237", "0.59329766", "0.5932868", "0.5887127", "0.5885997", "0.58768934", "0.5821118", "0.58161205", "0.5812831", "0.5774456", "0.5768499", "0.5738003", "0.5736774", "0.57239765", "0.57205725", "0.57148564", "0.56699884", "0.5660817", "0.5653887", "0.55874497", "0.55808043", "0.55793357", "0.55727905", "0.5557456", "0.55561775", "0.55501884", "0.5540308", "0.5534129", "0.5525827", "0.55065507", "0.54897493", "0.5488575", "0.54739106", "0.5469364", "0.5463155", "0.54457027", "0.54311705", "0.54276514", "0.54179335", "0.54100853", "0.540001", "0.539891", "0.53982407", "0.5397545", "0.5389655", "0.538206", "0.5378047", "0.5363038", "0.5358335", "0.5343411", "0.5341815", "0.53388464", "0.53333503", "0.53314203", "0.53121847", "0.5309265", "0.53057075", "0.5303068", "0.5302454", "0.52978927", "0.5295248", "0.5291202", "0.52776295", "0.5273129", "0.5272181", "0.52666533", "0.5259815", "0.52572936", "0.52526003", "0.5244402", "0.52423793", "0.5232065", "0.522322", "0.5217023", "0.5210177", "0.5209167", "0.52078193", "0.52062196", "0.52010965", "0.51994693" ]
0.64142644
2
Build & send password reset email
public void sendResetEmail(User user, HttpServletRequest request) { try { VerificationToken token = new VerificationToken(user); verificationTokenRepo.save(token); String appUrl = request.getScheme() + Constants.SERVER_URL + "register/reset-password/" + token.getToken(); UserDTO userDTO = new UserDTO(); userDTO.setFirstName(user.getFirstName()); userDTO.setUsername(user.getUsername()); // Build message body Map<String, Object> modelObject = null; modelObject = ImmutableMap.of( "name", userDTO.getFirstName(), "appUrl", appUrl ); // Send email with required info sendMimeEmailWithFreemarker(Constants.PASSWORDSUBJECT, Constants.PASSWORDTEMPLATE, userDTO, modelObject); } catch (UnsupportedEncodingException | CannotSendEmailException | URISyntaxException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void sendEmail(String randPass) {\n\t\t// Recipient's email ID needs to be mentioned.\n\t String to = \"kingstead1@gmail.com\";\n\n\t // Sender's email ID needs to be mentioned\n\t String from = \"kingstead1@gmail.com\";\n\n\t // Get system properties\n\t Properties properties = System.getProperties();\n\t \tproperties = System.getProperties();\n\t properties.put(\"mail.smtp.auth\", \"true\");\n\t properties.put(\"mail.smtp.starttls.enable\", \"true\");\n\t properties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\t properties.put(\"mail.smtp.port\", \"587\");\n\n\t // Get the default Session object.\n\t Session session = Session.getInstance(properties, new javax.mail.Authenticator() {\n\t protected PasswordAuthentication getPasswordAuthentication() {\n\t return new PasswordAuthentication(\"user\", \"pass\");\n\t }\n\t });\n\n\t try {\n\t // Create a default MimeMessage object.\n\t MimeMessage message = new MimeMessage(session);\n\n\t // Set From: header field of the header.\n\t message.setFrom(new InternetAddress(from));\n\n\t // Set To: header field of the header.\n\t message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n\n\t // Set Subject: header field\n\t message.setSubject(\"Dart Password Reset\");\n\t // Now set the actual message\n\t message.setText(\"You're getting this message because you've requested to reset your password! Your new password is: \" + randPass + \" ! Don't forget it.\");\n\n\t // Send message\n\t Transport.send(message);\n\t System.out.println(\"Sent message successfully....\");\n\t } catch (MessagingException mex) {\n\t mex.printStackTrace();\n\t }\n\n\t}", "private String getSendMailResetPasswordContent(UserForm userForm) {\n return \"\";\n }", "private void sendPwResetEmail(String email)\n {\n FirebaseAuth auth = FirebaseAuth.getInstance();\n String emailAddress = email;\n\n auth.sendPasswordResetEmail(emailAddress)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(TAG, \"Email sent.\");\n }\n }\n });\n }", "public static void sendResetPassword(Context context, String email) {\n FirebaseAuth.getInstance().sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) { // Reset email password successfully sent\n Log.d(\"RecipeFinderAuth\", \"Email Sent!\");\n Toast.makeText(context, \"Email Sent!\", Toast.LENGTH_SHORT).show();\n ((AppCompatActivity)(context)).finish();\n } else { // Failed to send reset email password\n Toast.makeText(context, \"Failed to Send Email!\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "private void resetPassword() {\n EditText etEmail = findViewById(R.id.etResetEmail);\n final String email = etEmail.getText().toString();\n\n if (email.isEmpty()) {\n etEmail.setError(\"Email field is required.\");\n etEmail.requestFocus();\n } else if (!Patterns.EMAIL_ADDRESS.matcher(email).matches()) {\n etEmail.setError(\"Valid email address required.\");\n etEmail.requestFocus();\n } else {\n mAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(\"PASSWORD_RESET\", \"Email sent.\");\n Toast.makeText(LoginActivity.this,\n \"An email has been sent to \" + email\n + \". Please check your inbox.\", Toast.LENGTH_LONG).show();\n changeForm(R.id.btnSignInForm);\n } else {\n //TODO: add some error notification for user here.\n Log.d(\"PASSWORD_RESET\", \"Failure.\");\n }\n }\n });\n }\n }", "String getPasswordExpiredMailBody( );", "public void sendPasswordEmail(String myEmail) {\n String to = myEmail;\n\n // Sender's email ID needs to be mentioned\n String from = \"IT353Uconnect@gmail.com\";\n\n // Assuming you are sending email from this host\n String host = \"smtp.gmail.com\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n properties.setProperty(\"mail.smtp.starttls.enable\", \"true\");\n properties.setProperty(\"mail.smtp.auth\", \"true\");\n properties.setProperty(\"mail.smtp.port\", \"587\");\n // Get the default Session object.\n Session session = Session.getInstance(properties, new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(\"IT353Uconnect@gmail.com\", \"itkstuadmin\");\n }\n });\n\n try {\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO,\n new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject(\"Password\");\n\n // Send the actual HTML message, as big as you like\n message.setContent(\"<p>Hello \" + theModel.getEmail() + \", your password is: \" + theModel.getPassword() + \"</p>\", \"text/html;charset=UTF-8\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n } catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n auth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, R.string.reset_sent, Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, getString(R.string.reset_not_sent) + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "public void sendMail() {\n String email = emailID.getText().toString();\n String subject = \"BlueBucket One-Time OTP\";\n otp=generateOTP();\n String message = \"\"+otp;\n\n //Creating SendMail object\n SendMail sm = new SendMail(this, email, subject, message);\n\n //Executing sendmail to send email\n sm.execute();\n }", "public static String generateNewPassword(String toMail){\n String newPassword = genString(); //generate a new password\n String newPasswordText = \"Hello, your new password for Household Manager is: \"+newPassword+\n \"\\n Please log in and change your password. You can do this by pressing 'My Profile'->'Edit Profile'\";\n sendMail(toMail,newPasswordText); //Send the new password to the users email.\n return newPassword; //return the new password\n }", "private void SendEmail(String password, String emailTo, String staffNames)\n {\n String to = emailTo;\n\n // Sender's email ID needs to be mentioned\n String from = \"noreply@HelpManager.com\";\n\n // Assuming you are sending email from localhost\n String host = \"smtp.upcmail.ie\";\n\n // Get system properties\n Properties properties = System.getProperties();\n\n // Setup mail server\n properties.setProperty(\"mail.smtp.host\", host);\n \n // Get the default Session object.\n Session session = Session.getDefaultInstance(properties);\n\n try{\n // Create a default MimeMessage object.\n MimeMessage message = new MimeMessage(session);\n\n // Set From: header field of the header.\n message.setFrom(new InternetAddress(from));\n\n // Set To: header field of the header.\n message.addRecipient(Message.RecipientType.TO,\n new InternetAddress(to));\n\n // Set Subject: header field\n message.setSubject(\"Password Change From Help Manager\");\n\n // Now set the actual message\n message.setText(\"Hello \"+staffNames +\", \\n\\n Your new Password is: \"+ password +\".\\n\\n Regards \\n Help Manager Team\");\n\n // Send message\n Transport.send(message);\n System.out.println(\"Sent message successfully....\");\n }catch (MessagingException mex) {\n mex.printStackTrace();\n }\n }", "private void getResetPassword() {\n\t\t// TODO Auto-generated method stub\n\t\tdialog = new ZProgressHUD(ChangePasswordActivity.this);\n\t\tdialog.setMessage(\"Pls wait ...\");\n\t\tdialog.show();\n\t\t\n\t\tNetworkEngine.setIP(\"starticketmyanmar.com\");\n\t\tNetworkEngine.getInstance().GetResetPassword(email, code, new_password, new Callback<ForgotPassword>() {\n\t\t\t\n\t\t\tpublic void success(ForgotPassword arg0, Response arg1) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tif (arg0 != null) {\n\t\t\t\t\t\n\t\t\t\t\tif (arg0.getStatus() == 400) {\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Your account has already been reset password\", SKToastMessage.ERROR);\n\t\t\t\t\t}\n\n\t\t\t\t\tif (arg0.getStatus() == 200) {\n\t\t\t\t\t\t\n\t\t\t\t\t\tSKToastMessage.showMessage(ChangePasswordActivity.this, \"Change Password Success\", SKToastMessage.SUCCESS);\n\t\t\t\t\t\tcloseAllActivities();\n\t\t\t\t\t\tstartActivity(new Intent(ChangePasswordActivity.this, SaleTicketActivity.class));\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tdialog.dismiss();\n\t\t\t}\n\t\t\t\n\t\t\tpublic void failure(RetrofitError arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\tdialog.dismissWithFailure();\n\t\t\t}\n\t\t});\n\t}", "@RequestMapping\n public ModelAndView mailForPasswd(Map<String, Object> out , HttpServletRequest request , String username)\n throws IOException, NoSuchAlgorithmException{\n SeoUtil.getInstance().buildSeo(\"resetPassword\",\n new String[]{\"邮箱找回登录密码\"},\n new String[]{\"\"},\n new String[]{\"\"},out);\n CompanyAccount companyAccount = companyAccountService.queryAccountByAccount(username);\n GetPasswordLog getPasswordLog = new GetPasswordLog();\n getPasswordLog.setCompanyId(companyAccount.getCompanyId());\n getPasswordLog.setType(EMAIL_TYPE);\n if (getPasswordLogService.numOfType(companyAccount.getCompanyId(), EMAIL_TYPE) < 5) {\n String email = companyAccount.getEmail();\n if (companyAccount.getIsUseBackEmail() != null && companyAccount.getIsUseBackEmail().equals(\"1\")) {\n email = companyAccount.getBackEmail();\n }\n String key = authService.generateForgotPasswordKey(email);\n if(key!=null){\n String url=\"#\";\n if(request.getServerPort()==80){\n url=request.getServerName()+request.getContextPath();\n }else{\n url=request.getServerName()+\":\"+request.getServerPort()+request.getContextPath();\n }\n authService.sendResetPasswordMail(key,email,url);\n getPasswordLogService.insertPasswordLog(getPasswordLog);\n }\n int index = email.indexOf(\"@\");\n String hiddenEmail = email.replace(email.substring(4, index), \"**\");\n String goEmail = \"http://mail.\"+email.substring(index+1,email.length());\n out.put(\"username\", username);\n out.put(\"email\", email);\n out.put(\"hiddenEmail\", hiddenEmail);\n out.put(\"goEmail\", goEmail);\n return new ModelAndView();\n } else {\n out.put(\"username\", username);\n out.put(\"error\", \"1\");\n return new ModelAndView(\"/user/getPasswd\");\n }\n \n }", "private void sendEmailWithNewPassword(final BusinessUserDetail user, final String newPassword) {\n eventBus.setLoadingProgress(60, null);\n ContactUsDetail dialogDetail = new ContactUsDetail();\n dialogDetail.setRecipient(user.getEmail());\n dialogDetail.setMessage(Storage.MSGS.resetPasswordEmail(user.getPersonFirstName(), newPassword));\n dialogDetail.setSubject(Storage.MSGS.resetPasswordEmailSubject());\n mailService.sendMail(dialogDetail, new SecuredAsyncCallback<Boolean>(eventBus) {\n @Override\n public void onSuccess(Boolean result) {\n eventBus.setLoadingProgress(100, Storage.MSGS.resetPasswordInfoStatus());\n }\n });\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset Link Sent To Your Email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error ! Reset Link is Not Sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void sendMessage() throws DLException{\n // adjust mail properties\n Properties properties = System.getProperties();\n properties.put(\"mail.smtp.port\", \"587\");\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.auth\", \"true\");\n properties.setProperty(\"mail.smtp.host\", host);\n Session session = Session.getInstance(properties,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(sender, senderPassword);\n }\n });\n \n try { \n // MimeMessage object. \n MimeMessage message = new MimeMessage(session); \n \n // Set From Field: adding senders email to from field. \n message.setFrom(new InternetAddress(sender)); \n \n // Set To Field: adding recipient's email to from field. \n message.addRecipient(Message.RecipientType.TO, new InternetAddress(recipient)); \n \n // Set Subject: subject of the email \n message.setSubject(\"Reset Password Request\"); \n \n // set body of the email. \n message.setText(\"Here is your temporary password: \" + password + \"\\nIt will expire in 5 minutes.\"); \n \n // Send email. \n Transport.send(message); \n System.out.println(\"Mail successfully sent\");\n \n } catch (MessagingException mex) { \n new DLException(mex);\n System.out.println(\"Something went wrong in sending an email\");\n } \n }", "private void sendEmail(String email, String password, String name) {\n \n String to = email;\n String from = \"twitproject16@yahoo.com\";\n String subject = \"New Password\";\n String body = \"Dear \" + name + \",\\n\\n\" +\n \"You recently requested a password change. Here is your new password: \\n\\n\" +\n password +\n \"\\n\\nHave a great day!\\n\\n\" +\n \"Twitter Team\\n\" +\n \"Alex Foreman & Paul Brown\";\n boolean isBodyHTML = false;\n\n try\n {\n MailUtilYahoo.sendMail(to, from, subject, body, isBodyHTML);\n }\n catch (MessagingException e)\n {\n this.log(\n \"Unable to send email. \\n\" +\n \"Here is the email you tried to send: \\n\" +\n \"=====================================\\n\" +\n \"TO: \" + email + \"\\n\" +\n \"FROM: \" + from + \"\\n\" +\n \"SUBJECT: \" + subject + \"\\n\" +\n \"\\n\" +\n body + \"\\n\\n\");\n } \n }", "private void showForgotPasswordDialog() {\n LayoutInflater inflater = LayoutInflater.from(this);\n View dialogView = inflater.inflate(R.layout.dialog_forgot_password, null);\n final TextInputEditText emailEditText = dialogView.findViewById(R.id.dialog_forgot_password_value_email);\n //endregion\n\n //region Building the dialog\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(R.string.password_reset);\n\n builder.setPositiveButton(R.string.reset, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n\n String email = emailEditText.getText().toString();\n\n mFirebaseAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(SignInActivity.this, R.string.sent_reset_password_email, Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(SignInActivity.this, R.string.failed_to_reset_email, Toast.LENGTH_SHORT).show();\n }\n }\n });\n dialog.dismiss();\n }\n });\n builder.setNegativeButton(R.string.cancel, new DialogInterface.OnClickListener() {\n public void onClick(DialogInterface dialog, int id) {\n dialog.dismiss();\n }\n });\n //endregion\n\n builder.setView(dialogView);\n\n AlertDialog dialog = builder.create();\n dialog.show();\n }", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n mAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LoginActivity.this,\"Reset Link sent to your Email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LoginActivity.this,\"Error ! Reset Link is Not Sent.\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Override\n\tpublic void createDigestEmail() {\n\n\t}", "@RequestMapping(value = \"/forgot-password\", method = RequestMethod.POST)\n\tpublic String forgotPasswordEmail(HttpServletRequest request, @ModelAttribute(\"email\") @Valid EmailDto email,\n\t\t\t\t\t\t\t\t\t BindingResult bindingResult, Model model)\n\t{\n\t\tUser user = userService.findUserByEmail(email.getEmail());\n\t\tif (user == null) {\n\t\t\tmodel.addAttribute(\"error\", messages.getMessage(\"message.emailNotExist\", null, null));\n\t\t\treturn \"user/forgot-password\";\n\t\t}\n\n\t\t/* Create new Password Token */\n\t\tString token = UUID.randomUUID().toString();\n\t\tsecurityService.createPasswordResetToken(user, token);\n\n\t\t/* Send Password Reset Token E-mail */\n\t\tSimpleMailMessage passwordResetEmail = userService.constructResetTokenEmail(userService.getAppUrl(request), token, user);\n\t\tsecurityService.sendEmail(passwordResetEmail);\n\n\t\treturn \"redirect:/forgot-password-confirm\";\n\t}", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String mail = resetMail.getText().toString();\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogIn.this,\"Reset Link sent.\",Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogIn.this,\"Error | Reset Link not sent.\",Toast.LENGTH_SHORT).show();\n }\n });\n }", "@Test\n\tpublic void verifySuccessMessageUponSubmittingValidEmailInForgetPasswordPage() throws Exception{\n\t\tLoginOtomotoProfiLMSPage loginPage = new LoginOtomotoProfiLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.languageDropdown);\n\t\tactionClick(driver,loginPage.languageDropdown);\n\t\twaitTill(1000);\n\t\tactionClick(driver,loginPage.englishOptioninLangDropdown);\n\t\tFogrotPasswordOTMPLMSPage forgotPasswordPageObj = new FogrotPasswordOTMPLMSPage(driver);\n\t\texplicitWaitFortheElementTobeVisible(driver,loginPage.forgotPasswordLink);\n\t\tjsClick(driver,loginPage.forgotPasswordLink);\n\t\texplicitWaitFortheElementTobeVisible(driver,forgotPasswordPageObj.forgotPasswordPageHeading);\n\t\tsendKeys(forgotPasswordPageObj.forgotPasswordEmailInputField, testUserPL);\n\t\tjsClick(driver,forgotPasswordPageObj.forgotPasswordRecoveryButton);\n\t\twaitTill(2000);\n\t Assert.assertEquals(getText(forgotPasswordPageObj.forgotPasswordSuccessMessage), \"We've sent you an email with a link to reset your password. You may close this tab and check your email.\", \"Success message is not displaying upon submitting the forget password page with valid ceredentials\");\n\t}", "@Override\n public void onClick(View v) {\n if (currentPwd.getText().toString().equals(MainActivity.pwd)) {\n Toast.makeText(ResetPassword.this, \"Correct password\", Toast.LENGTH_SHORT).show();\n FirebaseAuth auth = FirebaseAuth.getInstance();\n auth.sendPasswordResetEmail(MainActivity.email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(ResetPassword.this, \"Email sent\", Toast.LENGTH_SHORT).show();\n changeActivity(ResetPassword.this, Settings.class);\n } else {\n Toast.makeText(ResetPassword.this, \"Error occurred\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n } else {\n Toast.makeText(ResetPassword.this, \"Incorrect password\", Toast.LENGTH_SHORT).show();\n }\n }", "@Override\n\tpublic void sendNewPassword(String email, String password) {\n\t\tSimpleMailMessage message = getPasswordEmailMessage(email, password);\n mailSender.send(message);\n\t}", "@Test\n void resetPasswordRequest() throws Exception {\n ResetPasswordForm request = mockModel.generateResetPasswordForm();\n\n MvcResult mvcResult = mockMvc.perform(post(PATH + \"reset/password/request\")\n .contentType(MediaType.APPLICATION_JSON)\n .content(asJsonString(request)))\n .andExpect(status().is2xxSuccessful())\n .andExpect(view().name(\"login\"))\n .andExpect(model().attributeExists(\"success\"))\n .andExpect(model().attribute(\"success\", is(\"Email has been send!\")))\n .andReturn();\n\n verify(userService, times(1)).sendEmailWithLinkAndResetPassword(any());\n }", "private void forgotPasswordDialog() {\n mForgotPassword.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n AlertDialog.Builder builder = new AlertDialog.Builder(LoginActivity.this);\n builder.setTitle(\"Reset Password\");\n final EditText emailInput = new EditText(LoginActivity.this);\n emailInput.setHint(\"Enter email of forgotten account.\");\n emailInput.setInputType(InputType.TYPE_CLASS_TEXT);\n builder.setView(emailInput);\n builder.setPositiveButton(\"Send Reset Instructions\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String email = emailInput.getText().toString().trim();\n if (email.isEmpty()) {\n Toast.makeText(LoginActivity.this, \"Please type an email\", Toast.LENGTH_SHORT).show();\n } else {\n mAuth.sendPasswordResetEmail(email).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(LoginActivity.this, \"Password reset instructions sent\", Toast.LENGTH_SHORT).show();\n } else {\n Toast.makeText(LoginActivity.this, \"Invalid email entered. Please try again\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }\n }\n });\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n }\n });\n\n }", "private String getSendMailPasswordContent(UserForm userForm) {\n return \"\";\n\n }", "@Transactional(readOnly = true)\n public void sendResetPasswordJwe(String email)\n throws JOSEException, UnsupportedEncodingException, MessagingException {\n Optional<User> u = userRepository.findByEmail(email);\n if (u.isPresent()) {\n JWTClaimsSet claimsSet = new JWTClaimsSet.Builder()\n .subject(PASSWORD_RESET)\n .claim(\"uid\", u.get().getId())\n .expirationTime(Date.from(Instant.now().plus(JOSE_DURATION)))\n .build();\n\n mailService.sendResetPasswordMail(u.get(), joseHelper.signEncrypt(claimsSet));\n }\n }", "@RequestMapping\n public ModelAndView mailForAuth(Map<String, Object> out , HttpServletRequest request ){\n SeoUtil.getInstance().buildSeo(\"resetPassword\",\n new String[]{\"邮箱找回用户名\"},\n new String[]{\"\"},\n new String[]{\"\"},out);\n return new ModelAndView();\n }", "public void Send(String ToMail,int id,String name){\n String link = \"http://localhost:8080/Project/resetpassword.jsp\";\n String m_text = \"<table style=\\\"width: 100% !important\\\" >\\n\" +\n\" <tbody>\\n\" +\n\" <tr>\\n\" +\n\" <td>\\n\" +\n\" <div>\\n\" +\n\" <h2>Hello, \"+name+\"</h2>\\n\" +\n\" </div>\\n\" +\n\" <div>\\n\" +\n\" You recently took steps to reset the password for your Hanger account. Click on the link below to reset your password.\\n\" +\n\" </div>\\n\" +\n\" <br>\\n\" +\n\" <a href=\\\"\"+link+\"?id=\"+id+\"\\\">Reset Password</a>\\n\" +\n\" <br>\\n\" +\n\"\\n\" +\n\" <div>\\n\" +\n\" This link will expire in 1 days after this email was sent.\\n\" +\n\" </div>\\n\" +\n\"\\n\" +\n\" <br>\\n\" +\n\" <div>\\n\" +\n\" Sincerely,\\n\" +\n\" <h4>The Hanger Team</h4>\\n\" +\n\" </div>\\n\" +\n\" </td>\\n\" +\n\" </tr>\\n\" +\n\" </tbody>\\n\" +\n\" </table>\";\n send( d_email, d_host, d_port, ToMail, m_subject, m_text);\n }", "@Override\n public void onClick(View view) {\n final EditText emailField = new EditText(view.getContext());\n AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());\n passwordResetDialog.setIcon(android.R.drawable.ic_dialog_email)\n .setTitle(\"Reset password\")\n .setMessage(\"Enter your email to receive the reset link\")\n .setView(emailField)\n .setNegativeButton(\"NO\",null)\n .setPositiveButton(\"YES\", new DialogInterface.OnClickListener() {\n /**\n * Confirms password reset request\n * Sends an email to user to reset password\n * @param dialogInterface interface\n * @param i index\n */\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Extract email address\n String mail = emailField.getText().toString();\n if (mail.length()==0){\n Toast.makeText(LogInActivity.this, \"Enter a valid email\", Toast.LENGTH_SHORT).show();\n return;\n }\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n /**\n * Displays toast when password reset email is successfully sent\n * @param aVoid VarArgs\n */\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n /**\n * Displays email when password reset email fails to send\n * @param e exception\n */\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n passwordResetDialog.create().show();\n }", "public void sendEmail(String recipient,String password);", "@Override\n public void onClick(DialogInterface dialog, int which) {\n String mail = resetMail.getText().toString();\n fAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Login.this, \"Reset link sent to your email.\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Login.this, \"Error! Reset link was not sent\" + e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n\n }", "@Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Extract email address\n String mail = emailField.getText().toString();\n if (mail.length()==0){\n Toast.makeText(LogInActivity.this, \"Enter a valid email\", Toast.LENGTH_SHORT).show();\n return;\n }\n firebaseAuth.sendPasswordResetEmail(mail).addOnSuccessListener(new OnSuccessListener<Void>() {\n /**\n * Displays toast when password reset email is successfully sent\n * @param aVoid VarArgs\n */\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(LogInActivity.this, \"Email is send\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n /**\n * Displays email when password reset email fails to send\n * @param e exception\n */\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }\n });\n }", "public void resetPass(View view) {\n\n\t\tfinal Firebase myFirebaseRef = new Firebase(\"https://glowing-inferno-4690.firebaseio.com/\");\n\n\t\tfinal EditText resetEmail = (EditText)findViewById(R.id.emailText);\n\n\t\tSystem.out.println(\"EMAIL TO RESET: \" + resetEmail.getText().toString());\n\n\t\tmyFirebaseRef.resetPassword(resetEmail.getText().toString(), new Firebase.ResultHandler() {\n\n\n\n\t\t\t@Override\n\t\t\tpublic void onSuccess() {\n\n\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\"A new password has been emailed to you.\", Toast.LENGTH_LONG).show();\n\t\t\t\tmyFirebaseRef.unauth();\n\t\t\t\tfinish();\n\t\t\t}\n\n\t\t\t@Override\n\t\t\tpublic void onError(FirebaseError firebaseError){\n\n\n\t\t\t\tSystem.out.println(\"FIREBASE ERROR: \" + firebaseError);\n\t\t\t\tSystem.out.println(\"FIREBASE CODE: \" + firebaseError.getCode());\n\t\t\t\tSystem.out.println(\"FIREBASE Details: \" + firebaseError.getDetails());\n\t\t\t\tSystem.out.println(\"FIREBASE Message: \" + firebaseError.getMessage());\n\t\t\t\tSystem.out.println(\"FIREBASE STATIC NAME: \" + FirebaseError.INVALID_EMAIL);\n\n\n\t\t\t\tswitch (firebaseError.getCode()) {\n\t\t\t\t\tcase -18:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\tfirebaseError.getMessage() + \" Try using a different email or resetting your account.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase -24:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\t\"We can't log you in, please check your internet connection.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tcase -17:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\tfirebaseError.getMessage() + \" Create an account! It's free.\", Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t\tdefault:\n\t\t\t\t\t\tToast.makeText(ResetPasswordActivity.this,\n\t\t\t\t\t\t\t\tfirebaseError.getMessage(), Toast.LENGTH_LONG).show();\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\n\n\n\t\t\t}\n\n\n\t\t});\n\n\t}", "@Test(priority=1)\n public void resetPasswordTest() throws InterruptedException {\n\t teacherPOM.clickLostPassword(); \n\t teacherPOM.enterUsername(\"swapna18\");\n\t teacherPOM.clickSendMsgBtn();\n\t teacherPOM.checkMsg();\n\t try {\n\t\tscreenShot.captureScreenShot(\"Fourth\");\n\t} catch (Exception e) {\n\t \te.printStackTrace();\n\t}\n\t Thread.sleep(10000);\n\t driver.get(\"https://gmail.com\");\n\t teacherPOM.loginMyGmailid(\"testpurpose774\");\n\t teacherPOM.clickNext1();\n\t teacherPOM.loginMyGmail(\"Gautham@143\");\n\t teacherPOM.clickNext2();\n\t teacherPOM.checkMailForPassword();\n\t teacherPOM.checkPasswordLink();\n\t Thread.sleep(10000);\n\t driver.navigate().to(\"https://gmail.com\");\n\t teacherPOM.checkMailForPassword();\n\t teacherPOM.getPassword();\n\t \n\t }", "public ResponseEntity<String> sendMail(User user, String uuid) {\n try {\n String server = InetAddress.getLoopbackAddress().getHostName();\n\n int port = Integer.parseInt(Objects.requireNonNull(environment.getProperty(\"server.port\")));\n if (port != 80)\n server += \":\" + port;\n\n Context context = new Context();\n context.setVariable(\"user\", user);\n context.setVariable(\"uuid\", uuid);\n context.setVariable(\"server\", server);\n\n String process = templateEngine.process(\"emailTemplates/resetPassword\", context);\n javax.mail.internet.MimeMessage mimeMessage = javaMailSender.createMimeMessage();\n MimeMessageHelper helper = new MimeMessageHelper(mimeMessage);\n helper.setSubject(\"Reset Password Link for \" + user.getUserName());\n helper.setText(process, true);\n helper.setTo(user.getEmail());\n javaMailSender.send(mimeMessage);\n\n LOGGER.info(\"Reset Password Email Sent to \" + user.getEmail());\n return ResponseEntity.ok().body(\"Sent\");\n } catch (MessagingException e) {\n LOGGER.error(\"Failed To send Reset Password Email to \" + user.getEmail() + \". Cause: \" + e.getMessage());\n }\n LOGGER.warn(\"Failed To send Reset Password Email to \" + user.getEmail());\n return ResponseEntity.status(500).body(\"error\");\n }", "@RequestMapping\n public ModelAndView mailForAuthNext(Map<String, Object> out , HttpServletRequest request , CompanyAccount companyAccount)\n throws IOException, NoSuchAlgorithmException{\n SeoUtil.getInstance().buildSeo(\"resetPassword\",\n new String[]{\"邮箱找回用户名_第二步\"},\n new String[]{\"\"},\n new String[]{\"\"},out);\n String email = companyAccount.getEmail();\n Integer companyId = companyAccountService.queryCompanyIdByEmail(email);\n companyAccount = companyAccountService.queryAccountByCompanyId(companyId);\n //是否是注册的邮箱!\n Integer i=authService.countUserByEmail(email);\n if (i!= null && i.intValue()>0) {\n if (getPasswordLogService.numOfType(companyAccount.getCompanyId(), EMAIL_TYPE) < 5) {\n GetPasswordLog getPasswordLog = new GetPasswordLog();\n getPasswordLog.setCompanyId(companyAccount.getCompanyId());\n getPasswordLog.setType(EMAIL_TYPE);\n String key = authService.generateForgotPasswordKey(email);\n if(key!=null){\n String url=\"#\";\n if(request.getServerPort()==80){\n url=request.getServerName()+request.getContextPath();\n }else{\n url=request.getServerName()+\":\"+request.getServerPort()+request.getContextPath();\n }\n authService.sendResetPasswordMail(key,email,url);\n getPasswordLogService.insertPasswordLog(getPasswordLog);\n }\n int index = email.indexOf(\"@\");\n String hiddenEmail = email.replace(email.substring(4, index), \"**\");\n String goEmail = \"http://mail.\"+email.substring(index+1,email.length());\n out.put(\"email\", email);\n out.put(\"hiddenEmail\", hiddenEmail);\n out.put(\"goEmail\", goEmail);\n return new ModelAndView();\n } else {\n out.put(\"error\", \"1\");\n return new ModelAndView(\"/user/mailForAuth\");\n }\n } else {\n out.put(\"errorMsg\", \"您输入的不是注册时的邮箱!\");\n return new ModelAndView(\"/user/mailForAuth\");\n }\n }", "public void sendForgotPasswordDetails(String emailAddress)\r\n\t{\n\t\tthis.emailAddress.clear();\r\n\t\t//send email address\r\n\t\tthis.emailAddress.sendKeys(emailAddress);\r\n\t\t//click on continue button\r\n\t\tcontinueBtn.click();\r\n\t}", "@PostMapping(path = \"/account/reset_password/init\",\n produces = MediaType.TEXT_PLAIN_VALUE)\n @Timed\n public ResponseEntity requestPasswordReset(@RequestBody String mail) {\n return userService.requestPasswordReset(mail)\n .map(user -> {\n mailService.sendPasswordResetMail(user);\n return new ResponseEntity<>(\"e-mail was sent\", HttpStatus.OK);\n }).orElse(new ResponseEntity<>(\"e-mail address not registered\", HttpStatus.BAD_REQUEST));\n }", "public static void sendConfirmationMail(String toMail){\n String confirmationText = \"Welcome as a new user of Household Manager.\" +\n \"\\n You can log in with \"+toMail+ \" and the password you chose.\" +\n \"If you've forgotten your password you can get a new one sent from our Login page.\";\n sendMail(toMail,confirmationText);\n }", "@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/password-reset\")\n Call<Void> submitPasswordReset(\n @retrofit2.http.Body PasswordResetRequest passwordReset\n );", "public static URL getUrlForForgotPassword()\r\n {\r\n String strUrl = getBaseURL() + \"account_services/api/1.0/account/forgot_password\";\r\n return str2url( strUrl );\r\n }", "public String getResetPassword() { return password; }", "public User forgotPassword (String inputUsername, String inputEmail, String textForEmailBody) {\n\t\t\n\t String [] recievers = new String[1];\n\t recievers[0] = inputEmail;\n\t \n\t if( this.myCompany.isCompanyMember(inputUsername) != null)\n\t {\n\t\tif(!emailAvailability(inputEmail))\n\t\t{\n\t\t\tfor(int i=0; i<myCompany.getCompanyMembers().size(); i++)\n\t\t\t{\n\t\t\t\tif(inputEmail.equalsIgnoreCase(myCompany.getCompanyMembers().get(i).getMyAccount().getEmail()))\n\t\t\t\t{\n\t\t\t\t\tUser user = myCompany.getCompanyMembers().get(i);\n\t\t\t\t\tHelp.sendGMail(\"itintelligenceuom@gmail.com\", \"ITintelligence2001\", recievers, \"Account Recovery\", textForEmailBody);\n\t\t\t\t\treturn user;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t }\n\t \n\t return null;\n\t}", "public void forgotPassword()\n {\n new MaterialDialog.Builder(activity)\n .title(R.string.dialog_forgot_password_title)\n .content(R.string.dialog_forgot_password_content)\n .inputType(InputType.TYPE_CLASS_TEXT |\n InputType.TYPE_TEXT_VARIATION_EMAIL_ADDRESS)\n .theme(Theme.LIGHT)\n .positiveText(R.string.dialog_forgot_password_positive_button)\n .negativeText(R.string.dialog_forgot_password_negative_button)\n .widgetColorRes(R.color.colorPrimary)\n .positiveColorRes(R.color.colorPrimary)\n .negativeColorRes(R.color.colorPrimary)\n .autoDismiss(false)\n .cancelable(false)\n .onAny(new MaterialDialog.SingleButtonCallback()\n {\n @Override\n public void onClick(@NonNull MaterialDialog dialog,\n @NonNull DialogAction which)\n {\n if(which == DialogAction.POSITIVE)\n {\n try\n {\n //Check if the email is valid.\n String email = dialog.getInputEditText().getText().toString();\n if(!Patterns.EMAIL_ADDRESS.matcher(email).matches())\n {\n //TODO send recovery instructions to reset password.\n dialog.dismiss();\n }\n else\n {\n dialog.getInputEditText().setText(\"\");\n dialog.getInputEditText().setError(\n activity.getResources().getString\n (R.string.dialog_forgot_password_invalid_email));\n }\n }\n catch(NullPointerException ex)\n {\n ex.printStackTrace();\n dialog.dismiss();\n }\n }\n else if(which == DialogAction.NEGATIVE) { dialog.dismiss(); }\n }\n })\n .input(R.string.dialog_edit_text_forgot_password_hint,\n R.string.dialog_edit_text_forgot_password_prefill,\n new MaterialDialog.InputCallback()\n {\n @Override\n public void onInput(@NonNull MaterialDialog dialog,\n CharSequence input) { }\n }).show();\n }", "public void sendMail() {\n String sub;\n String message;\n\n sub = \"Welcome\";\n message = \"Thank you for choosing us as your healthcare partners. Here we strive hard to ensure that\\n\"\n + \"you remain in good health. Not only we boast of an exellent team of doctors but also world class operational \\n\"\n + \"infrastructure in place. For any other information or details contact our reg desk. You can access\\n\"\n + \"your account with the Username:\" + txtUserName.getText()+ \"and your password:\" + txtPassword.getPassword().toString()+ \".\\n\\t\\t\\t -Team MVP\";\n\n SendEmail SE = new SendEmail(txtEmail.getText(), sub, message);\n }", "public void generateAndSendEmail(EmailSendingParameters emailParameters) throws AddressException, MessagingException {\r\n \r\n\t\t//Step1\t\t\r\n\t\tSystem.out.println(\"Setup Mail Server Properties..\");\r\n\t\tmailServerProperties = System.getProperties();\r\n\t\tmailServerProperties.put(\"mail.smtp.port\", \"587\");\r\n\t\tmailServerProperties.put(\"mail.smtp.auth\", \"true\");\r\n\t\tmailServerProperties.put(\"mail.smtp.starttls.enable\", \"true\");\r\n\t\tSystem.out.println(\"Mail Server Properties have been setup successfully..\");\r\n \r\n\t\t//Step2\r\n\t\tSystem.out.println(\"Get Mail Session..\");\r\n\t\tgetMailSession = Session.getDefaultInstance(mailServerProperties, null);\r\n\t\tgenerateMailMessage = new MimeMessage(getMailSession);\r\n\t\tgenerateMailMessage.addRecipient(Message.RecipientType.TO, new InternetAddress(emailParameters.getEmailReceiverAdress()));\r\n\t\tgenerateMailMessage.setSubject(\"Greetings from Crunchify..\");\r\n\t\tString emailBody = \"EMAIL CONTENT (with html tags)\";\r\n\t\tgenerateMailMessage.setContent(emailBody, \"text/html\");\r\n\t\tSystem.out.println(\"Mail Session has been created successfully..\");\r\n \r\n\t\t//Step3\t\t\r\n\t\tSystem.out.println(\"Get Session\tand Send mail\");\r\n\t\tTransport transport = getMailSession.getTransport(\"smtp\");\r\n\r\n\t\tSystem.out.println(\"Sending message\");\r\n\t\ttransport.connect(/*smtp.gmail.com\", emailReceiverAdress* emailReceiverPassword*/); \r\n\t\ttransport.sendMessage(generateMailMessage, generateMailMessage.getAllRecipients());\r\n\t\tSystem.out.println(\"Message sended properly\");\r\n\t\ttransport.close();\r\n\t}", "private ForgotPasswordUser populateForgotPassword()\n\t{\n\t\tForgotPasswordUser fUser = new ForgotPasswordUser();\n\t\tfUser.setAction(WebServiceAction.FORGOTPASSWORD);\n\t\tfUser.setEmail(medtUserName.getText().toString());\n\t\treturn fUser;\n\t}", "@Override\n public void onClick(View v) {\n\n mAuth.sendPasswordResetEmail(email)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Log.d(TAG, \"Email sent.\");\n messageDisplay.setText(\"Reset Email Sent Successfully!\");\n Toast.makeText(ForgotPasswordActivity.this, \"Reset Email Sent Successfully!\", Toast.LENGTH_SHORT).show();\n }\n\n else {\n //display some message here\n messageDisplay.setText(\"User Does Not Exist\");\n Toast.makeText(ForgotPasswordActivity.this, \"User Does Not Exist\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n }", "SendEmail() {\t\n\t}", "public boolean mailRecuperarPassword(String nombreusuario, String password, String mail){\n\n try {\n\n// //seteamos el asunto\n// message.setSubject(\"UNDEC - Activar Cuenta Nortia UNDEC\");\n//\n// //seteamos el mensaje que vamos a enviar\n// message.setContent(\"<html>\\n\" +\n// \"<body>\\n\" +\n// \"\\nHola, usuario = \" +nombreusuario+ \",\\n su nuevo password es = \"+password+\n// \"\\n\" +\n// \"\\nUsted puede cambiar el password cuando ingrese al sistema\\n \"+\n// \n// \"Muchas Gracias\"+\n// \"</body>\\n\" +\n// \"</html>\", \"text/html\");\n// //colocamos la direccion de donde enviamos el correo\n// Address address = new InternetAddress(mail);\n// message.setFrom(address);\n// //Colocamos la direccion de la persona a enviar\n// Address send = new InternetAddress(mail,false);\n// message.addRecipient(Message.RecipientType.TO,send);\n// \n// //la persona que envia con la validacion de su cuenta.\n// Transport trans = session.getTransport(\"smtp\");\n// //Aca se autentifica que la direccion de la persona que envia sea válida\n//\n// trans.connect(\"hmaza@undec.edu.ar\",\"momomomo\");\n// trans.sendMessage(message,message.getAllRecipients());\n// trans.close();\n System.out.println(\"maiñll\");\n Email email = new Email();\n email.setFromAddress(\"Nortia UNDEC\", \"sisgap@undec.edu.ar\");\n email.addRecipient(nombreusuario, mail, RecipientType.TO);\n //email.addRecipient(agente.getApellido(), agente.getOtroemail(), RecipientType.BCC);\n email.setTextHTML(\"Hola, usuario = \"+nombreusuario+ \"su nuevo password es = \"+password +\n\n\" <br />Usted puede cambiar el password cuando ingrese al sistema <br />\" +\n\n\"Muchas Gracias\");\n System.out.println(\"-----------\"+mail);\n email.setSubject(\"UNDEC - Recuperar Password Nortia UNDEC\");\n \n // or:\n new Mailer(\"localhost\", 25, \"sisgap@undec.edu.ar\", \"sgap*9812\").sendMail(email);\n System.out.println(\"-----------enviado\");\n } catch (Exception ex) {\n\n ex.printStackTrace();\n //Si el correo tiene algun error lo retornaremos aca\n JsfUtil.addErrorMessage(ex,\"No se pudo crear el Usuario\");\n\n return false;\n\n \n }\n //Correo tuvo exito dara una salida en este punto indicando que si se envio\n return true;\n \n }", "public void sendMpEmail(String pwd, String email, String msgBody, String subject ) {\n\t\t\t// TODO\n\t\t\t\tmsgBody= \"Votre nouveau mdp est: \" + pwd;\n\t\t\t\tsubject = \"Récuperation du mot de passe\";\n\t\t\t\tString toAdress= email;\n\t\t\t\tString actualFromAdress = \"simplon.company@gmail.com\";\n\t\t Date createdAt = new Date();\n\t\t mailService.sendMailandSave(email, msgBody, subject, actualFromAdress, createdAt);\n\t\t\t}", "private void showForgotPassDialogEmail() {\n\n final AlertDialog.Builder builder = new AlertDialog.Builder(Login.this);\n builder.setTitle(\"Quên mật khẩu\");\n builder.setMessage(\"Nhập mã bảo mật của bạn\");\n builder.setIcon(R.drawable.common_google_signin_btn_icon_dark);\n\n\n LayoutInflater inflater = this.getLayoutInflater();\n View forgotPassView = inflater.inflate(R.layout.activity_forgot_password, null);\n\n builder.setView(forgotPassView);\n builder.setIcon(R.drawable.common_google_signin_btn_icon_dark);\n final EditText edPhone = forgotPassView.findViewById(R.id.edtPhone);\n\n Email = edPhone.getText().toString().trim();\n\n builder.setPositiveButton(\"Xác nhận\", new DialogInterface.OnClickListener() {\n\n @Override\n public void onClick(DialogInterface dialog, int which) {\n if(!Patterns.EMAIL_ADDRESS.matcher(Email).matches())\n {\n// Toast.makeText(Login.this, \"Cách thức nhập Email của bạn bị sai\", Toast.LENGTH_SHORT).show();\n Toasty.error(Login.this, \"Cách thức nhập Email của bạn bị sai\", Toast.LENGTH_SHORT, true).show();\n\n return;\n }\n progressDialog.setMessage(\"Đang gửi mã đổi mật khẩu sang Email của bạn\\nVui lòng kiểm tra hòm thư Email đã gửi chưa\\nNếu chưa thì bạn hãy chờ vài phút để hệ thống đang trong tiến trình gửi cho bạn..\");\n progressDialog.show();\n\n Fauth.sendPasswordResetEmail(Email)\n .addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n //instructions sent\n //hướng dẫn được gửi để reset lại password của bạn\n progressDialog.dismiss();\n dialog.dismiss();\n //Password reset instructions sent to your email\n// Toast.makeText(Login.this, \"Đã gửi link đặt lại mật khẩu đến Email của bạn\", Toast.LENGTH_SHORT).show();\n Toasty.success(Login.this, \"Đã gửi link đặt lại mật khẩu đến Email của bạn!\", Toast.LENGTH_SHORT, true).show();\n\n }\n }\n })\n .addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n //failed sending instructions\n //không gửi được hướng dẫn để reset lại password của bạn\n progressDialog.dismiss();\n dialog.dismiss();\n ReusableCodeForAll.ShowAlert(Login.this,\"Lỗi kìa\",\"Chưa có tài khoản mà đòi quên với chả không\");\n Toasty.error(Login.this, \"\"+e.getMessage(), Toast.LENGTH_SHORT, true).show();\n }\n });\n\n\n }\n });\n builder.setNegativeButton(\"Huỷ\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialog, int which) {\n dialog.dismiss();\n }\n });\n builder.show();\n }", "@OnClick(R.id.tdk_menerima_kata_sandi)\n public void kirimUlangnkatasandi(){\n resetpassword(email);\n }", "@Override\r\n\tpublic String forgotPassword(String emailId) {\r\n\t\tlogger.debug(\"***AdminServiceImpl::forgotPassword() is started***\");\r\n\t\tAppAccountEntity entity = appAccRepository.findByEmail(emailId);\r\n\t\tif (entity == null) {\r\n\t\t\tlogger.debug(emailId + \" email is not registered!!\");\r\n\t\t\treturn appProperties.getProperties().get(AppConstants.EMAIL_NOT_REG);\r\n\t\t} else {\r\n\t\t\tif (entity.getActiveSw().equals(\"N\")) {\r\n\t\t\t\tlogger.debug(emailId + \" account not in active\");\r\n\t\t\t\treturn appProperties.getProperties().get(AppConstants.ACCOUNT_DE_ACTIVATE_MSG);\r\n\t\t\t} else {\r\n\t\t\t\ttry {\r\n\t\t\t\t\tAppAccount appAccountModel = new AppAccount();\r\n\t\t\t\t\tBeanUtils.copyProperties(entity, appAccountModel);\r\n\t\t\t\t\tappAccountModel.setPassword(PasswordUtils.decrypt(appAccountModel.getPassword()));\r\n\t\t\t\t\tlogger.debug(\"***Password is decryted***\");\r\n\t\t\t\t\tString mailBody = getEmailBodyContent(appAccountModel,\r\n\t\t\t\t\t\t\tappProperties.getProperties().get(AppConstants.FORGOT_PASSWORD_EMAIL_FILE_NAME));\r\n\t\t\t\t\temailUtils.sendEmail(appAccountModel.getEmail(),\r\n\t\t\t\t\t\t\tappProperties.getProperties().get(AppConstants.FORGOT_PASSWORD_EMAIL_SUB), mailBody);\r\n\t\t\t\t\tlogger.debug(\"password is sent to \" + emailId + \" succussfully\");\r\n\t\t\t\t\tlogger.info(\"AdminServiceImpl::forgotPassword() is completed\");\r\n\t\t\t\t\treturn appProperties.getProperties().get(AppConstants.PWD_EMAIL_SENT_SUCC_MSG);\r\n\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\tlogger.error(\"password is failed to sent to \" + emailId);\r\n\t\t\t\t\treturn appProperties.getProperties().get(AppConstants.PWD_EMAIL_SENT_FAIL_MSG);\r\n\t\t\t\t}\r\n\r\n\t\t\t} // else\r\n\r\n\t\t} // top else\r\n\r\n\t}", "@GetMapping(\"/forgot\")\r\n\tpublic String openEmailForm(Model m) {\r\n\t\t//m.addAttribute(\"title\", \"forgot password | Smart Phonebook Manager\");\r\n\t\treturn \"forgot_email_form\";\r\n\t}", "public void forgotPasswordValidate()\r\n\t{\n\t\tString expectedMessage = \"An email with a confirmation link has been sent your email address.\";\r\n\t\tString actualMessage=this.forgotPasswordSuccessMessage.getText();\r\n\t\tAssert.assertEquals(expectedMessage,actualMessage);\r\n\t}", "@Override\n public void sendEmail() {\n return;\n }", "public void sendResetPasswordToken(String token) {\n\t\tif (token != null) {\n sendSuccessResult(CALLBACK_TYPE_RESET_PASSWORD_TOKEN, token);\n\t\t}\n\t}", "@Override\n\tpublic ForgotPasswordResponse forgotPassword(ResetPasswordRequest resetpwdreq) {\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// get reg emailid from db\n\t\tlogger.info(\"IN resetPassword Method==========\");\n\t\t// Response object\n\t\tForgotPasswordResponse reset_pass_obj = new ForgotPasswordResponse();\n\t\tlogger.info(\"CALLING COUNT \");\n\t\tString sql = \"select count(1) from user where emailid = ? \";\n\t\tint result = jdbcTemplate.queryForObject(sql, new Object[] { resetpwdreq.getEmailid() }, Integer.class);\n\t\tlogger.info(\"RESULT QUERY \" + result);\n\t\tif (result > 0) {\n\t\t\t// to call email func\n\t\t\tResetPassword resetpass_obj = new ResetPassword();\n\t\t\t// generate 4 digit PIN\n\t\t\t// method to genearate 4 digit number\n\t\t\tPIN = resetpass_obj.generateSecurityKey();\n\t\t\tlogger.info(\"PIN : \" + PIN);\n\t\t\t//encrypted password\n\t\t\t// update generated pin to database using emailid\n\t\t\tString update_pin = \"UPDATE user SET password = ? WHERE emailid =? \";\n\t\t\tint rowcount = jdbcTemplate.update(update_pin, PasswordEncryptionUtil.encryptPassword(PIN), resetpwdreq.getEmailid().trim());\n\t\t\tlogger.info(\" DB Updated =========== \" + rowcount);\n\t\t\tif (rowcount > 0) {\n\t\t\t\t// db updated, send email with generated PIN\n\t\t\t\tresetpass_obj.generateEMail(resetpwdreq, PIN);\n\t\t\t\treset_pass_obj.setStatus(true);\n\t\t\t\treset_pass_obj.setMessage(\" EMAIL SENT WITH TEMPORARY PASSWORD \");\n\t\t\t\treset_pass_obj.setPassword(PIN);\n\t\t\t} else {\n\t\t\t\t// DB not updated\n\t\t\t\treset_pass_obj.setMessage(\" EMAIL IS NOT SEND \");\n\t\t\t\treset_pass_obj.setStatus(false);\n\t\t\t\treset_pass_obj.setPassword(\"NA\");\n\t\t\t}\n\t\t} else {\n\t\t\t// provided email ID doesnt exist\n\t\t\treset_pass_obj.setMessage(\"PLEASE PROVIDE REGISTERED EMAILID\");\n\t\t\treset_pass_obj.setStatus(false);\n\t\t\treset_pass_obj.setPassword(\"NA\");\n\t\t}\n\t\treturn reset_pass_obj;\n\t}", "public static String buildUsernameForgotURL() {\n return NISUtils.getURL() + \"/nis/nwapi/v2/customer/username/forgot\";\n\t}", "public static SendResult sendResetPassword(String name, String mobile, String newPassword) {\n Map<String, String> para = new HashMap<String, String>();\n para.put(\"mob\", mobile);\n para.put(\"uid\", \"vvOcK30SPG2x\");\n para.put(\"pas\", \"86vq37m2\");\n para.put(\"type\", \"json\");\n para.put(\"cid\", \"o4Z5IC4xj4X2\");\n para.put(\"p1\", name);\n para.put(\"p2\", newPassword);\n para.put(\"p3\", \"5\");\n\n return _send(para);\n }", "@Override\n public void onClick(DialogInterface dialog, int id) {\n FirebaseAuth auth = FirebaseAuth.getInstance();\n EditText editTextMail = getDialog().findViewById(R.id.editTextPasswordMail);\n String mail = editTextMail.getText().toString();\n\n // Senden der ResetMail durch Firebase\n auth.sendPasswordResetEmail(mail)\n .addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n // Bei Erfolg Dialog wird geschlossen\n dismiss();\n }\n }\n });\n }", "@Override\n public String generateMail() {\n return \"<HTML> Don`t call us Nikolas</HTML>\";\n }", "public void resetpassword(){\n resetpasswordlocal.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n final EditText resetpass = new EditText(view.getContext());\n AlertDialog.Builder passwordResetDialog = new AlertDialog.Builder(view.getContext());\n passwordResetDialog.setTitle(\"Reset Password ?\");\n passwordResetDialog.setMessage(\"Enter the new password\");\n passwordResetDialog.setView(resetpass);\n\n passwordResetDialog.setPositiveButton(\"Yes\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Extract the email and set reset link\n String newpass = resetpass.getText().toString();\n user.updatePassword(newpass).addOnSuccessListener(new OnSuccessListener<Void>() {\n @Override\n public void onSuccess(Void aVoid) {\n Toast.makeText(Profile.this, \"Password reset successfully\", Toast.LENGTH_SHORT).show();\n }\n }).addOnFailureListener(new OnFailureListener() {\n @Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(Profile.this, \"Password reset failed\", Toast.LENGTH_SHORT).show();\n }\n });\n }\n });\n\n passwordResetDialog.setNegativeButton(\"No\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n //Close the dialog box\n dialogInterface.cancel();\n }\n });\n passwordResetDialog.create().show();\n\n }\n });\n }", "public String getPasswordResetEmailSubject() {\n return getValue(\"eurekaclinical.userservice.email.reset.subject\");\n }", "public void sendMail(RegistrationData d) {}", "public void sendEmail(String username, String password) throws Throwable {\r\n\t\tString emailSubject = \"Test Report on \" + new Date();\r\n\t\tString emailMsg = \"This is an automatically generated email for test run\";\r\n\t\tEmailAttachment attachment = new EmailAttachment();\r\n\t\tattachment.setPath(\"test-output/emailable-report.html\");\r\n\t\tattachment.setDisposition(EmailAttachment.ATTACHMENT);\r\n\t\tattachment.setDescription(\"Test Report\");\r\n\t\tMultiPartEmail email = new MultiPartEmail();\r\n\t\temail.setHostName(\"imap.gmail.com\");\r\n\t\temail.setSmtpPort(465);\r\n\t\temail.setAuthenticator(new DefaultAuthenticator(username, password));\r\n\t\temail.setSSLCheckServerIdentity(true);\r\n\t\temail.setSSLOnConnect(true);\r\n\t\tSystem.out.println(\"Connected to gmail..\");\r\n\t\tSystem.out.println(\"Sending mail to: \" + toEmails);\r\n\t\tSystem.out.println(\"Subject: \" + emailSubject + \"\\nEmail Body: \" + emailMsg);\r\n\t\temail.setFrom(username);\r\n\t\temail.setSubject(emailSubject);\r\n\t\temail.setMsg(emailMsg);\r\n\t\tString[] emails = toEmails.split(\",\");\r\n\t\temail.addTo(emails);\r\n\t\temail.attach(attachment);\r\n\t\temail.send();\r\n\t\tSystem.out.println(\"Email Sent..\");\r\n\t}", "@Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n Toast.makeText(Resetpasswordpage.this, \"Email Sent\", Toast.LENGTH_SHORT).show();\n Intent resetpasswordintent = new Intent(Resetpasswordpage.this, Loginpage.class);\n startActivity(resetpasswordintent);\n //close activity when done\n finish();\n } else {\n //otherwise create new toast (error)\n Toast.makeText(Resetpasswordpage.this, \"Please enter correct details\", Toast.LENGTH_SHORT).show();\n }\n }", "public void SendEmail(){\n //Dummy Email Bot\n String from = \"cz2002testacc@gmail.com\";\n String emailPW = \"thisiscz2002\";\n\n try{\n Session session = Session.getDefaultInstance(init(), new Authenticator(){\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(from, emailPW);\n }});\n\n // -- Create a new message --\n Message msg = new MimeMessage(session);\n\n // -- Set the FROM and fields --\n msg.setFrom(new InternetAddress(from));\n msg.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(getRecipientEmail(),false));\n\n LocalDateTime myDateObj = LocalDateTime.now();\n DateTimeFormatter myFormatObj = DateTimeFormatter.ofPattern(\"dd-MM-yyyy HH:mm:ss\");\n String formattedDate = myDateObj.format(myFormatObj);\n\n msg.setSubject(getEmailSubject());\n msg.setText(getMessage());\n msg.setSentDate(new Date());\n Transport.send(msg);\n\n //System.out.println(formattedDate + \" - Message sent.\");\n }catch (MessagingException e){\n System.out.println(\"Error: \" + e);\n }\n }", "@RequestMapping(method = RequestMethod.POST)\n \tpublic String create(@Valid ForgotLoginForm form, BindingResult result, Model model, HttpServletRequest request) {\n \t\tvalidator.validate(form, result);\t// Validates provided information\n \t\t\n \t\t// Returns the form with errors found\n \t\tif(result.hasErrors()) {\n \t\t\treturn createForm(model, form);\n \t\t}\n \t\t\n \t\tString emailAddress = form.getEmailAddress();\t// Gets the email from the form\n \t\tTypedQuery<User> query = User.findUsersByEmailAddress(emailAddress);\t// Stores the query for the user\n \t\tUser targetUser = query.getSingleResult();\t// Stores the user found with the query\n \t\tRandom random = new Random(System.currentTimeMillis());\t// Generates a random number\n\t\tString newPassword = \"\" + Math.abs(random.nextInt());\t// Sets the string for the new password\n \t\t\n \t\t// If reset is specified\n \t\tif(form.getResetPassword())\n \t\t{\n \t\t\ttargetUser.setPassword(messageDigestPasswordEncoder.encodePassword(newPassword, null));\t// Encrypts and sets the user password\n \t\t\ttargetUser.merge();\t\t// Merges the local user with the database user\n \t\t}\n \t\t\n \t\t// Sends the user an e-mail\n \t\tSimpleMailMessage mail = new SimpleMailMessage();\n \t\tmail.setTo(targetUser.getEmailAddress());\n \t\tmail.setSubject(\"Social Web Spider Login Retrevial\");\n \t\t\n \t\t// If the user requested a password reset send that message message\n \t\tif(form.getResetPassword())\n \t\t{\n \t\t\tmail.setText(\"Hello, here is your requested login and password reset.\\n\\nUsername: \" + targetUser.getUsername() + \"\\nNew Password: \" + newPassword + \"\\n\\nThanks, Social Web Spider\");\n \t\t\tmailSender.send(mail);\n \t\t\treturn \"forgotlogin/thanks\";\n \t\t}\n \t\t\n \t\t// Send the user just an e-mail\n \t\tmail.setText(\"Hello, here is your requested login.\\n\\nUsername: \" + targetUser.getUsername() + \"\\n\\nThanks, Social Web Spider\");\n \t\tmailSender.send(mail);\n \t\treturn \"forgotlogin/thanks\";\n \t}", "public void reset_password(View view) {\n String after_forgot_mailId = email_id.getText().toString();\n\n if (!after_forgot_mailId.equals(\"\")) {\n onPreExecute();\n firebaseAuth.sendPasswordResetEmail(after_forgot_mailId).addOnCompleteListener(new OnCompleteListener<Void>() {\n @RequiresApi(api = Build.VERSION_CODES.KITKAT)\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if (task.isSuccessful()) {\n onPostExecute();\n Toast.makeText(LoginActivity.this, \"Check your emails to Reset Your Password\", Toast.LENGTH_SHORT).show();\n Intent intent = new Intent(LoginActivity.this,LoginActivity.class);\n overridePendingTransition(R.anim.right_to_left,R.anim.left_to_right);\n startActivity(intent);\n finish();\n } else if (task.isCanceled()) {\n onPostExecute();\n Toast.makeText(LoginActivity.this, Objects.requireNonNull(task.getException()).getLocalizedMessage(), Toast.LENGTH_SHORT).show();\n Log.e(\"Cancelled\", Objects.requireNonNull(task.getException().getLocalizedMessage()));\n Intent intent = new Intent(LoginActivity.this,LoginActivity.class);\n overridePendingTransition(R.anim.right_to_left,R.anim.left_to_right);\n startActivity(intent);\n finish();\n } else {\n onPostExecute();\n Toast.makeText(LoginActivity.this, \"This Email Id isn't present in the Database\", Toast.LENGTH_SHORT).show();\n Log.e(\"Error\", Objects.requireNonNull(Objects.requireNonNull(task.getException()).getLocalizedMessage()));\n Intent intent = new Intent(LoginActivity.this,LoginActivity.class);\n overridePendingTransition(R.anim.right_to_left,R.anim.left_to_right);\n startActivity(intent);\n finish();\n }\n }\n });\n } else {\n Toast.makeText(this, \"Please enter valid Email\", Toast.LENGTH_SHORT).show();\n }\n }", "public void recoverPassword(String email){\r\n User user = userRepo.findUserByEmail(email);\r\n if (user == null) throw new NullPointerException(\"User with this email was not found\");\r\n String newPassword = PasswordGenerator.generatePassword();\r\n user.setPassword(hashPassword(newPassword));\r\n userRepo.save(user);\r\n\r\n // sends email to user\r\n emailService.sendEmail(email, \"Gidd! varsler\", \"Forandringer med din Gidd! bruker\\n\" +\r\n \"Ditt nye passord er: \" + newPassword);\r\n }", "private void sendEmail(String result){\n \t\n \tIntent emailIntent = new Intent(android.content.Intent.ACTION_SEND);\n \temailIntent.setType(\"plain/text\");\n \t\n \t//emailIntent.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n \t/* Fill it with Data */\n \temailIntent.setType(\"plain/text\");\n \t//emailIntent.putExtra(android.content.Intent.EXTRA_EMAIL, new String[]{\"to@email.com\"});\n \temailIntent.putExtra(android.content.Intent.EXTRA_SUBJECT, \"Here's the code from FlipSHA\");\n \temailIntent.putExtra(android.content.Intent.EXTRA_TEXT, \"After the coin is flipped and\" +\n \t\t\t\" you don't believe in your friend, check this hash \"+ result);\n\n \t/* Send it off to the Activity-Chooser */\n \tstartActivity(emailIntent); \n }", "public String toResetpassword() {\r\n\t\treturn \"/admin/resetpassword.jsf\";\r\n\t}", "@Override\n public void onFailure(@NonNull Exception e) {\n Toast.makeText(LogInActivity.this, \"Unable to send the email\"+e.getMessage(), Toast.LENGTH_SHORT).show();\n }", "public void sendNewOrderAdmin(){\n final String username = \"tryllemikkel@gmail.com\";\n\n // change accordingly\n final String password = \"dcc59vez\";\n\n // Get system properties\n Properties props = new Properties();\n\n // enable authentication\n props.put(\"mail.smtp.auth\", \"true\");\n\n // enable STARTTLS\n props.put(\"mail.smtp.starttls.enable\", \"true\");\n\n // Setup mail server\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n\n // TLS Port\n props.put(\"mail.smtp.port\", \"587\");\n\n // creating Session instance referenced to\n // Authenticator object to pass in\n // Session.getInstance argument\n Session session = Session.getInstance(props,\n new javax.mail.Authenticator() {\n //override the getPasswordAuthentication method\n protected PasswordAuthentication\n getPasswordAuthentication() {\n\n return new PasswordAuthentication(username,\n password);\n }\n });\n\n try {\n // compose the message\n // javax.mail.internet.MimeMessage class is\n // mostly used for abstraction.\n Message message = new MimeMessage(session);\n\n // header field of the header.\n message.setFrom(new InternetAddress(\"BallonkompagnietIVS\"));\n\n //Set admin email\n message.setRecipients(Message.RecipientType.TO, InternetAddress.parse(\"mikkel@dalbynielsen.dk\"));\n message.setSubject(\"New order on website\");\n\n message.setText(\"New order placed on your website\");\n\n //send Message\n Transport.send(message);\n System.out.println(\"Email sent to admin - New order\");\n } catch (MessagingException e) {\n throw new RuntimeException(e);\n }\n }", "@RequestMapping\n public ModelAndView emailExpired(Map<String, Object> out , HttpServletRequest request){\n SeoUtil.getInstance().buildSeo(\"resetPassword\",\n new String[]{\"邮箱已过期\"},\n new String[]{\"\"},\n new String[]{\"\"},out);\n return new ModelAndView();\n }", "public void verifyCodePressed(View view) {\r\n emailTo = String.valueOf(etEmail.getText());\r\n //Generate the random verify code\r\n verifyCode = (int)((Math.random() * 9 + 1) * 100000);\r\n Toast.makeText(ForgetPswActivity.this,\"Sending..... the verify code\", Toast.LENGTH_LONG).show();\r\n Thread thread = new Thread(){\r\n @Override\r\n public void run() {\r\n EmailUtil.getInstance().sendEmail(emailTo,\"Verify Code from Digital Learner Logbook\",\r\n \"DLL send a verify code: \" + verifyCode +\r\n \", This code is for reset the password only!\" );\r\n\r\n Looper.prepare();\r\n Toast.makeText(ForgetPswActivity.this,\"Sent the verify code\", Toast.LENGTH_LONG).show();\r\n Looper.loop();\r\n }\r\n };\r\n thread.start();\r\n\r\n }", "public synchronized void resetPassword(RemoteWebDriver driver, String env) throws InterruptedException, IOException, AWTException {\n\t\t\t\n\t\t// Enter Email\n\t\tperform.type(driver, SLogin.email_txtbx(driver), \"automation\" + env + user + \"@dntest.net\");\n\t\t\n\t\t// Enter Password\n\t\tperform.type(driver, SLogin.password_txtbx(driver), password);\n\t\t\n\t\t// Click Sign In\n\t\tperform.click(driver, SLogin.signIn_btn(driver));\n\t\t\n\t\t// Wait for Find textbox\n\t\tperform.waitForElementToBeClickable(driver, SOrders.find_txtbx(driver));\n\t\t\n\t\t// Go to Users\n\t\tsecure.goToUsers(driver);\n\t\t\n\t\t// Change the password 5 times\n\t\tfor (int a = 1; a <=5; a++)\n\t\t{\n\t\t\t\n\t\t\tString pw = perform.randomLetters(driver, 10);\n\t\t\n\t\t\t// Wait for the Password Gear Icon\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Click the Password Gear icon\n\t\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be visible\n\t\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\t\n\t\t\t// Wait for New\n\t\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\t\n\t\t\t// Enter New PW\n\t\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Confirm New PW\n\t\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), pw);\n\t\t\t\n\t\t\t// Click Save\n\t\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\t\n\t\t\t// Wait for overlay to be hidden\n\t\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t} // end for loop\n\t\t\n\t\t// Change the password to T3sting1\n\t\t// Wait for the Password Gear Icon\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Click the Password Gear icon\n\t\tperform.click(driver, SUsers.passwordGear_icon(driver));\n\t\t\n\t\t// Wait for overlay to be visible\n\t\tperform.waitForOverlayToBeVisible(driver);\n\t\t\n\t\t// Wait for New\n\t\tperform.waitForElementToBeClickable(driver, SUsers.passwordSecurityOptions_txtbx(driver));\n\t\t\n\t\t// Enter New PW\n\t\tperform.type(driver, SUsers.passwordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Confirm New PW\n\t\tperform.type(driver, SUsers.confirmPasswordSecurityOptions_txtbx(driver), \"T3sting1\");\n\t\t\n\t\t// Click Save\n\t\tperform.click(driver, SUsers.saveSecurityOptions_btn(driver));\n\t\t\n\t\t// Wait for overlay to be hidden\n\t\tperform.waitForOverlayToBeHidden(driver);\n\t\t\n\t\t// Save the settings\n\t\tsecure.saveUsersSettings(driver);\n\t\t\n\t}", "public void AuthenticatorPinGen(String To,int pin,String name) {\n String to = To;\n String from = \"Your mailing Id\";\n Properties properties= new Properties();\n properties.put(\"mail.smtp.auth\", \"true\");\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n properties.put(\"mail.smtp.port\", 587);\n\n //write your email id and password here(from where you want to send mails to your clients)\n Session session=Session.getDefaultInstance(properties,new javax.mail.Authenticator(){\n protected PasswordAuthentication getPasswordAuthentication(){\n return new PasswordAuthentication(\"Your Email Id\", \"Your Password\");\n }\n });\n try{\n MimeMessage message = new MimeMessage(session);\n message.setFrom(new InternetAddress(from));\n message.addRecipient(Message.RecipientType.TO,new InternetAddress(to));\n //Subject\n message.setSubject(\"Authentication Pin Number\");\n //Body\n message.setText(\"Hello MR.\"+name+\",\\nYour pin number is \"+pin);\n Transport.send(message);\n System.out.println(\"sending\");\n }\n catch (MessagingException e) {\n e.printStackTrace();\n }\n }", "private static void sendMail(String toEmail, String mailText) {\n final String username = \"info.householdmanager@gmail.com\"; //The Email of the sender.\n final String password = \"emailpassword\";\n\n //Properties of the used SMTP server.\n Properties props = new Properties();\n props.put(\"mail.smtp.ssl.trust\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.auth\", \"true\");\n props.put(\"mail.smtp.starttls.enable\", \"true\");\n props.put(\"mail.smtp.host\", \"smtp.gmail.com\");\n props.put(\"mail.smtp.port\", \"587\");\n\n Session session = Session.getInstance(props,\n new javax.mail.Authenticator() {\n protected PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(username, password);\n }\n });\n\n try {\n\n Message message = new MimeMessage(session);\n message.setFrom(new InternetAddress(username));\n message.setRecipients(Message.RecipientType.TO,\n InternetAddress.parse(toEmail));\n message.setSubject(\"New Password - Household Manager\");\n //Message to the user\n message.setText(mailText);\n\n Transport.send(message);\n\n } catch (MessagingException e) {\n throw new RuntimeException(e);\n }\n }", "private void showPasswordResetView(String email) {\n if (!email.isEmpty()) {\n EditText etEmail = findViewById(R.id.etResetEmail);\n etEmail.setText(email);\n }\n\n changeForm(R.id.btnResetPasswordForm);\n }", "@Headers({\n \"Content-Type:application/json\"\n })\n @POST(\"users/{id}/password-reset\")\n Call<Void> startPasswordReset(\n @retrofit2.http.Path(\"id\") Integer id\n );", "public static String passwordRecovery(String email, String password) {\n\t\tStringBuilder sb = new StringBuilder();\n\n\t\tsb.append(MARGIN_TOP);\n\t\tsb.append(\"<h2><b>Password Recovery</b></h2>\");\n\t\tsb.append(\"<br>\");\n\t\tsb.append(\n\t\t\t\t\"<blockquote>\" +\n\t\t\t\t\t\t\"<b>Email:</b> \" + email +\n\t\t\t\t\t\t\"<br>\" +\n\t\t\t\t\t\t\"<b>Password:</b> \" + password +\n\t\t\t\t\t\t\"</blockquote>\");\n\n\t\treturn sb.toString();\n\t}", "private String processResetIPassword(\n\t\t\tChangePasswordFormBean changePasswordFormBean,\n\t\t\tHttpServletRequest request)\n\t\t\tthrows Exception {\n\t\tlogger.info(\" Started...\");\n\t\tHttpSession session = request.getSession();\n\t\tUserSessionContext userSessionContext = (UserSessionContext) session\n\t\t\t\t.getAttribute(Constants.AUTHENTICATED_USER);\n\t\tlogger.info(\" Request to reset Password by user \"\n\t\t\t\t+ userSessionContext.getId());\n\t\tActionErrors errors = new ActionErrors();\n\t\ttry {\n\t\t\t\t\n\t\t\tGSDService gSDService = new GSDService();\n\t\t\t/* call gsdService to check password history and gsd compliance. */\n\t\t\tlogger.info(\" Calling GSD to validate reset password.\");\n\t\t\n\t\t\tgSDService.validateChangePwd(changePasswordFormBean.getLoginName(),\n\t\t\t\t\tchangePasswordFormBean.getNewPassword(),\n\t\t\t\t\tchangePasswordFormBean.getOldPassword());\n\t\t\tlogger.info(\" GSD validation successful for reset password.\");\n\t\t\t/* Encrypt passwords entered by the user */\n\t\t\tIEncryption encrypt = new Encryption();\n\t\t\tString newDigest = encrypt.generateDigest(changePasswordFormBean\n\t\t\t\t\t.getNewPassword());\n\t\t\tString oldDigest = encrypt.generateDigest(changePasswordFormBean\n\t\t\t\t\t.getOldPassword());\n\t\t\tAuthenticationService authenticationService = new AuthenticationServiceImpl();\n\t\t\t\n\t\t\t/* call changePassword method of ChangePasswordService */\n\t\t\tauthenticationService.changePassword(userSessionContext.getId(),\n\t\t\t\t\toldDigest, newDigest);\n\t\t\t\n\t\t\t/* show message for successful password change */\n\t\t\terrors.add(\"message\", new ActionError(\n\t\t\t\t\t\"message.changepassword.success\"));\n\t\t\tsaveErrors(request, errors);\n\t\t\tlogger.info(\" Change password successful.\");\n\n\t\t\t\n\n\t\t} catch (ValidationException valExp) {\n\t\t\tif (\"msg.security.id02\".equalsIgnoreCase(valExp.getMessageId())) {\n\t\t\t\terrors.add(\"validationerror\", new ActionError(\n\t\t\t\t\t\t\"msg.security.id02\"));\n\t\t\t\treturn PASSWORD_EXPIRED;\n\n\t\t\t} else {\n\t\t\t\tString application_user = ResourceReader.getWebResourceBundleValue(\"application.user\");\n\t\t\t\terrors.add(\"validationerror\", new ActionError(valExp\n\t\t\t\t\t\t.getMessageId(), application_user));\n\t\t\t}\n\t\t} catch (VirtualizationServiceException virtualSerExp) {\n\t\t\tlogger.error(\" VirtualizationException occured for \"\n\t\t\t\t\t+ userSessionContext.getId());\n\t\t\terrors.add(\"error\", new ActionError(virtualSerExp.getMessage()));\n\t\t\tsaveErrors(request, errors);\n\t\t}\n\t\tif (!errors.isEmpty()) {\n\t\t\tsaveErrors(request, errors);\n\t\t}\n\t\treturn \"\";\n\n\t}", "private void sendEmailVerification() {\n final FirebaseUser user = mAuth.getCurrentUser();\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // [START_EXCLUDE]\n // Re-enable button\n\n if (task.isSuccessful()) {\n Toast.makeText(LoginCombActivity.this,\n \"Verification email sent to \" + user.getEmail(),\n Toast.LENGTH_SHORT).show();\n } else {\n Log.e(TAG, \"sendEmailVerification\", task.getException());\n Toast.makeText(LoginCombActivity.this,\n \"Failed to send verification email.\",\n Toast.LENGTH_SHORT).show();\n }\n // [END_EXCLUDE]\n }\n });\n // [END send_email_verification]\n }", "public void validateResetPassword()\r\n {\r\n boolean flag = this.hasErrors();\r\n if (userProfile == null || userProfile.getLoginId() == null\r\n || \"\".equals(userProfile.getLoginId().trim()))\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0809\"));\r\n }\r\n else\r\n {\r\n try\r\n {\r\n log.info(this.getText(\"B2BPC0802\", new String[] {\r\n userProfile.getLoginId(),\r\n this.getRequest().getRemoteAddr() }));\r\n String loginId = userProfile.getLoginId();\r\n userProfile = userProfileService\r\n .getUserProfileByLoginId(userProfile.getLoginId());\r\n if (userProfile == null)\r\n {\r\n log.info(this.getText(\"B2BPC0810\", new String[] { loginId,\r\n this.getRequest().getRemoteAddr() }));\r\n this.setErrorMsg(this.getText(\"B2BPC0811\",\r\n new String[] { loginId }));\r\n flag = true;\r\n }\r\n if (!flag)\r\n {\r\n if (!flag && !userProfile.getActive())\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0824\",\r\n new String[] { userProfile.getLoginId() }));\r\n flag = true;\r\n }\r\n if (!flag && userProfile.getBlocked())\r\n {\r\n this.setErrorMsg(this.getText(\"B2BPC0825\",\r\n new String[] { userProfile.getLoginId() }));\r\n flag = true;\r\n }\r\n }\r\n if (!flag)\r\n {\r\n previousResetPwdRecord = new ResetPasswordRequestHistoryHolder();\r\n previousResetPwdRecord.setLoginId(userProfile.getLoginId());\r\n previousResetPwdRecord.setValid(Boolean.TRUE);\r\n List<? extends Object> resetPasswordRequestHistorys = resetPasswordRequestHistoryService\r\n .select(previousResetPwdRecord);\r\n if (resetPasswordRequestHistorys == null\r\n || resetPasswordRequestHistorys.isEmpty())\r\n {\r\n previousResetPwdRecord = null;\r\n }\r\n else\r\n {\r\n previousResetPwdRecord = (ResetPasswordRequestHistoryHolder) resetPasswordRequestHistorys\r\n .get(0);\r\n int reqInvl = controlParameterService\r\n .selectCacheControlParameterBySectIdAndParamId(\r\n SECT_ID_CTRL, \"REQ_INVL\").getNumValue();\r\n Date canResetDate = new Date(previousResetPwdRecord\r\n .getRequestTime().getTime()\r\n + reqInvl * 60L * 1000);\r\n if ((new Date()).before(canResetDate))\r\n {\r\n log.info(this.getText(\"B2BPC0812\", new String[] {\r\n String.valueOf(reqInvl),\r\n DateUtil.getInstance().convertDateToString(\r\n previousResetPwdRecord\r\n .getRequestTime(),\r\n DATA_FORMAT),\r\n DateUtil.getInstance().convertDateToString(\r\n new Date(), DATA_FORMAT) }));\r\n this\r\n .setErrorMsg(this\r\n .getText(\r\n \"B2BPC0812\",\r\n new String[] {\r\n String\r\n .valueOf(reqInvl),\r\n DateUtil\r\n .getInstance()\r\n .convertDateToString(\r\n previousResetPwdRecord\r\n .getRequestTime(),\r\n DATA_FORMAT),\r\n DateUtil\r\n .getInstance()\r\n .convertDateToString(\r\n new Date(),\r\n DATA_FORMAT) }));\r\n flag = true;\r\n }\r\n }\r\n\r\n }\r\n }\r\n catch (Exception e)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e);\r\n try\r\n {\r\n this\r\n .setErrorMsg(this\r\n .getText(\r\n \"B2BPC0814\",\r\n new String[] { controlParameterService\r\n .selectCacheControlParameterBySectIdAndParamId(\r\n SECT_ID_CTRL,\r\n PARAM_ID_HELPDESK_NO)\r\n .getStringValue() }));\r\n }\r\n catch (Exception e1)\r\n {\r\n ErrorHelper.getInstance().logError(log, this, e1);\r\n }\r\n }\r\n }\r\n }", "void sendEmail(Otp otp) throws Exception {\n String text = \"Otp: \" + otp.getOtpValue();\n String from = \"\"; // Add From Email Address\n String to = \"\"; // Add To Email Address\n\n SimpleMailMessage message = new SimpleMailMessage();\n message.setFrom(from);\n message.setTo(to);\n message.setSubject(\"Otp Verification\");\n message.setText(text);\n emailSender.send(message);\n }", "public void sendRegistrationEmail(User user, HttpServletRequest request) {\r\n try {\r\n VerificationToken token = new VerificationToken(user);\r\n verificationTokenRepo.save(token);\r\n\r\n String appUrl = request.getScheme() + Constants.SERVER_URL + \"register/confirm/\" + token.getToken();\r\n\r\n UserDTO userDTO = new UserDTO();\r\n userDTO.setFirstName(user.getFirstName());\r\n userDTO.setUsername(user.getUsername());\r\n\r\n // Build message body\r\n String subject = \"\";\r\n String template = \"\";\r\n Map<String, Object> modelObject = null;\r\n\r\n subject = Constants.REGISTRATIONSUBJECT;\r\n template = Constants.REGISTRATIONTEMPLATE;\r\n modelObject = ImmutableMap.of(\r\n \"name\", userDTO.getFirstName(),\r\n \"appUrl\", appUrl\r\n );\r\n\r\n // Send email with required info\r\n sendMimeEmailWithFreemarker(subject, template, userDTO, modelObject);\r\n } catch (UnsupportedEncodingException | CannotSendEmailException | URISyntaxException e) {\r\n e.printStackTrace();\r\n }\r\n }", "public LoginPage resetPasswordGmail(String email) {\r\n\t\tArrayList<String> tabs = new ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\tConstant.WEBDRIVER.switchTo().window(tabs.get(1));\r\n\r\n\t\tresetRailwayAccount(email);\r\n\t\tArrayList<String> newtabs = new ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\tConstant.WEBDRIVER.switchTo().window(newtabs.get(3));\r\n\t\treturn new LoginPage();\r\n\t\t/*\r\n\t\t * this.clickLinkEmail(_resetPWSubject, email); // Switch tab chrome ---------\r\n\t\t * ArrayList<String> arr = new\r\n\t\t * ArrayList<String>(Constant.WEBDRIVER.getWindowHandles());\r\n\t\t * Constant.WEBDRIVER.switchTo().window(arr.get(2)); // End Switch tab chrome\r\n\t\t * ---------\r\n\t\t * \r\n\t\t * \r\n\t\t * closeWindow(); switchWindow();\r\n\t\t */\r\n\r\n\t}", "private void sendEmailVerification() {\n showProgressDialog();\n\n // [START send_email_verification]\n final FirebaseUser user = mAuth.getCurrentUser();\n assert user != null;\n user.sendEmailVerification()\n .addOnCompleteListener(this, new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n // [START_EXCLUDE]\n // Re-enable button\n if (task.isSuccessful()) {\n Toast.makeText(getApplicationContext(),\n \"Verification email sent to \" + user.getEmail(),\n Toast.LENGTH_SHORT).show();\n } else {\n Log.e(TAG, \"sendEmailVerification\", task.getException());\n Toast.makeText(getApplicationContext(),\n \"Failed to send verification email.\",\n Toast.LENGTH_SHORT).show();\n }\n hideProgressDialog();\n // [END_EXCLUDE]\n }\n });\n // [END send_email_verification]\n }", "public void clickForgotPassword() {\r\n\t\tutilities.clickOnElement(aForgotPassword);\r\n\t}", "public static String buildUsernameForgotRequestBody( String email ) {\n\t\tStringWriter sw = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter( sw );\n\t\tpw.println(\"{\");\n\t\tpw.println(\" \\\"email\\\":\\\"\" + email + \"\\\"\");\n\t\tpw.println(\"}\");\n\t\treturn sw.toString();\n\t}", "void sendEmail(Task task, String taskTypeName, String plantName);", "protected void sendPassword(JSONArray args, final CallbackContext callbackContext) {\n\t\tLog.d(TAG, \"SENDPASSWORD\");\n\t\ttry {\n\t\t\tString email = args.getString(0);\n\t\t\tNotificare.shared().sendPassword(email, new NotificareCallback<Boolean>() {\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onSuccess(Boolean result) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.success();\n\t\t\t\t}\n\n\t\t\t\t@Override\n\t\t\t\tpublic void onError(NotificareError error) {\n\t\t\t\t\tif (callbackContext == null) {\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t\tcallbackContext.error(error.getLocalizedMessage());\n\t\t\t\t}\n\t\t\t});\n\t\t} catch (JSONException e) {\n\t\t\tcallbackContext.error(\"JSON parse error\");\n\t\t}\n\t}", "@Override\n public void onClick(View v) {\n final Dialog MyDialog = new Dialog(Login.this);\n MyDialog.requestWindowFeature(Window.FEATURE_NO_TITLE);\n MyDialog.setContentView(R.layout.activity_email_popup);\n\n hello = (Button)MyDialog.findViewById(R.id.hello);\n close = (Button)MyDialog.findViewById(R.id.close);\n\n hello.setEnabled(true);\n close.setEnabled(true);\n\n hello.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n EditText resetmail=MyDialog.findViewById(R.id.edittext);\n firebaseAuth=FirebaseAuth.getInstance();\n if(resetmail.getText().toString().isEmpty())\n\n Toast.makeText(getApplicationContext(),\"Enter the mail\",Toast.LENGTH_LONG).show();\n else{\n firebaseAuth.sendPasswordResetEmail(resetmail.getText().toString().trim()).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n Toast.makeText(getApplicationContext(),\"link sent to mail\",Toast.LENGTH_LONG).show();\n\n MyDialog.dismiss();\n }\n else Toast.makeText(getApplicationContext(),\"Invalid email\",Toast.LENGTH_LONG).show();\n }\n });\n }\n }\n });\n\n\n\n\n close.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n MyDialog.cancel();\n }\n });\n\n MyDialog.show();\n\n }", "private void sendBookingConfirmMailWithMailtrapProvider(String userEmail, String token) throws MessagingException {\n String to = userEmail;//change accordingly \n// Gmail’s SMTP account,\n\n String userName = \"91c28c9b77f112\";//from mailtrap\n String password = \"9d4d7fbf411267\";\n\n //Get the session object \n //1. sets SMTP server properties\n Properties properties = new Properties();\n properties.put(\"mail.smtp.auth\", true);\n properties.put(\"mail.smtp.starttls.enable\", \"true\");\n properties.put(\"mail.smtp.host\", \"smtp.mailtrap.io\");\n properties.put(\"mail.smtp.port\", \"25\");\n properties.put(\"mail.smtp.ssl.trust\", \"smtp.mailtrap.io\");\n //2. creates a new session with an authenticator\n Authenticator auth = new Authenticator() {\n @Override\n public PasswordAuthentication getPasswordAuthentication() {\n return new PasswordAuthentication(userName, password);\n }\n };\n\n Session session = Session.getInstance(properties, auth);\n\n //3. Creates a new e-mail message\n Message msg = new MimeMessage(session);\n\n msg.setFrom(new InternetAddress(\"hungbsse130615@fpt.edu.vn\"));\n InternetAddress[] toAddresses = {new InternetAddress(to)};\n msg.setRecipients(Message.RecipientType.TO, toAddresses);\n msg.setSubject(\"Test send mail\");\n msg.setSentDate(new Date());\n msg.setText(\"Hello, this is example of sending email. ?token=\" + token);\n\n// MimeMessage message = new MimeMessage(session);\n// message.setFrom(new InternetAddress(from));\n// message.addRecipient(Message.RecipientType.TO, new InternetAddress(to));\n //4. Send the message\n Transport.send(msg);\n System.out.println(\"message sent successfully....\");\n\n }" ]
[ "0.7039207", "0.6918928", "0.6757768", "0.6716748", "0.6642199", "0.6604574", "0.65186185", "0.64475936", "0.6361972", "0.6361342", "0.6321791", "0.6318825", "0.6297109", "0.6295586", "0.6281588", "0.623788", "0.62376964", "0.62169707", "0.6199517", "0.6172093", "0.6122745", "0.6122083", "0.6121617", "0.6105773", "0.6100362", "0.6083996", "0.607473", "0.6067726", "0.6063957", "0.6063044", "0.604837", "0.60347354", "0.60338867", "0.6030536", "0.59868675", "0.5979608", "0.59425426", "0.59381574", "0.59200656", "0.59196776", "0.59173554", "0.58777297", "0.58664006", "0.58349323", "0.58247507", "0.5795576", "0.5793866", "0.57829297", "0.57693356", "0.5767059", "0.57667", "0.574271", "0.57364625", "0.5725764", "0.57147956", "0.5710577", "0.5709136", "0.5707867", "0.5692083", "0.56770855", "0.56674194", "0.5652684", "0.56362176", "0.56161076", "0.56108457", "0.5607851", "0.560717", "0.5597653", "0.55868816", "0.5545077", "0.5544139", "0.55414885", "0.5540768", "0.55391216", "0.5534764", "0.5529452", "0.5507671", "0.548286", "0.5474996", "0.54499966", "0.5447811", "0.543089", "0.5430379", "0.5412173", "0.54109305", "0.54012305", "0.5399349", "0.5387694", "0.53779656", "0.5374357", "0.5372248", "0.5345595", "0.5337594", "0.5337476", "0.53356683", "0.53222686", "0.53026897", "0.5300941", "0.5300719", "0.52995574" ]
0.71497923
0
Function processing username update email requests
public void sendUsernameChangeEmail(UserDTO userDTO) { try { Map<String, Object> modelObject = null; modelObject = ImmutableMap.of( "name", userDTO.getFirstName() ); // Send email with required info sendMimeEmailWithFreemarker(Constants.USERNAME_UPDATE_SUBJECT, Constants.USERNAME_UPDATE_TEMPLATE, userDTO, modelObject); } catch (UnsupportedEncodingException | CannotSendEmailException | URISyntaxException e) { e.printStackTrace(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void usernameFromEmail(String email) {\n if (email.matches(\"(?:[a-z0-9!#$%&'*+/=?^_`{|}~-]+(?:\\\\.[a-z0-9!#$%&'*+/=?^_`{|}~-]+)*|\\\"(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21\\\\x23-\\\\x5b\\\\x5d-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])*\\\")@(?:(?:[a-z0-9](?:[a-z0-9-]*[a-z0-9])?\\\\.)+[a-z0-9](?:[a-z0-9-]*[a-z0-9])?|\\\\[(?:(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?)\\\\.){3}(?:25[0-5]|2[0-4][0-9]|[01]?[0-9][0-9]?|[a-z0-9-]*[a-z0-9]:(?:[\\\\x01-\\\\x08\\\\x0b\\\\x0c\\\\x0e-\\\\x1f\\\\x21-\\\\x5a\\\\x53-\\\\x7f]|\\\\\\\\[\\\\x01-\\\\x09\\\\x0b\\\\x0c\\\\x0e-\\\\x7f])+)\\\\])\")) {\n goNextEnable();\n } else {\n goNextDisable();\n }\n }", "void setEmail( String username, String email ) throws UserNotFoundException;", "int updateContact(String email, String firstName, String lastName, String phone, String username);", "private void emailExistCheck() {\n usernameFromEmail(email.getText().toString());\n }", "protected void updateTaskEmailsManually() {\n List<Object> arguments = new ArrayList<Object>();\n String emailToReplace = \"test22@just.ee\";\n arguments.add(emailToReplace);\n List<Task> results = BeanHelper.getWorkflowDbService().searchTasksAllStores(\"(wfc_owner_email=? )\", arguments, -1).getFirst();\n Map<QName, Serializable> changedProps = new HashMap<QName, Serializable>();\n for (Task task : results) {\n changedProps.clear();\n try {\n String ownerId = task.getOwnerId();\n String newTaskOwnerEmail = BeanHelper.getUserService().getUserEmail(ownerId);\n if (StringUtils.isBlank(newTaskOwnerEmail)) {\n LOG.warn(\"The e-mail of following task was not updated because no user e-mail address was found:\\n\" + task);\n continue;\n }\n changedProps.put(WorkflowCommonModel.Props.OWNER_EMAIL, newTaskOwnerEmail);\n BeanHelper.getWorkflowDbService().updateTaskEntryIgnoringParent(task, changedProps);\n LOG.info(\"Updated task [nodeRef=\" + task.getNodeRef() + \"] e-mail manually: \" + emailToReplace + \" -> \" + newTaskOwnerEmail);\n } catch (Exception e) {\n LOG.error(e);\n continue;\n }\n }\n }", "@Override\n public void process() {\n if (this.mail.isEmpty() || this.password == null) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n } else {\n //Get all users with the given e-mail address (size of list is 1 if successful)\n DBFilter mailFilter = new DBFilter();\n mailFilter.addConstraint(User.CLMN_MAIL, SQLConstraintOperator.LIKE, this.mail);\n ArrayList<User> users = User.findAll(mailFilter);\n\n //We expect to find exactly one user. If we find more or less than one user, the verification failed.\n if (users != null && users.size() == 1) {\n User user = users.get(0);\n //Check password:\n if (Arrays.equals(user.getPassword(), this.password)) {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", true);\n ScopeHandler.getInstance().store(this.request, \"user\", user);\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n } else {\n ScopeHandler.getInstance().store(this.request, \"inputValidation\", false);\n //Probably there is a user in the session. Remove him!\n ScopeHandler.getInstance().remove(this.request, \"user\", \"session\");\n }\n }\n }", "String updateUserInfo(String usernameToUpdate, UserInfo userInfo);", "java.lang.String getUserEmail();", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n response.setContentType(\"text/plain;charset=UTF-8\");\n Date date = new Date();\n String email = request.getParameter(\"email\");\n boolean valido = false;\n UtenteQueries uq = new UtenteQueries(manager);\n try {\n valido = uq.emailValida(email);\n } catch (SQLException ex) {\n \n }\n if(valido){\n Timestamp time = new Timestamp(date.getTime());\n String timestamp = time.toString();\n MessageDigest md = null;\n try {\n md = MessageDigest.getInstance(\"MD5\");\n } catch (NoSuchAlgorithmException ex) {\n //\n }\n md.update((email + timestamp).getBytes());\n byte[] md5 = md.digest();\n StringBuffer sb = new StringBuffer();\n for (byte b : md5) {\n sb.append(String.format(\"%02x\", b & 0xff));\n }\n String md5Str = sb.toString();\n PasswordRecoveryQueries prq = new PasswordRecoveryQueries(manager);\n try {\n PasswordRecovery pr = new PasswordRecovery();\n pr.setHash(md5Str);\n pr.setEmail(email);\n pr.setTime(time);\n prq.insertRecuperaPassword(pr);\n MailSender instance = new MailSender();\n try {\n instance.changePassword(email, \"http://localhost:8084/Multisala/password-recovery.html?key=\" + md5Str);\n response.getWriter().println(\"success\");\n } catch (MessagingException ex) {\n response.getWriter().println(\"fail\");\n }\n } catch (SQLException ex) {\n response.getWriter().println(\"fail\");\n }\n }else\n response.getWriter().println(\"noemail\"); \n }", "public static void setUsernameEmailMappings(HashMap<String,String> usernameToEmailNew)\r\n\t{\r\n\t\tusernameToEmail = usernameToEmailNew;\r\n\t}", "private void updateUsernameInFirebase() {\n\n binding.profileActivityProgressBar.setVisibility(View.VISIBLE);\n\n //String username = this.mTextInputEditTextUsername.getText().toString();\n String username = Objects.requireNonNull(binding.profileActivityEditTextUsername.getText()).toString();\n\n\n if (this.getCurrentUser() != null) {\n if (!username.isEmpty() && !username.equals(getString(R.string.info_no_username_found))) {\n UserHelper.updateUsername(username, this.getCurrentUser().getUid()).addOnFailureListener(this.onFailureListener()).addOnSuccessListener(this.updateUIAfterRESTRequestsCompleted(UPDATE_USERNAME));\n\n }\n }\n\n }", "public User forgotPassword (String inputUsername, String inputEmail, String textForEmailBody) {\n\t\t\n\t String [] recievers = new String[1];\n\t recievers[0] = inputEmail;\n\t \n\t if( this.myCompany.isCompanyMember(inputUsername) != null)\n\t {\n\t\tif(!emailAvailability(inputEmail))\n\t\t{\n\t\t\tfor(int i=0; i<myCompany.getCompanyMembers().size(); i++)\n\t\t\t{\n\t\t\t\tif(inputEmail.equalsIgnoreCase(myCompany.getCompanyMembers().get(i).getMyAccount().getEmail()))\n\t\t\t\t{\n\t\t\t\t\tUser user = myCompany.getCompanyMembers().get(i);\n\t\t\t\t\tHelp.sendGMail(\"itintelligenceuom@gmail.com\", \"ITintelligence2001\", recievers, \"Account Recovery\", textForEmailBody);\n\t\t\t\t\treturn user;\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t }\n\t \n\t return null;\n\t}", "private void getUsernameButtonActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_getUsernameButtonActionPerformed\n\n clearInformation();\n String key = keySearchUserTextField.getText();\n String email = emailSearchUserTestField.getText();\n if (key.equals(EMPTY)) {\n this.displayInformation(PLEASE_EDIT_KEY);\n } else if (email.equals(EMPTY)) {\n this.displayInformation(PLEASE_EDIT_EMAIL);\n } else {\n // get the user and display its username\n Rsp response = flickrService.findByEmail(key, email);\n String result = ((User) response.getAny()).getUsername();\n resultUsernameTextField.setText(result);\n displayInformation(REQUEST_OK);\n }\n }", "@Override\n\tpublic void acceptRequest(String userEmail, String senderEmail) {\n\t\tconn = ConnectionFactory.getConnection();\n\n\t\ttry {\n\t\t\tString sql = \"update friendship set status=? where user_id_1=? and user_id_2=?\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\n\t\t\tpstmt.setString(1, Constants.COMPLETED);\n\t\t\tpstmt.setString(2, senderEmail);\n\t\t\tpstmt.setString(3, userEmail);\n\n\t\t\tpstmt.executeUpdate();\n\t\t\t\n\t\t\tsql = \"insert into friendship (user_id_1, user_id_2, status) values (?, ?, ?)\";\n\t\t\tpstmt = conn.prepareStatement(sql);\n\n\t\t\tpstmt.setString(1, userEmail);\n\t\t\tpstmt.setString(2, senderEmail);\n\t\t\tpstmt.setString(3, Constants.COMPLETED);\n\n\t\t\tpstmt.executeUpdate();\n\n\t\t} catch(SQLException sqlex) {\n\t\t\tsqlex.printStackTrace();\n\t\t} catch(Exception ex) {\n\t\t\tex.printStackTrace();\n\t\t} finally {\n\t\t\tConnectionFactory.closeResources(set, pstmt, conn);\n\t\t}\n\t}", "@Override\n public void onClick(View view) {\n inputUsername = usernameInput.getText().toString().trim();\n inputPassword = passwordInput.getText().toString();\n\n if(!inputUsername.contains(\"@gmail.com\")){\n inputUsername = inputUsername.concat(\"@gmail.com\");\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n }\n\n //Toast.makeText(MainActivity.this, \"Email: \" + inputUsername, Toast.LENGTH_SHORT).show();\n checkEmail(inputUsername);\n }", "@RequestMapping(value = \"/reikningur/breyta-nafni\", method = RequestMethod.POST)\n private String changeUsernameHandler (\n HttpSession session, @RequestParam(value=\"username\") String username, ModelMap model) {\n \n String email = (String) session.getAttribute(\"user\");\n accountService.changeName(email, username);\n session.setAttribute(\"username\", username);\n model.addAttribute(\"message\", \"Nafni þínu hefur verið breytt!\");\n return \"settings\";\n }", "private void checkEmail(UserResource target, Errors errors) {\n final String proc = PACKAGE_NAME + \".checkEmail.\";\n final String userId = target.getId();\n final String email = target.getEmail();\n int found = 0;\n boolean doValidation = false;\n\n logger.debug(\"Entering: \" + proc + \"10\");\n\n final boolean isUpdating = apiUpdating(userId);\n logger.debug(proc + \"20\");\n\n if (isUpdating) {\n final UserEntry user = userRepository.findOne(userId);\n logger.debug(proc + \"30\");\n\n if (!user.getEmail()\n .equals(email)) {\n logger.debug(proc + \"40\");\n\n found = userRepository.updateEmail(email, userId);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n }\n else {\n logger.debug(proc + \"50\");\n\n found = userRepository.uniqueEmail(email);\n if (found > 0) {\n errors.rejectValue(\"email\", \"user.email.duplicate\");\n }\n else {\n doValidation = true;\n }\n }\n\n if (doValidation) {\n logger.debug(proc + \"60\");\n\n final laxstats.web.validators.Validator emailValidator = EmailValidator.getInstance();\n if (!emailValidator.isValid(email)) {\n errors.rejectValue(\"email\", \"user.email.invalidEmail\");\n }\n }\n logger.debug(\"Leaving: \" + proc + \"70\");\n }", "public static String updateUsersUEmail(String newEmail, String account){\n return \"update users set u_email = '\"+newEmail+\"' where u_accountnum = '\"+account+\"'\";\n }", "String getUserMainEmail( int nUserId );", "String extractUserNameFromData(String userInfoDataFromServer);", "private void responseMonitor(List<User> returnedUsers, User returnedUserFromEdit){\n String USER_NAME= returnedUserFromEdit.getName();\n String USER_EMAIL = returnedUserFromEdit.getEmail();\n Long UserID = returnedUserFromEdit.getId();\n Toast.makeText(this,getString(R.string.returned)+ USER_NAME+ \" , \"+ USER_EMAIL+\" , \"+ UserID,Toast.LENGTH_LONG).show();\n }", "public void sendFollowingRequest (String username) {\n communicator.getDB()\n .collection(\"users\")\n .whereEqualTo(\"username\",username)\n .limit(1)\n .get()\n .addOnCompleteListener(task -> {\n if (task.getResult() != null) {\n if (!(task.getResult().isEmpty())){\n for (QueryDocumentSnapshot document : task.getResult()) {\n String UID = document.getId();\n addRequestToMailBox(UID);\n }\n }\n }\n });\n }", "public void sendUpdate() {\n JSONObject obj = new JSONObject();\n String url = (\"http://coms-309-hv-3.cs.iastate.edu:8080/user/update\");\n RequestQueue queue = Volley.newRequestQueue(this);\n\n try {\n obj.put(\"email\", emailEdit.getText()); //string\n obj.put(\"name\", nameEdit.getText()); //string\n obj.put(\"age\", Integer.parseInt(ageEdit.getText().toString())); //int\n obj.put(\"height\", Integer.parseInt(heightEdit.getText().toString())); //int\n obj.put(\"weight\", Integer.parseInt(weightEdit.getText().toString())); //int\n obj.put(\"lifestyle\", lifestyleString(activityEdit)); //string\n obj.put(\"gender\", genderEdit.getSelectedItem().toString()); //string\n\n } catch (JSONException ex) {\n ex.printStackTrace();\n }\n\n JsonObjectRequest request = new JsonObjectRequest(Request.Method.POST, url, obj,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n int responseCode = 1;\n String responseMessage = \"\";\n try {\n responseCode = response.getInt(\"response\");\n responseMessage = response.getString(\"message\");\n } catch (JSONException e) {\n e.printStackTrace();\n }\n toastKickoff(\"User Updated: \" + responseCode + \" \" + responseMessage);\n }\n },\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Log.e(\"HttpClient\", \"error: \" + error.toString());\n toastKickoff(\"Internal Error\");\n }\n });\n\n queue.add(request);\n\n }", "public static void update_TbUser() {\n builder = new Uri.Builder();\n builder.appendQueryParameter(\"username\", Server.owner.get_username());\n builder.appendQueryParameter(\"email\", Server.owner.get_Email());\n builder.appendQueryParameter(\"birthday\", Server.owner.get_Birthday().toString());\n builder.appendQueryParameter(\"gender\", Server.owner.get_gender() ? \"1\" : \"0\");\n builder.appendQueryParameter(\"phone\", Server.owner.get_Phone());\n builder.appendQueryParameter(\"image_source\", Server.owner.get_imageSource());\n builder.appendQueryParameter(\"conversations\", Server.owner.get_AllConversation());\n\n String url = Constant.M_HOST + Constant.M_UPDATE_USER_WITHOUT_PASS;\n String a = uService.execute(builder, url);\n }", "void send(String emailName);", "private void handleUser(String username) {\n if (username.toLowerCase().equals(validUser)) {\n sendMsgToClient(\"331 User name okay, need password\");\n currentUserStatus = userStatus.ENTEREDUSERNAME;\n } else if (currentUserStatus == userStatus.LOGGEDIN) {\n sendMsgToClient(\"530 User already logged in\");\n } else {\n sendMsgToClient(\"530 Not logged in\");\n }\n }", "public String updateEmail(String value) {\n String message = invalidValueMessage + value + \". Please enter a proper email address.\\n\";\n if (validateEmail(value) || value.equals(\"\")) {\n message = updatedMessage;\n setEmail(value);\n }\n return message;\n }", "private void updateUserName() {\n\t\t// if the customer has a first and last name update their username to be\n\t\t// the concatenation of their first and last name (in lower case)\n\t\t// else, make their username their first name\n\t\tif (!this.lastName.equals(Customer.EMPTY_LAST_NAME)) {\n\t\t\tthis.userName = (this.firstName + this.lastName).toLowerCase();\n\t\t} else {\n\t\t\tthis.userName = this.firstName.toLowerCase();\n\t\t}\n\t}", "void saveNewEmail(String userName, String eMail) throws DatabaseException;", "public void updateEmail(String newEmailAddress)\r\n {\r\n emailAddress = newEmailAddress;\r\n }", "public static String updateUserInfoUEmail(String newEmail, String account){\n return \"update user_information set ui_email = '\"+newEmail+\"' where ui_account = '\"+account+\"'\";\n }", "public static void addUsernameEmailMapping(String username, String email)\r\n\t{\r\n\t\tusernameToEmail.put(username, email);\r\n\t}", "String getUserMail();", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String lid = request.getParameter(\"lid\");\n String nic = request.getParameter(\"nic\");\n String onic = request.getParameter(\"onic\");\n String pname = request.getParameter(\"pname\");\n \n Connection conn;\n Statement stat;\n ResultSet rs,rs2;\n String sql,sql2,sql3;\n \n Connections reg = new Connections();\n reg.Connect();\n conn = reg.con;\n stat = reg.qry;\n \n sql = \"UPDATE lost set FNIC='\"+nic+\"', isFound = 1 WHERE LID = '\"+lid+\"'\";\n try {\n stat.executeUpdate(sql);\n } catch (SQLException ex) {\n Logger.getLogger(found.class.getName()).log(Level.SEVERE, null, ex);\n }\n sql3 = \"SELECT Name, Email, City from users where NIC = '\"+nic+\"' \";\n String FName = \"\", FEmail = \"\" , FCity = \"\";\n String OName = \"\", OEmail = \"\" , OCity = \"\";\n try {\n rs = stat.executeQuery(sql3);\n if(rs.next()){\n FName = rs.getString(\"Name\");\n FEmail = rs.getString(\"Email\");\n FCity = rs.getString(\"City\");\n }\n } catch (Exception ex) {\n \n Logger.getLogger(found.class.getName()).log(Level.SEVERE, null, ex);\n }\n sql2 = \"SELECT Name, Email, City from users where NIC = '\"+onic+\"' \";\n \n try {\n rs2 = stat.executeQuery(sql2);\n if(rs2.next()){\n OName = rs2.getString(\"Name\");\n OEmail = rs2.getString(\"Email\");\n } \n \n String msg = \"Dear \" + OName + \",your lost pet \" +pname+ \" was found by our member \" + FName + \" from\" + FCity + \".\\nYou can connect via Email \" + FEmail + \" !\";\n \n SimpleMail mail = new SimpleMail();\n mail.sendmail(OEmail, msg);\n response.sendRedirect(request.getContextPath() + \"/userEvents.jsp\");\n \n } catch (SQLException ex) {\n Logger.getLogger(found.class.getName()).log(Level.SEVERE, null, ex);\n }\n }", "public void authenticateUserEmail(final String email) {\n RequestQueue queue = Volley.newRequestQueue(this);\n String url = \"http://\" + Config.getWebServerURL(this) + \"/exists?email=\"+email;\n StringRequest stringRequest = new StringRequest(Request.Method.GET, url, new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n retrieveSecurityQuestions(email);\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n txtValidEmail.requestFocus();\n txtValidEmail.setError(\"Email address not found, please try again\");\n }\n }) ;\n queue.add(stringRequest);\n }", "void setUserUsername(String username);", "public String setUserName2(UserManager uManager){\n boolean exists = true;\n String userName = \"\";\n while(exists) {\n userName = setUserName();\n exists = setUserNameAndValidate.apply(userName, uManager);\n userNameErrorMessage(exists, userName);\n }\n return userName;\n }", "@Override\n public void sendInitialUpdate(String username) {\n if (match == null) return;\n InitialUpdate update = match.generateUpdate();\n notifyObservers(username, update);\n }", "public void updateRegistredUser (int request, int _socket_number, String _name, String _ip_address) {\n\t\tsetName(_name);\n\t\tsetIpAddress(_ip_address);\n\t\tsetSocketNumber(_socket_number);\n\t}", "protected void userSave(HttpServletRequest request,\n\t\t\tHttpServletResponse response) throws ServletException, IOException {\n\n\t\t// check if the typed name is real\n\t\ttry {\n\t\t\tInteger.parseInt(strFullname);\n\t\t\tsendError(request, response,\n\t\t\t\t\t\"You can't type number for your Full Name!\");\n\t\t\treturn;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\t// check if the user is filled all the lines\n\t\tif ((strUsername.equals(\"\")) || strPassword.equals(\"\")\n\t\t\t\t|| strFullname.equals(\"\") || strEmail.equals(\"\")) {\n\t\t\tsendError(request, response, \"Please, fill the lines with *\");\n\t\t\treturn;\n\t\t}\n\t\t// Check for valid email\n\t\ttry {\n\t\t\tString emailregex = \"^[_A-Za-z0-9-]+(\\\\.[_A-Za-z0-9-]+)*@[A-Za-z0-9-]+(\\\\.[A-Za-z0-9-]+)*(\\\\.[A-Za-z]{2,})$\";\n\t\t\tBoolean b = strEmail.matches(emailregex);\n\t\t\tif (b == false) {\n\t\t\t\tsendError(request, response, \"Invalid Email\");\n\t\t\t}\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\tMySql sql = new MySql();\n\t\t// check if there is another user registered with the same name and\n\t\t// email\n\t\tif (sql.DublicateUsernameEmail(strUsername, strEmail)) {\n\t\t\tsendError(request, response,\n\t\t\t\t\t\"There is another person with the same Name and Email!\");\n\t\t\treturn;\n\t\t}\n\t\tsql.insertUserInfo(strUsername, strPassword, strFullname, strEmail);\n\t}", "@Override\r\n\tpublic void updateEmail(Integer id, String email) {\n\t\t\r\n\t}", "private void sendStatusUpdateMailToOperators()\n {\n if (sendMail == false) {\n return;\n }\n\n wikiContext.runInTenantContext(branch, getWikiSelector(), new CallableX<String, RuntimeException>()\n {\n @Override\n public String call() throws RuntimeException\n {\n BranchFileStats stats = PlcUtils.getBranchFileStats(wikiContext);\n if (stats == null) {\n return StringUtils.EMPTY;\n }\n FileStatsDO statsForId = stats.getFileStatsForId(pageId);\n if (statsForId == null) {\n return StringUtils.EMPTY;\n }\n\n // retrieve operators and send email to each of them in their specisifed language (if no language is specified english will be taken\n // as default)\n final String currentUserName = wikiContext.getWikiWeb().getAuthorization().getCurrentUserName(wikiContext);\n for (final String operator : statsForId.getOperators()) {\n try {\n wikiContext.getWikiWeb().getAuthorization().runAsUser(operator, wikiContext,\n new CallableX<Void, RuntimeException>()\n {\n\n GWikiI18nProvider i18n = wikiContext.getWikiWeb().getI18nProvider();\n\n @Override\n public Void call() throws RuntimeException\n {\n String email = wikiContext.getWikiWeb().getAuthorization().getCurrentUserEmail(wikiContext);\n if (StringUtils.isEmpty(email) == true) {\n GLog.warn(GWikiLogCategory.Wiki, \"User has no mail specified. No status article update mail sent.\",\n new LogAttribute(GenomeAttributeType.UserEmail, operator));\n return null;\n }\n\n // prepare email contents\n String subject = i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.subject\",\n \"Article status updated\",\n getPageTitle());\n String bodyString = getBodyString(currentUserName);\n\n final Map<String, String> ctx = new HashMap<String, String>();\n ctx.put(GWikiEmailProvider.FROM, wikiContext.getWikiWeb().getWikiConfig().getSendEmail());\n ctx.put(GWikiEmailProvider.SUBJECT, subject);\n ctx.put(GWikiEmailProvider.TEXT, bodyString);\n ctx.put(GWikiEmailProvider.MAILTEMPLATE, \"edit/pagelifecycle/mailtemplates/StatusUpdateMailTemplate\");\n ctx.put(GWikiEmailProvider.TO, email);\n\n GLog.note(GWikiLogCategory.Wiki, \"Sent status update mail to: \" + email);\n wikiContext.getWikiWeb().getDaoContext().getEmailProvider().sendEmail(ctx);\n return null;\n }\n\n /**\n * Get body contents\n * \n * @param currentUserName\n * @return\n */\n private String getBodyString(final String currentUserName)\n {\n StringBuffer bodyString = new StringBuffer();\n String body = i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.body\", \"\",\n wikiContext.getWikiWeb()\n .getAuthorization().getCurrentUserName(wikiContext),\n getPageTitle(), wikiContext.globalUrl(pageId), currentUserName,\n newPageState);\n bodyString.append(body);\n if (StringUtils.isNotBlank(comment) == true) {\n bodyString.append(i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.comment\", \"\", comment));\n }\n bodyString.append(i18n.translate(wikiContext, \"gwiki.plc.dashpoard.popup.mail.foot\"));\n return bodyString.toString();\n }\n });\n } catch (AuthorizationFailedException ex) {\n GWikiLog.warn(\"Cannot determine email for user: \" + operator, ex);\n }\n }\n return null;\n }\n });\n }", "public String requestPasswordResetForUsername(HttpServletRequest request, String username) {\n\t\tOptional<User> optUser = userService.findByUsername(username);\n\t\treturn processPotentialUser(request, optUser);\n\t}", "@RequestMapping(value = \"/resendverification\", method = RequestMethod.POST)\n\tpublic String unlockAccount(@RequestParam String usernameemail, ModelMap model) {\n\t\tmodel.clear();\n\t\tboolean userExists = loginService.userExists(usernameemail);\n\t\tif (userExists) {\n\t\t\tString email = loginService.returnEmailFromUsername(usernameemail);\n\t\t\tString username = loginService.returnUsernameFromEmail(usernameemail);\n\t\t\tvtService.regenerateVerificationCode(username, email);\n\t\t\treturn \"unlocksuccessful\";\n\t\t} else {\n\t\t\t// FRONT END TO PRINT NO SUCH EMAIL EXIST\n\t\t\treturn \"resendverification\";\n\t\t}\n\t}", "@Override\r\n\tpublic int updateemail(Account account) {\n\t\tString email = String.valueOf(accountMapper.findByemail(account.getEmail()));\r\n\t\tif(email.equals(\"null\")) {\r\n\t\t\taccountMapper.updateemail(account);\r\n\t\t\treturn 1;\r\n\t\t}else {\r\n\t\t\treturn 0;\r\n\t\t}\r\n\t}", "public static void updateEmailRequest(final Context context, final String businessId, final String email) {\n final RequestQueue httpRequestQueue = Volley.newRequestQueue(context);\n final StringRequest httpRequest = new StringRequest(Request.Method.POST, (MainActivity.serverURL + \"update/update_email.php\"),\n //success, the request responded successfully!\n new Response.Listener<String>() {\n @Override\n public void onResponse(String response) {\n httpRequestQueue.stop();\n }\n },\n //error, the request responded with a failure...\n new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n Toast.makeText(context, \"An error occurred with your internet...\", Toast.LENGTH_LONG).show();\n error.printStackTrace();\n httpRequestQueue.stop();\n }\n }\n ) {\n //POST variables to send to the request\n @Override\n protected Map<String, String> getParams() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"businessId\", businessId);\n params.put(\"email\", email);\n return params;\n }\n //header values to send to the request\n @Override\n public Map<String, String> getHeaders() throws AuthFailureError {\n Map<String, String> params = new HashMap<String, String>();\n params.put(\"Content-Type\",\"application/x-www-form-urlencoded\");\n return params;\n }\n };\n httpRequestQueue.add(httpRequest);\n }", "@Override\npublic String getUsername() {\n\treturn email;\n}", "public void setEmail(String email)\r\n/* 36: */ {\r\n/* 37:50 */ this.email = email;\r\n/* 38: */ }", "private void logic_for_username() {\n userID = SCUtils.getUniqueID(getApplicationContext());\n databaseRef.child(\"users\").child(userID).addListenerForSingleValueEvent(new ValueEventListener() {\n @Override public void onDataChange(DataSnapshot dataSnapshot) {\n progressBar.setVisibility(View.GONE);\n if (!dataSnapshot.exists()) {\n show_alert_username();\n } else {\n username = dataSnapshot.getValue(String.class);\n Snackbar.make(findViewById(android.R.id.content), \"Logged in as \" + username, Snackbar.LENGTH_SHORT).show();\n }\n }\n\n @Override public void onCancelled(DatabaseError databaseError) {\n Log.w(\"!!!\", \"username:onCancelled\", databaseError.toException());\n }\n });\n }", "public static ClientResponse usernameForgotAlt(RESTActions restActions, Hashtable<String,String> data, Hashtable<String,String> headerTable, String email ) throws Throwable {\n\n\t\tString usernameForgotURL = buildUsernameForgotURL();\n\t\tLOG.info(\"##### Built URL: \" + usernameForgotURL);\n\t\t\n\t\tString requestBody = buildUsernameForgotRequestBody();\n\t\tLOG.info(\"##### Built request body: \" + requestBody);\n\t\t\n\t\tLOG.info(\"##### Making HTTP request to obtain the Username Forgot...\");\n\t\tClientResponse clientResponse = restActions.postClientResponse(\n\t\t\t\tusernameForgotURL, requestBody, headerTable, null,\n\t\t\t\tRESTConstants.APPLICATION_JSON);\n\n\t\tLOG.info(\"##### Verifying HTTP response code...\");\n\t\tString sExpectedResponseCode = data.get(\"EXPECTED_RESPONSE_CODE\");\n\t\tint iExpectedResponseCode = Integer.parseInt(sExpectedResponseCode);\n\t\tint iActualResponseCode = clientResponse.getStatus();\n\t\tString fmt = \"WRONG HTTP RESPONSE CODE - EXPECTED %s, FOUND %s\";\n\t\tString msg = String.format(fmt, iExpectedResponseCode, iActualResponseCode);\n\t\trestActions.assertTrue(iExpectedResponseCode == iActualResponseCode, msg);\n\t\t\n\t\treturn clientResponse;\n\t}", "protected static void updateUsername(User user, String newUsername) {\n String friendsString = \"{\";\n for (User friend : user.getFriendsList()) {\n friendsString += friend.getUsername() + \",\";\n }\n friendsString = Utils.removeStartEndChars(friendsString);\n String [] strings = Utils.splitCommas(friendsString);\n\n for (String string : strings) {\n try {\n // connect to database\n Connection connection = DriverManager.getConnection(secrets.getUrl(), secrets.getUsername(), secrets.getPassword());\n\n // create a statement\n Statement statement = connection.createStatement();\n\n // execute SQL query\n String query = String.format(\"SELECT * FROM users WHERE username='%s'\", string);\n ResultSet result = statement.executeQuery(query);\n\n while (result.next()) {\n String usernameFriends = result.getString(\"friends\");\n usernameFriends = Utils.parseString(usernameFriends);\n String[] users = Utils.splitCommas(Utils.removeStartEndChars(usernameFriends));\n usernameFriends = \"{\";\n\n for (int j=0; j<users.length; j++) {\n if (users[j].equals(user.getUsername())) {\n users[j] = newUsername;\n }\n usernameFriends += users[j] + \",\";\n }\n usernameFriends = Utils.removeEndChar(usernameFriends) + \"}\";\n query = String.format(\"UPDATE users SET friends='%s' WHERE username='%s'\", usernameFriends, string);\n updateDBWithQuery(query);\n }\n\n connection.close();\n } catch (Exception e) {\n e.printStackTrace();\n\n return;\n }\n }\n\n // and companies followers list\n String companiesListString = \"{\";\n for (Company company : user.getCompaniesList()) {\n companiesListString += company.getName() + \",\";\n }\n\n companiesListString = Utils.removeStartEndChars(companiesListString);\n String [] arrayOfCompaniesName = Utils.splitCommas(companiesListString);\n\n for (String companyName : arrayOfCompaniesName) {\n try {\n // connect to database\n Connection connection = DriverManager.getConnection(secrets.getUrl(), secrets.getUsername(), secrets.getPassword());\n\n // create a statement\n Statement statement = connection.createStatement();\n\n // execute SQL query\n String query = String.format(\"SELECT * FROM companies WHERE name='%s'\", companyName);\n ResultSet result = statement.executeQuery(query);\n\n while (result.next()) {\n String followersList = result.getString(\"followers_list\");\n followersList = Utils.parseString(followersList);\n String[] users = Utils.splitCommas(Utils.removeStartEndChars(followersList));\n followersList = \"{\";\n\n for (int j=0; j<users.length; j++) {\n if (users[j].equals(user.getUsername())) users[j] = newUsername;\n\n followersList += users[j] + \",\";\n }\n followersList = Utils.removeEndChar(followersList) + \"}\";\n query = String.format(\"UPDATE companies SET followers_list='%s' WHERE name='%s'\", followersList, companyName);\n updateDBWithQuery(query);\n\n }\n\n connection.close();\n } catch (Exception e) {\n e.printStackTrace();\n\n return;\n }\n }\n\n // sql update username query command\n String query = String.format(\"UPDATE users SET username='%s' WHERE username='%s'\", newUsername, user.getUsername());\n updateDBWithQuery(query);\n }", "@RequestMapping(value = \"/socialLoginUpdate\", method = RequestMethod.POST, produces = \"application/json\")\n \t@ResponseBody\n \tpublic Map<String, String> socialLoginUpdate(@RequestParam String emailId,\n \t\t\t@RequestParam String firstName, @RequestParam String lastName) {\n \tMap<String, String> responseMap = null;\n \t\ttry {\n \t\t\tresponseMap = this.econnectService.socialLoginUpdate(emailId, firstName, lastName);\n \t\t} catch (Exception e) {\n \t\t\te.printStackTrace();\n \t\t}\n \t\treturn responseMap;\n \t}", "public static String buildUsernameForgotRequestBody( String email ) {\n\t\tStringWriter sw = new StringWriter();\n\t\tPrintWriter pw = new PrintWriter( sw );\n\t\tpw.println(\"{\");\n\t\tpw.println(\" \\\"email\\\":\\\"\" + email + \"\\\"\");\n\t\tpw.println(\"}\");\n\t\treturn sw.toString();\n\t}", "public void setUsername(String username) {\n this.username = username;\n this.email = username;\n this.needToSave = Boolean.TRUE;\n }", "@Test\n public void testUsernameChange() {\n final String username = \"harvey@iaeste.us\";\n // There was a bug related to the Changing of Username, as it failed if\n // the password contained upper/lower case letters. Since IWS followed\n // the rule from IW3 and only looked at Passwords case insensitive.\n final String password = \"Harvey's password which is SUPER secret.\";\n final CreateUserRequest createRequest = new CreateUserRequest(username, password, \"Harvey\", \"Rabbit\");\n final CreateUserResponse createResponse = administration.createUser(token, createRequest);\n assertThat(createResponse.isOk(), is(true));\n\n // To ensure that we can use the account, we have to activate it. Once\n // it is activated, we can move on to the actual test.\n final String activationCode = readCode(NotificationType.ACTIVATE_NEW_USER);\n final Response activateResponse = administration.activateUser(activationCode);\n assertThat(activateResponse.isOk(), is(true));\n\n // Now we have a fresh new account which is active. So we can now try to\n // change the Username. To do this, we have to log in as the user, since\n // only a user may change his/her own username.\n final String newUsername = \"rabbit@iaeste.us\";\n final AuthenticationToken myToken = login(username, password);\n // We're building the request with the user itself as User Object\n final UserRequest updateRequest = new UserRequest(createResponse.getUser());\n // We're setting a new username here, which we can use.\n updateRequest.setNewUsername(newUsername);\n // To update the username, we need to provide some credentials,\n // otherwise the IWS will reject the request. This is needed to ensure\n // that nobody is attempting to hijack an active account.\n updateRequest.setPassword(password);\n // Let's just clear the Spy before we're using it :-)\n final Response updateResponse = administration.controlUserAccount(myToken, updateRequest);\n assertThat(updateResponse.isOk(), is(true));\n // Changing username must work without being logged in, well actually\n // it doesn't matter. As it doesn't use the current Session.\n logout(myToken);\n // Now, we can read out the update Code from the Notifications, which\n // is a cheap way of reading the value from the e-mail that is send.\n final String updateCode = readCode(NotificationType.UPDATE_USERNAME);\n final Response resetResponse = administration.updateUsername(updateCode);\n assertThat(resetResponse.isOk(), is(true));\n\n // Final part of the test, login with the new username, and ensure that\n // the UserId we're getting is the same as the previous Id.\n final AuthenticationToken newToken = login(newUsername, password);\n assertThat(newToken, is(not(nullValue())));\n final FetchPermissionResponse permissionResponse = access.fetchPermissions(newToken);\n assertThat(permissionResponse.isOk(), is(true));\n assertThat(permissionResponse.getAuthorizations().get(0).getUserGroup().getUser().getUserId(), is(createResponse.getUser().getUserId()));\n logout(newToken);\n // And done - Long test, but worth it :-)\n }", "private void changeUsername() throws SQLException {\n printAllWebsites();\n\n System.out.print(\"Which website?\\nwebsite: \");\n String website = input.next();\n\n System.out.println(\"Do you want to change the password as well? Y/N\");\n if (input.next().equalsIgnoreCase(\"y\")) {\n changeWebsite(website);\n return;\n }\n\n System.out.print(\"What is the old username?\\nusername: \");\n String username = input.next();\n\n int websiteDataId = getWebsiteDataId(website, username);\n if (websiteDataId == 0) throw new RuntimeException(\"Error while updating website.\");\n\n System.out.print(\"What is the new username?\\nusername: \");\n String user = input.next();\n\n try (PreparedStatement stmt = connection.prepareStatement(\"UPDATE website_data SET username = ? \" +\n \"WHERE website_data_id like (?)\")) {\n stmt.setString(1, user);\n stmt.setInt(2, websiteDataId);\n stmt.executeUpdate();\n }\n\n System.out.println(\"Username updated.\\n\");\n }", "void setErrorUsername();", "public void setUpdateUsername(String updateUsername) {\r\n\t\tthis.updateUsername = updateUsername;\r\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n String url = \"/Welcome.jsp\";\n String emailMessage = request.getParameter(\"emailMessage\");\n \n ArrayList<String> emailList = UserDB.getEmailList();\n if (emailList != null){\n for (String email:emailList){\n sendEmail(email, emailMessage);\n }\n }\n \n this.getServletContext().getRequestDispatcher(url).forward(request, response);\n }", "protected boolean processPersonalTell(String username, String titles, String message){return false;}", "@VisibleForTesting\n void updateUsers(List<String> userUnids) {\n final String METHOD = \"updateUsers\";\n LOGGER.entering(CLASS_NAME, METHOD);\n\n long timeStart = System.currentTimeMillis();\n NotesView serverAccessView = null;\n try {\n String userSelectionFormula = connectorSession.getUserSelectionFormula();\n String userNameFormula = connectorSession.getUserNameFormula();\n LOGGER.log(Level.FINEST,\n \"User selection formula is: {0}\\nUser name formula is: {1}\",\n new Object[] { userSelectionFormula, userNameFormula });\n serverAccessView = directoryDatabase.getView(\n NCCONST.DIRVIEW_SERVERACCESS);\n serverAccessView.refresh();\n\n int count = 0;\n for (String unid : userUnids) {\n NotesDocument personDoc = getDocumentByUnid(directoryDatabase, unid);\n if (personDoc == null) {\n LOGGER.log(Level.FINEST, \"Person document [{0}] is not found\", unid);\n } else {\n String notesName = null;\n try {\n if (count++ % NCCONST.GC_INVOCATION_INTERVAL == 0) {\n Util.invokeGC();\n }\n if (!personDoc.getItemValueString(NCCONST.ITMFORM).contentEquals(\n NCCONST.DIRFORM_PERSON)) {\n continue;\n }\n // The first value in this field is the Notes name; other\n // names may be present.\n Vector nameVector = personDoc.getItemValue(NCCONST.PITM_FULLNAME);\n if (nameVector.size() == 0) {\n continue;\n }\n String storedName = nameVector.firstElement().toString();\n notesName = notesSession.createName(storedName)\n .getCanonical().toLowerCase();\n LOGGER.log(Level.FINEST,\n \"Processing user: {0}; name from directory was: {1}\",\n new Object[] { notesName, storedName});\n // Get their PVI\n String pvi = evaluatePvi(userNameFormula, personDoc);\n if (0 == pvi.length()) {\n LOGGER.log(Level.WARNING,\n \"Could not evaluate PVI username for: {0}\", notesName);\n continue;\n }\n LOGGER.log(Level.FINEST, \"PVI: {0}\", pvi);\n // Does this person match the selection formula?\n boolean selected = checkPersonSelectionFormula(userSelectionFormula,\n personDoc);\n if (!selected) {\n LOGGER.log(Level.FINEST, \"User not selected: {0}\", notesName);\n continue;\n }\n updateUser(personDoc, notesName, pvi, serverAccessView);\n // Log user info\n if (LOGGER.isLoggable(Level.FINE)) {\n User user = getUser(\"gsaname\", pvi);\n LOGGER.log(Level.FINE, \"All groups for {0}: {1}\",\n new Object[] { user, user.getGroups() });\n }\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, \"Failed to update user cache\"\n + (notesName != null ? \" for \" + notesName : \"\"), e);\n } finally {\n Util.recycle(personDoc);\n }\n }\n }\n } catch (Exception e) {\n LOGGER.log(Level.WARNING, \"Error processing users\", e);\n } finally {\n Util.recycle(serverAccessView);\n LOGGER.exiting(CLASS_NAME, METHOD);\n }\n long timeFinish = System.currentTimeMillis();\n LOGGER.log(Level.FINE, \"Update users: {0}ms\", timeFinish - timeStart);\n }", "public String getUserEmail(String nick) throws DAOException;", "@Test\n\tpublic void testUpdateUser_wrongUsername() {\n\t\tLogin login = new Login(\"unique_username_14365432\", \"password\");\n\t\tResponse response = createUser(login);\n\t\t//printResponse(response);\n\t\tassertEquals(Status.OK.getStatusCode(), response.getStatus());\n\t\t\n\t\t//update the user\n\t\tLogin update = new Login(\"unique_username_645324\", \"a_different_password\");\n\t\tupdate.encryptPassword(passwordEncryptionKey);\n\t\t//change the password (to test a wrong password)\n\t\tlogin.setUsername(\"a_not_existing_username_64234e985243\");\n\t\tString resource = \"update_user\";\n\t\tString requestType = \"POST\";\n\t\t\n\t\tList<Login> updateLogins = Arrays.asList(login, update);\n\t\t\n\t\tresponse = sendRequest(resource, requestType, Entity.entity(updateLogins, MediaType.APPLICATION_JSON));\n\t\t//printResponse(response);\n\t\tassertEquals(Status.NOT_FOUND.getStatusCode(), response.getStatus());\n\t}", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws ServletException, IOException {\n\n DaoAluno daoAluno = new DaoAluno();\n Aluno aluno = new Aluno();\n aluno = (Aluno) request.getSession(true).getAttribute(\"aluno\");\n String email = request.getParameter(\"email\");\n\n aluno.setEmail(email);\n daoAluno.update(aluno);\n request.setAttribute(\"mensagem\", \"E-mail alterado com sucesso !\");\n RequestDispatcher rd = request.getRequestDispatcher(\"trocarEmail_a.jsp\");\n rd.forward(request, response);\n\n }", "protected void processRequest(HttpServletRequest request, HttpServletResponse response)\n throws IOException, ServletException\n {\n String name = request.getParameter(\"txtName\");\n String lastName1 = request.getParameter(\"txtLastName1\");\n String lastName2 = request.getParameter(\"txtLastName2\");\n String userName = request.getParameter(\"hdUserName\");\n String role = request.getParameter(\"cmbRole\");\n boolean enabled = CommonFunctions.GetValue(request.getParameter(\"chkEnabled\"));\n UserBase user = new UserBase(-1, userName, name, lastName1, lastName2, role);\n\n HpcaServiceAgent agent = new HpcaServiceAgent();\n ServiceResult<Boolean> result = agent.UpdateUserPersonalInfo(user, enabled);\n\n if(result.getStatus() == ServiceResult.OperationResult.Succeeded)\n response.sendRedirect(RequestManager.AllUsersFullPage);\n else //An unexpected error occured\n RequestManager.SendUserCreationError(request, response);\n }", "void checkUserName() {\n usernameChecked = false;\n signInUpController.checkUserName(userNameText.getText().toString(), new OnTaskListeners.Bool() {\n @Override\n public void onSuccess(Boolean result) {\n usernameChecked = true;\n if (result)\n uniqueUsername = false;\n else\n uniqueUsername = true;\n\n\n }\n });\n }", "@Override\n\tpublic void updateUserProfileInfo(String name) throws Exception {\n\n\t}", "private void requestUserName() {\n // Show an alert to ask for the name\n AlertDialog.Builder builder = new AlertDialog.Builder(this);\n builder.setTitle(\"Enter name:\");\n\n final EditText input_field = new EditText(this);\n\n builder.setView(input_field);\n\n // If a name is provided, let the user pass after pressing Ok\n builder.setPositiveButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n name = input_field.getText().toString();\n }\n });\n // If a no name is provided, prompt again\n builder.setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n requestUserName();\n }\n });\n\n builder.show();\n }", "@Override\n protected void onActivityResult(int requestCode, int resultCode, Intent data) {\n //Checking which request we're responding to\n if (requestCode == 1) {\n //Making sure the request was successful\n if (resultCode == RESULT_OK) {\n\n //display a toast message if the username could not be resolved on the server\n Toast.makeText(getApplicationContext(), \"Username Not Found On Server\", Toast.LENGTH_SHORT).show();\n\n }\n }\n }", "public void setEmailAddress(java.lang.String newEmailAddress);", "void setEmail(String email);", "void setEmail(String email);", "@FXML\n void handlerModifyProfile(){\n //Checks if any field is empty so it can show an alert to the user.\n if(tfName.getText().equals(\"\")||tfFirstSurName.getText().equals(\"\")||\n tfSecondSurName.getText().equals(\"\")||tfDirection.getText().equals(\"\")||\n tfEmail.getText().equals(\"\")){\n //Alert that notice the user that at least oen field is empty\n Alert alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, \"Please write your email before\");\n alert.showAndWait();\n }else{\n try {\n //Checks if the email is correct\n if(new EmailValidator().validate(tfEmail.getText())){\n Alert alert;\n //load a UserDTO class with the current information in the fields\n UserDTO user= new UserDTO(tfUserName.getText(),tfName.getText(),\n tfFirstSurName.getText()+\"%\"+tfSecondSurName.getText(),\n tfEmail.getText(), tfDirection.getText());\n //Call to the DB to change the user information\n userManager.updateUser(user);\n logger.info(tfUserName.getText() + \" user updated\");\n //load password pattern\n String pattern = \"((?=.*[a-z])(?=.*\\\\d)(?=.*[A-Z])(?=.*[@#$%!*.,+-;&]).{8,40})\";\n //Checks that the fields are not empty, have same value and matches with pattern,\n if((!(tfPassword.getText().equals(\"\")||tfRepeatPassword.getText().equals(\"\"))) &&\n tfPassword.getText().equals(tfRepeatPassword.getText()) &&\n tfPassword.getText().matches(pattern)){\n //Update user password\n userManager.changePassword(tfUserName.getText(),EncrypterUtil.encrypt(tfPassword.getText()));\n System.out.println(tfPassword.getText());\n System.out.println(EncrypterUtil.encrypt(tfPassword.getText()));\n alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, \"Credentials updated\");\n alert.showAndWait();\n logger.info(tfUserName.getText() + \" password changed\");\n //Send an email to the user saying that the password has been changed\n MailUtil.sendEmail(tfEmail.getText(), \"Password changed\", \"Your password have changed, if you didn´t do it\"\n + \" put in contact with our customer service.\");\n //Check that passwords got same value\n }else if(!tfPassword.getText().equals(tfRepeatPassword.getText())){\n alert = new Alert(javafx.scene.control.Alert.AlertType.INFORMATION, \"Please write same password\");\n alert.showAndWait();\n //Password are the same but dont match with pattern\n }else if (!tfPassword.getText().matches(pattern) && !(tfPassword.getText().equals(\"\") && tfRepeatPassword.getText().equals(\"\"))){\n alert = new Alert(AlertType.WARNING, \"Pasword has to be valid. A valid pasword contains at least :\\n-8 characters\\n-one capital letter\"\n + \"\\n-one small letter\\n-one number and one symbol\");\n alert.showAndWait();\n }else if(tfPassword.getText().equals(\"\")&&tfRepeatPassword.getText().equals(\"\")){\n //In case the user just changed his/her information.\n MobileApplication.getInstance().showMessage(\"Data saved\");\n }\n \n }\n } catch (UserUpdateException ex) {\n //Put in the logger the information of the error\n logger.severe(ex.getMessage());\n //Alert with the current error\n Alert alert = new Alert(javafx.scene.control.Alert.AlertType.ERROR, ex.getMessage());\n alert.showAndWait();\n }\n }\n }", "@Override\n public String getUsername(){\n return getEmail();\n }", "public void setUserNameEmailText() {\n mEmailTextView.setText(mCurrentUser.getEmail());\n mNameTextView.setText(mCurrentUser.getName());\n }", "public void emailStatusChange(\n\t\t\tUserService userService, Issue issue\n\t\t);", "private static String getUser(String message) { return message.split(\"!\")[0].substring(1); }", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "java.lang.String getEmail();", "void updateUserById(String username, User userData);", "public void editUser()\r\n\t{\r\n\t\tsc.nextLine();\r\n\t\tint index=loginattempt();\r\n\t\tif(index==-1)\r\n\t\t{\r\n\t\t\t\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tString password=\"\",repassword=\"\";\r\n\t\t\tboolean flag=false;\r\n\t\t\twhile(!flag)\r\n\t\t\t{\r\n\t\t\t\tboolean validpassword=false;\r\n\t\t\t\twhile(!validpassword)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Please enter your new password: \");\r\n\t\t\t\t\tpassword=sc.nextLine();\r\n\t\t\t\t\tvalidpassword=a.validitycheck(password);\r\n\t\t\t\t\tif(!validpassword)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tSystem.out.println(\"Your password has to fulfil: at least 1 small letter, 1 capital letter, 1 digit!\");\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t\tSystem.out.print(\"Please re-enter your new password: \");\r\n\t\t\t\trepassword=sc.nextLine();\r\n\t\t\t\tflag=a.matchingpasswords(password,repassword);\r\n\t\t\t\tif(!flag)\r\n\t\t\t\t{\r\n\t\t\t\t\tSystem.out.print(\"Password not match! \");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\tString hash_password=hashfunction(password); \r\n\t\t\tSystem.out.print(\"Please enter your new full name: \");\r\n\t\t\tString fullname=sc.nextLine();\r\n\t\t\tSystem.out.print(\"Please enter your new email address: \");\r\n\t\t\tString email=sc.nextLine();\r\n\t\t\t((User)user_records.get(index)).set_hash_password(hash_password);\r\n\t\t\t((User)user_records.get(index)).set_fullname(fullname);\r\n\t\t\t((User)user_records.get(index)).set_email(email);\r\n\t\t\tSystem.out.println(\"Record update successfully!\");\r\n\t\t}\r\n\t}", "void ensureUserCreationAllowed(String email, String userName) throws BadRequestException, ConflictException, ServerException;", "public static void main(String[] args) {\n\t\t\n\t\tString username = \"John\";\n\t\t\n\t\t//contact() -> update the string\n\t\tusername.concat(\" Snow\");\t// old name -> old string (John)\n\t\tSystem.out.println(username); \n\t\t\n\t\tSystem.out.println(\"--------------\");\n\t\t\n\t\tString response = username.concat(\" Snow\"); // new name -> new string (John Snow)\n\t\tSystem.out.println(response); \n\n\t}", "void validate(String email);", "@Override\n\tpublic CheckEmailResponse updatepassword(UpdatePasswordRequest uppwdreq) {\n\n\t\tdatasource = getDataSource();\n\t\tjdbcTemplate = new JdbcTemplate(datasource);\n\t\t// get reg emailid from db\n\t\tlogger.info(\"IN updatepassword Method==========\");\n\t\t// Response object\n\t\tCheckEmailResponse reset_pass_obj = new CheckEmailResponse();\n\t\tlogger.info(\"CALLING COUNT \");\n\t\tString sql = \"select count(1) from user where emailid = ? \";\n\t\tint result = jdbcTemplate.queryForObject(sql, new Object[] { uppwdreq.getEmailid() }, Integer.class);\n\t\tlogger.info(\"RESULT QUERY \" + result);\n\t\tif (result > 0) {\n\t\t\t// update generated pin to database using emailid\n\t\t\tString update_pin = \"UPDATE user SET password = ? WHERE emailid =? \";\n\t\t\t//Encrypted the Pwd\n\t\t\tint rowcount = jdbcTemplate.update(update_pin,PasswordEncryptionUtil.encryptPassword(uppwdreq.getPassword()), uppwdreq.getEmailid().trim());\n\t\t\tlogger.info(\" DB Updated =========== \" + rowcount);\n\t\t\tif (rowcount > 0) {\n\t\t\t\t// db updated, send email with generated PIN\n\t\t\t\treset_pass_obj.setStatus(true);\n\t\t\t\treset_pass_obj.setMessage(\" NEW PASSWORD UPDATED SUCCESSFULLY \");\n\n\t\t\t} else {\n\t\t\t\t// DB not updated\n\t\t\t\treset_pass_obj.setMessage(\" NEW PASSWORD NOT UPDATED SUCCESSFULLY PROVIDE VALID EMAIL ID\");\n\t\t\t\treset_pass_obj.setStatus(false);\n\t\t\t}\n\t\t} else {\n\t\t\t// provided email ID doesnt exist\n\t\t\treset_pass_obj.setMessage(\"NEW PASSWORD NOT UPDATED SUCCESSFULLY PROVIDE VALID EMAIL ID\");\n\t\t\treset_pass_obj.setStatus(false);\n\t\t}\n\t\treturn reset_pass_obj;\n\t}", "@RequestMapping(value = \"/twitterUpdateUsername/\", method = RequestMethod.POST)\n\tpublic String twitterUpdateUsername(HttpServletRequest req,\n\t\t\t@RequestParam(value = \"t_username\", defaultValue = \"null\") String t_username) {\n\n\t\tSystem.out.println(\"Updating twitter data!\");\n\t\tHttpSession session = req.getSession();\n\t\tString username = (String) session.getAttribute(\"username\");\n\t\tSystem.out.println(\"Here twitter Update Username: \" + username);\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\n\t\tDate date = new Date();\n\t\tRestTemplate restTemplate = new RestTemplate();\n\t\trestTemplate.setErrorHandler(new DefaultResponseErrorHandler() {\n\t\t\tprotected boolean hasError(HttpStatus statusCode) {\n\t\t\t\treturn false;\n\t\t\t}\n\t\t});\n\t\tSocialMediaAccess smaNewCreate = new SocialMediaAccess(username, \"twitter\", \"twitter_username\", t_username,\n\t\t\t\t\"long_live\", dateFormat.format(date));\n\t\tResponseEntity<SocialMediaAccess> smaTwitter = restTemplate.getForEntity(uriReadSM + username + \"/twitter/\",\n\t\t\t\tSocialMediaAccess.class);\n\n\t\tSystem.out.println(\"--------------------------START check in smaTwitter. username: \" + username);\n\t\tif (smaTwitter.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***START. There is smaTwitter in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaTwitter.getBody().getSma_id());\n\t\t\tsmaNewCreate.setSma_id(smaTwitter.getBody().getSma_id());\n\t\t\trestTemplate.put(uriUpdateSMA, smaNewCreate);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------***END. There is smaTwitter in database. need to UPDATE. smaFB.id: \"\n\t\t\t\t\t\t\t+ smaTwitter.getBody().getSma_id());\n\t\t} else {\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******START. There is NO smaTwitter in database. need to CREATE.\");\n\t\t\tResponseEntity<SocialMediaAccess> resmaCreated = restTemplate.postForEntity(uriCreateSMA, smaNewCreate,\n\t\t\t\t\tSocialMediaAccess.class);\n\t\t\tSystem.out.println(\n\t\t\t\t\t\"--------------------------******END. There is NO smaTwitter in database. need to CREATE.\");\n\t\t}\n\t\tSystem.out.println(\"--------------------------END check in smaTwitter\");\n\n\t\t// START getting twitter data\n\t\tSystem.out.println(\"Getting twitter data\");\n\n\t\tResponseEntity<SocialMediaData[]> smDataArr = restTemplate.postForEntity(uriGetTwitterDataWeb, smaNewCreate,\n\t\t\t\tSocialMediaData[].class);\n\t\tSystem.out.println(\"+++START Twitter update data. smdLength: \" + smDataArr.getBody().length);\n\t\t// START storing of twitter data to database\n\t\tfor (SocialMediaData smData : smDataArr.getBody()) {\n\t\t\tResponseEntity<SocialMediaData> oldsmd = restTemplate\n\t\t\t\t\t.getForEntity(uriGetSMDataByID + smData.getData_id() + \"/\", SocialMediaData.class);\n\t\t\tif (oldsmd.getStatusCode().equals(HttpStatus.OK)) {\n\t\t\t\tSystem.out.println(\"Social Media Data Id = \" + smData.getData_id() + \" exists already\");\n\t\t\t} else {\n\t\t\t\tSystem.out\n\t\t\t\t\t\t.println(\"Social Media Data id = \" + smData.getData_id() + \" doesn't exists. Need to create..\");\n\t\t\t\tResponseEntity<SocialMediaData> smD = restTemplate.postForEntity(uriSocialMediaDataCreate, smData,\n\t\t\t\t\t\tSocialMediaData.class);\n\t\t\t}\n\t\t\t/*\n\t\t\t * System.out.println(\"Printing: \" + smData.getData());\n\t\t\t * ResponseEntity<SocialMediaData> smD =\n\t\t\t * restTemplate.postForEntity(uriSocialMediaDataCreate, smData,\n\t\t\t * SocialMediaData.class);\n\t\t\t */\n\t\t}\n\t\tSystem.out.println(\"+++END Updating twitter data+++\");\n\n\t\t// END storing of twitter data to database\n\t\t// END getting twitter data\n\t\tdoAsyncProcessCharacter(username);\n\t\t//\n\t\t// HttpSession session = req.getSession();\n\t\t// String username = (String) session.getAttribute(\"username\");\n\t\t// doAsyncProcessCharacter(username);\n\t\treturn \"redirect:../home\";\n\t}", "@Ignore(\"Test is not done yet\")\n @Test\n public void testChangingUsernameToExisting() {\n final UserRequest request = new UserRequest();\n // We're currently logged in as Austria, so we're trying to change the\n // username to Germany.\n request.setNewUsername(\"germany@iaeste.de\");\n final Response response = administration.controlUserAccount(token, request);\n assertThat(response.getError(), is(IWSErrors.FATAL));\n }", "public void setUsername(String username) {this.username = username;}", "public void receiveUsernames() throws Exception{\n BufferedReader in = new BufferedReader(new InputStreamReader(socket.getInputStream()));\n String serverMsg = in.readLine();\n while (!serverMsg.equals(\"END\")){\n users.add(serverMsg);\n notifyObservers(ObserverEnum.ADD, serverMsg);\n serverMsg = in.readLine();\n }\n }", "void updateInvitationForSendingUser(Invitation invitation);", "void formatEmail(String email) throws EmailAddressFormatException;", "protected void editField(HttpServletRequest request, HttpServletResponse response, EcAnonymousPaymentInfo _EcAnonymousPaymentInfo) throws Exception{\n\r\n if (!isMissing(request.getParameter(\"anonymousUserId\"))) {\r\n m_logger.debug(\"updating param anonymousUserId from \" +_EcAnonymousPaymentInfo.getAnonymousUserId() + \"->\" + request.getParameter(\"anonymousUserId\"));\r\n _EcAnonymousPaymentInfo.setAnonymousUserId(WebParamUtil.getLongValue(request.getParameter(\"anonymousUserId\")));\r\n }\r\n if (!isMissing(request.getParameter(\"firstName\"))) {\r\n m_logger.debug(\"updating param firstName from \" +_EcAnonymousPaymentInfo.getFirstName() + \"->\" + request.getParameter(\"firstName\"));\r\n _EcAnonymousPaymentInfo.setFirstName(WebParamUtil.getStringValue(request.getParameter(\"firstName\")));\r\n }\r\n if (!isMissing(request.getParameter(\"middleInitial\"))) {\r\n m_logger.debug(\"updating param middleInitial from \" +_EcAnonymousPaymentInfo.getMiddleInitial() + \"->\" + request.getParameter(\"middleInitial\"));\r\n _EcAnonymousPaymentInfo.setMiddleInitial(WebParamUtil.getStringValue(request.getParameter(\"middleInitial\")));\r\n }\r\n if (!isMissing(request.getParameter(\"lastName\"))) {\r\n m_logger.debug(\"updating param lastName from \" +_EcAnonymousPaymentInfo.getLastName() + \"->\" + request.getParameter(\"lastName\"));\r\n _EcAnonymousPaymentInfo.setLastName(WebParamUtil.getStringValue(request.getParameter(\"lastName\")));\r\n }\r\n if (!isMissing(request.getParameter(\"address1\"))) {\r\n m_logger.debug(\"updating param address1 from \" +_EcAnonymousPaymentInfo.getAddress1() + \"->\" + request.getParameter(\"address1\"));\r\n _EcAnonymousPaymentInfo.setAddress1(WebParamUtil.getStringValue(request.getParameter(\"address1\")));\r\n }\r\n if (!isMissing(request.getParameter(\"address2\"))) {\r\n m_logger.debug(\"updating param address2 from \" +_EcAnonymousPaymentInfo.getAddress2() + \"->\" + request.getParameter(\"address2\"));\r\n _EcAnonymousPaymentInfo.setAddress2(WebParamUtil.getStringValue(request.getParameter(\"address2\")));\r\n }\r\n if (!isMissing(request.getParameter(\"city\"))) {\r\n m_logger.debug(\"updating param city from \" +_EcAnonymousPaymentInfo.getCity() + \"->\" + request.getParameter(\"city\"));\r\n _EcAnonymousPaymentInfo.setCity(WebParamUtil.getStringValue(request.getParameter(\"city\")));\r\n }\r\n if (!isMissing(request.getParameter(\"state\"))) {\r\n m_logger.debug(\"updating param state from \" +_EcAnonymousPaymentInfo.getState() + \"->\" + request.getParameter(\"state\"));\r\n _EcAnonymousPaymentInfo.setState(WebParamUtil.getStringValue(request.getParameter(\"state\")));\r\n }\r\n if (!isMissing(request.getParameter(\"zip\"))) {\r\n m_logger.debug(\"updating param zip from \" +_EcAnonymousPaymentInfo.getZip() + \"->\" + request.getParameter(\"zip\"));\r\n _EcAnonymousPaymentInfo.setZip(WebParamUtil.getStringValue(request.getParameter(\"zip\")));\r\n }\r\n if (!isMissing(request.getParameter(\"country\"))) {\r\n m_logger.debug(\"updating param country from \" +_EcAnonymousPaymentInfo.getCountry() + \"->\" + request.getParameter(\"country\"));\r\n _EcAnonymousPaymentInfo.setCountry(WebParamUtil.getStringValue(request.getParameter(\"country\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentType\"))) {\r\n m_logger.debug(\"updating param paymentType from \" +_EcAnonymousPaymentInfo.getPaymentType() + \"->\" + request.getParameter(\"paymentType\"));\r\n _EcAnonymousPaymentInfo.setPaymentType(WebParamUtil.getIntValue(request.getParameter(\"paymentType\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentNum\"))) {\r\n m_logger.debug(\"updating param paymentNum from \" +_EcAnonymousPaymentInfo.getPaymentNum() + \"->\" + request.getParameter(\"paymentNum\"));\r\n _EcAnonymousPaymentInfo.setPaymentNum(WebParamUtil.getStringValue(request.getParameter(\"paymentNum\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentExpireMonth\"))) {\r\n m_logger.debug(\"updating param paymentExpireMonth from \" +_EcAnonymousPaymentInfo.getPaymentExpireMonth() + \"->\" + request.getParameter(\"paymentExpireMonth\"));\r\n _EcAnonymousPaymentInfo.setPaymentExpireMonth(WebParamUtil.getIntValue(request.getParameter(\"paymentExpireMonth\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentExpireYear\"))) {\r\n m_logger.debug(\"updating param paymentExpireYear from \" +_EcAnonymousPaymentInfo.getPaymentExpireYear() + \"->\" + request.getParameter(\"paymentExpireYear\"));\r\n _EcAnonymousPaymentInfo.setPaymentExpireYear(WebParamUtil.getIntValue(request.getParameter(\"paymentExpireYear\")));\r\n }\r\n if (!isMissing(request.getParameter(\"paymentExtraNum\"))) {\r\n m_logger.debug(\"updating param paymentExtraNum from \" +_EcAnonymousPaymentInfo.getPaymentExtraNum() + \"->\" + request.getParameter(\"paymentExtraNum\"));\r\n _EcAnonymousPaymentInfo.setPaymentExtraNum(WebParamUtil.getStringValue(request.getParameter(\"paymentExtraNum\")));\r\n }\r\n if (!isMissing(request.getParameter(\"timeCreated\"))) {\r\n m_logger.debug(\"updating param timeCreated from \" +_EcAnonymousPaymentInfo.getTimeCreated() + \"->\" + request.getParameter(\"timeCreated\"));\r\n _EcAnonymousPaymentInfo.setTimeCreated(WebParamUtil.getDateValue(request.getParameter(\"timeCreated\")));\r\n }\r\n\r\n m_actionExtent.beforeUpdate(request, response, _EcAnonymousPaymentInfo);\r\n m_ds.update(_EcAnonymousPaymentInfo);\r\n m_actionExtent.afterUpdate(request, response, _EcAnonymousPaymentInfo);\r\n }", "public void setUsername(String un)\r\n\t{\r\n\t\tusername = un;\r\n\t}", "@Override\n\tpublic String requestedProcess(HttpServletRequest request, HttpServletResponse response) throws Throwable {\n\t\trequest.setCharacterEncoding(\"utf-8\");\n\t\tresponse.setCharacterEncoding(\"utf-8\");\n\t\t\n\t\tString email = request.getParameter(\"email\");\n\t\tSystem.out.println(\"idCheckAction>>> email : \"+email);\n\t\t\n\t\tuserDAO dataMgr = new userDAO();\n\t\tboolean emailChecker = dataMgr.proc_emailChecker(email);\n\t\trequest.setAttribute(\"emailChecker\", emailChecker);\n\t\t\n\t\treturn \"/mgr_account/idCheck.jsp\";\n\t}", "public static ClientResponse usernameForgot(RESTActions restActions, Hashtable<String,String> data, Hashtable<String,String> headerTable, String email ) throws Throwable {\n\n\t\tString usernameForgotURL = buildUsernameForgotURL();\n\t\tLOG.info(\"##### Built URL: \" + usernameForgotURL);\n\t\t\n\t\tString requestBody = buildUsernameForgotRequestBody( email );\n\t\tLOG.info(\"##### Built request body: \" + requestBody);\n\t\t\n\t\tLOG.info(\"##### Making HTTP request to obtain the Username Forgot...\");\n\t\tClientResponse clientResponse = restActions.postClientResponse(\n\t\t\t\tusernameForgotURL, requestBody, headerTable, null,\n\t\t\t\tRESTConstants.APPLICATION_JSON);\n\n\t\tLOG.info(\"##### Verifying HTTP response code...\");\n\t\tString sExpectedResponseCode = data.get(\"EXPECTED_RESPONSE_CODE\");\n\t\tint iExpectedResponseCode = Integer.parseInt(sExpectedResponseCode);\n\t\tint iActualResponseCode = clientResponse.getStatus();\n\t\tString fmt = \"WRONG HTTP RESPONSE CODE - EXPECTED %s, FOUND %s\";\n\t\tString msg = String.format(fmt, iExpectedResponseCode, iActualResponseCode);\n\t\trestActions.assertTrue(iExpectedResponseCode == iActualResponseCode, msg);\n\t\t\n\t\treturn clientResponse;\n\t}", "@Override\n\tpublic String getUsername() {\n\t\treturn email;\n\t}" ]
[ "0.66896385", "0.63930464", "0.633381", "0.6258753", "0.6089262", "0.6034837", "0.5975434", "0.5924484", "0.5905281", "0.58868057", "0.5885812", "0.5866347", "0.58650374", "0.5841401", "0.5839061", "0.58106476", "0.57138014", "0.57003087", "0.5697075", "0.5695075", "0.5692034", "0.56891835", "0.56532454", "0.56520104", "0.5648444", "0.5646208", "0.5637271", "0.5633005", "0.5601324", "0.5597305", "0.5595118", "0.5571063", "0.5569957", "0.5542088", "0.5528632", "0.551554", "0.5491975", "0.5470766", "0.5453215", "0.54476863", "0.5446016", "0.5443296", "0.5443143", "0.5435996", "0.5417058", "0.5408174", "0.54062515", "0.53938806", "0.53397256", "0.53393894", "0.53374547", "0.5336164", "0.5332034", "0.53285134", "0.53283054", "0.531839", "0.531436", "0.5309996", "0.53074086", "0.5306209", "0.5300521", "0.52932477", "0.5293059", "0.5287867", "0.52864724", "0.5286223", "0.52798516", "0.5265572", "0.52590907", "0.5258203", "0.5254726", "0.5254726", "0.52511996", "0.5248403", "0.5248278", "0.5230138", "0.52202034", "0.52171445", "0.52171445", "0.52171445", "0.52171445", "0.52171445", "0.52171445", "0.52135164", "0.520453", "0.52042603", "0.52031666", "0.51985216", "0.51982635", "0.51967174", "0.5194472", "0.5191189", "0.51895154", "0.51884586", "0.5167564", "0.5163268", "0.51628333", "0.5162737", "0.51615477", "0.5161506" ]
0.5864922
13
stop the reader. After being stopped, the reader will not block writers. After being stopped the reader can be reopened
void stop();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void stop() {\n isRunning = false;\n\n mReadLogsHandler = null;\n if (mReadLogThread != null) {\n final Thread inherited = mReadLogThread;\n mReadLogThread = null;\n inherited.interrupt();\n }\n\n IOUtilities.closeStream(reader);\n }", "public void disconnect() {\n if (reader != null) {\n reader.stop();\n }\n\n }", "public void stopReading() {\r\n rightShoe.getSerialReader().stopRead();\r\n leftShoe.getSerialReader().stopRead();\r\n rightShoe.getSerialReader().closePort();\r\n leftShoe.getSerialReader().closePort();\r\n timeController.stopReading();\r\n }", "public void stop() {\n closed.set(true);\n consumer.wakeup();\n }", "public synchronized void stop()\n {\n if (open) {\n //stop = true;\n notifyAll();\n started = false;\n line.stop();\n timeTracker.pause();\n }\n }", "public void stop() {\n\t\tthis.flag = false;\n\t\t\n\t\t\n\t}", "public void stop() {\n\t\tthis.close(this.btcomm);\n\t}", "private void stop() {\r\n\t\t\tstopped = true;\r\n\t\t}", "public void stop() {\n stop = true;\n }", "public void stop()\n\t{\n\t\trunning = false;\n\t}", "public void stop() {\n\t\tthis.stopper = true;\n\t}", "void stop() throws IOException;", "public void stop(){\n stop = true;\n }", "public void stop() {\n setClosedLoopControl(false);\n }", "public void stop() {\r\n running = false;\r\n }", "public void stop() {}", "public synchronized void stop() {\n this.running = false;\n }", "public void stop() {\n synchronized (lock) {\n isRunning = false;\n if (rawAudioFileOutputStream != null) {\n try {\n rawAudioFileOutputStream.close();\n } catch (IOException e) {\n Log.e(TAG, \"Failed to close file with saved input audio: \" + e);\n }\n rawAudioFileOutputStream = null;\n }\n fileSizeInBytes = 0;\n }\n }", "public void stop() {\n enable = false;\n }", "public void stop() {\n stop = true;\n //index--;\n line.flush();\n line.close();\n try {\n decodedInput.close();\n } catch (IOException ex) {\n Logger.getLogger(MP3Player.class.getName()).log(Level.SEVERE, null, ex);\n }\n Runtime.getRuntime().gc();\n }", "public boolean stop();", "public void stop(){\n return;\n }", "public void stop() {\n running = false;\n }", "public void stopRecord() {\n\t\tcmd = new StopRecordCommand(editor);\n\t\tinvoker = new MiniEditorInvoker(cmd);\n\t\tinvoker.action();\n\t}", "public void stop() {\r\n _keepGoing = false;\r\n }", "protected void stop() {\r\n\t\tif (active) {\r\n\t\t\tsource.stop();\r\n\t\t}\r\n\t}", "public void stop(){\n running = false;\n }", "public void stop() {\r\n\t\tisRecording = false;\r\n\t}", "public void stop()\n {\n running = false;\n }", "public void stop() {\n _running = false;\n }", "public void stop() {\n\t\t\n\t}", "@Override\n public void stop() {\n }", "private void stop() {\n\t\tif (null == this.sourceRunner || null == this.channel) {\n\t\t\treturn;\n\t\t}\n\t\tthis.sourceRunner.stop();\n\t\tthis.channel.stop();\n\t\tthis.sinkCounter.stop();\n\t}", "@Override\n\tpublic void stop()\n\t\t{\n\t\t}", "@Override\n public void stop() {}", "public void stop(){\n\t\t\n\t}", "@Override public void stop() {\n }", "public void stop() {\n\t}", "@Override\r\n\tpublic void stop() {\n\t\t\r\n\t}", "@Override\r\n public void stop() {\r\n }", "@Override\r\n public void stop() {\r\n }", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public void stop();", "public synchronized void stop() {\n try {\n thread.join();\n running = false;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }", "public void stop() {\n m_enabled = false;\n }", "public final void stop() {\n running = false;\n \n \n\n }", "public synchronized void stop(){\n\t\tthis.running = false;\n\t\ttry {\n\t\t\tthis.thread.join();\n\t\t} catch (InterruptedException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public synchronized void stop() {\n stopping = true;\n }", "public void stop() {\n stopped.set(true);\n if (this.currentThread != null) {\n this.currentThread.interrupt();\n this.currentThread = null;\n }\n }", "public void stopThread(){\r\n\t\tthis.p.destroy();\r\n\t\ttry {\r\n\t\t\tinput.close();\r\n\t\t} catch (IOException e) {\r\n\t\t\t// TODO Auto-generated catch block\r\n\t\t\te.printStackTrace();\r\n\t\t}\r\n\t\tthis.stop();\r\n\t}", "public void stop () {\n driveRaw (0);\n }", "@Override public void stop() {\n\t\t_active = false;\n\t}", "public void stop() {\n }", "public void stop() {\n }", "public void stop() {\n \t\t\tif (isJobRunning) cancel();\n \t\t}", "@Override\n public void run() {\n stop();\n }", "private void stopClient() {\n\n run = false;\n\n if (bufferOut != null) {\n bufferOut.flush();\n bufferOut.close();\n }\n\n messageListener = null;\n bufferIn = null;\n bufferOut = null;\n serverMessage = null;\n }", "@Override public void stop () {\n }", "@Override\r\n public void stop() {\r\n\r\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "@Override\n public void stop() {\n }", "public void stop() {\n System.setErr(saveErr);\n System.setOut(saveOut);\n running = false;\n try {\n flushThread.join();\n } catch (InterruptedException e) {\n }\n }", "public void stop()\n throws IOException\n {\n }", "public void stop()\n {\n storage.stop();\n command.stop();\n }", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}", "@Override\n\tpublic void stop() {\n\t\tsuper.stop();\n\t}", "@Override\r\n public void stop() throws IOException {\n\r\n }", "@Override\n\t\tpublic void stop() {\n\t\t\t// Nothing to do for now\n\t\t}", "public synchronized void stop()\r\n\t\t{\r\n\t\tstate = CLOSING_DOWN;\r\n\t\t}", "public void\n stop() throws IOException;", "public void stopFile(){\n try {\n running = false;\n resumeFile();\n }\n catch (Exception e) {\n e.printStackTrace();\n }\n }", "public void stop() {\n thread.interrupt();\n }", "public void stop() {\n\t\tconnection.stop();\n\t\tdata.disconnectAll();\n\t\tsaveData();\n\t}", "public void stop() throws IOException {\r\n\t_bRecording=false;\r\n recorder.stop();\r\n recorder.release();\r\n }", "@Override\n\tpublic void stop() {\n\t}", "@Override\n\tpublic void stop() {\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}", "@Override\n\tpublic void stop() {\n\t\t\n\t}" ]
[ "0.78127295", "0.7316705", "0.725244", "0.7243795", "0.7046846", "0.6896096", "0.68808776", "0.6796823", "0.6769171", "0.6757895", "0.67563266", "0.66877747", "0.667693", "0.6647489", "0.6642488", "0.6639411", "0.66220623", "0.66084063", "0.66070634", "0.660651", "0.65980875", "0.65827036", "0.6572467", "0.6564995", "0.65595734", "0.65574193", "0.65495026", "0.6548548", "0.65485", "0.6547302", "0.6528936", "0.65229756", "0.6513906", "0.6503575", "0.64959943", "0.64931", "0.6488032", "0.6487422", "0.64798063", "0.6477797", "0.6477797", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.6477585", "0.64722764", "0.6470555", "0.6465046", "0.6464522", "0.6452214", "0.64462346", "0.6438246", "0.64368314", "0.64353096", "0.6426573", "0.6426573", "0.64148784", "0.64133316", "0.6401031", "0.63979375", "0.6394747", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6392146", "0.6389506", "0.6388182", "0.6384291", "0.63775104", "0.63775104", "0.6376616", "0.63763946", "0.634489", "0.6344805", "0.6344592", "0.6344193", "0.6342422", "0.63393676", "0.6327413", "0.6327413", "0.6321434", "0.6321434", "0.6321434" ]
0.0
-1
Take reader to just past the end of the RB
void toEnd();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void advanceToNextReader(){\r\n\t\tcurrentReader = null;\r\n\t\treaderQueueIndex++;\r\n\t}", "protected void readAhead() {\n if (! reader.hasNext()) {\n this.nextLine = null;\n } else {\n this.nextLine = reader.next();\n while (this.nextLine != null && this.nextLine.isEmpty() && reader.hasNext())\n this.nextLine = reader.next();\n }\n }", "public synchronized void finishReading() {\n readerNumber--;\n if (readerNumber == 0) {\n this.notifyAll(); // notify possible waiting writers \n }\n }", "void setReadPosition(int minus) {\n/* 159 */ this.pos -= minus;\n/* 160 */ this.readerIndex = getReadPosition(this.pos);\n/* 161 */ this.buffer.readerIndex(this.readerIndex);\n/* */ }", "public final void rewind() {\n branch = 0;\n }", "public abstract void endRead(boolean restart);", "public void endRead() throws ThingsException;", "private void goBack() throws IOException{\n\t\tif(\"\\n\".equals(currentChar)){\n\t\t\tline--;\n\t\t}\n\t\tpos--;\n\t\tsourceReader.reset();\n\t}", "public synchronized void beginRead() {\n\t\tSystem.out.println(\"READER BEGIN: \" + Thread.currentThread().getId());\t\n\t\tint readTurn = currentTurn;\n\t\tcurrentTurn++;\n\t\t\n\t\twhile(readTurn!=nextTurn || numWriters > 0 ){\n\t\t\ttry {\n//\t\t\t\tSystem.out.println(\"READER BLOCKED: \" + Thread.currentThread().getId());\t\n\t\t\t\twait();\n//\t\t\t\tSystem.out.println(\"READER UNBLOCKED: \" + Thread.currentThread().getId());\t\n\n\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t\t//number of readers at front of the queue\n\t\t//(unblocked reader)\n\t\tnumReaders ++;\n\n\t}", "public void read() {\n\t\tthis.isRead = true;\n\t}", "private void doRecoveryRead() {\n if (!promise.isDone()) {\n startEntryToRead = endEntryToRead + 1;\n endEntryToRead = endEntryToRead + clientCtx.getConf().recoveryReadBatchSize;\n new RecoveryReadOp(lh, clientCtx, startEntryToRead, endEntryToRead, this, null)\n .initiate();\n }\n }", "private void readNext() {\n nextLine = null;\n try {\n while (nextLine == null) {\n nextLine = reader.readNext();\n reader.consumeEmptyLines();\n if (reader.eof()) {\n break;\n }\n }\n if (nextLine != null) {\n super.recordCounter++;\n if (super.readLimit > 0 && super.recordCounter > super.readLimit) {\n nextLine = null;\n }\n }\n } catch (Exception ignore) {\n // no more lines\n }\n }", "@Override\n\tpublic void rewind() {\n\t\t\n\t}", "public void lastReaderAdded(){\r\n\t\tdoneAddingReaders = true;\r\n\t}", "void pushBack() throws IOException {\n iis.seek(iis.getStreamPosition()-bufAvail);\n bufAvail = 0;\n bufPtr = 0;\n }", "private void rewind() {\n currentPos = markPos;\n }", "int getReadPosition(int index) {\n/* 170 */ return index - this.origPos + this.readerIndex;\n/* */ }", "@Override\r\n\tpublic void read() {\n\r\n\t}", "@Override\n\tpublic void read() {\n\n\t}", "synchronized public void rdlock() {\n\t\tlong tid = Thread.currentThread().getId();\n\n\t\t// Place myself on queue\n\t\treadersQueue.enq(tid);\n\n\t\t// While its not my turn, wait\n\t\twhile (readersQueue.getFirstItem() != tid\n\t\t\t\t|| activeWriter == true\n\t\t\t\t|| activeReaders >= maxReaders\n\t\t\t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n\t\t\ttry {\n\t\t\t\twait();\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\tSystem.out.println(e.getMessage());\n\t\t\t}\n\t\t}\n\n\t\t// Its my turn, remove myself from queue\n\t\treadersQueue.deq();\n\n\t\t// DEBUG\n if (activeWriter == true\n \t\t|| activeReaders >= maxReaders\n \t\t|| (bias == 'W' && writersQueue.isEmpty() == false)) {\n \tSystem.out.println(\"BUG IN READER\");\n }\n\n\t\t// I am now an active reader!\n\t\tactiveReaders++;\n\n\t\t// Signal all, so other readers may continue\n\t\tnotifyAll();\n\t}", "private void trim() {\n read(0);\n }", "public void rewind() {\n readAllocationNode = firstAllocationNode;\n }", "void rewind();", "public void releaseReadLock() {\r\n return;\r\n }", "private void ensureRead() throws IOException, BadDescriptorException {\n if (reading) return;\n flushWrite();\n buffer.clear();\n buffer.flip();\n reading = true;\n }", "@Override\n public CarDocument readNextRecord(BufferedReader bRdr) throws IOException {\n return null;\n }", "void seekToLast();", "@Override public int read() throws IOException {\r\n\t\tif (closed) throw new IOException(\"Reader closed\");\r\n\t\tint r = -1;\r\n\t\twhile (r == -1){\r\n\t\t\tReader in = getCurrentReader();\r\n\t\t\tif (in == null){\r\n\t\t\t\tif (doneAddingReaders) return -1;\r\n\t\t\t\ttry {\r\n\t\t\t\t\tThread.sleep(100);\r\n\t\t\t\t} catch (InterruptedException iox){\r\n\t\t\t\t\tthrow new IOException(\"Interrupted\");\r\n\t\t\t\t}\r\n\t\t\t} else {\r\n\t\t\t\tr = in.read();\r\n\t\t\t\tif (r == -1) advanceToNextReader();\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn r;\r\n\t}", "void mark(@Nonnegative int readLimit);", "public synchronized void finishWriting() {\n readerNumber++; // readerNumber = -1 + 1 = 0; \n// readerNumber must be 0 at this point \n this.notifyAll(); // notify possible waiting writers or waiting readers \n }", "public void setNextToRead(int nextToRead) {\n\t\t// Overrides\n\t}", "protected void releaseBuffer()\n {\n interlock.endReading();\n // System.out.println(\"endReading: 2\");\n }", "public ConcatReader(Reader in){\r\n\t\taddReader(in);\r\n\t\tlastReaderAdded();\r\n\t}", "public NV readNext() throws ThingsException;", "void incrementLinesRead();", "@SuppressWarnings(\"unused\")\n private void _read() {\n }", "@Override\n\tpublic int read() {\n\t\treturn super.read();\n\t}", "protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }", "protected final void unlockRead() {\n m_lock.readLock().unlock();\n }", "public void tailUp () {\r\n\t\ttail_mode = false;\r\n\t\tsuper.tailUp();\r\n\t}", "private static String readNextLine(BufferedReader reader) {\n\t\t\n\t\ttry {\n\t\t\tString line = reader.readLine();\n\t\t\treturn line;\n\t\t} catch(IOException e) {\n\t\t\tGdx.app.error(TAG, \"Failed to read the file\", e);\n\t\t\ttry {\n\t\t\t\treader.close();\n\t\t\t} catch(IOException ex) {\n\t\t\t\tGdx.app.error(TAG, \"Failed to close file\");\n\t\t\t\tGdx.app.exit();\n\t\t\t}\n\t\t\tGdx.app.exit();\n\t\t\treturn null;\n\t\t}\n\t}", "public String[] readNext() {\n\t\treturn null;\n\t}", "public void acquireReadLock() {\r\n return;\r\n }", "private void advanceUntilNL() throws BufferEndedException {\twhile (reader.getLastDelimiter()!='\\n') reader.nextToken();}", "protected void doBeginRead() throws Exception {}", "private void internalReadUnlock() {\n checkpointLock.readLock().unlock();\n\n if (ASSERTION_ENABLED)\n CHECKPOINT_LOCK_HOLD_COUNT.set(CHECKPOINT_LOCK_HOLD_COUNT.get() - 1);\n }", "private void readUntilEndOfLine(int val) throws java.io.IOException {\n\t\tint c = reader.read();\n\t\tStringBuilder stringBuilder = new StringBuilder();\n\t\tstringBuilder.append(Character.toString((char) val));\n\n\t\twhile (!isEndOfLine(c)) {\n\t\t\tstringBuilder.append(Character.toString((char) c));\n\t\t\tc = reader.read();\n\t\t}\n\t\tc = ignoreComment(c);\n\t\tnext = stringBuilder.toString().trim();\n\t\toldvar = c;\n\t}", "public void ownRead();", "void oldconsume() {\n\t\tfor (;;) {\n\t\t\tif (printoldline > oldinfo.maxLine)\n\t\t\t\tbreak; /* end of file */\n\t\t\tprintnewline = oldinfo.other[printoldline];\n\t\t\tif (printnewline < 0)\n\t\t\t\tshowdelete();\n\t\t\telse if (blocklen[printoldline] < 0)\n\t\t\t\tskipold();\n\t\t\telse showmove();\n\t\t}\n\t}", "public int peekRear();", "private void forwardRead(int hash) throws IOException {\n if (forwardRead != null)\n return;\n\n int pos = buf.position();\n\n long nextRecPos = fileIo.position() - buf.remaining();\n\n buf.reset();\n\n int bufPos = buf.position();\n\n long curRecPos = fileIo.position() - buf.remaining();\n\n buf.position(pos);\n\n curHnd = NOOP_HANDLER;\n\n forwardRead = new ForwardRead(hash, curRecPos, nextRecPos, bufPos);\n }", "public synchronized List getBufferForReading() {\n// if some writer is writing, wait until no writer is writing \n while (readerNumber < 0) {\n try {\n this.wait();\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n// when readerNumber >= 0 \n readerNumber++;\n return buffer;\n }", "private void ackRead() throws SIMException\n\t\t{\n\t\t\tfor (;;)\n\t\t\t{\n\t\t\t\t// Read a byte from memory\n\t\t\t\tif ((mode & MODE_TRANSFER_MASK) == MODE_TRANSFER_READ)\n\t\t\t\t{\n\t\t\t\t\tint v = transferFromMemory(this,base.getValue());\n\t\t\t\t\trequestRead.setDmaValue(v);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t// Increment / decrement address if requested\n\t\t\t\tif (hold == false)\n\t\t\t\t{\n\t\t\t\t\tif ((mode & MODE_DECREMENT) != 0)\n\t\t\t\t\t\tbase.decrement();\n\t\t\t\t\telse\n\t\t\t\t\t\tbase.increment();\n\n\t\t\t\t}\n\n\t\t\t\tif (isTerminate(requestRead))\n\t\t\t\t{\n\t\t\t\t\tterminateDma();\n\t\t\t\t\treturn;\n\t\t\t\t}\n\n\t\t\t\t// In single transfer wait another dreq\n\t\t\t\tif ((mode & MODE_DMA_MASK) == MODE_DMA_SINGLE)\n\t\t\t\t{\n\t\t\t\t\tif (requestRead.getDmaDREQ() == false)\n\t\t\t\t\t{\n\t\t\t\t\t\trequest = false;\n\t\t\t\t\t\treturn;\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\t\t}", "public void unread() {\n Preconditions.checkState(this.index > 0);\n this.index--;\n }", "public void stopReading() {\r\n rightShoe.getSerialReader().stopRead();\r\n leftShoe.getSerialReader().stopRead();\r\n rightShoe.getSerialReader().closePort();\r\n leftShoe.getSerialReader().closePort();\r\n timeController.stopReading();\r\n }", "@Override\n void advance() {\n }", "public int read() throws IOException {\n int result = super.read();\n if(iMaxSet) {\n iRemainder--;\n } else {\n iRemainder = available();\n }\n return result;\n }", "private FilePart rollOver() throws IOException {\n/* 251 */ if (this.currentLastBytePos > -1) {\n/* 252 */ throw new IllegalStateException(\"Current currentLastCharPos unexpectedly positive... last readLine() should have returned something! currentLastCharPos=\" + this.currentLastBytePos);\n/* */ }\n/* */ \n/* */ \n/* 256 */ if (this.no > 1L) {\n/* 257 */ return new FilePart(this.no - 1L, ReversedLinesFileReader.this.blockSize, this.leftOver);\n/* */ }\n/* */ \n/* 260 */ if (this.leftOver != null) {\n/* 261 */ throw new IllegalStateException(\"Unexpected leftover of the last block: leftOverOfThisFilePart=\" + new String(this.leftOver, ReversedLinesFileReader.this.encoding));\n/* */ }\n/* */ \n/* 264 */ return null;\n/* */ }", "public void goNextLine () throws IOException {\n\t\treader.goNextLine();\n\t\tcurrentLine = reader.getCurrentLine();\n\t}", "void seekReset() {\n discardQueued(false);\n eofCond = false;\n stickyEofCond = false;\n blocked = false;\n sawCR = false;\n // FIXME: Change needed in Tcl\n //needNL = false;\n }", "@Override\n\tpublic void readCB(CB cb) {\n\t\t\n\t}", "public void doReads(Reader reader) throws IOException;", "private boolean peek(Reader reader, byte[] dst, int offset, int numBytes) {\n int bytesToRead = numBytes;\n if (bytesToRead == 0) {\n return true;\n }\n if (bytesToRead < 0 || bytesToRead > reader.availableBytes()) {\n return false;\n }\n int endOfReadSection = (reader.readHead + bytesToRead) % capacity;\n if (reader.readHead < endOfReadSection) {\n System.arraycopy(buffer, reader.readHead, dst, offset, endOfReadSection - reader.readHead);\n } else { // Data wraps around buffer edge.\n System.arraycopy(buffer, reader.readHead, dst, offset, capacity - reader.readHead);\n int entriesBeforeWrap = capacity - reader.readHead;\n System.arraycopy(\n buffer, 0, dst, offset + capacity - reader.readHead, bytesToRead - entriesBeforeWrap);\n }\n return true;\n }", "public void disconnect() {\n if (reader != null) {\n reader.stop();\n }\n\n }", "@Override\n\tpublic void readBanque(Banque b) {\n\t\t\n\t}", "@Override\r\n\tpublic void reading() {\n\t\tSystem.out.println(\"reading\");\r\n\t}", "@Override\n\tpublic void readBourse(Bourse brs) {\n\t\t\n\t}", "public void tailDown () {\r\n\t\ttail_mode = true;\r\n\t\tsuper.tailDown();\r\n\t}", "abstract void read();", "private void read(){\n try {\n if (c != -1) c = r.read();\n } catch (IOException e){\n throw new IOError(e);\n }\n }", "@Override\n public int read() throws IOException {\n int r = -1;\n \n if (encryptedDataBuffer!=null && pos>=encryptedDataBuffer.length && !closed)\n fillBuffer();\n \n if (encryptedDataBuffer!=null && pos<encryptedDataBuffer.length)\n r = (int)encryptedDataBuffer[pos++]; // next element in the buffer\n return r;\n }", "public void read() throws IOException {\n\t\twhile (this.in.getReadBytes() != size) {\n\t\t\tString chunkID;\n\t\t\ttry {\n\t\t\t\tchunkID = readString(4);\n\t\t\t} catch (EmptyReadException e) {\n\t\t\t\t/**\n\t\t\t\t * T4L bug 15259: Some encoders must write a byte \"0\" to signify\n\t\t\t\t * EOF?\n\t\t\t\t */\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlong chunkSize = readLong(4);\n\t\t\treadChunk(chunkID, chunkSize);\n\t\t}\n\t}", "private final int bufferedInputBytesRemaining() {\n return reading ? (buffer.remaining() + (ungotc != -1 ? 1 : 0)) : 0;\n }", "void releaseReadLock();", "public void readerUnlock() {\n Holders rootHolder = null;\n Holders newHolder = null;\n final Thread current = Thread.currentThread();\n\n do {\n Holders holder = this.holder.get();\n newHolder = null;\n rootHolder = holder;\n // A reader lock can only exist if the holder is a ReaderList instance.\n if (holder instanceof Writer) {\n throw new IllegalStateException();\n }\n\n // A reader lock can only be unlocked if it exists.\n if (!((ReaderList)holder).contains(current)) {\n throw new IllegalStateException();\n }\n\n // get a new ReaderList without the reader lock of current Thread\n newHolder = ((ReaderList)holder).remove(current);\n\n // Attempt to update ReaderList holder.\n } while (!holder.compareAndSet(rootHolder, newHolder));\n }", "protected abstract Reader read() throws IOException;", "public void resetRead() {\r\n\t\t// don't do anything if heartbeats are not expected\r\n\t\tif (this.readDelay == null) return;\r\n\r\n\t\tif (this.read != null)\r\n\t\t\tthis.read.cancel(false);\r\n\t\tthis.read = this.scheduler.schedule(new ReadHeartBeatTimeOut(), this.readDelay, TimeUnit.MILLISECONDS);\r\n\t}", "public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtBOL = true;\n\t\tzzAtEOF = false;\n\t}", "@Override\n\tpublic void readData() {\n\t\t\n\t}", "void seekToFirst();", "public void testMoveToEnd() {\n for (int i = 0; i < 10; i++) {\n test1.append(new Buffer(i, rec));\n }\n test1.moveToEnd();\n test1.prev();\n assertTrue(test1.getValue().inRange(9));\n }", "public final void yyreset(Reader reader) {\n\t\t// 's' has been updated.\n\t\tzzBuffer = s.array;\n\t\t/*\n\t\t * We replaced the line below with the two below it because zzRefill\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\n\t\t * \"full\" the first time through, since it points to the segment's\n\t\t * array). So, we assign zzEndRead here.\n\t\t */\n\t\t//zzStartRead = zzEndRead = s.offset;\n\t\tzzStartRead = s.offset;\n\t\tzzEndRead = zzStartRead + s.count - 1;\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\n\t\tzzLexicalState = YYINITIAL;\n\t\tzzReader = reader;\n\t\tzzAtEOF = false;\n\t}", "void unlockRead(long stamp);", "private void refill(){\n\t\tscrollTo(0, 0);\n\t\trefillInternal(-1, 0);\n\t}", "public void start (BufferedReader br) throws IOException {\n\t\treader=br;\n\t\tnextLine = reader.readLine();\n\t}", "@Override\n public void doRead() throws IOException {\n if (sc.read(bbin) == -1) {\n state = State.CLOSED;\n }\n processIn();\n updateInterestOps();\n }", "public void checkReadLock() {\r\n return;\r\n }", "private String readNextLine() {\n StringBuilder sb = new StringBuilder();\n\n try {\n BufferedReader br = new BufferedReader(new InputStreamReader(stream));\n sb.append(br.readLine());\n } catch (IOException e) {\n e.fillInStackTrace();\n }\n\n return sb.toString();\n }", "Read createRead();", "protected static void skipAndRead(AeProcessLogPart aPart, Reader aReader, int aPartSize)\n throws IOException {\n aPart.setLog(null);\n try (BufferedReader br = new BufferedReader(aReader)) {\n // skip to where we want to be in the log\n int skipCount = aPart.getPart() * aPartSize;\n long skipped = br.skip(skipCount);\n\n // if we don't skip to that point, then there's nothing to read here\n if (skipped != skipCount) {\n aPart.setMoreAvailable(false);\n } else {\n // fill the buffer for the part\n char[] buffer = new char[aPartSize];\n int read = br.read(buffer);\n if (read > 0) {\n aPart.setLog(new String(buffer, 0, read));\n // signal that there's more to read if we didn't fill the buffer\n aPart.setMoreAvailable(read == buffer.length);\n } else {\n aPart.setMoreAvailable(false);\n }\n }\n }\n }", "public void initializeFullRead() {\r\n\r\n try {\r\n bPtr = 0;\r\n\r\n if (raFile != null) {\r\n fLength = raFile.length();\r\n } else {\r\n return;\r\n }\r\n\r\n if (tagBuffer == null) {\r\n tagBuffer = new byte[(int) fLength];\r\n } else if (fLength > tagBuffer.length) {\r\n tagBuffer = new byte[(int) fLength];\r\n }\r\n\r\n raFile.readFully(tagBuffer);\r\n } catch (final IOException ioE) {}\r\n }", "private boolean read(Reader reader, byte[] dst, int offset, int numBytes) {\n reader.droppedSamplesWarning = false;\n if (cumulativeWritten - reader.cumulativeRead > capacity) {\n logger.atSevere().log(\"We lost data before this read!\");\n // Skip ahead to the very end of the buffer.\n int skipAmount = (int) (cumulativeWritten - reader.cumulativeRead) - numBytes;\n reader.advance(skipAmount);\n reader.cumulativeRead += skipAmount;\n reader.droppedSamplesWarning = true;\n }\n if (peek(reader, dst, offset, numBytes)) {\n reader.advance(numBytes);\n return true;\n }\n return false;\n }", "public final void yyreset(java.io.Reader reader) {\r\n\t\t// 's' has been updated.\r\n\t\tzzBuffer = s.array;\r\n\t\t/*\r\n\t\t * We replaced the line below with the two below it because zzRefill\r\n\t\t * no longer \"refills\" the buffer (since the way we do it, it's always\r\n\t\t * \"full\" the first time through, since it points to the segment's\r\n\t\t * array). So, we assign zzEndRead here.\r\n\t\t */\r\n\t\t//zzStartRead = zzEndRead = s.offset;\r\n\t\tzzStartRead = s.offset;\r\n\t\tzzEndRead = zzStartRead + s.count - 1;\r\n\t\tzzCurrentPos = zzMarkedPos = s.offset;\r\n\t\tzzLexicalState = YYINITIAL;\r\n\t\tzzReader = reader;\r\n\t\tzzAtEOF = false;\r\n\t}", "public final void drain(rx.subjects.ReplaySubject.ReplayProducer<T> r19) {\n /*\n r18 = this;\n r0 = r18;\n r1 = r19;\n r2 = r19.getAndIncrement();\n if (r2 == 0) goto L_0x000b;\n L_0x000a:\n return;\n L_0x000b:\n r2 = r1.actual;\n r3 = 1;\n r4 = r3;\n L_0x000f:\n r5 = r1.requested;\n r5 = r5.get();\n r7 = r1.node;\n r7 = (rx.subjects.ReplaySubject.ReplaySizeAndTimeBoundBuffer.TimedNode) r7;\n r8 = 0;\n if (r7 != 0) goto L_0x0021;\n L_0x001d:\n r7 = r18.latestHead();\n L_0x0021:\n r10 = r8;\n L_0x0022:\n r12 = (r10 > r5 ? 1 : (r10 == r5 ? 0 : -1));\n r13 = 0;\n r14 = 0;\n if (r12 == 0) goto L_0x0061;\n L_0x0028:\n r12 = r2.isUnsubscribed();\n if (r12 == 0) goto L_0x0031;\n L_0x002e:\n r1.node = r14;\n return;\n L_0x0031:\n r12 = r0.done;\n r15 = r7.get();\n r15 = (rx.subjects.ReplaySubject.ReplaySizeAndTimeBoundBuffer.TimedNode) r15;\n if (r15 != 0) goto L_0x003e;\n L_0x003b:\n r16 = r3;\n goto L_0x0040;\n L_0x003e:\n r16 = r13;\n L_0x0040:\n if (r12 == 0) goto L_0x0052;\n L_0x0042:\n if (r16 == 0) goto L_0x0052;\n L_0x0044:\n r1.node = r14;\n r1 = r0.error;\n if (r1 == 0) goto L_0x004e;\n L_0x004a:\n r2.onError(r1);\n return;\n L_0x004e:\n r2.onCompleted();\n return;\n L_0x0052:\n if (r16 != 0) goto L_0x0061;\n L_0x0054:\n r7 = r15.value;\n r2.onNext(r7);\n r12 = 1;\n r16 = r10 + r12;\n r7 = r15;\n r10 = r16;\n goto L_0x0022;\n L_0x0061:\n r12 = (r10 > r5 ? 1 : (r10 == r5 ? 0 : -1));\n if (r12 != 0) goto L_0x0089;\n L_0x0065:\n r12 = r2.isUnsubscribed();\n if (r12 == 0) goto L_0x006e;\n L_0x006b:\n r1.node = r14;\n return;\n L_0x006e:\n r12 = r0.done;\n r15 = r7.get();\n if (r15 != 0) goto L_0x0077;\n L_0x0076:\n r13 = r3;\n L_0x0077:\n if (r12 == 0) goto L_0x0089;\n L_0x0079:\n if (r13 == 0) goto L_0x0089;\n L_0x007b:\n r1.node = r14;\n r1 = r0.error;\n if (r1 == 0) goto L_0x0085;\n L_0x0081:\n r2.onError(r1);\n return;\n L_0x0085:\n r2.onCompleted();\n return;\n L_0x0089:\n r12 = (r10 > r8 ? 1 : (r10 == r8 ? 0 : -1));\n if (r12 == 0) goto L_0x009b;\n L_0x008d:\n r8 = 9223372036854775807; // 0x7fffffffffffffff float:NaN double:NaN;\n r12 = (r5 > r8 ? 1 : (r5 == r8 ? 0 : -1));\n if (r12 == 0) goto L_0x009b;\n L_0x0096:\n r5 = r1.requested;\n rx.internal.operators.BackpressureUtils.produced(r5, r10);\n L_0x009b:\n r1.node = r7;\n r4 = -r4;\n r4 = r1.addAndGet(r4);\n if (r4 != 0) goto L_0x000f;\n L_0x00a4:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.subjects.ReplaySubject.ReplaySizeAndTimeBoundBuffer.drain(rx.subjects.ReplaySubject$ReplayProducer):void\");\n }", "public int Rear() {\n if (isEmpty())\n return -1;\n return buf[e];\n }", "@Override\n\t\tpublic BufferedReader getReader() throws IOException {\n\t\t\treturn null;\n\t\t}", "public final void drain(rx.subjects.ReplaySubject.ReplayProducer<T> r19) {\n /*\n r18 = this;\n r0 = r18;\n r1 = r19;\n r2 = r19.getAndIncrement();\n if (r2 == 0) goto L_0x000b;\n L_0x000a:\n return;\n L_0x000b:\n r2 = r1.actual;\n r3 = 1;\n r4 = r3;\n L_0x000f:\n r5 = r1.requested;\n r5 = r5.get();\n r7 = r1.node;\n r7 = (rx.subjects.ReplaySubject.ReplaySizeBoundBuffer.Node) r7;\n r8 = 0;\n if (r7 != 0) goto L_0x001f;\n L_0x001d:\n r7 = r0.head;\n L_0x001f:\n r10 = r8;\n L_0x0020:\n r12 = (r10 > r5 ? 1 : (r10 == r5 ? 0 : -1));\n r13 = 0;\n r14 = 0;\n if (r12 == 0) goto L_0x005f;\n L_0x0026:\n r12 = r2.isUnsubscribed();\n if (r12 == 0) goto L_0x002f;\n L_0x002c:\n r1.node = r14;\n return;\n L_0x002f:\n r12 = r0.done;\n r15 = r7.get();\n r15 = (rx.subjects.ReplaySubject.ReplaySizeBoundBuffer.Node) r15;\n if (r15 != 0) goto L_0x003c;\n L_0x0039:\n r16 = r3;\n goto L_0x003e;\n L_0x003c:\n r16 = r13;\n L_0x003e:\n if (r12 == 0) goto L_0x0050;\n L_0x0040:\n if (r16 == 0) goto L_0x0050;\n L_0x0042:\n r1.node = r14;\n r1 = r0.error;\n if (r1 == 0) goto L_0x004c;\n L_0x0048:\n r2.onError(r1);\n return;\n L_0x004c:\n r2.onCompleted();\n return;\n L_0x0050:\n if (r16 != 0) goto L_0x005f;\n L_0x0052:\n r7 = r15.value;\n r2.onNext(r7);\n r12 = 1;\n r16 = r10 + r12;\n r7 = r15;\n r10 = r16;\n goto L_0x0020;\n L_0x005f:\n r12 = (r10 > r5 ? 1 : (r10 == r5 ? 0 : -1));\n if (r12 != 0) goto L_0x0087;\n L_0x0063:\n r12 = r2.isUnsubscribed();\n if (r12 == 0) goto L_0x006c;\n L_0x0069:\n r1.node = r14;\n return;\n L_0x006c:\n r12 = r0.done;\n r15 = r7.get();\n if (r15 != 0) goto L_0x0075;\n L_0x0074:\n r13 = r3;\n L_0x0075:\n if (r12 == 0) goto L_0x0087;\n L_0x0077:\n if (r13 == 0) goto L_0x0087;\n L_0x0079:\n r1.node = r14;\n r1 = r0.error;\n if (r1 == 0) goto L_0x0083;\n L_0x007f:\n r2.onError(r1);\n return;\n L_0x0083:\n r2.onCompleted();\n return;\n L_0x0087:\n r12 = (r10 > r8 ? 1 : (r10 == r8 ? 0 : -1));\n if (r12 == 0) goto L_0x0099;\n L_0x008b:\n r8 = 9223372036854775807; // 0x7fffffffffffffff float:NaN double:NaN;\n r12 = (r5 > r8 ? 1 : (r5 == r8 ? 0 : -1));\n if (r12 == 0) goto L_0x0099;\n L_0x0094:\n r5 = r1.requested;\n rx.internal.operators.BackpressureUtils.produced(r5, r10);\n L_0x0099:\n r1.node = r7;\n r4 = -r4;\n r4 = r1.addAndGet(r4);\n if (r4 != 0) goto L_0x000f;\n L_0x00a2:\n return;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: rx.subjects.ReplaySubject.ReplaySizeBoundBuffer.drain(rx.subjects.ReplaySubject$ReplayProducer):void\");\n }", "public void back() throws JSONException {\n if(usePrevious || this.index <= 0) {\n throw new JSONException(\"Stepping back two steps is not supported\");\n }\n this.index -= 1;\n this.character -= 1;\n this.usePrevious = true;\n this.eof = false;\n }", "protected abstract Reader getReader() throws IOException;", "public java.lang.String readLine() {\n /*\n r7 = this;\n r0 = r7.in;\n monitor-enter(r0);\n r1 = r7.buf;\t Catch:{ all -> 0x0097 }\n if (r1 != 0) goto L_0x000f;\n L_0x0007:\n r1 = new java.io.IOException;\t Catch:{ all -> 0x0097 }\n r2 = \"LineReader is closed\";\n r1.<init>(r2);\t Catch:{ all -> 0x0097 }\n throw r1;\t Catch:{ all -> 0x0097 }\n L_0x000f:\n r1 = r7.pos;\t Catch:{ all -> 0x0097 }\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n if (r1 < r2) goto L_0x0018;\n L_0x0015:\n r7.aOB();\t Catch:{ all -> 0x0097 }\n L_0x0018:\n r1 = r7.pos;\t Catch:{ all -> 0x0097 }\n L_0x001a:\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n r3 = 10;\n if (r1 == r2) goto L_0x0051;\n L_0x0020:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r2 = r2[r1];\t Catch:{ all -> 0x0097 }\n if (r2 != r3) goto L_0x004e;\n L_0x0026:\n r2 = r7.pos;\t Catch:{ all -> 0x0097 }\n if (r1 == r2) goto L_0x0035;\n L_0x002a:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r3 = r1 + -1;\n r2 = r2[r3];\t Catch:{ all -> 0x0097 }\n r4 = 13;\n if (r2 != r4) goto L_0x0035;\n L_0x0034:\n goto L_0x0036;\n L_0x0035:\n r3 = r1;\n L_0x0036:\n r2 = new java.lang.String;\t Catch:{ all -> 0x0097 }\n r4 = r7.buf;\t Catch:{ all -> 0x0097 }\n r5 = r7.pos;\t Catch:{ all -> 0x0097 }\n r6 = r7.pos;\t Catch:{ all -> 0x0097 }\n r3 = r3 - r6;\n r6 = r7.charset;\t Catch:{ all -> 0x0097 }\n r6 = r6.name();\t Catch:{ all -> 0x0097 }\n r2.<init>(r4, r5, r3, r6);\t Catch:{ all -> 0x0097 }\n r1 = r1 + 1;\n r7.pos = r1;\t Catch:{ all -> 0x0097 }\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n return r2;\n L_0x004e:\n r1 = r1 + 1;\n goto L_0x001a;\n L_0x0051:\n r1 = new com.a.a.b$1;\t Catch:{ all -> 0x0097 }\n r2 = r7.end;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r2 = r2 - r4;\n r2 = r2 + 80;\n r1.<init>(r2);\t Catch:{ all -> 0x0097 }\n L_0x005d:\n r2 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r7.end;\t Catch:{ all -> 0x0097 }\n r6 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r5 - r6;\n r1.write(r2, r4, r5);\t Catch:{ all -> 0x0097 }\n r2 = -1;\n r7.end = r2;\t Catch:{ all -> 0x0097 }\n r7.aOB();\t Catch:{ all -> 0x0097 }\n r2 = r7.pos;\t Catch:{ all -> 0x0097 }\n L_0x0071:\n r4 = r7.end;\t Catch:{ all -> 0x0097 }\n if (r2 == r4) goto L_0x005d;\n L_0x0075:\n r4 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r4[r2];\t Catch:{ all -> 0x0097 }\n if (r4 != r3) goto L_0x0094;\n L_0x007b:\n r3 = r7.pos;\t Catch:{ all -> 0x0097 }\n if (r2 == r3) goto L_0x008a;\n L_0x007f:\n r3 = r7.buf;\t Catch:{ all -> 0x0097 }\n r4 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r7.pos;\t Catch:{ all -> 0x0097 }\n r5 = r2 - r5;\n r1.write(r3, r4, r5);\t Catch:{ all -> 0x0097 }\n L_0x008a:\n r2 = r2 + 1;\n r7.pos = r2;\t Catch:{ all -> 0x0097 }\n r1 = r1.toString();\t Catch:{ all -> 0x0097 }\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n return r1;\n L_0x0094:\n r2 = r2 + 1;\n goto L_0x0071;\n L_0x0097:\n r1 = move-exception;\n monitor-exit(r0);\t Catch:{ all -> 0x0097 }\n throw r1;\n */\n throw new UnsupportedOperationException(\"Method not decompiled: com.a.a.b.readLine():java.lang.String\");\n }", "public ByteBuf readRetainedSlice(int length)\r\n/* 89: */ {\r\n/* 90:106 */ recordLeakNonRefCountingOperation(this.leak);\r\n/* 91:107 */ return super.readRetainedSlice(length);\r\n/* 92: */ }" ]
[ "0.7013514", "0.67812306", "0.66207564", "0.6619646", "0.6483382", "0.62323403", "0.62275785", "0.6151702", "0.61444527", "0.61337644", "0.6131297", "0.6119677", "0.60847914", "0.60436755", "0.6020636", "0.60000664", "0.5962036", "0.59424794", "0.59348434", "0.592553", "0.59155446", "0.5895933", "0.58873224", "0.58458763", "0.58164024", "0.5810462", "0.5800252", "0.57762486", "0.57654715", "0.57498056", "0.5746664", "0.57412827", "0.5739304", "0.57268596", "0.57007194", "0.56968564", "0.5692499", "0.5674929", "0.5671707", "0.5661085", "0.56441516", "0.56342244", "0.562157", "0.56097287", "0.5588348", "0.55859077", "0.5579511", "0.5567685", "0.55449504", "0.5541695", "0.55415636", "0.55414027", "0.55289674", "0.552282", "0.5517818", "0.5509298", "0.5507779", "0.5495666", "0.5487902", "0.54850954", "0.54607326", "0.545369", "0.5449842", "0.54462373", "0.5439901", "0.54397964", "0.54301465", "0.5427443", "0.5422123", "0.54191786", "0.5409662", "0.54075193", "0.54059464", "0.5397631", "0.53963226", "0.5394333", "0.53919137", "0.5386402", "0.5383751", "0.537583", "0.53723335", "0.5369664", "0.53693455", "0.53678644", "0.5365127", "0.53626907", "0.5359722", "0.53536856", "0.5353429", "0.5352171", "0.53486896", "0.53473896", "0.5344739", "0.5339103", "0.5330267", "0.5326348", "0.53250283", "0.53223175", "0.5320913", "0.5315101", "0.53148484" ]
0.0
-1
TODO: Warning this method won't work in the case the id fields are not set
@Override public boolean equals(Object object) { if (!(object instanceof Cia)) { return false; } Cia other = (Cia) object; if ((this.idEmpresa == null && other.idEmpresa != null) || (this.idEmpresa != null && !this.idEmpresa.equals(other.idEmpresa))) { return false; } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void setId(Integer id) { this.id = id; }", "private Integer getId() { return this.id; }", "public void setId(int id){ this.id = id; }", "public void setId(Long id) {this.id = id;}", "public void setId(Long id) {this.id = id;}", "public void setID(String idIn) {this.id = idIn;}", "public void setId(int id) { this.id = id; }", "public void setId(int id) { this.id = id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public int getId() { return id; }", "public void setId(long id) { this.id = id; }", "public void setId(long id) { this.id = id; }", "public int getId(){ return id; }", "public int getId() {return id;}", "public int getId() {return Id;}", "public int getId(){return id;}", "public void setId(long id) {\n id_ = id;\n }", "private int getId() {\r\n\t\treturn id;\r\n\t}", "public Integer getId(){return id;}", "public int id() {return id;}", "public long getId(){return this.id;}", "public int getId(){\r\n return this.id;\r\n }", "@Override public String getID() { return id;}", "public Long id() { return this.id; }", "public Integer getId() { return id; }", "@Override\n\tpublic Integer getId() {\n return id;\n }", "@Override\n public Long getId () {\n return id;\n }", "@Override\n public long getId() {\n return id;\n }", "public Long getId() {return id;}", "public Long getId() {return id;}", "public String getId(){return id;}", "@Override\r\n\tpublic Long getId() {\n\t\treturn null;\r\n\t}", "public Integer getId() { return this.id; }", "@Override\r\n public int getId() {\n return id;\r\n }", "@Override\n\t\tpublic long getId() {\n\t\t\treturn 0;\n\t\t}", "public int getId() {\n return id;\n }", "public long getId() { return _id; }", "public int getId() {\n/* 35 */ return this.id;\n/* */ }", "public long getId() { return id; }", "public long getId() { return id; }", "public void setId(Long id) \n {\n this.id = id;\n }", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "@Override\n\tpublic Long getId() {\n\t\treturn null;\n\t}", "public void setId(String id) {\n this.id = id;\n }", "@Override\n\tpublic void setId(Long id) {\n\t}", "public Long getId() {\n return id;\n }", "public long getId() { return this.id; }", "public int getId()\n {\n return id;\n }", "public void setId(int id){\r\n this.id = id;\r\n }", "@Test\r\n\tpublic void testSetId() {\r\n\t\tbreaku1.setId(5);\r\n\t\texternu1.setId(6);\r\n\t\tmeetingu1.setId(7);\r\n\t\tteachu1.setId(8);\r\n\r\n\t\tassertEquals(5, breaku1.getId());\r\n\t\tassertEquals(6, externu1.getId());\r\n\t\tassertEquals(7, meetingu1.getId());\r\n\t\tassertEquals(8, teachu1.getId());\r\n\t}", "protected abstract String getId();", "@Override\n\tpublic int getId(){\n\t\treturn id;\n\t}", "public int getID() {return id;}", "public int getID() {return id;}", "public String getId() { return id; }", "public String getId() { return id; }", "public String getId() { return id; }", "public int getId ()\r\n {\r\n return id;\r\n }", "@Override\n public int getField(int id) {\n return 0;\n }", "public void setId(Long id)\n/* */ {\n/* 66 */ this.id = id;\n/* */ }", "public int getId(){\r\n return localId;\r\n }", "void setId(int id) {\n this.id = id;\n }", "@Override\n public Integer getId() {\n return id;\n }", "@Override\n\tpublic Object selectById(Object id) {\n\t\treturn null;\n\t}", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "private void clearId() {\n \n id_ = 0;\n }", "@Override\n public int getId() {\n return id;\n }", "@Override\n public int getId() {\n return id;\n }", "public void setId(int id)\n {\n this.id=id;\n }", "@Override\r\n public int getID()\r\n {\r\n\treturn id;\r\n }", "@Override\n\tpublic Integer getId() {\n\t\treturn null;\n\t}", "public int getId()\r\n {\r\n return id;\r\n }", "public void setId(Long id){\n this.id = id;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "@java.lang.Override\n public int getId() {\n return id_;\n }", "private void clearId() {\n \n id_ = 0;\n }", "final protected int getId() {\n\t\treturn id;\n\t}", "public abstract Long getId();", "public void setId(Long id) \r\n {\r\n this.id = id;\r\n }", "@Override\n public long getId() {\n return this.id;\n }", "public String getId(){ return id.get(); }", "@SuppressWarnings ( \"unused\" )\n private void setId ( final Long id ) {\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(long id){\n this.id = id;\n }", "public void setId(Integer id)\r\n/* */ {\r\n/* 122 */ this.id = id;\r\n/* */ }", "public Long getId() \n {\n return id;\n }", "@Override\n\tpublic void setId(int id) {\n\n\t}", "public void test_getId() {\n assertEquals(\"'id' value should be properly retrieved.\", id, instance.getId());\n }", "@Override\r\n\tpublic Object getId() {\n\t\treturn null;\r\n\t}", "public int getID(){\n return id;\n }", "public int getId()\n {\n return id;\n }", "public String getID(){\n return Id;\n }" ]
[ "0.68954784", "0.68378097", "0.6704338", "0.66405046", "0.66405046", "0.6591173", "0.6577649", "0.6577649", "0.657354", "0.657354", "0.657354", "0.657354", "0.657354", "0.657354", "0.65609664", "0.65609664", "0.6543523", "0.65234846", "0.6514877", "0.6486739", "0.64767367", "0.642598", "0.6418224", "0.6416077", "0.64008904", "0.63655996", "0.6354077", "0.63503945", "0.6346775", "0.6323574", "0.6318245", "0.63005674", "0.6292615", "0.6292615", "0.6282184", "0.6270863", "0.6265186", "0.6264375", "0.62613726", "0.62583315", "0.6255373", "0.6250626", "0.6246553", "0.6246553", "0.6243956", "0.6238707", "0.6238707", "0.6230739", "0.62232894", "0.62195456", "0.62184453", "0.6210688", "0.6208303", "0.6201759", "0.6200382", "0.61917084", "0.6188896", "0.6188896", "0.61881596", "0.61881596", "0.61881596", "0.6183394", "0.6182932", "0.617465", "0.6173436", "0.6166611", "0.6165045", "0.61600006", "0.61568975", "0.61568975", "0.61568975", "0.61568975", "0.61568975", "0.61568975", "0.61568975", "0.6154626", "0.6154626", "0.6141511", "0.61333525", "0.61282176", "0.6126933", "0.6104891", "0.61035514", "0.61035514", "0.6102866", "0.6102238", "0.61013037", "0.6099772", "0.6098166", "0.6093518", "0.6092529", "0.6091996", "0.6091996", "0.60906154", "0.6088676", "0.60753924", "0.6071486", "0.60712415", "0.6069405", "0.6068963", "0.6068712" ]
0.0
-1
Creates a new instance.
public ElemViewCurvedPolygon(ElemModel model) { super(model); setHandlesClass(ElemHandlesPolyline.class); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "Instance createInstance();", "public void create(){}", "public Instance() {\n }", "private Instantiation(){}", "private Object createInstance() throws InstantiationException, IllegalAccessException {\n\t\treturn classType.newInstance();\n\t}", "void create(T instance) throws IOException;", "public void create() {\n\t\t\n\t}", "Reproducible newInstance();", "@Override\r\n\tpublic void create() {\n\t\t\r\n\t}", "@Override\r\n\tpublic T createInstance() {\r\n\t\ttry {\r\n\t\t\treturn getClassType().newInstance();\r\n\t\t} catch (Exception e) {\r\n\t\t\tLogger.getLogger(AbstractCRUDBean.class.getSimpleName()).log(Level.ALL, e.getMessage());\r\n\t\t}\r\n\t\treturn null;\r\n\t}", "public T newInstance();", "public void makeInstance() {\n\t\t// Create the attributes, class and text\n\t\tFastVector fvNominalVal = new FastVector(2);\n\t\tfvNominalVal.addElement(\"ad1\");\n\t\tfvNominalVal.addElement(\"ad2\");\n\t\tAttribute attribute1 = new Attribute(\"class\", fvNominalVal);\n\t\tAttribute attribute2 = new Attribute(\"text\",(FastVector) null);\n\t\t// Create list of instances with one element\n\t\tFastVector fvWekaAttributes = new FastVector(2);\n\t\tfvWekaAttributes.addElement(attribute1);\n\t\tfvWekaAttributes.addElement(attribute2);\n\t\tinstances = new Instances(\"Test relation\", fvWekaAttributes, 1); \n\t\t// Set class index\n\t\tinstances.setClassIndex(0);\n\t\t// Create and add the instance\n\t\tInstance instance = new Instance(2);\n\t\tinstance.setValue(attribute2, text);\n\t\t// Another way to do it:\n\t\t// instance.setValue((Attribute)fvWekaAttributes.elementAt(1), text);\n\t\tinstances.add(instance);\n \t\tSystem.out.println(\"===== Instance created with reference dataset =====\");\n\t\tSystem.out.println(instances);\n\t}", "@Override\n\tpublic void create() {\n\n\t}", "T create();", "T create();", "@Override\n protected T createInstance() throws Exception {\n return this.isSingleton() ? this.builder().build() : XMLObjectSupport.cloneXMLObject(this.builder().build());\n }", "public CMObject newInstance();", "@Override\n\tpublic void create() {\n\t\t\n\t}", "@Override\n\tpublic void create () {\n\n\t}", "void createNewInstance(String filename)\n {\n iIncomingLobsFactory = new incomingLobsFactory();\n iIncomingLobsFactory.setPackageName(\"com.loadSample\");\n \n // include schemaLocation hint for validation\n iIncomingLobsFactory.setXSDFileName(\"LoadSample.xsd\");\n \n // encoding for output document\n iIncomingLobsFactory.setEncoding(\"UTF8\");\n \n // encoding tag for xml declaration\n iIncomingLobsFactory.setEncodingTag(\"UTF-8\");\n \n // Create the root element in the document using the specified root element name\n iIncomingLobs = (incomingLobs) iIncomingLobsFactory.createRoot(\"incomingLobs\");\n createincomingLobs();\n \n iIncomingLobsFactory.save(filename);\n }", "private synchronized static void createInstance(){\r\n\t\tif (instance == null){\r\n\t\t\tinstance = new Casino();\r\n\t\t}\r\n\t}", "public abstract void create();", "InstanceModel createInstanceOfInstanceModel();", "public static void createInstance()\n {\n if (instance == null) {\n // Create the instance\n instance = new SalesOrderDataSingleton();\n }\n }", "public Instance() {\n super(Routing.NAMESPACE, \"instance\");\n }", "@Override\r\n\tpublic void create() {\n\r\n\t}", "private Vehicle createNewVehicle() {\n\t\tString make = generateMake();\n\t\tString model = generateModel();\n\t\tdouble weight = generateWeight(model);\n\t\tdouble engineSize = generateEngineSize(model);\n\t\tint numberOfDoors = generateNumberOfDoors(model);\n\t\tboolean isImport = generateIsImport(make);\n\t\t\n\t\tVehicle vehicle = new Vehicle(make, model, weight, engineSize, numberOfDoors, isImport);\n\t\treturn vehicle;\t\t\n\t}", "public Command createInstance() {\n\t\t\n\t\tif(name == \"Direction\")\n\t\t\treturn new Direction();\n\t\t\n\t\tif(name == \"Gear\")\n\t\t\treturn new Gear();\n\t\t\n\t\tif(name == \"Pause\")\n\t\t\treturn new Pause();\n\t\t\n\t\treturn null;\n\t\t\n\t}", "private static void makeInstance(){\n\n if(settingsFile==null){\n settingsFile = new MetadataFile(SETTINGS_FILE_PATH);\n }\n\n if(!settingsFile.exists()){\n settingsFile.create();\n }\n\n if(tagListeners==null){\n tagListeners= new HashMap<>();\n }\n\n }", "public Factory() {\n\t\tsuper();\n\t}", "private synchronized static void createInstance() {\n if (INSTANCE == null) { \n INSTANCE = new DataConnection();\n }\n }", "@SuppressWarnings(\"unchecked\")\n public T newInstance()\n throws NoSuchMethodException, IllegalAccessException, InvocationTargetException, InstantiationException {\n if (constructor_ == null) {\n constructor_ = getRawClass().getConstructor();\n }\n\n return (T)constructor_.newInstance();\n }", "public static void createInstance(Model model, org.ontoware.rdf2go.model.node.Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "@Override\r\n\tpublic CMObject newInstance()\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\treturn this.getClass().getDeclaredConstructor().newInstance();\r\n\t\t}\r\n\t\tcatch(final Exception e)\r\n\t\t{\r\n\t\t\tLog.errOut(ID(),e);\r\n\t\t}\r\n\t\treturn new StdBehavior();\r\n\t}", "public abstract boolean create(T newInstance);", "private static synchronized void createInstance() {\r\n\t\tif (instance == null)\r\n\t\t\tinstance = new LOCFacade();\r\n\t}", "public static QuinzicalModel createInstance() throws Exception {\n\t\tif (instance == null) {\n\t\t\tinstance = new QuinzicalModel();\n\t\t}\n\t\treturn instance;\n\t}", "@Override\n\tpublic LightTank create() {\n\t\treturn new LightTank(GameContext.getGameContext());\n\t}", "<T> T newInstance(URI description) throws EnvironmentException;", "public Idea create() {\n \t\t\tIdea idea = new Idea();\n \n \t\t\treturn idea;\n \t\t}", "public static void createInstance(Model model, Resource instanceResource) {\r\n\t\tBase.createInstance(model, RDFS_CLASS, instanceResource);\r\n\t}", "public Taginstance() {\n\t\tthis(\"taginstance\", null);\n\t}", "@Override\n\tpublic ModIndexedInstance createNewInstance() {\n\t\tModIndexedInstance newInst = new ModIndexedInstance(); // create the new instance\n\t\tnewInst.setRegComp(this); // set component type of new instance\n\t\taddInstanceOf(newInst); // add instance to list for this comp\n\t\treturn newInst;\n\t}", "public static StaticFactoryInsteadOfConstructors create(){\n return new StaticFactoryInsteadOfConstructors();\n }", "public ObjectFactory() {}", "public ObjectFactory() {}", "public ObjectFactory() {}", "public Factory() {\n this(getInternalClient());\n }", "For createFor();", "public ObjectFactory() {\n super(grammarInfo);\n }", "public Game getNewInstance() {\n try {\n return classObj.newInstance();\n } catch (Exception e) {\n e.printStackTrace();\n throw new RuntimeException(\"Error generating \" + this + \" game\");\n }\n }", "T create() throws PersistException;", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public static Builder create() {\n\t\treturn new Builder();\n\t}", "public ApplicationCreator() {\n }", "@Override\r\n public void instantiate() {\r\n }", "public void create () {\n // TODO random generation of a ~100 x 100 x 100 world\n }", "public SingleRequest<?> create() {\n return new SingleRequest<>();\n }", "public ObjectFactory() {\n\t}", "public ObjectFactory() {\r\n\t}", "public Open() {\n //creates a new open instance\n }", "protected abstract void construct();", "public static StaticFactoryInsteadOfConstructors newInstance() {\n return new StaticFactoryInsteadOfConstructors();\n }", "@Override\r\n\tpublic ItemInstance createItemInstance() {\n\t\treturn new HpInstance();\r\n\t}", "private static void createInstance() {\n if (mApiInterface == null) {\n synchronized(APIClient.class) {\n if (mApiInterface == null) {\n mApiInterface = buildApiClient();\n }\n }\n }\n }", "Klassenstufe createKlassenstufe();", "Snapshot create();", "public static Book createEntity() {\n Book book = new Book()\n .idBook(DEFAULT_ID_BOOK)\n .isbn(DEFAULT_ISBN)\n .title(DEFAULT_TITLE)\n .author(DEFAULT_AUTHOR)\n .year(DEFAULT_YEAR)\n .publisher(DEFAULT_PUBLISHER)\n .url_s(DEFAULT_URL_S)\n .url_m(DEFAULT_URL_M)\n .url_l(DEFAULT_URL_L);\n return book;\n }", "public static synchronized void constructInstance()\n {\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, false );\n\n if ( ourInstance != null )\n {\n throw new IllegalStateException( myName + \" Already Constructed\" );\n }\n ourInstance = new ElbowSubsystem();\n\n SmartDashboard.putBoolean( TelemetryNames.Elbow.status, true );\n }", "public ProductoCreable newInstance(int codigo, String nombre){\r\n \r\n }", "public Object createNew(String typename, Object... args) \n\t\tthrows \tIllegalAccessException, \n\t\t\tInstantiationException, \n\t\t\tClassNotFoundException,\n\t\t\tNoSuchMethodException,\n\t\t\tInvocationTargetException \n\t{\n\t\tswitch(args.length) \n\t\t{\n\t\tcase 1 : return Class.forName(typename).getConstructor(args[0].getClass()).newInstance(args[0]);\n\t\tcase 2 : return Class.forName(typename).getConstructor(args[0].getClass(), args[1].getClass()).\n\t\t\tnewInstance(args[0], args[1]);\n\t\t}\n\t\treturn null;\n\t}", "public static IPCGCallDetailCreator instance()\r\n {\r\n if (instance == null)\r\n {\r\n instance = new IPCGCallDetailCreator();\r\n }\r\n return instance;\r\n }", "public Object buildNewInstance() throws DescriptorException {\n if (this.isUsingDefaultConstructor()) {\n return this.buildNewInstanceUsingDefaultConstructor();\n } else {\n return this.buildNewInstanceUsingFactory();\n }\n }", "void create(T t);", "void create( State state );", "public Activator() {\r\n\t}", "OBJECT createOBJECT();", "public Produto() {}", "public T safeNewInstance() {\n try {\n return newInstance();\n } catch (NoSuchMethodException e) {\n throw new IllegalArgumentException(e);\n } catch (IllegalAccessException e) {\n throw new IllegalArgumentException(e);\n } catch (InvocationTargetException e) {\n throw new IllegalArgumentException(e);\n } catch (InstantiationException e) {\n throw new IllegalArgumentException(e);\n }\n }", "@SuppressWarnings(\"unchecked\")\n\tpublic AnalysisGraph createNewInstance() {\n\t\tAnalysisGraph graph = new AnalysisGraph();\n\t\tgraph.currentIndex = currentIndex;\n\t\t\n\t\tgraph.nodes = (HashMap<String, Node>) nodes.clone();\n\t\tgraph.nodeList = (ArrayList<Node>)((ArrayList<Node>) nodeList).clone();\n\t\tgraph.links = (ArrayList<Link>)((ArrayList<Link>) links).clone();\n\t\treturn graph;\n\t}", "DynamicInstance createDynamicInstance();", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }", "public ObjectFactory() {\n }" ]
[ "0.7834167", "0.72893584", "0.70771503", "0.7048765", "0.70209944", "0.6839274", "0.67782235", "0.6770133", "0.67429745", "0.6701039", "0.6690158", "0.6630354", "0.66046286", "0.6600776", "0.6600776", "0.6597608", "0.6592152", "0.6564594", "0.65268713", "0.652679", "0.6475239", "0.6442598", "0.63414943", "0.63365746", "0.63303816", "0.63249475", "0.627689", "0.627521", "0.6227869", "0.620804", "0.6167403", "0.6164787", "0.610737", "0.6102229", "0.60939527", "0.60640883", "0.60597515", "0.60330635", "0.60064733", "0.600185", "0.59933734", "0.59891814", "0.5978862", "0.5975761", "0.59642875", "0.59642875", "0.59642875", "0.595006", "0.5948986", "0.5939949", "0.5935609", "0.59320545", "0.5930863", "0.5930863", "0.5930808", "0.59303784", "0.59288776", "0.59219015", "0.5912657", "0.5900076", "0.58830214", "0.5879637", "0.5878685", "0.58779675", "0.58684635", "0.5859659", "0.5852349", "0.5844357", "0.5844119", "0.58357304", "0.582402", "0.581462", "0.58129567", "0.5803098", "0.58003926", "0.5787434", "0.5786469", "0.57835597", "0.578337", "0.5780014", "0.57761306", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006", "0.5772006" ]
0.0
-1
buffer stream (is this really necessary to get optimal performance?)
public ModifyingWriter createRegexModifyingWriter(Writer output, String regex, int flags, String replacement, int minimumLengthOfLookBehind, int requestedCapacityOfCharacterBuffer) { if (!(output instanceof BufferedWriter)) { output = new BufferedWriter(output); } // create modifier Modifier modifier = new RegexModifier(regex, flags, replacement, minimumLengthOfLookBehind, requestedCapacityOfCharacterBuffer); // create and return Writer return new ModifyingWriter(output, modifier); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "byte [] getBuffer ();", "Buffer copy();", "abstract public Buffer createBuffer();", "void read(Buffer buffer);", "void setStreamBuffer(int size) {\r\n\t\tif(size>0)\r\n\t\t\tbuffer = new byte[size];\r\n\t\telse\r\n\t\t\tbuffer = new byte[this.size];\r\n\t}", "public IBuffer newBuffer();", "CharArrayBuffer getBuffer()\n ;", "public static void testBuffer() throws Exception {\n\t\tStopwatch.start();\n\t\t// readWithoutBuffer(new FileInputStream(\"bigdata\"));\n\t\tStopwatch.stop();\n\n\t\t/*\n\t\t * When read a single byte(or small piece of data), BufferedInputStream\n\t\t * improve performance significantly\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\t\t\n\t\t/*\n\t\t * When read a single byte(or small piece of data), BufferedInputStream\n\t\t * improve performance significantly\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBufferEnhanced(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\n\t\t/*\n\t\t * When read a chunk at a time, BufferedInputStream won't help\n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer2(new FileInputStream(\"bigdata.data\"));\n\t\tStopwatch.stop();\n\t\t\n\t\t/*\n\t\t * NIO way, same as chunk read \n\t\t */\n\t\tStopwatch.start();\n\t\treadWithBuffer3(new RandomAccessFile(\"bigdata.data\", \"r\").getChannel());\n\t\tStopwatch.stop();\n\t}", "private final byte[] readBuffer( int size ) throws IOException {\n byte[] buffer = new byte[ size ];\n\n int read = 0;\n while ( read < size ) {\n int next = dataSource.read( buffer, read, size - read );\n if ( next < 0 ) throw new IOException( \"End of Stream\" );\n read += next;\n\t}\n return buffer;\n }", "private int readBufferedContentInto(ByteBuffer byteBuffer) {\n long bytesToSkip = positionForNextRead - positionInGrpcStream;\n\n if (bytesToSkip >= bufferedContent.size()) {\n positionInGrpcStream += bufferedContent.size();\n invalidateBufferedContent();\n return 0;\n }\n\n if (bytesToSkip > 0) {\n positionInGrpcStream += bytesToSkip;\n bufferedContent = bufferedContent.substring(Math.toIntExact(bytesToSkip));\n }\n\n int bytesToWrite = Math.min(byteBuffer.remaining(), bufferedContent.size());\n put(bufferedContent, 0, bytesToWrite, byteBuffer);\n positionInGrpcStream += bytesToWrite;\n positionForNextRead += bytesToWrite;\n\n if (bytesToWrite < bufferedContent.size()) {\n bufferedContent = bufferedContent.substring(bytesToWrite);\n } else {\n invalidateBufferedContent();\n }\n\n return bytesToWrite;\n }", "private int readFill(InputStream stream, byte[] buffer)\n throws IOException {\n int r = buffer.length;\n while (r > 0) {\n int p = buffer.length - r;\n int c = stream.read(buffer, p, r);\n if (c == -1) {\n break;\n }\n r -= c;\n }\n return buffer.length - r;\n\n }", "public StreamWriter write(byte[] buffer)\r\n {\r\n \t_stream.write(buffer,0,buffer.length);\r\n\t\treturn this;\r\n }", "public void setBuffering() {\n try {\n doc = StaxUtils.read(stream);\n stream = null;\n } catch (XMLStreamException e) {\n throw new Fault(e); \n }\n }", "abstract public Buffer createBufferFromData(byte[] data, int size);", "private DataInputStream readBuffer( DataInputStream in, int count ) throws IOException{\n byte[] buffer = new byte[ count ];\n int read = 0;\n while( read < count ){\n int input = in.read( buffer, read, count-read );\n if( input < 0 )\n throw new EOFException();\n read += input;\n }\n \n ByteArrayInputStream bin = new ByteArrayInputStream( buffer );\n DataInputStream din = new DataInputStream( bin );\n return din;\n }", "public abstract void outputBmp(FastStringBuffer buf);", "private byte[] refreshBuffer() throws IOException {\n bufpos = 0;\n if (client.isTransferCancelled())\n return null;\n int count = client.readChunk(in, chunk, chunk.length);\n if (count < 0) {\n if (matchpos > 0) { \n pos += matchpos;\n buflen = matchpos;\n monitorCount += matchpos;\n byte[] tmp = new byte[matchpos];\n System.arraycopy(tmp, 0, prevBuf, 0, matchpos);\n matchpos = 0;\n return tmp;\n }\n return null;\n }\n try {\n // transform CRLF\n out.reset();\n for (int i = 0; i < count; i++) {\n if (chunk[i] == FTPClient.FTP_LINE_SEPARATOR[matchpos]) {\n prevBuf[matchpos] = chunk[i];\n matchpos++;\n if (matchpos == FTPClient.FTP_LINE_SEPARATOR.length) {\n out.write(LINE_SEPARATOR);\n pos += LINE_SEPARATOR.length;\n monitorCount += LINE_SEPARATOR.length;\n matchpos = 0;\n }\n }\n else { // no match\n // write out existing matches\n if (matchpos > 0) {\n out.write(prevBuf, 0, matchpos);\n pos += matchpos;\n monitorCount += matchpos;\n }\n out.write(chunk[i]);\n pos++;\n monitorCount++;\n matchpos = 0;\n } \n } \n byte[] result = out.toByteArray();\n buflen = result.length;\n return result;\n }\n finally {\n checkMonitor(); \n }\n }", "private byte[] readBuffer( DataInputStream in ) throws IOException{\n String factory = in.readUTF();\n int count = in.readInt();\n \n ByteArrayOutputStream out = new ByteArrayOutputStream( factory.length()*4 + 4 + count );\n DataOutputStream dout = new DataOutputStream( out );\n \n dout.writeUTF( factory );\n dout.writeInt( count );\n \n for( int i = 0; i < count; i++ ){\n int read = in.read();\n if( read == -1 )\n throw new EOFException( \"unexpectetly reached end of file\" );\n dout.write( read );\n }\n \n dout.close();\n return out.toByteArray();\n }", "abstract public ByteString getBlocksBuffer();", "abstract public Buffer createBufferFromString(String data);", "@Test\r\n\tpublic void testCompressing() throws ClassNotFoundException,\r\n\t\t\tInstantiationException, IllegalAccessException {\n\r\n\t\tAbstractStream abstractStream = Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.FileStream\");\r\n\t\tCompressingStream stream = (CompressingStream) Factory\r\n\t\t\t\t.getStream(\"by.bsu.decorator.bean.CompressingStream\");\r\n\t\tstream.setAbstractStream(abstractStream);\r\n\t\tString str = stream.handleBufferFull();\r\n\r\n\t\tbyte[] b = new byte[10];\r\n\t\tfor (int i = 0; i < 10; i++)\r\n\t\t\tb[i] = (byte) i;\r\n\t\tstream.putByte(b);\r\n\t\tSystem.out.println(str);\r\n\t\tassertEquals(\"Compressing Stream. File Stream. \", str);\r\n\t}", "private int fillBuffer(InputStream is) throws IOException {\n int len = buffer.length;\n int pos = 0;\n while (pos < buffer.length) {\n int read = is.read(buffer, pos, len);\n if (read == -1)\n return pos;\n pos += read;\n len -= read;\n }\n return pos;\n }", "public Object getContent() {\n/* 112 */ return this.buf;\n/* */ }", "public final ByteBuffer finishStream() {\n return finishNative();\n }", "public static <E> Stream<E> buffer(Iterable<E> stream) {\n if (stream == null) return null;\n \n return new AbstractStream<E>() {\n final Iterable<E> input_stream = stream;\n List<E> buffer = null;\n\n public Iterator<E> iterator() {\n if (buffer != null) return buffer.iterator();\n \n buffer = new LinkedList<E>();\n return new Iterator<E>(){\n Iterator<E> iter = input_stream.iterator();\n public void remove(){ iter.remove(); }\n public boolean hasNext() { return iter.hasNext(); }\n public E next() {\n E next_item = iter.next();\n buffer.add(next_item);\n return next_item;\n }\n };\n }\n\n };\n }", "public FastBytesOutputStream(int size) \r\n {\r\n \tbuf = new byte[size];\r\n }", "int writeTo(byte[] iStream, int pos, ORecordVersion version);", "@Override\n public void flushBuffer() throws IOException {\n\n }", "public long getStream();", "static void readBytes(ByteBufAllocator allocator, ByteBuffer buffer, int position, int length, OutputStream out) throws IOException {\n if (buffer.hasArray()) {\n out.write((byte[])buffer.array(), (int)(position + buffer.arrayOffset()), (int)length);\n return;\n }\n int chunkLen = Math.min((int)length, (int)8192);\n buffer.clear().position((int)position);\n if (length <= 1024 || !allocator.isDirectBufferPooled()) {\n ByteBufUtil.getBytes((ByteBuffer)buffer, (byte[])ByteBufUtil.threadLocalTempArray((int)chunkLen), (int)0, (int)chunkLen, (OutputStream)out, (int)length);\n return;\n }\n ByteBuf tmpBuf = allocator.heapBuffer((int)chunkLen);\n try {\n byte[] tmp = tmpBuf.array();\n int offset = tmpBuf.arrayOffset();\n ByteBufUtil.getBytes((ByteBuffer)buffer, (byte[])tmp, (int)offset, (int)chunkLen, (OutputStream)out, (int)length);\n return;\n }\n finally {\n tmpBuf.release();\n }\n }", "@Override\n public int getBufferSize() {\n return 0;\n }", "private void writeBuffer( byte b[], int offset, int length) throws IOException\r\n\t{\r\n\t\t// Write the chunk length as a hex number.\r\n\t\tfinal String size = Integer.toHexString(length);\r\n\t\tthis.out.write(size.getBytes());\r\n\t\t// Write a CRLF.\r\n\t\tthis.out.write( CR );\r\n\t\tthis.out.write( LF );\r\n\t\t// Write the data.\r\n\t\tif (length != 0 )\r\n\t\t\tthis.out.write(b, offset, length);\r\n\t\t// Write a CRLF.\r\n\t\tthis.out.write( CR );\r\n\t\tthis.out.write( LF );\r\n\t\t// And flush the real stream.\r\n\t\tthis.out.flush();\r\n\t}", "void writeCurrentBuffer();", "private static void flushInternalBuffer() {\n\n //Strongly set the last byte to \"0A\"(new line)\n if (mPos < LOG_BUFFER_SIZE_MAX) {\n buffer[LOG_BUFFER_SIZE_MAX - 1] = 10;\n }\n\n long t1, t2;\n\n //Save buffer to SD card.\n t1 = System.currentTimeMillis();\n writeToSDCard();\n //calculate write file cost\n t2 = System.currentTimeMillis();\n Log.i(LOG_TAG, \"internalLog():Cost of write file to SD card is \" + (t2 - t1) + \" ms!\");\n\n //flush buffer.\n Arrays.fill(buffer, (byte) 0);\n mPos = 0;\n }", "void flushBuffer();", "Buffer slice();", "private Buffer getBufferByPosition(int pos)\n throws IOException\n {\n return getBuffer(pos / BLOCK_SIZE);\n }", "protected abstract OutputStream getStream() throws IOException;", "void writeTo(ByteBuffer buffer) {\n/* 526 */ Preconditions.checkNotNull(buffer);\n/* 527 */ Preconditions.checkArgument(\n/* 528 */ (buffer.remaining() >= 40), \"Expected at least Stats.BYTES = %s remaining , got %s\", 40, buffer\n/* */ \n/* */ \n/* 531 */ .remaining());\n/* 532 */ buffer\n/* 533 */ .putLong(this.count)\n/* 534 */ .putDouble(this.mean)\n/* 535 */ .putDouble(this.sumOfSquaresOfDeltas)\n/* 536 */ .putDouble(this.min)\n/* 537 */ .putDouble(this.max);\n/* */ }", "private void readMoreBytesFromStream() throws IOException {\n if (!innerStreamHasMoreData) {\n return;\n }\n\n int bufferSpaceAvailable = buffer.length - bytesInBuffer;\n if (bufferSpaceAvailable <= 0) {\n return;\n }\n\n int bytesRead =\n stream.read(buffer, bytesInBuffer, bufferSpaceAvailable);\n\n if (bytesRead == -1) {\n innerStreamHasMoreData = false;\n } else {\n bytesInBuffer += bytesRead;\n }\n }", "protected int populateBuffer()\n {\n interlock.beginReading();\n // System.out.println(\"populateBuffer: 2\");\n return byteBuffer.limit();\n }", "int getBufferSize();", "public interface ProductionBuffer {\n\t\n\tpublic int getMaxBufferSize();\n\t\n\tpublic int getCurrentBufferSize();\n\t\n\tpublic boolean isFull();\n\t\n\tpublic boolean isEmpty();\n\t\n\t//Add to the back of the buffer\n\tpublic boolean add(BufferSlot bs);\n\t\n\t//Remove from the front of the buffer\n\tpublic BufferSlot remove();\n\t\n\t//empties the buffer\n\tpublic void clear();\n\n}", "private String getFileContents ()\n {\n final String s = m_buffers.values ()//\n .stream ()//\n .flatMap (List::stream)//\n .collect (Collectors.joining ());\n\n return s;\n }", "protected abstract Buffer doCreateBuffer(byte[] data)\n throws BadParameterException, NoSuccessException;", "public interface Buffer {\r\n\tpublic void add(String s);\r\n\tpublic String retrieve();\r\n}", "public void run() {\n try {\n byte b[] = new byte[100];\n for (;;) {\n int n = in.read(b);\n String str;\n if (n < 0) {\n break;\n }\n str = new String(b, 0, n);\n buffer.append(str);\n System.out.print(str);\n }\n } catch (IOException ioe) { /* skip */ }\n }", "default StreamBuffering getBuffering() {\n\t\treturn StreamBuffering.UNSUPPORTED;\n\t}", "public void bufferPacket(UtpTimestampedPacketDTO pkt) throws IOException {\r\n\t\tint sequenceNumber = pkt.utpPacket().getSequenceNumber() & 0xFFFF;\r\n\t\tint position = sequenceNumber - expectedSequenceNumber;\r\n\t\tdebug_lastSeqNumber = sequenceNumber;\r\n\t\tif (position < 0) {\r\n\t\t\tposition = mapOverflowPosition(sequenceNumber);\r\n\t\t}\r\n\t\tdebug_lastPosition = position;\r\n\t\telementCount++;\r\n\t\ttry {\r\n\t\t\tbuffer[position] = pkt;\t\t\t\r\n\t\t} catch (ArrayIndexOutOfBoundsException ioobe) {\r\n\t\t\tlog.error(\"seq, exp: \" + sequenceNumber + \" \" + expectedSequenceNumber + \" \");\r\n\t\t\tioobe.printStackTrace();\r\n\r\n\t\t\tdumpBuffer(\"oob: \" + ioobe.getMessage());\r\n\t\t\tthrow new IOException();\r\n\t\t}\r\n\r\n\t}", "@Override\n public void serialize(ByteBuffer buf) {\n }", "public void run() {\n\n do {\n\n ByteBuffer byteBuffer = (ByteBuffer) slist[0];\n slist = (Object[]) slist[1];\n if (0 == bufsize) {\n if (null == slist) {\n buffer = byteBuffer;\n break;//optimization\n }\n linkedList = new LinkedList<ByteBuffer>();\n }\n bufsize += byteBuffer.limit();\n linkedList.addFirst(byteBuffer);\n\n } while (null != slist);\n\n if (null == buffer) {\n buffer = ByteBuffer.allocateDirect(bufsize);\n\n for (ByteBuffer netBuffer : linkedList) {\n buffer.put(netBuffer);\n }\n }\n\n buffer.rewind();\n System.err.println(\"MsgSize: \" + buffer.limit());\n int i = ENDL.length - 1;\n byte b1 = ENDL[i];\n do {\n ByteBuffer b = buffer.slice();\n while (b.hasRemaining() && b.get() != b1);\n b.flip();\n Integer integer = Integer.valueOf(UTF8.decode(b).toString().trim(), 0x10);\n System.err.println(\"RecordSize: \" + integer);\n buffer = ((ByteBuffer) buffer.position(b.limit())).slice();\n ByteBuffer handoff = (ByteBuffer) buffer.slice().limit(integer);\n final String trim = UTF8.decode(handoff).toString().trim();\n // System.err.println(\"RecordId: \" + trim);\n final LinkedHashMap couchChange = CouchDriver.GSON.fromJson(trim, LinkedHashMap.class);\n\n EXECUTOR_SERVICE.submit(getDocUpdateHandler(couchChange));\n buffer.position(handoff.limit() + ENDL.length);\n buffer = buffer.slice();\n } while (buffer.hasRemaining());\n }", "@Override\n public void setBufferSize(int arg0) {\n\n }", "public ByteBuffer toBuffer() {\n return ByteBuffer.wrap(buf, 0, count);\n }", "private void sendBody(OutputStream outputStream, long pending) throws IOException {\n\t\t\tlong BUFFER_SIZE = 16 * 1024;\n\t\t\tbyte[] buff = new byte[(int) BUFFER_SIZE];\n\t\t\tboolean sendEverything = pending == -1;\n\t\t\twhile (pending > 0 || sendEverything) {\n\t\t\t\tlong bytesToRead = sendEverything ? BUFFER_SIZE : Math.min(pending, BUFFER_SIZE);\n\t\t\t\tint read = this.data.read(buff, 0, (int) bytesToRead);\n\t\t\t\tif (read <= 0) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\toutputStream.write(buff, 0, read);\n\t\t\t\tif (!sendEverything) {\n\t\t\t\t\tpending -= read;\n\t\t\t\t}\n\t\t\t}\n\t\t}", "public void copyLineBuffer() throws IOException {\n\t\tBufferedReader in = null;\n\t\tBufferedWriter out = null;\n\t\tlong startTime, elapsedTime;\n\t\tString line;\n\n\t\tstartTime = System.nanoTime();\n\t\ttry {\n\t\t\tin = new BufferedReader(new FileReader(inFileStr));\n\t\t\tout = new BufferedWriter(new FileWriter(outFileStr));\n\n\t\t\twhile ((line = in.readLine()) != null) {\n\t\t\t\tout.write(line);\n\t\t\t\tout.newLine();\n\t\t\t}\n\t\t} finally {\n\t\t\tif (in != null)\n\t\t\t\tin.close();\n\t\t\tif (out != null)\n\t\t\t\tout.close();\n\t\t}\n\t\telapsedTime = System.nanoTime() - startTime;\n\t\tSystem.out.println(\"copyWithBuffer() [\" + new File(inFileStr).length() / (elapsedTime / 1000.0) + \" MB/S]\");\n\t}", "@Override\n\tpublic int getBufferSize() {\n\t\treturn 0;\n\t}", "public void write(byte[] buffer);", "void record(int actualReadBytes);", "InputStream getDataStream();", "private String getDataFromBuffer(int end){\r\n StringBuilder temp = new StringBuilder();\r\n \r\n for (int i = 0; i < end; i++) {\r\n temp.append(mBufferData.remove());\r\n }\r\n return temp.toString();\r\n }", "@SuppressWarnings(\"unused\")\r\n private void addReadStream(Reader asciiStream) {\n\t\taddReadSize(100);\r\n\t}", "@Override\n\tpublic void flushBuffer() throws IOException {\n\t}", "public void toBuffer(ByteBufWrapper paramhd)\r\n/* 23: */ {\r\n/* 24:40 */ paramhd.a(a.toJson(this.b));\r\n/* 25: */ }", "public void toBuffer(ByteBufWrapper paramhd)\r\n/* 48: */ {\r\n/* 49:55 */ paramhd.b(this.a);\r\n/* 50:56 */ paramhd.writeInt(this.b);\r\n/* 51:57 */ paramhd.writeInt(this.c);\r\n/* 52:58 */ paramhd.writeInt(this.d);\r\n/* 53:59 */ paramhd.writeByte(this.e);\r\n/* 54:60 */ paramhd.writeByte(this.f);\r\n/* 55:61 */ paramhd.writeBoolean(this.g);\r\n/* 56: */ }", "@Override\n public void onNext(List<ByteBuffer> buffers) {\n for (ByteBuffer buffer : buffers) {\n if (buffer.limit() != buffer.capacity()) {\n final int limit = buffer.limit();\n final int position = buffer.position();\n buffer.position(buffer.limit());\n buffer.limit(buffer.capacity());\n while (buffer.hasRemaining())\n buffer.put((byte)'X');\n buffer.position(position); // restore original position\n buffer.limit(limit); // restore original limit\n }\n }\n asString.onNext(buffers);\n }", "public static void generate(SparseStream stream, PrintStream output) {\n stream.position(0);\n byte[] buffer = new byte[1024 * 1024];\n for (Range block : StreamExtent.blocks(stream.getExtents(), buffer.length)) {\n long startPos = block.getOffset() * buffer.length;\n long endPos = Math.min((block.getOffset() + block.getCount()) * buffer.length, stream.getLength());\n stream.position(startPos);\n while (stream.position() < endPos) {\n int numLoaded = 0;\n long readStart = stream.position();\n while (numLoaded < buffer.length) {\n int bytesRead = stream.read(buffer, numLoaded, buffer.length - numLoaded);\n if (bytesRead == 0) {\n break;\n }\n\n numLoaded += bytesRead;\n }\n for (int i = 0; i < numLoaded; i += 16) {\n boolean foundVal = false;\n if (i > 0) {\n for (int j = 0; j < 16; j++) {\n if (buffer[i + j] != buffer[i + j - 16]) {\n foundVal = true;\n break;\n }\n\n }\n } else {\n foundVal = true;\n }\n if (foundVal) {\n output.printf(\"%08x\", i + readStart);\n for (int j = 0; j < 16; j++) {\n if (j % 8 == 0) {\n output.print(\" \");\n }\n\n output.printf(\" %02x\", buffer[i + j]);\n }\n output.print(\" |\");\n for (int j = 0; j < 16; j++) {\n if (j % 8 == 0 && j != 0) {\n output.print(\" \");\n }\n\n output.printf(\"%c\", (buffer[i + j] >= 32 && buffer[i + j] < 127) ? (char) buffer[i + j] : '.');\n }\n output.print(\"|\");\n output.println();\n }\n }\n }\n }\n }", "private String getDataFromBuffer(){\r\n int bufferDataSize = mBufferData.size();\r\n StringBuilder temp = new StringBuilder();\r\n \r\n for (int i = 0; i < bufferDataSize; i++) {\r\n temp.append(mBufferData.remove());\r\n }\r\n return temp.toString();\r\n }", "public void read_from_buffer(byte[] buffer) throws IOException {\r\n ByteArrayInputStream byte_in = new ByteArrayInputStream(buffer);\r\n DataInputStream in = new DataInputStream(byte_in);\r\n\r\n read_from_buffer(in);\r\n\r\n in.close();\r\n byte_in.close();\r\n }", "public interface StreamAlgorithm{\n \n \n /**\n * Return the stream content-length. If the content-length wasn't parsed,\n * return -1.\n */\n public int contentLength();\n \n \n /**\n * Return the stream header length. The header length is the length between\n * the start of the stream and the first occurance of character '\\r\\n' .\n */\n public int headerLength();\n \n \n /**\n * Allocate a <code>ByteBuffer</code>\n * @param useDirect allocate a direct <code>ByteBuffer</code>.\n * @param useView allocate a view <code>ByteBuffer</code>.\n * @param size the size of the newly created <code>ByteBuffer</code>.\n * @return a new <code>ByteBuffer</code>\n */\n public ByteBuffer allocate(boolean useDirect, boolean useView, int size);\n \n \n /**\n * Before parsing the bytes, initialize and prepare the algorithm.\n * @param byteBuffer the <code>ByteBuffer</code> used by this algorithm\n * @return <code>ByteBuffer</code> used by this algorithm\n */\n public ByteBuffer preParse(ByteBuffer byteBuffer);\n \n \n /**\n * Parse the <code>ByteBuffer</code> and try to determine if the bytes\n * stream has been fully read from the <code>SocketChannel</code>.\n * @paran byteBuffer the bytes read.\n * @return true if the algorithm determines the end of the stream.\n */\n public boolean parse(ByteBuffer byteBuffer);\n \n \n /**\n * After parsing the bytes, post process the <code>ByteBuffer</code> \n * @param byteBuffer the <code>ByteBuffer</code> used by this algorithm\n * @return <code>ByteBuffer</code> used by this algorithm\n */\n public ByteBuffer postParse(ByteBuffer byteBuffer); \n \n \n /**\n * Recycle the algorithm.\n */\n public void recycle();\n \n \n /**\n * Rollback the <code>ByteBuffer</code> to its previous state in case\n * an error as occured.\n */\n public ByteBuffer rollbackParseState(ByteBuffer byteBuffer); \n \n \n /**\n * The <code>Handler</code> associated with this algorithm.\n */\n public Handler getHandler();\n\n \n /**\n * Set the <code>SocketChannel</code> used by this algorithm\n */\n public void setSocketChannel(SocketChannel socketChannel);\n \n \n /**\n * Set the <code>port</code> this algorithm is used.\n */\n public void setPort(int port);\n \n \n /**\n * Return the port\n */\n public int getPort();\n \n \n /**\n * Return the class responsible for handling OP_READ.\n */\n public Class getReadTask(SelectorThread selectorThread);\n}", "private int fillBuffer() throws IOException {\r\n int n = super.read(buffer, 0, BUF_SIZE);\r\n if (n >= 0) {\r\n file_pos +=n;\r\n buf_end = n;\r\n buf_pos = 0;\r\n }\r\n return n;\r\n }", "private String readStream(InputStream is) throws IOException {\n StringBuilder sb = new StringBuilder();\n BufferedReader r = new BufferedReader(new InputStreamReader(is),1000);\n for (String line = r.readLine(); line != null; line =r.readLine()){\n sb.append(line);\n }\n is.close();\n return sb.toString();\n }", "public interface ByteVectorIO {\n public void send(byte[] b) throws IOException;\n\n public byte[] get() throws IOException;\n\n public void close();\n}", "void setBuffer(byte[] b)\n {\n buffer = b;\n }", "@Override\n public void log(byte[] buffer, int start, int count) throws IOException {\n String logData = new String(buffer, start, count, this.encoding);\n String lineFeed = this.addLineFeed ? this.lineSeparator : \"\";\n String logEntry = String.format(\"%s: %s%s\", this.prefix, logData, lineFeed);\n stream.print(logEntry);\n }", "@Override\n public void flush() throws IOException {\n byteBufferStreamOutput.flush();\n }", "public byte[] getBuffer () {\n\t\t\t\n\t\t\tif (index < 0)\n\t\t\t\treturn null;\n\n\t\t\tint len = index;\n\t\t\tbyte[] b = new byte[len+1];\n\t\t\tfor (int k=0; k <= len; k++)\n\t\t\t\tb[k] = buf[k];\n\n\t\t\treturn b;\n\t\t}", "public ByteBuffer buffer() { return bb; }", "public void write_to_buffer(byte[] buffer) throws IOException {\r\n ByteArrayOutputStream byte_out = new ByteArrayOutputStream(buffer.length);\r\n DataOutputStream out = new DataOutputStream(byte_out);\r\n\r\n write_to_buffer(out);\r\n\r\n byte[] bytes = byte_out.toByteArray();\r\n for (int i = 0; i < buffer.length; ++i) {\r\n buffer[i] = bytes[i];\r\n }\r\n\r\n out.close();\r\n byte_out.close();\r\n }", "public void write(byte[] buffer) {\n try {\n String bufferstring=\"a5550100a2\";\n // byte [] buffer03=new byte[]{(byte) 0xa5, Byte.parseByte(\"ffaa\"),0x01,0x00, (byte) 0xa2};\n byte buffer01[]=bufferstring.getBytes();\n byte [] buffer02=new byte[]{(byte) 0xa5,0x55,0x01,0x00, (byte) 0xa2};\n\n\n //for(int i=0;i<100000;i++) {\n mmOutStream.write(buffer);\n // Thread.sleep(1000);\n //}\n //\n //Share the sent message back to the UI Activity\n// mHandler.obtainMessage(BluetoothChat.MESSAGE_WRITE, -1, -1, buffer)\n// .sendToTarget();\n } catch (Exception e) {\n Log.e(TAG, \"Exception during write\", e);\n }\n }", "@SuppressWarnings(\"unused\")\r\n private void addReadStream(InputStream asciiStream) {\n\t\taddReadSize(100);\r\n\t}", "private void read() throws IOException {\n\n ByteBuffer buffer = ByteBuffer.allocate(ProjectProperties.BYTE_BUFFER_SIZE);\n int read = 0;\n // Keep trying to write until all bytes are read\n while (buffer.hasRemaining() && read != -1) {\n read = channel.read(buffer);\n }\n checkIfClosed(read);// check for error\n\n // convert byte[] to hash string\n String rt = RandomByteAndHashCode.SHA1FromBytes(buffer.array());\n if(ProjectProperties.DEBUG_FULL){\n System.out.println(\"Read: \" + rt );\n }\n\n write(rt.getBytes()); // write hash string\n }", "public void write(byte[] buffer) { //이건 보내주는거\n try {\n mmOutStream.write(buffer);\n\n // Disabled: Share the sent message back to the main thread\n mHandler.obtainMessage(MESSAGE_WRITE, -1, -1, buffer).sendToTarget(); //MH주석풀엇음 //what arg1, arg2 obj\n\n } catch (IOException e) {\n Log.e(TAG, \"Exception during write\");\n }\n }", "public synchronized void pushData(byte[] buffer, int len) {\r\n // saveFile(buffer,len);\r\n int index = 0;\r\n mOutput.write(buffer, 0, len);\r\n byte[] src = mOutput.toByteArray();\r\n if (!foundStartCode) {\r\n index = KMPMatch.indexOf(src, frameHeader);\r\n if (index != -1) {\r\n //foundStartCode=true;\r\n Log.i(tag, \"found start code, index = \" + index);\r\n } else {\r\n Log.e(tag, \"cannot found startcode,data len =\" + mOutput.size());\r\n mOutput.reset();\r\n return;\r\n }\r\n }\r\n //Log.d(tag,\"dataSize = \" + src.length + \" index = \" + index);\r\n int leave = mOutput.size() - index;\r\n LogUtil.i(tag, \"leave: \" + (leave - 32));\r\n while (true) {\r\n if (leave > 32) //header size\r\n {\r\n System.arraycopy(src, index, frameheader, 0, 32);\r\n NArchive arIn = NArchive.createFromBuffer(frameheader, true);\r\n //\t\tbyte[] part =new byte[24];\r\n int mark = arIn.readInt();\r\n byte ch = arIn.readByte();\r\n byte codeType = arIn.readByte();\r\n byte resolution = arIn.readByte();\r\n byte vopType = arIn.readByte();\r\n if (vopType == AUDIO_FRAME) {\r\n Log.d(tag, \"codectype AUDIO_FRAME= \" + codeType);\r\n//\t\t\t\t\tAudioPlay.audioCodec = codeType;\r\n hasAudio = true;\r\n } else if (vopType == I_FRAME) {\r\n Log.d(tag, \"codectype I_FRAME = \" + codeType);\r\n getIFrame = true;\r\n }\r\n byte videMode = arIn.readByte();\r\n byte streamType = arIn.readByte();\r\n short rate = arIn.readShort();\r\n int dataSize = arIn.readInt();\r\n int sequence = arIn.readInt();\r\n int currenttime = arIn.readInt();\r\n long timestamp = arIn.readLong();\r\n LogUtil.i(tag, \"dataSize: \" + dataSize);\r\n if (leave - 32 >= dataSize) {\r\n { //video\r\n //Log.d(tag,\"push video data ,size = \" + (dataSize) + \" timestamp = \" + timestamp + \"sequence = \" + sequence + \" mark = \" + Integer.toHexString(mark));\r\n if (dataSize < 0) {\r\n Log.e(tag, \"video data exception,leave data = \" + leave);\r\n leave -= 32 + dataSize;\r\n break;\r\n }\r\n Log.d(tag, \"timestamp = \" + timestamp + \" sequence = \" + sequence + \" videoSize = \" + dataSize);\r\n if (getIFrame) {\r\n pushVideoData(src, index + 32, dataSize, timestamp);\r\n if (getVideoQueueSize() >= 2 && getAudioQueueSize() == 0) {\r\n hasAudio = false;\r\n needBuffering = false;\r\n Log.d(tag, \"no audio\");\r\n }\r\n Log.d(tag, \"timestamp diff= \" + (timestamp - lastAudioTime) + \" video time = \" + timestamp + \" AudioTime = \" + lastAudioTime);\r\n }\r\n }\r\n index += (32 + dataSize);\r\n leave -= (32 + dataSize);\r\n } else { //dataSize > leave-32\r\n Log.w(tag, \"data is not enough,need read more data...\");\r\n break;\r\n }\r\n } else {\r\n LogUtil.e(tag, \" leve 无效\");\r\n }\r\n break;\r\n }//end while\r\n if (leave > 0) {\r\n byte[] temp = new byte[leave];\r\n System.arraycopy(src, index, temp, 0, leave);\r\n mOutput.reset();\r\n mOutput.write(temp, 0, leave);\r\n //Log.d(tag,\"leave Size = \" + leave);\r\n } else {\r\n mOutput.reset();\r\n }\r\n }", "private void loadBuffer(ByteBuffer buffer) {\n byteBuffer = buffer.get();\n }", "public int size() { return buffer.length; }", "private void processBuffer(boolean flushBuffer, boolean endOfInput) throws IOException {\n decodeBuffer(flushBuffer || endOfInput);\n if (!endOfInput && !flushBuffer && cb.position() < PROCESS_THRESHOLD) {\n return;\n }\n cb.flip();\n found = SubstituteUtil.processSubstitute(cb, substitute, endOfInput, outputCharset, stream);\n // Write the tail bytes in the byte buffer if required\n if (bb.position() > 0 && (found || endOfInput)) {\n bb.flip();\n while (bb.hasRemaining()) {\n stream.write(bb.get());\n }\n bb.clear();\n }\n }", "protected void initBuffer() throws IOException {\n if (buf != null) {\r\n Util.disposeDirectByteBuffer(buf);\r\n }\r\n // this check is overestimation:\r\n int size = bufferNumLength << Main.log2DataLength;\r\n assert (size > 0);\r\n if (Main.debug) { System.out.println(\"Allocating direct buffer of \"+bufferNumLength+\" ints.\"); }\r\n buf = ByteBuffer.allocateDirect(size).order(Main.byteOrder);\r\n buf.clear();\r\n }", "public ByteBuffer getBuffer() {\n return _buf;\n }", "private static String readIt(InputStream stream) throws IOException {\n\t\tBufferedReader br = new BufferedReader(new InputStreamReader(stream));\n StringBuilder sb = new StringBuilder();\n String line;\n while ((line = br.readLine()) != null) {\n sb.append(line+\"\\n\");\n }\n br.close();\n return sb.toString();\n\t}", "int read(long pos, byte[] buf)throws IOException;", "protected OutputStream _createDataOutputWrapper(DataOutput out)\n/* */ {\n/* 1520 */ return new DataOutputAsStream(out);\n/* */ }", "@Override\n\tpublic void builder(ByteBuffer buffer) {\n\t\tsetV(buffer);\n\t\tsetO(buffer);\n\t\tsetT(buffer);\n\t\tsetLen(buffer);\n\t\tsetContents(buffer);\n\t\tsetTotalByteLength();\n\t}", "DataStreamApi getDataStreamApi();", "public Buffer getBuffer() {\n return buffer.getCopy();\n }", "@Override\r\n\tpublic void read(IByteBuffer source, long offset) {\n\r\n\t}", "protected void logByteBuffer(String msg, ByteBuffer inBuffer) {\n if(!logger.isDebugEnabled()) return;\n\n ByteBuffer bb = inBuffer.duplicate();\n\n byte[] byData = new byte[512];\n int len = Math.min(byData.length, bb.remaining());\n bb.get(byData, 0, len);\n\n logger.debug(\"{}. Content: '{}'\", msg, new String(byData, 0, len));\n }", "@Override\r\n public void write(byte[] buffer) throws IOException {\r\n inWrite1 = true;\r\n try {\r\n super.write(buffer);\r\n if (!inWrite3) {\r\n /*if (!Helper.NEW_IO_HANDLING \r\n && null != IoNotifier.fileNotifier) {\r\n IoNotifier.fileNotifier.notifyWrite(recId, buffer.length);\r\n } else {*/\r\n if (null != RecorderFrontend.instance) {\r\n RecorderFrontend.instance.writeIo(recId, \r\n null, buffer.length, StreamType.FILE);\r\n }\r\n //}\r\n }\r\n inWrite1 = false;\r\n } catch (IOException e) {\r\n inWrite1 = false;\r\n throw e;\r\n }\r\n }", "protected ByteBuffer getBuffer() {\n return buffer;\n }", "void write(byte[] buffer, int bufferOffset, int length) throws IOException;", "public BlockOutputStream(OutputStream out) {\n\t\t\t// always use a buffered stream, even though we know how\n\t\t\t// much bytes to write/read, since this is just faster for\n\t\t\t// some reason\n\t\t\tsuper(new BufferedOutputStream(out));\n\t\t}", "public BaseServerInputStream() {\n data = new ArrayDeque<IoBuffer>();\n marked = false;\n resetCache = null;\n }" ]
[ "0.6631441", "0.645146", "0.6338259", "0.627323", "0.6159326", "0.6120696", "0.61076605", "0.60465586", "0.5987739", "0.59674454", "0.59662986", "0.5953871", "0.5889592", "0.5876312", "0.5863563", "0.58572316", "0.58314234", "0.5804316", "0.5796376", "0.577608", "0.5775759", "0.5774807", "0.57717144", "0.57554144", "0.57497287", "0.5745097", "0.57440305", "0.5740779", "0.5738923", "0.5734081", "0.57242894", "0.5723918", "0.57158935", "0.5711859", "0.5681004", "0.5660707", "0.5655261", "0.56355566", "0.5616886", "0.559874", "0.5575932", "0.5531623", "0.5531442", "0.55269396", "0.55262107", "0.5511361", "0.54973644", "0.54921454", "0.5490724", "0.54808015", "0.5480582", "0.547444", "0.5470919", "0.546727", "0.5464344", "0.5463686", "0.54621947", "0.5433858", "0.54323024", "0.5431487", "0.5429467", "0.54228103", "0.54126936", "0.5397834", "0.5389023", "0.5381203", "0.5380341", "0.5375836", "0.53748405", "0.5372554", "0.53706867", "0.5369933", "0.5369364", "0.5366913", "0.53646153", "0.5364092", "0.5363123", "0.5354065", "0.53392154", "0.533736", "0.53344566", "0.53331673", "0.5330234", "0.53234", "0.53098774", "0.5302", "0.52997506", "0.5284631", "0.5284019", "0.5279784", "0.52741814", "0.52714354", "0.5263917", "0.5259636", "0.5257078", "0.52492994", "0.5247365", "0.5247083", "0.52455795", "0.52452993", "0.5244993" ]
0.0
-1
Inflate the layout for this fragment
@Override public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) { View view = inflater.inflate(R.layout.fragment_frm_home, container, false); nama_pengguna = view.findViewById(R.id.nama_pengguna); carouselView = (CarouselView) view.findViewById(R.id.carouselView); lihat_semua = view.findViewById(R.id.lihat_semua); kategoriBarang = view.findViewById(R.id.kategori_barang); ke_halaman_pencarian = view.findViewById(R.id.ke_halaman_pencarian); swipeRefreshLayout = (SwipeRefreshLayout) view.findViewById(R.id.swipe_refresh_layout); shimmer = view.findViewById(R.id.shimmer); session = new Session(getActivity()); api = RetrofitClient.createServiceWithAuth(Api.class, session.getToken()); nama_pengguna.setText(session.getUsername()); requestOptions = new RequestOptions().centerCrop(); kategoriBarang.setFocusable(false); swipeRefreshLayout.setOnRefreshListener(new SwipeRefreshLayout.OnRefreshListener() { @Override public void onRefresh() { tampilKategori(); // dataPoinVoucher(); new Handler().postDelayed(new Runnable() { @Override public void run() { swipeRefreshLayout.setRefreshing(false); } }, 1000); } }); handler.postDelayed(new Runnable() { @Override public void run() { shimmer.stopShimmer(); shimmer.hideShimmer(); shimmer.setVisibility(View.GONE); kategoriBarang.setVisibility(View.VISIBLE); } },1850); lihat_semua.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View v) { startActivity(new Intent(getContext(), act_category.class)); } }); ke_halaman_pencarian.setOnClickListener(new View.OnClickListener() { @Override public void onClick(View view) { startActivity(new Intent(getContext(), act_search_result.class)); } }); tampilKategori(); // checkUpdate(); getPenawaran = api.getPenawaran(); getPenawaran.enqueue(new Callback<BaseResponse<Penawaran>>() { @Override public void onResponse(Call<BaseResponse<Penawaran>> call, Response<BaseResponse<Penawaran>> response) { if (response.isSuccessful()) { gambar_penawaran.clear(); for (int i = 0; i < response.body().getData().size(); i++) { gambar_penawaran.add(response.body().getData().get(i).getGambar()); System.out.println(response.body().getData().get(i).getGambar()); } carouselView.setPageCount(response.body().getData().size()); } else { Toasty.error(getContext(), "Data Tidak Ditemukan", Toast.LENGTH_SHORT).show(); } } @Override public void onFailure(Call<BaseResponse<Penawaran>> call, Throwable t) { Toasty.error(getContext(), "Error" + t.getMessage(), Toast.LENGTH_SHORT).show(); } }); carouselView.setImageListener(imageListener); return view; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_main_allinfo, container, false);\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.wallpager_layout, null);\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_invit_friends, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_zhuye, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_posts, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n return inflater.inflate(R.layout.ilustration_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_sow_drug_cost_per_week, container, false);\n\n db = new DataBaseAdapter(getActivity());\n hc = new HelperClass();\n pop = new FeedSowsFragment();\n\n infltr = (LayoutInflater) getActivity().getSystemService(Context.LAYOUT_INFLATER_SERVICE);\n parent = (LinearLayout) v.findViewById(R.id.layout_for_add);\n tvTotalCost = (TextView) v.findViewById(R.id.totalCost);\n\n getData();\n setData();\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_stream_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_event, container, false);\n\n\n\n\n\n\n\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_feed, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.screen_select_list_student, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_overall, container, false);\n mNamesLayout = (LinearLayout) rootView.findViewById(R.id.fragment_overall_names_layout);\n mOverallView = (OverallView) rootView.findViewById(R.id.fragment_overall_view);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState)\n {\n\n\n view = inflater.inflate(R.layout.fragment_earning_fragmant, container, false);\n ini(view);\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n super.onCreateView(inflater, container, savedInstanceState);\n final View rootview = inflater.inflate(R.layout.activity_email_frag, container, false);\n ConfigInnerElements(rootview);\n return rootview;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n\t\t\tBundle savedInstanceState) {\n\t\trootView = inflater.inflate(R.layout.fragment_attack_armor, container, false);\r\n\r\n\t\tfindInterfaceElements();\r\n\t\taddRangeSelector();\r\n\t\tupdateHeadings();\r\n\t\tsetListeners();\r\n\r\n\t\tsetFromData();\r\n\r\n\t\treturn rootView;\r\n\t}", "@SuppressLint(\"InflateParams\")\r\n\t@Override\r\n\tpublic View initLayout(LayoutInflater inflater) {\n\t\tView view = inflater.inflate(R.layout.frag_customer_all, null);\r\n\t\treturn view;\r\n\t}", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_fore_cast, container, false);\r\n initView();\r\n mainLayout.setVisibility(View.GONE);\r\n apiInterface = RestClinet.getClient().create(ApiInterface.class);\r\n loadData();\r\n return view;\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_friend, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_detail, container, false);\n image = rootView.findViewById(R.id.fr_image);\n name = rootView.findViewById(R.id.fr_name);\n phoneNumber = rootView.findViewById(R.id.fr_phone_number);\n email = rootView.findViewById(R.id.fr_email);\n street = rootView.findViewById(R.id.fr_street);\n city = rootView.findViewById(R.id.fr_city);\n state = rootView.findViewById(R.id.fr_state);\n zipcode = rootView.findViewById(R.id.fr_zipcode);\n dBrith = rootView.findViewById(R.id.date_brith);\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_pm25, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_kkbox_playlist, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_feed_pager, container, false);\n\n// loadData();\n\n findViews(rootView);\n\n setViews();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n layout = (FrameLayout) inflater.inflate(R.layout.fragment_actualites, container, false);\n\n relLayout = (RelativeLayout) layout.findViewById(R.id.relLayoutActus);\n\n initListView();\n getXMLData();\n\n return layout;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.frag_post_prayer_video, container, false);\n setCustomDesign();\n setCustomClickListeners();\n return rootView;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\treturn inflater.inflate(R.layout.lf_em4305_fragment, container, false);\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_recordings, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view=inflater.inflate(R.layout.fragment_category, container, false);\n initView(view);\n bindRefreshListener();\n loadParams();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_cm_box_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_layout12, container, false);\n\n iniv();\n\n init();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_details, container, false);\n //return inflater.inflate(R.layout.fragment_details, container, false);\n getIntentValues();\n initViews();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_qiugouxiaoxi, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_mem_body_blood, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_coll_blank, container, false);\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_attendance_divide, container, false);\n\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.show_program_fragment, parent, false);\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, @Nullable ViewGroup container,\n @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.visualization_fragment, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n rootView = inflater.inflate(R.layout.fragment_category_details_page, container, false);\n initializeAll();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n final View v = inflater.inflate(R.layout.fragemnt_reserve, container, false);\n\n\n\n\n return v;\n }", "protected int getLayoutResId() {\n return R.layout.activity_fragment;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_quizs, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n role = getArguments().getInt(\"role\");\n rootview = inflater.inflate(R.layout.fragment_application, container, false);\n layout = rootview.findViewById(R.id.patentDetails);\n progressBar = rootview.findViewById(R.id.progressBar);\n try {\n run();\n } catch (IOException e) {\n e.printStackTrace();\n }\n return rootview;\n }", "@Override\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container,\n\t\t\tBundle savedInstanceState) {\n\t\tview = inflater.inflate(R.layout.fragment_zhu, null);\n\t\tinitView();\n\t\tinitData();\n\t\treturn view;\n\t}", "@Override\n\t\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState)\n\t\t{\n\t\t\tView rootView = inflater.inflate(R.layout.maimfragment, container, false);\n\t\t\treturn rootView;\n\t\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n // Inflate the layout for this fragment\n return inflater.inflate(R.layout.fragment__record__week, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(getLayoutId(), container, false);\n init(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_porishongkhan, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_dashboard, container, false);\n resultsRv = view.findViewById(R.id.db_results_rv);\n resultText = view.findViewById(R.id.db_search_empty);\n progressBar = view.findViewById(R.id.db_progressbar);\n lastVisitText = view.findViewById(R.id.db_last_visit);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_feedback, container, false);\n self = getActivity();\n initUI(view);\n initControlUI();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_service_summery, container, false);\n tvVoiceMS = v.findViewById(R.id.tvVoiceValue);\n tvDataMS = v.findViewById(R.id.tvdataValue);\n tvSMSMS = v.findViewById(R.id.tvSMSValue);\n tvVoiceFL = v.findViewById(R.id.tvVoiceFLValue);\n tvDataBS = v.findViewById(R.id.tvDataBRValue);\n tvTotal = v.findViewById(R.id.tvTotalAccountvalue);\n return v;\n }", "@Override\r\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\r\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_clan_rank_details, container, false);\r\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_star_wars_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View inflate = inflater.inflate(R.layout.fragment_lei, container, false);\n\n initView(inflate);\n initData();\n return inflate;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_quotation, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_wode_ragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n\n\n\n\n\n return inflater.inflate(R.layout.fragment_appoint_list, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n if (rootView == null) {\n rootView = inflater.inflate(R.layout.fragment_ip_info, container, false);\n initView();\n }\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_offer, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_rooms, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\n View view = inflater.inflate(R.layout.fragment_img_eva, container, false);\n\n getSendData();\n\n initView(view);\n\n initData();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_yzm, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_project_collection, container, false);\n ButterKnife.bind(this, view);\n fragment = this;\n initView();\n getCollectionType();\n // getCategoryList();\n initBroadcastReceiver();\n return view;\n }", "@Override\r\n\tpublic View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n\t\tmainLayout = inflater.inflate(R.layout.fragment_play, container, false);\r\n\t\treturn mainLayout;\r\n\t}", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_invite_request, container, false);\n initialiseVariables();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n getLocationPermission();\n return inflater.inflate(R.layout.centrum_fragment, container, false);\n\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View rootView = inflater.inflate(R.layout.fragment_habit_type_details, container, false);\n\n habitTitle = rootView.findViewById(R.id.textViewTitle);\n habitReason = rootView.findViewById(R.id.textViewReason);\n habitStartDate = rootView.findViewById(R.id.textViewStartDate);\n habitWeeklyPlan = rootView.findViewById(R.id.textViewWeeklyPlan);\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View v = inflater.inflate(R.layout.fragment_information_friends4, container, false);\n\n if (getArguments() != null) {\n FriendsID = getArguments().getString(\"keyFriends\");\n }\n\n return v;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view=inflater.inflate(R.layout.fragment_bus_inquiry, container, false);\n initView();\n initData();\n initDialog();\n getDataFromNet();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hotel, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_post_details, container, false);\n\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_weather, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_srgl, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_ground_detail_frgment, container, false);\n init();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_book_appointment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_wheretogo, container, false);\n ids();\n setup();\n click();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n binding = DataBindingUtil\n .inflate(inflater, R.layout.fragment_learning_leaders, container, false);\n init();\n\n return rootView;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_end_game_tab, container, false);\n\n setupWidgets();\n setupTextFields(view);\n setupSpinners(view);\n\n // Inflate the layout for this fragment\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.memoir_fragment, container, false);\n\n getUserIdFromSharedPref();\n configureUI(view);\n configureSortSpinner();\n configureFilterSpinner();\n\n networkConnection = new NetworkConnection();\n new GetAllMemoirTask().execute();\n\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_jadwal, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n view = inflater.inflate(R.layout.fragment_delivery_detail, container, false);\n initialise();\n\n\n\n return view;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_4, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_all_product, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_group_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_downloadables, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment06_7, container, false);\n initView(view);\n setLegend();\n setXAxis();\n setYAxis();\n setData();\n return view;\n }", "@Override\n public View onCreateView(@NonNull LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.movie_list_fragment, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_like, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_hall, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_moviespage, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_unit_main, container, false);\n TextView mTxvBusinessAassistant = (TextView) view.findViewById(R.id.txv_business_assistant);\n TextView mTxvCardINformation = (TextView) view.findViewById(R.id.txv_card_information);\n RelativeLayout mRelOfficialWebsite = (RelativeLayout) view.findViewById(R.id.rel_official_website);\n RelativeLayout mRelPictureAblum = (RelativeLayout) view.findViewById(R.id.rel_picture_album);\n TextView mTxvQrCodeCard = (TextView) view.findViewById(R.id.txv_qr_code_card);\n TextView mTxvShareCard = (TextView) view.findViewById(R.id.txv_share_card);\n mTxvBusinessAassistant.setOnClickListener(this.mOnClickListener);\n mTxvCardINformation.setOnClickListener(this.mOnClickListener);\n mRelOfficialWebsite.setOnClickListener(this.mOnClickListener);\n mRelPictureAblum.setOnClickListener(this.mOnClickListener);\n mTxvQrCodeCard.setOnClickListener(this.mOnClickListener);\n mTxvShareCard.setOnClickListener(this.mOnClickListener);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_overview, container, false);\n\n initOverviewComponents(view);\n registerListeners();\n initTagListener();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_s, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_bahan_ajar, container, false);\n initView(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container, Bundle savedInstanceState) {\n root = (ViewGroup) inflater.inflate(R.layout.money_main, container, false);\n context = getActivity();\n initHeaderView(root);\n initView(root);\n\n getDate();\n initEvetn();\n return root;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_event_details, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup parent, Bundle savedInstanceState) {\n // Defines the xml file for the fragment\n return inflater.inflate(R.layout.fragment_historical_event, parent, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_video, container, false);\n unbinder = ButterKnife.bind(this, view);\n initView();\n initData();\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n\n v= inflater.inflate(R.layout.fragment_post_contacts, container, false);\n this.mapping(v);\n return v;\n }", "@Nullable\n @Override\n public View onCreateView(LayoutInflater inflater, @Nullable ViewGroup container, @Nullable Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_measures, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n View view = inflater.inflate(R.layout.fragment_feed, container, false);\n findViews(view);\n return view;\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_surah_list, container, false);\n }", "@Override\n public View onCreateView(LayoutInflater inflater, ViewGroup container,\n Bundle savedInstanceState) {\n return inflater.inflate(R.layout.fragment_data_binded, container, false);\n }" ]
[ "0.6740675", "0.6725193", "0.67224836", "0.6699259", "0.6691596", "0.668896", "0.6687658", "0.66861755", "0.667755", "0.66756433", "0.6667425", "0.66667783", "0.6665166", "0.66614723", "0.66549766", "0.665031", "0.6643759", "0.6639389", "0.66378653", "0.66345453", "0.6626348", "0.66202056", "0.66176945", "0.66094035", "0.65976113", "0.65937936", "0.6585841", "0.6585124", "0.65741223", "0.65721804", "0.65698904", "0.65695107", "0.6569451", "0.6568099", "0.6565633", "0.6554688", "0.65533894", "0.65447044", "0.65432465", "0.6542017", "0.65385425", "0.6537571", "0.65369105", "0.6535379", "0.6533447", "0.6533258", "0.65316767", "0.6529574", "0.6528449", "0.65262675", "0.6525467", "0.6525181", "0.6524235", "0.6523963", "0.65187466", "0.65138274", "0.65137535", "0.6513218", "0.6513202", "0.65115535", "0.651113", "0.6510943", "0.6510124", "0.65094703", "0.65082514", "0.65038425", "0.65023196", "0.6501983", "0.65014684", "0.64982104", "0.64945936", "0.6492533", "0.6491023", "0.6488248", "0.64879525", "0.6487852", "0.6487744", "0.64873713", "0.6487171", "0.64851", "0.6485003", "0.6483167", "0.6482433", "0.64824027", "0.6481711", "0.6480902", "0.64779234", "0.64767206", "0.6476515", "0.6475657", "0.64747864", "0.64715266", "0.64714354", "0.64711314", "0.6470619", "0.6468112", "0.6466466", "0.64631015", "0.646268", "0.6462456", "0.64620507" ]
0.0
-1
This method was called from MapsActivity class. This method checks weather there was a preious record of random locations associated with the requested lat and lng, if the record was available then it checks weather the available record has more fake locations count or less and accordingly it returns the fake locations or generaates new fake locations
public String generateRandomLoc(double curLon, double curLat, double num, double r, Context mapsContext) { myDB = new DBHelper(mapsContext); boolean locationsFromDB = false; Log.d("Detailed analysis","finding data available in db or not"); //Method to find weather there was a previous record of fake locations. locationsFromDB = getLocationsFrom(curLat, curLon, num); r = r * 1609.34; //Condition if there was no previous record if(!locationsFromDB) { //Method to generate fake locations locationValues = findRandomLocations(curLat, curLon, num, r ); Log.d("Detailed Analysis","Going to save location values in sqllite db"); //calling insertLocations in DBHelper class to insert the generated fake locations into db for further use myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,locationValues, condChoice ,false); Cursor rs = myDB.getData(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0, num); rs.moveToFirst(); number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num))); Log.d("Detailed Analysis","Recent number value from !locationsFromDB: "+ number); Log.d("Detailed analysis","Location Values "+locationValues); } else{ locationValues = locationValues+""; Log.d("Detailed Analysis","Going to save updated location values in sqllite db"); double num1; String values = locationValues; String valuesArray[] = values.split(":"); num1 = valuesArray.length; myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num1,locationValues, condChoice, false); Log.d("Detailed analysis","Location Values "+locationValues); } //Condition to check if the requested fake locations count was greater than the previous request if(num > number){ Log.d("Detailed Analysis: ","num: "+num +" number: "+ number); Log.d("Detailed Analysis","Number of fake locations requested this time were higher than previous request"); Log.d("Detailed Analysis","Generating new random locations"); String temp = locationValues; locationValues = ""; //generating new fake locations for the extra count temp = temp + findRandomLocations(curLat, curLon, num - number, r); Log.d("Detailed Analysis","Going to save updated location values in sqllite db after adding new random locations"); //updating the previous record with new fake locations count myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,temp, condChoice, true); locationValues = temp; } //Condition to check if the requested fake locations count was less than the previous request if(num < number){ Log.d("Detailed Analysis: ","num: "+num +" number: "+ number); Log.d("Detailed Analysis","Number of fake locations requested this time were lesser than previous request"); String values = locationValues; String valuesArray[] = values.split(":"); String temp = ""; //trimmig the fake locations count to the requested number for(int i = 0; i < num; i++) { String pointsArray[] = valuesArray[i].split(","); temp = temp + Double.parseDouble(pointsArray[0]) + "," + Double.parseDouble(pointsArray[1]) + ":" + "" ; } locationValues = temp; Log.d("Detailed Analysis","Location values when reduced fake locations count to "+num + ": "+ locationValues); } Log.d("Detailed Analysis: ", "number before returning locations: "+ number); return locationValues; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public boolean getLocationsFrom(double curLat, double curLon, Double num) {\r\n boolean locationsFromDB = true;\r\n String previousCurLat, previousCurLon;\r\n Log.d(\"Detailed analysis\",\"getting data from db, calling getdata function\");\r\n Cursor rs1 = myDB.getData(curLat, curLon, num);\r\n //In this condition if data not found locationsFromDB is set to false and then returned\r\n if (rs1.getCount() <= 0){\r\n System.out.println(rs1.getCount());\r\n locationsFromDB = false;\r\n Log.d(\"Detailed analysis\",\"Data not found\");\r\n }\r\n //In this condition if data is found need to do the further action of finding the user has moved or not and calculating the direction and distance if user has moved\r\n else {\r\n Log.d(\"Detailed analysis\", \"data found\");\r\n Double[] latArray = new Double[rs1.getCount()];\r\n Double[] lonArray = new Double[rs1.getCount()];\r\n int z = 0;\r\n double distanceBtwLocations = 0;\r\n double finalLat = 0.0;\r\n double finalLon = 0.0;\r\n while (rs1.moveToNext()) {\r\n latArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lat)));\r\n lonArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lon)));\r\n Log.d(\"Detailed Analysis\", latArray[z] +\", \" + lonArray[z] );\r\n double tempDistance = findDistanceBetweenPoints(latArray[z], lonArray[z], Math.round(curLat * 10000.0) / 10000.0, Math.round(curLon * 10000.0) / 10000.0);\r\n System.out.println(tempDistance + \" : tempDistance\");\r\n if (distanceBtwLocations < tempDistance) {\r\n finalLat = latArray[z];\r\n finalLon = lonArray[z];\r\n distanceBtwLocations = tempDistance;\r\n System.out.println(distanceBtwLocations + \" : distanceBtwLocations\");\r\n }\r\n z++;\r\n }\r\n if (distanceBtwLocations < 100 * 1606.34) {\r\n Log.d(\"Detailed Analysis\", \"Distance is not greater than 100 miles\");\r\n previousCurLat = String.valueOf(finalLat);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lat));\r\n previousCurLon = String.valueOf(finalLon);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lon));\r\n Cursor rs = myDB.getData(finalLat, finalLon, num);\r\n rs.moveToFirst();\r\n// condChoice = Integer.parseInt(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_condChoice)));\r\n number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num)));\r\n Log.d(\"Detailed Analysis\", \"number while data found: \" + number);\r\n Log.d(\"Detailed Analysis\", \"Recent number value from getLocationsFrom: \" + number);\r\n Log.d(\"Detailed analysis\", \"Lattittude and Longitude points\" + \" \" + Double.parseDouble(previousCurLat) + \",\" + Double.parseDouble(previousCurLon) + \":\" + Math.round(curLat * 10000.0) / 10000.0 + \",\" + Math.round(curLon * 10000.0) / 10000.0);\r\n //if user has not moved then locationsFromDB is set to true and then returned\r\n if (Double.parseDouble(previousCurLat) == Math.round(curLat * 10000.0) / 10000.0 && Double.parseDouble(previousCurLon) == Math.round(curLon * 10000.0) / 10000.0) {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are same\");\r\n rs.moveToFirst();\r\n locationValues = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n locationsFromDB = true;\r\n } else {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are not same\");\r\n float distance = 0;\r\n LatLng movedPoints;\r\n Log.d(\"Detailed analysis\", \"finding distance between lattitudes and longitudes\");\r\n distance = findDistanceBetweenPoints(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon), curLat, curLon);\r\n Log.d(\"Detailed Analysis\", \"distance in meters\" + \" \" + distance);\r\n direction = SphericalUtil.computeHeading(new LatLng(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon)), new LatLng(curLat, curLon));\r\n Log.d(\"Detailed Analysis\", \"direction in degrees\" + \" \" + direction);\r\n String values = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n String valuesArray[] = values.split(\":\");\r\n Log.d(\"Detailed analysis\", \"finding random locations after moving a bit\");\r\n for (int i = 0; i < valuesArray.length; i++) {\r\n String pointsArray[] = valuesArray[i].split(\",\");\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes points\" + pointsArray[0] + \" \" + pointsArray[1]);\r\n movedPoints = findMovedPoints(Double.parseDouble(pointsArray[0]), Double.parseDouble(pointsArray[1]), distance, direction);\r\n Log.d(\"Detailed Analysis\", \"latitude and longitude points after moving\" + \" \" + movedPoints);\r\n locationValues = findRandomLocations(movedPoints.latitude, movedPoints.longitude, 1, distance + 1);\r\n }\r\n }\r\n }\r\n else{\r\n locationValues = findRandomLocations(curLat, curLon, num, 30);\r\n }\r\n locationsFromDB = true;\r\n }\r\n return locationsFromDB;\r\n }", "private void locate() {\n possibleLocations[0][0] = false;\n possibleLocations[0][1] = false;\n possibleLocations[1][0] = false;\n do {\n location.randomGenerate();\n } while (!possibleLocations[location.y][location.x]);\n }", "private void getDeviceLocation(){\n Log.d(TAG,\"get device location currently\");\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n try{\n if(mLocationPermissionGranted){\n @SuppressLint(\"MissingPermission\") final Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG,\"onComplete: found Location\");\n mLastKnownLocation= (Location) task.getResult();\n moveCamera(new LatLng(mLastKnownLocation.getLatitude(),mLastKnownLocation.getLongitude()),DEFAULT_ZOOM);\n\n Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude(), 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n LatLng latLng = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n\n address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n city = addresses.get(0).getLocality();\n state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName(); // Only\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(address);\n mMap.clear();//Not sure\n mMap.addMarker(markerOptions);\n Marker here = mMap.addMarker(markerOptions.title(address + \", \" + city + \", \" + state + \", \" + country\n + \", \" + postalCode + \", \" + knownName));\n here.showInfoWindow();\n } catch (IOException e) {\n e.printStackTrace();\n } }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(MapsActivity.this, \"unable to get current location\",Toast.LENGTH_SHORT).show();\n getLocationPermission();\n }\n }\n });\n\n }\n }catch (SecurityException e){\n Log.e(TAG,\"getDeviceLocation: SecurityException: \" + e.getMessage() );\n }\n\n\n\n }", "private List<Restaurant> getNearRestaurants() {\n\t\tLog.v(LOG_TAG, \"Getting near restaurants offline by the last known position \");\n\t\tList<Restaurant> restaurantsList = new ArrayList<Restaurant>();\n\t\tif (lastPositionKnown == null) {\n\t\t\tLog.e(LOG_TAG, \"Error trying to get the list of near restaurants when the user's position is null\");\n\t\t\treturn restaurantsList;\n\t\t}\n\t\t\n\t\tLog.v(LOG_TAG, \"My position is \" + lastPositionKnown.latitude + \" ,\" + lastPositionKnown.longitude);\n\n\t\tLocation myLocation = new Location(\"\");\n\t\tmyLocation.setLatitude(lastPositionKnown.latitude);\n\t\tmyLocation.setLongitude(lastPositionKnown.longitude);\n\n\t\tSet<String> ids = restaurants.keySet();\n\t\tfor (String id: ids) {\n\t\t\tRestaurant restaurant = restaurants.get(id);\n\t\t\tLatLng restaurantPosition = restaurant.getPosition();\n\t\t\tLocation restaurantLocation = new Location(\"\");\n\t\t\t\n\t\t\trestaurantLocation.setLatitude(restaurantPosition.latitude);\n\t\t\trestaurantLocation.setLongitude(restaurantPosition.longitude);\n\t\t\t\n\t\t\tint distance = (int)restaurantLocation.distanceTo(myLocation);\n\t\t\tLog.v(LOG_TAG, \"The distance to my location is \" + distance + \" \" + restaurant.getName());\n\t\t\tif (distance <= DEFAULT_RANGE ) {\n\t\t\t\trestaurantsList.add(restaurant);\n\t\t\t}\n\t\t}\n\n\t\treturn restaurantsList;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Storage.map = googleMap;\n if(checkPermissions()){\n if (ContextCompat.checkSelfPermission(this,\n Manifest.permission. ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n if (Storage.map != null) {\n Storage.map.setMyLocationEnabled(true);\n }\n }\n }\n\n LocationManager locationManager = (LocationManager)\n getSystemService(Context.LOCATION_SERVICE);\n Criteria criteria = new Criteria();\n android.location.Location loc = locationManager.getLastKnownLocation(locationManager\n .getBestProvider(criteria, false));\n if(loc != null){\n LatLng actualLoc = new LatLng(loc.getLatitude(),loc.getLongitude());\n Storage.addToArray(actualLoc);\n }\n else{\n Storage.path();\n }\n /* Storage.addToArray(santaCruz);\n Storage.addToArray(new LatLng(40,-120));\n if(l!=null) {\n Log.e(\"Real\", \" found location\" );\n Storage.addToArray(new LatLng(l.getLatitude(), l.getLongitude()));\n\n }*/\n // Add a marker in Santa Cruz and move the camera\n LatLng santaCruz = new LatLng(36.997213, -122.056893);\n Storage.map.addMarker(new MarkerOptions().position(santaCruz).title(\"Marker in Santa Cruz\"));\n Storage.map.moveCamera(CameraUpdateFactory.newLatLngZoom(santaCruz, 14.5f));\n Graphics.startDraw(Storage.map);\n Storage.recursiveBackgroundCheck = new RecursiveBackgroundCheck(locationManager,this);\n if(loc != null) {\n Storage.recursiveBackgroundCheck.execute(locationManager);\n }\n }", "private void getDeviceLocation( ) {\n\n if (searchLocationMarker != null) {\n searchLocationMarker.remove();\n }\n\n mFusedLocationProviderClient =\n LocationServices.getFusedLocationProviderClient(this);\n //Task locationResult = mFusedLocationProviderClient.getLastLocation();\n try {\n if (mLocationPermissionGranted) {\n Task locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n System.out.println(\"Current location retrieved successfully!\");\n mLastKnownLocation = (Location) task.getResult(); // location?\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n searchLocationMarker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()))\n .title(\"Current Location\")\n .icon(BitmapDescriptorFactory.fromBitmap(\n getBitmapFromVectorDrawable(\n MainActivity.this, R.drawable.ic_current_location_marker))));\n getNearbyStations(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n searchLocationMarker = mMap.addMarker(new MarkerOptions()\n .position(mDefaultLocation)\n .title(\"Current Location\")\n .icon(BitmapDescriptorFactory.fromBitmap(\n getBitmapFromVectorDrawable(\n MainActivity.this, R.drawable.ic_current_location_marker))));\n }\n }\n });\n }\n } catch(SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n\n }", "private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }", "@Override\n public void onLocationChanged(Location location) {\n\n if(!locationFound){\n while(mlongitude == 0.0 && mlatitude == 0.0) {\n\n mlatitude = location.getLatitude();\n mlongitude = location.getLongitude();\n }\n\n locationFound = true;\n }\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n mFusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(this);\n\n if (ContextCompat.checkSelfPermission(this,Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED) {\n buildGoogleApiClient();\n Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n Location currentLocation = (Location) task.getResult();\n //CameraUpdateFactory.newLatLngZoom(\n LatLng check = new LatLng(currentLocation.getLatitude(), currentLocation.getLongitude());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(check,DEFAULT_ZOOM));\n\n } else {\n Toast.makeText(MapsActivity2.this, \"unable to get current location\", Toast.LENGTH_SHORT).show();\n }\n }\n });\n Toast.makeText(MapsActivity2.this,\"Getting Restaurants\",Toast.LENGTH_LONG).show();\n mMap.setMyLocationEnabled(true);\n }\n else{\n buildGoogleApiClient();\n mMap.setMyLocationEnabled(true);\n }\n }", "private void initLocationData() {\n\n // init google client and request for fused location provider\n fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);\n\n locationRequest = new LocationRequest()\n //.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) // GPS quality location points\n .setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY) // optimized for battery\n .setInterval(20000) // at least once every 20 seconds\n .setFastestInterval(10000); // at most once every 10 seconds\n\n locationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Point userPoint;\n if (locationResult != null) {\n // update user location\n Location lastLocation = locationResult.getLastLocation();\n userPoint = new Point(lastLocation.getLatitude(), lastLocation.getLongitude());\n // cache location\n PreferencesCache.setLastLatitude(lastLocation.getLatitude());\n PreferencesCache.setLastLongitude(lastLocation.getLongitude());\n } else {\n // get cached data\n userPoint = new Point(PreferencesCache.getLastLatitude(), PreferencesCache.getLastLongitude());\n }\n\n navigator.updateUserLocation(userPoint);\n }\n };\n }", "private Location generateRandomStartLocation() {\n\t\tif (!atLeastOneNonWallLocation()) {\n\t\t\tthrow new IllegalStateException(\n\t\t\t\t\t\"There is no free tile available for the player to be placed\");\n\t\t}\n\n\t\twhile (true) {\n\t\t\t// Generate a random location\n\t\t\tfinal Random random = new Random();\n\t\t\tfinal int randomRow = random.nextInt(this.map.getMapHeight());\n\t\t\tfinal int randomCol = random.nextInt(this.map.getMapWidth());\n\n\t\t\tfinal Location location = new Location(randomCol, randomRow);\n\n\t\t\tif (this.map.getMapCell(location).isWalkable()\n\t\t\t\t\t&& !otherPlayerOnTile(location, -1)) {\n\t\t\t\t// If it's not a wall then we can put them there\n\t\t\t\treturn location;\n\t\t\t}\n\t\t}\n\t}", "private void getLastKnownLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n Task<Location> task = fusedLocationProviderClient.getLastLocation();\n task.addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n lastKnownLocation = location;\n lastKnownLatLng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n riderMarker = mMap.addMarker(new MarkerOptions().position(lastKnownLatLng).title(\"Your Location\")); // adding marker to rider location\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lastKnownLatLng, 18)); // focusing on rider location\n if (ActivityCompat.checkSelfPermission(RiderMapsActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(RiderMapsActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n riderInfoHashMap.put(NodeNames.RIDERID,currentUserId);\n riderInfoHashMap.put(NodeNames.RIDERLATITUDE,lastKnownLocation.getLatitude());\n riderInfoHashMap.put(NodeNames.RIDERLONGITUDE,lastKnownLocation.getLongitude());\n\n nodeReference = NodeNames.RIDERS + \"/\" + currentUserId;\n referenceHashMap = new HashMap<>();\n referenceHashMap.put(nodeReference,riderInfoHashMap);\n databaseReference.updateChildren(referenceHashMap, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n if(error==null){\n Toast.makeText(RiderMapsActivity.this,\"Request your Cab ride\",Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(RiderMapsActivity.this,\"error: \" + error.getMessage(),Toast.LENGTH_LONG).show();\n }\n }\n });\n\n // searching for nearby available driver\n\n searchCab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(requestCancelled){\n rideEndedByRider(); // rider cancelled ride\n }else {\n requestCancelled = true;\n GeoFire geoFire = new GeoFire(riderRequestsDatabaseReference);\n geoFire.setLocation(currentUserId, new GeoLocation(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude()));\n\n progressDialog.setTitle(\"Getting Your Driver\");\n progressDialog.setMessage(\"Please wait while we are looking for nearby drivers\");\n progressDialog.show();\n\n getClosestDriver();\n }\n }\n });\n }\n }\n });\n }", "public void generateMarkers(){\n /**\n * State verification\n */\n LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n final double currentlongitude = location.getLongitude();\n final double currentlatitude = location.getLatitude();\n\n final String usersCurrentState = getCurrentState(currentlatitude,currentlongitude);\n System.out.println(\"CURRENT STATE IS: \" + usersCurrentState);\n\n\n FirebaseDatabase.getInstance().getReference().child(\"Danger Zone Markers\")\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n int numberOfMarkers = 0;\n int displayedMarkers = 0;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n numberOfMarkers++;\n\n String zone_name = snapshot.child(\"zone_name\").getValue().toString();\n String risk_level = snapshot.child(\"risk_level\").getValue().toString();\n String lat = snapshot.child(\"lat\").getValue().toString();\n String longitude = snapshot.child(\"long\").getValue().toString();\n String description = snapshot.child(\"description\").getValue().toString();\n String time = snapshot.child(\"time\").getValue().toString();\n\n String dangerZoneState = getCurrentState(Double.valueOf(lat),Double.valueOf(longitude));\n System.out.println(\"DANGER ZONE STATE: \" + dangerZoneState);\n if(dangerZoneState.equals(usersCurrentState)) {\n displayedMarkers++;\n\n placeMarker(zone_name,risk_level,lat,longitude,description,time);\n\n\n }\n //placeMarker(zone_name,risk_level,lat,longitude,description);\n System.out.println(lat);\n }\n System.out.println(\"NUMBER OF TOTAL MARKERS: \" + numberOfMarkers);\n System.out.println(\"NUMBER OF DISPLAYED MARKERS: \" + displayedMarkers);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "public Location getRandomLocation(ArenaWorld world, ArenaAnimal animal, List<Location> locations) {\n int HIGH = locations.size();\n int randomIndex = 0;\n Random randomize = new Random();\n if (HIGH > 0) {\n randomIndex = randomize.nextInt(HIGH);\n return locations.get(randomIndex);\n }\n return animal.getLocation();\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "public void randomHit() throws LocationHitException{\r\n\t\t// Random ran = new Random();\r\n\t\tint x = randomX();\r\n\t\tint y = randomY();\r\n\r\n\t\tboolean newHit = false;\r\n\t\twhile (!newHit) {\r\n\t\t\tif (Player.userGrid[x][y] == 2) {\r\n\t\t\t\tx = ran.nextInt(9);\r\n\t\t\t\ty = ran.nextInt(11);\r\n\t\t\t} else\r\n\t\t\t\tnewHit = true;\r\n\t\t}\r\n\t\tint hitCoord[] = { x, y };\r\n\t\tsetCoords(hitCoord);\r\n\t\tString coordx = Integer.toString(x);\r\n\t\tString coordy = Integer.toString(y);\r\n\t\tif (Player.userGrid[x][y] == 1) {\r\n\t\t\t// change the grid value from 1 to 2 to signify hit\r\n\t\t\tPlayer.userGrid[x][y] = 2;\r\n\t\t\t\r\n\t\t\tif(!time1) {\r\n\t\t\t\ttimea=java.lang.System.currentTimeMillis();\r\n\t\t\t\ttime1=!time1;\r\n\t\t\t}else if(!time2) {\r\n\t\t\t\ttimeb=java.lang.System.currentTimeMillis();\r\n\t\t\t\t\ttime2=!time2;\r\n\t\t\t}else {\r\n\t\t\t\tdouble t=timeb-timea;\r\n\t\t\t\tif(t<3000) {\r\n\t\t\t\t\tsetScore(20);\r\n\t\t\t\t}\r\n\t\t\t\ttime1=false;\r\n\t\t\t\ttime2=false;\r\n\t\t\t\ttimea=0;\r\n\t\t\t\ttimeb=0;\r\n\t\t\t\t\r\n\t\t\t}//if time between consecutive hit is less than 3 seconds ,then bonus score\r\n\t\t\tsetScore(10);\r\n\t\t\tPlayer.coordinatesHit.add(coordx + \",\" + coordy);\r\n\t\t\tsetReply(\"It's a Hit!!!!!\");\r\n\r\n\t\t} else if (Player.userGrid[x][y] == 0) {\r\n\t\t\tPlayer.userGrid[x][y] = 3;\r\n\t\t\tsetScore(-1);\r\n\t\t\tsetReply(\"It's a miss!!!!!\");\r\n\t\t} else if (Player.userGrid[x][y] == 2 || Player.userGrid[x][y] == 3) {\r\n\t\t\tsetReply(\"The location has been hit earlier\");\r\n\t\t\t //throw new LocationHitException(\"The location has been hit earlier\");\r\n\t\t}\r\n\t}", "private android.location.Location getMockLocation() {\n android.location.Location newLocation = new android.location.Location(\"flp\");\n newLocation.setLatitude(110);\n newLocation.setLongitude(150);\n newLocation.setAccuracy(3.0f);\n newLocation.setTime(System.currentTimeMillis());\n newLocation.setElapsedRealtimeNanos(SystemClock.elapsedRealtimeNanos());\n return newLocation;\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n FusedLocationProviderClient mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "public void testInsertReadProvider() {\n ResultDBHelper dbHelper = new ResultDBHelper(mContext);\n SQLiteDatabase db = dbHelper.getWritableDatabase();\n\n ContentValues values = TestDB.getLocationContentValues();\n\n Uri locationUri = mContext.getContentResolver().insert(ResultContract.LocationEntry.CONTENT_URI, values);\n long locationRowId = ContentUris.parseId(locationUri);\n\n // Verify we got a row back.\n assertTrue(locationRowId != -1);\n Log.d(LOG_TAG, \"New row id: \" + locationRowId);\n\n // Data's inserted. IN THEORY. Now pull some out to stare at it and verify it made\n // the round trip.\n\n // A cursor is your primary interface to the query results.\n Cursor cursor = mContext.getContentResolver().query(\n ResultContract.LocationEntry.buildLocationUri(locationRowId),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(values, cursor);\n\n cursor.close();\n\n ContentValues resultValues = TestDB.getResultContentValues(locationRowId);\n Uri insertUri = mContext.getContentResolver().insert(ResultContract.ResultEntry.CONTENT_URI, resultValues);\n\n // Now see if we can successfully query if we include the row id\n Cursor resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.CONTENT_URI, // Table to Query\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n // For testing joins\n resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.buildResultLocation(TEST_LATITUDE, TEST_LONGITUDE),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n // For testing joins\n resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.buildResultLocationWithStartDate(TEST_LATITUDE, TEST_LONGITUDE, TEST_DATE),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n // For testing joins\n resultCursor = mContext.getContentResolver().query(\n ResultContract.ResultEntry.buildResultLocationWithDate(TEST_LATITUDE, TEST_LONGITUDE, TEST_DATE),\n null, // leaving \"columns\" null just returns all the columns.\n null, // cols for \"where\" clause\n null, // values for \"where\" clause\n null // sort order\n );\n\n TestDB.validateCursor(resultValues, resultCursor);\n\n resultCursor.close();\n\n dbHelper.close();\n }", "private void locationRequests(){\n mFusedClient = LocationServices.getFusedLocationProviderClient(this);\n mLocationCallback = new LocationCallback(){\n @Override\n public void onLocationResult(LocationResult locationResult){\n List<Location> locationList = locationResult.getLocations();\n if(locationList.size() > 0){\n Location location = locationList.get(locationList.size() - 1);\n Log.i(TAG, \"Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n mLatitude = String.valueOf(location.getLatitude());\n mLongitude = String.valueOf(location.getLongitude());\n }\n }\n };\n mLocationRequest = new LocationRequest();\n mLocationRequest.setInterval(UPDATE_INTERVAL_IN_MILLISECONDS);\n mLocationRequest.setFastestInterval(FASTEST_UPDATE_INTERVAL_IN_MILLISECONDS);\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n if(Build.VERSION.SDK_INT >= Build.VERSION_CODES.M){\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n == PackageManager.PERMISSION_GRANTED) {\n mFusedClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n } else {\n getLocation();\n }\n } else {\n mFusedClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }\n }", "private void getLocation() {\n LocationRequest mLocationRequestHighAccuracy = new LocationRequest();\n mLocationRequestHighAccuracy.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequestHighAccuracy.setInterval(UPDATE_INTERVAL);\n mLocationRequestHighAccuracy.setFastestInterval(FASTEST_INTERVAL);\n\n\n // new Google API SDK v11 uses getFusedLocationProviderClient(this)\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"getLocation: stopping the location service.\");\n stopSelf();\n return;\n }\n Log.d(TAG, \"getLocation: getting location information.\");\n mFusedLocationClient.requestLocationUpdates(mLocationRequestHighAccuracy, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n Log.d(TAG, \"onLocationResult: got location result.\");\n Location location = locationResult.getLastLocation();\n if (location != null) {\n GeoPoint geoPoint = new GeoPoint(location.getLatitude(), location.getLongitude());\n userInfoDoc.get().addOnCompleteListener(task -> {\n Boolean av = (Boolean) task.getResult().get(\"Availability\");\n saveUserLocation(geoPoint , av);\n });\n saveDistance(geoPoint);\n\n }\n }\n },\n Looper.myLooper()); // Looper.myLooper tells this to repeat forever until thread is destroyed\n }", "private void searchForLocation() {\n foundLocation = false;\n FusedLocationProviderClient mFusedLocationProviderClient = LocationServices\n .getFusedLocationProviderClient(getActivity());\n //Ignore the red line - we check for permissions before this function is called\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n Task<Location> lastLocation = mFusedLocationProviderClient.getLastLocation();\n lastLocation.addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n Location location = task.getResult();\n if (location != null) {\n LatLng currentLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(currentLatLng,\n DEFAULT_ZOOM);\n googleMap.moveCamera(update);\n foundLocation = true;\n }\n }\n }\n });\n }", "private RandomLocationGen() {}", "@Test\n public void testGetAllLocations() {\n\n Location loc1 = new Location();\n loc1.setLocationName(\"The Basement\");\n loc1.setDescription(\"Underground\");\n loc1.setAddress(\"123 nunya Ave\");\n loc1.setCity(\"Cityville USA\");\n loc1.setLatitude(123.456);\n loc1.setLongitude(123.456);\n locDao.addLocation(loc1);\n\n Location loc2 = new Location();\n loc2.setLocationName(\"The Attic\");\n loc2.setDescription(\"Above ground\");\n loc2.setAddress(\"123 nunya Ave\");\n loc2.setCity(\"HamletTown USA\");\n loc2.setLatitude(654.321);\n loc2.setLongitude(654.321);\n locDao.addLocation(loc2);\n \n List<Location> locations = locDao.getAllLocations();\n \n assertEquals(2, locations.size());\n }", "public void getRandom(){\n RequestQueue queue = Volley.newRequestQueue(this);\n // Request a JSON response from the provided URL.\n JsonObjectRequest jRequest = new JsonObjectRequest(Request.Method.GET, RANDOM_URL, null,\n new Response.Listener<JSONObject>() {\n @Override\n public void onResponse(JSONObject response) {\n try {\n String lat = response.getJSONObject(\"nearest\").getString(\"latt\");\n String lng = response.getJSONObject(\"nearest\").getString(\"longt\");\n getAddress(lat + \",\" + lng);\n\n\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }, new Response.ErrorListener() {\n @Override\n public void onErrorResponse(VolleyError error) {\n //Toast.makeText(getApplicationContext(), \"Could not retrieve Address\", Toast.LENGTH_SHORT).show();\n getRandom(); //repeating call here might automatically make it happen B/C success rate of this call is roughly 50/50\n }\n });\n queue.add(jRequest);\n }", "private List<BaseLocation> getExpectedBaseLocations() {\r\n final List<BaseLocation> baseLocations = new ArrayList<>();\r\n\r\n final Position position1 = new Position(3104, 3856, PIXEL);\r\n final Position center1 = new Position(3040, 3808, PIXEL);\r\n baseLocations.add(new BaseLocation(position1, center1, 13500, 5000, true, false, true));\r\n\r\n final Position position2 = new Position(2208, 3632, PIXEL);\r\n final Position center2 = new Position(2144, 3584, PIXEL);\r\n baseLocations.add(new BaseLocation(position2, center2, 9000, 5000, true, false, false));\r\n\r\n final Position position3 = new Position(640, 3280, PIXEL);\r\n final Position center3 = new Position(576, 3232, PIXEL);\r\n baseLocations.add(new BaseLocation(position3, center3, 13500, 5000, true, false, true));\r\n\r\n final Position position4 = new Position(2688, 2992, PIXEL);\r\n final Position center4 = new Position(2624, 2944, PIXEL);\r\n baseLocations.add(new BaseLocation(position4, center4, 9000, 5000, true, false, false));\r\n\r\n final Position position5 = new Position(1792, 2480, PIXEL);\r\n final Position center5 = new Position(1728, 2432, PIXEL);\r\n baseLocations.add(new BaseLocation(position5, center5, 12000, 0, true, true, false));\r\n\r\n final Position position6 = new Position(3200, 1776, PIXEL);\r\n final Position center6 = new Position(3136, 1728, PIXEL);\r\n baseLocations.add(new BaseLocation(position6, center6, 13500, 5000, true, false, true));\r\n\r\n final Position position7 = new Position(640, 1968, PIXEL);\r\n final Position center7 = new Position(576, 1920, PIXEL);\r\n baseLocations.add(new BaseLocation(position7, center7, 9000, 5000, true, false, false));\r\n\r\n final Position position8 = new Position(1792, 1808, PIXEL);\r\n final Position center8 = new Position(1728, 1760, PIXEL);\r\n baseLocations.add(new BaseLocation(position8, center8, 12000, 0, true, true, false));\r\n\r\n final Position position9 = new Position(2336, 560, PIXEL);\r\n final Position center9 = new Position(2272, 512, PIXEL);\r\n baseLocations.add(new BaseLocation(position9, center9, 13500, 5000, true, false, true));\r\n\r\n final Position position10 = new Position(3584, 720, PIXEL);\r\n final Position center10 = new Position(3520, 672, PIXEL);\r\n baseLocations.add(new BaseLocation(position10, center10, 9000, 5000, true, false, false));\r\n\r\n final Position position11 = new Position(544, 432, PIXEL);\r\n final Position center11 = new Position(480, 384, PIXEL);\r\n baseLocations.add(new BaseLocation(position11, center11, 13500, 5000, true, false, true));\r\n\r\n return baseLocations;\r\n }", "public ArrayList< LocationHandler >findNear ( double lat, double lon){\n\t\tArrayList< LocationHandler> locationList = new ArrayList< LocationHandler>();\n\t\tString selectQuery = \"SELECT \"+ table_location +\".*, \" +\n\t\t\t\t\"(( \" + lat +\" - \" + table_location+\".\"+ key_latitude +\") * (\" + lat +\" - \" + table_location+\".\"+ key_latitude +\") + \" +\n\t\t\t\t\"(\" + lon +\" - \" + table_location+\".\"+ key_longitude +\") * (\" + lon +\" - \" + table_location+\".\"+ key_longitude +\"))\" +\n\t\t\t\t\" AS distance \"+ \n\t\t\t\t\" FROM \" + table_location + \" LEFT JOIN \" + table_locationType + \" ON \" +\n\t\t\t\ttable_location +\".\"+key_type + \" = \" + table_locationType+ \".\" +key_base_id +\n\t\t\t\t\" ORDER BY distance\";\n\t\t//\t\t\t\t\t\" ORDER BY \" + \"ABS( \" + table_location +\".\" +key_latitude + \" - \" + lon + \") \" + \" AND \" \n\t\t//\t\t\t\t\t + \"ABS( \" + table_location +\".\"+ key_longitude + \" - \" + lat + \") \" + \" DESC\";\n\t\tLog.i(TAG, \"near \" + selectQuery);\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationHandler locationHandlerArray = new LocationHandler();\n\t\t\t\tlocationHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationHandlerArray.setLongitude(cursor.getDouble(3)); \n\t\t\t\tlocationHandlerArray.setLatitude(cursor.getDouble(4)); \n\t\t\t\tlocationHandlerArray.setName(cursor.getString(5)); \n\t\t\t\tlocationHandlerArray.setType(cursor.getString(6));\n\t\t\t\tlocationHandlerArray.setSearchTag(cursor.getString(7));\n\t\t\t\tlocationHandlerArray.setAmountables(cursor.getDouble(8));\n\t\t\t\tlocationHandlerArray.setDescription(cursor.getString(9));\n\t\t\t\tlocationHandlerArray.setBestSeller(cursor.getString(10));\n\t\t\t\tlocationHandlerArray.setWebsite(cursor.getString(11));\n\t\t\t\tlocationList.add(locationHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\t\tdb.close();\n\t\treturn locationList;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n if ((getIntent().getDoubleExtra(\"locationLat\", 0)) != 0\n && (getIntent().getDoubleExtra(\"locationLon\", 0)) != 0\n && !((getIntent().getIntExtra(\"origin\",0))==1)) {\n LatLng company = new LatLng((getIntent().getDoubleExtra(\"locationLat\", 0)), (getIntent().getDoubleExtra(\"locationLon\", 0)));\n mMap.addMarker(new MarkerOptions().position(company).title(getIntent().getStringExtra(\"companyname\")));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(company, 16));\n check = 1;\n } else if ((getIntent().getIntExtra(\"origin\",0))==1\n && (getIntent().getDoubleExtra(\"locationLat\", 0)) != 0\n && (getIntent().getDoubleExtra(\"locationLon\", 0)) != 0) {\n LatLng company = new LatLng((getIntent().getDoubleExtra(\"locationLat\", 0)), (getIntent().getDoubleExtra(\"locationLon\", 0)));\n previousLocation = mMap.addMarker(new MarkerOptions().position(company).title(getIntent().getStringExtra(\"companyname\")));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(company, 16));\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 101);\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n previousLocation.remove();\n if (marker != null) {\n marker.setPosition(latLng);\n } else {\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Your Location\").draggable(true));\n }\n companyLocation = latLng;\n }\n });\n } else {\n LatLng nepal = new LatLng(27.7172, 85.3240);\n kathmandu = mMap.addMarker(new MarkerOptions().position(nepal).title(\"Marker in Kathmandu\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(nepal, 14));\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 101);\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n kathmandu.remove();\n if (marker != null) {\n marker.setPosition(latLng);\n } else {\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Your Location\").draggable(true));\n }\n companyLocation = latLng;\n }\n });\n }\n }", "private void checkLocationandAddToMap() {\n if (ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //Requesting the Location permission\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n return;\n }\n\n locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n criteria = new Criteria();\n bestProvider = locationManager.getBestProvider(criteria, true);\n\n\n //Fetching the last known location using the Fus\n Location location = locationManager.getLastKnownLocation(bestProvider);\n\n\n if (location != null) {\n\n onLocationChanged(location);\n\n\n } else {\n //This is what you need:\n locationManager.requestLocationUpdates(bestProvider, 1000, 0, (LocationListener) getActivity());\n }\n\n\n }", "public Location getRandomLocation() {\n\t\tfinal Random randomGenerator = new Random();\n\n\t\tLocation result = new Location(getWorld(), highPoint.getBlockX(), highPoint.getBlockY(), highPoint.getBlockZ());\n\t\t\n\t\tif (getSize() > 1) {\n\t\t\tfinal double randomX = lowPoint.getBlockX() + randomGenerator.nextInt(getXSize());\n\t\t\tfinal double randomY = lowPoint.getBlockY() + randomGenerator.nextInt(getYSize());\n\t\t\tfinal double randomZ = lowPoint.getBlockZ() + randomGenerator.nextInt(getZSize());\n\t\t\t\n\t\t\tresult = new Location(Bukkit.getWorld(world), randomX, randomY, randomZ);\n\t\t}\n\t\t\n\t\treturn result;\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n mMap.setMyLocationEnabled(true);\n // Get LocationManager object from System Service LOCATION_SERVICE\n LocationManager locationManager = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n\n // Create a criteria object to retrieve provider\n Criteria criteria = new Criteria();\n\n // Get the name of the best provider\n String provider = locationManager.getBestProvider(criteria, true);\n\n // Get Current Location\n if (this.checkCallingOrSelfPermission(Manifest.permission.ACCESS_FINE_LOCATION) == PackageManager.PERMISSION_GRANTED) {\n Location myLocation = locationManager.getLastKnownLocation(provider);\n // set map type\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n // Get latitude of the current location\n double latitude = myLocation.getLatitude();\n\n // Get longitude of the current location\n double longitude = myLocation.getLongitude();\n\n // Create a LatLng object for the current location\n LatLng latLng = new LatLng(latitude, longitude);\n\n // Show the current location in Google Map\n mMap.moveCamera(CameraUpdateFactory.newLatLng(latLng));\n\n // Zoom in the Google Map\n mMap.animateCamera(CameraUpdateFactory.zoomTo(14));\n\n for (int i = restoList.size(); i >= 1; i--) {\n Restaurant current = restoList.get(i-1);\n LatLng curPos = new LatLng(current.getLatitude(),current.getLongitude());\n mMap.addMarker(new MarkerOptions().position(curPos).title(current.getName()));\n }\n\n } else {\n //TODO this stuff here\n }\n\n }", "private Location pickLocation(List<Location> locations){\n\t\tList<Location> temp =new ArrayList<Location>(locations); \n\t\t\n\t\ttemp = filterOnAffordancesL(temp); //Easier to give a new list back and change ref.\n\t\tList<Location> aFiltered = new ArrayList<Location>(temp);\n\t\tif(isHomogenous(aFiltered)) return pickAccordingToPreference(temp);\n\t\t\n\t\tList<Location> hFiltered= new ArrayList<Location>(temp);; //hack\n\t\tif(CFG.isFilteredOnHabits()){\n\t\ttemp = filterOnHabitsL(temp);\n\t\thFiltered = new ArrayList<Location>(temp);\n\t\tif(hFiltered.isEmpty()) temp = new ArrayList<Location>(aFiltered); //Reroll if empty\n\t\telse if(isHomogenous(hFiltered)) return pickAccordingToPreference(temp);\n\t\t}\n\t\t\n\t\tif(CFG.isIntentional()){\n\t\ttemp = filterOnIntentionsL(temp);\n\t\tList<Location> iFiltered = new ArrayList<Location>(temp);\n\t\tif(iFiltered.isEmpty()){\n\t\t\ttemp = new ArrayList<Location>(hFiltered); //unique case where habits for non-prefered stuff'\n\t\t\tif(hFiltered.isEmpty()){\n\t\t\t\tSystem.out.println(\"This can't be\");\n\t\t\t\ttemp = new ArrayList<Location>(aFiltered);\n\t\t\t}\n\t\t}\n\t\t}\n\t\t\n\t\treturn pickAccordingToPreference(temp);\n\t}", "private void checkLocation(String mapName, Set<Point> seenLocations, List<Point> wildLocations) {\n Assert.assertFalse(mapName, wildLocations.isEmpty());\n for (Point location : wildLocations) {\n Assert.assertFalse(seenLocations.contains(location));\n seenLocations.add(location);\n }\n }", "public void getDeviceLocation() {\n try {\n if (locationPermissionGranted) {\n Task<Location> locationResult = fusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n lastKnownLocation = task.getResult();\n\n if (lastKnownLocation != null) {\n if (checkInLACounty(lastKnownLocation) != -1) {\n // geofenceHelper(getContext());\n lastKnownLocationInLA = true;\n sharedViewModel.setCountyData(\"Los Angeles County\");\n backLA.setVisibility(View.INVISIBLE);\n } else if (lastKnownLocationInLA) {\n lastKnownLocationInLA = false;\n sharedViewModel.setCountyData(\"Not in Los Angeles County\");\n\n backLA.setVisibility(View.VISIBLE);\n\n AlertDialog.Builder alertDialogBuilder = new AlertDialog.Builder(getContext());\n alertDialogBuilder.setTitle(\"Friendly Warning\");\n alertDialogBuilder.setMessage(\"Out of Los Angeles County \\n(Current Service Area)\");\n AlertDialog alertDialog = alertDialogBuilder.create();\n alertDialog.show(); // Show Dialog\n }\n } else {\n sharedViewModel.setCountyData(\"Los Angeles County\");\n }\n\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n map.moveCamera(CameraUpdateFactory\n .newLatLngZoom(defaultLocation, DEFAULT_ZOOM));\n map.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage(), e);\n }\n }", "public void startLocationDiscovery() {\n\t\t/*CountDownTimer gpsDelay = new CountDownTimer(\n\t\t\t\tcalculateNextInteraction(failedInteractions) * 60 * 1000, 1000) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onTick(long arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFinish() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t};*/\n\t\tregisterLocationListener(locationListener);\n\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n LatLng startingMarker;\n if (location == null) {\n\n /* Check if the fine and course locations are denied.*/\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n String[] permissions = new String[1];\n permissions[0] = Manifest.permission.ACCESS_FINE_LOCATION;\n ActivityCompat.requestPermissions(this, permissions, 1);\n return;\n }\n mMap.setMyLocationEnabled(true);\n startingMarker = getCurrentLocation();\n } else {\n startingMarker = new LatLng(location.latitude, location.longitude);\n\n }\n if (mapMode.equals(\"selection\") || mapMode.equals(\"view\")) {\n currentMarker = mMap.addMarker(new MarkerOptions().position(startingMarker).title(\"Selected record location\"));\n } else if (mapMode.equals(\"viewAll\")) {\n ArrayList<Condition> conditions = userAccountListController.getUserAccountList().getAccountOfInterest().getConditionList().getConditions();\n for (int j =0; j< conditions.size(); j++) {\n ArrayList<Record> records = recordListController.loadRecords(conditions.get(j));\n for (int i = 0; i < records.size(); i++) {\n Record record = records.get(i);\n if (record.getGeoLocation() != null) {\n Double latitude = record.getGeoLocation().getLatitude();\n Double longitude = record.getGeoLocation().getLongitude();\n startingMarker = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(startingMarker).title(record.getTitle()));\n\n }\n }\n }\n\n }\n mMap.moveCamera(CameraUpdateFactory.newLatLng(startingMarker));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(startingMarker, 11));\n if (mapMode.equals(\"selection\")) {\n mMap.setOnMapClickListener(this);\n mMap.setOnMarkerClickListener(this);\n }\n }", "public void addMine()\n {\n int randomRow = random.nextInt(rows);\n int randomColumn = random.nextInt(columns);\n Integer[] randomLocation = {randomRow, randomColumn};\n\n while (mineLocations.contains(randomLocation))\n {\n randomRow = random.nextInt(rows);\n randomColumn = random.nextInt(columns);\n randomLocation[0] = randomRow;\n randomLocation[1] = randomColumn;\n }\n\n mineLocations.add(randomLocation);\n }", "private void loadMarkers(){\n if (partnerLocs){\n latLngs = dataStorage.getPartnerLatLngList();\n locationNames = dataStorage.getPartnerLocNameList();\n }else{\n String favLatLngFromJson = dataStorage.getLatLngList();\n String favNamesFromJson = dataStorage.getLocNameList();\n\n if(favNamesFromJson != null && favLatLngFromJson != null){\n String[] favNames = new Gson().fromJson(favNamesFromJson, String[].class);\n LatLng[] favLatLng = new Gson().fromJson(favLatLngFromJson, LatLng[].class);\n\n //Convert json to the actual ArrayLists\n latLngs = Arrays.asList(favLatLng);\n latLngs = new ArrayList<LatLng>(latLngs);\n locationNames = Arrays.asList(favNames);\n locationNames = new ArrayList<String>(locationNames);\n }\n }\n\n\n\n\n //Add the markers back onto the map\n for (int i = 0; i < latLngs.size(); i++) {\n LatLng point = latLngs.get(i);\n String name = locationNames.get(i);\n Marker addedMarker = mMap.addMarker(new MarkerOptions().position(new LatLng\n (point.latitude, point.longitude)).title(name));\n if(partnerLocs){\n addedMarker.setIcon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_AZURE));\n }\n\n if(name.equals(locClicked)){\n markerClicked = addedMarker;\n }\n }\n }", "private void loadData() {\n gps = new GPSTracker(LocationActivity.this);\n if (from.equals(\"home\")) {\n if (lat == 0 && lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n lat = gps.getLatitude();\n lon = gps.getLongitude();\n Log.v(\"lati\", \"lat\" + lat);\n Log.v(\"longi\", \"longi\" + lon);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n } else if (from.equals(\"add\")) {\n if (AddProductDetail.lat == 0 && AddProductDetail.lon == 0) {\n if (gps.canGetLocation()) {\n if (TextbookTakeoverApplication.isNetworkAvailable(LocationActivity.this)) {\n Log.v(\"lati\", \"lat\" + AddProductDetail.lat);\n Log.v(\"longi\", \"longi\" + AddProductDetail.lat);\n } else {\n // TextbookTakeoverApplication.dialog(LocationActivity.this, \"Error!\", \"Please check your connection and try again\");\n }\n } else {\n if (!alertDialog.isShowing()) {\n alertDialog.show();\n }\n got = true;\n }\n }\n }\n\n }", "List<SkuAvailability> lookupSKUAvailabilityForLocation(List<Long> skuIds, Long locationId, boolean realTime);", "private void getLocation() {\n LocationRequest mLocationRequestHighAccuracy = new LocationRequest();\n mLocationRequestHighAccuracy.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequestHighAccuracy.setInterval(UPDATE_INTERVAL);\n mLocationRequestHighAccuracy.setFastestInterval(FASTEST_INTERVAL);\n\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED || ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n stopSelf();\n return;\n } else\n mFusedLocationClient.requestLocationUpdates(mLocationRequestHighAccuracy, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Log.d(TAG, \"onLocationResult: got location result.\");\n\n Location location = locationResult.getLastLocation();\n if (location != null) {\n db.getReference(\"Users\").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n user=snapshot.getValue(User.class);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n\n LocationModel geoPoint = new LocationModel(location.getLatitude(), location.getLongitude());\n UserLocation userLocation = new UserLocation(geoPoint, user);\n saveUserLocation(userLocation);\n }\n\n /*if (location != null) {\n DocumentReference u = db.collection(\"Users\").document(FirebaseAuth.getInstance().getCurrentUser().getUid());\n u.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n user = task.getResult().toObject(User.class);\n }\n }\n });\n\n GeoPoint geoPoint = new GeoPoint(location.getLatitude(), location.getLongitude());\n UserLocation userLocation = new UserLocation(geoPoint, null, user);\n saveUserLocation(userLocation);\n }*/\n\n }\n },\n Looper.myLooper()); // Looper.myLooper tells this to repeat forever until thread is destroyed\n }", "private void inputLocation() {\n// boolean googleMapExist= (ConnectionResult.SUCCESS==GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext));\n//\n// if(googleMapExist) {\n// org.wowtalk.Log.w(\"google map exist\");\n// Intent mapIntent = new Intent(mContext, PickLocActivity.class);\n// mapIntent.putExtra(\"auto_loc\", true);\n// mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n// } else {\n //org.wowtalk.Log.w(\"google map not exist\");\n Intent mapIntent = new Intent(mContext, PickLocActivityWithAMap.class);\n mapIntent.putExtra(\"auto_loc\", true);\n mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n //}\n }", "public static LatLng[] getFakeRoute(){\n\n return new LatLng[]{\n new LatLng(30.0780708,31.3228058),\n new LatLng(30.0560173,31.3169771),\n new LatLng(30.0752362,31.309582),\n new LatLng(30.0752362,31.3095829),\n new LatLng(30.0758615,31.3085954),\n new LatLng(30.0758615,31.3085954),\n new LatLng(30.0768828,31.3107631),\n new LatLng(30.0791337,31.3132559),\n new LatLng(30.0801342,31.3155079),\n new LatLng(30.0812388,31.3170975),\n };\n }", "public Location getRandomLocation() {\n\t\tint x = rand.nextInt(WORLD_SIZE);\n\t\tint y = 12;\n\t\tint z = rand.nextInt(WORLD_SIZE);\n\t\treturn new Location(x, y, z);\n\t}", "private void getLastKnownLocation() {\n Log.d(TAG, \"getLastKnownLocation()\");\n if (checkPermission()) {\n if (lastLocation != null) {\n Log.i(TAG, \"LasKnown location. \" +\n \"Long: \" + lastLocation.getLongitude() +\n \" | Lat: \" + lastLocation.getLatitude());\n\n markerLocation(new LatLng(lastLocation.getLatitude(), lastLocation.getLongitude()));\n\n } else {\n Log.w(TAG, \"No location retrieved yet\");\n }\n } else askPermission();\n }", "protected Location nextLocation()\n {\n // Get list of neighboring empty locations.\n ArrayList emptyNbrs = emptyNeighbors();\n\n // Remove the location behind, since fish do not move backwards.\n Direction oppositeDir = direction().reverse();\n Location locationBehind = environment().getNeighbor(location(),\n oppositeDir);\n emptyNbrs.remove(locationBehind);\n Debug.print(\"Possible new locations are: \" + emptyNbrs.toString());\n\n // If there are no valid empty neighboring locations, then we're done.\n if ( emptyNbrs.size() == 0 )\n return location();\n\n // Return a randomly chosen neighboring empty location.\n Random randNumGen = RandNumGenerator.getInstance();\n int randNum = randNumGen.nextInt(emptyNbrs.size());\n\t return (Location) emptyNbrs.get(randNum);\n }", "public static void getOneNearbyRestaurant(final int period, String latitude, String longitude, final RouteMakerFragment.MyHandler handler) {\n Parameters parameters = new Parameters();\n parameters.add(\"lng\", longitude);\n parameters.add(\"lat\", latitude);\n parameters.add(\"radius\", 1000);\n Log.e(\"lng\",longitude);\n Log.e(\"lat\",latitude);\n JuheData.executeWithAPI(APIConstants.DIET_INFO_ID, APIConstants.DIET_INFO_IP, JuheData.GET, parameters, new DataCallBack() {\n @Override\n public void resultLoaded(int err, String reason, String result) {\n\n if (err == 0) {\n try {\n JSONObject object = new JSONObject(result);\n Log.e(\"reason2\",object.getString(\"reason\"));\n JSONArray list = object.getJSONArray(\"result\");\n JSONObject restaurant = list.getJSONObject(new Random().nextInt(list.length()));\n RouteData.dietTempInfo[period] = new RouteData.DietTemp(period,\n restaurant.getString(\"name\"),\n restaurant.getString(\"latitude\"),\n restaurant.getString(\"longitude\"),\n restaurant.getString(\"address\"),\n restaurant.getString(\"phone\"),\n restaurant.getString(\"photos\"),\n Integer.parseInt(restaurant.getString(\"very_good_remarks\").equals(\"\")?\"0\":restaurant.getString(\"very_good_remarks\")) + Integer.parseInt(restaurant.getString(\"good_remarks\").equals(\"\")?\"0\":restaurant.getString(\"good_remarks\")),\n Integer.parseInt(restaurant.getString(\"common_remarks\").equals(\"\")?\"0\":restaurant.getString(\"common_remarks\")),\n Integer.parseInt(restaurant.getString(\"bad_remarks\").equals(\"\")?\"0\":restaurant.getString(\"bad_remarks\")) + Integer.parseInt(restaurant.getString(\"very_bad_remarks\").equals(\"\")?\"0\":restaurant.getString(\"very_bad_remarks\")),\n new StringBuilder(restaurant.getString(\"recommended_dishes\")).append(restaurant.getString(\"recommended_products\").equals(\"\") || restaurant.getString(\"recommended_dishes\").equals(\"\") ? \"\" : \",\").append((restaurant.getString(\"recommended_products\"))).toString());\n Message m = new Message();\n Bundle b = new Bundle();\n b.putBoolean(\"minus\", true);\n b.putString(\"source\", \"spot\");\n m.setData(b);\n handler.handleMessage(m);\n } catch (JSONException e) {\n e.printStackTrace();\n }\n }\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.d(\"TEST\", \"MAP READY\");\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n mMap.setMapType(GoogleMap.MAP_TYPE_NORMAL);\n\n LatLng curLocation = new LatLng(latitude,longitude);\n CameraUpdate cameraUpdate = CameraUpdateFactory.newLatLngZoom(curLocation,15.0f);\n setPin(latitude,longitude, null);\n mMap.moveCamera(cameraUpdate);\n for(int i = 0; i < restaurantList.size(); i++){\n double lat = restaurantList.get(i).getLatitude();\n double lng = restaurantList.get(i).getLongitude();\n setPin(lat, lng, restaurantList.get(i));\n }\n //Check we have the users permission to access their location\n // if we dont have it, we have to request it\n if (ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)== PackageManager.PERMISSION_GRANTED){\n mMap.setMyLocationEnabled(true);\n\n } else {\n //we dont have permission, so we have to ask for it\n ActivityCompat.requestPermissions(this,\n new String[]{Manifest.permission.ACCESS_FINE_LOCATION},\n MY_LOCATION_REQUEST_CODE);\n //run asychronously.. show an alert dialog\n //user can choose allow or deny\n }\n }", "@Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n Log.d(TAG, \"onLocationResult: \");\n if (locationResult != null) {\n Log.d(TAG, \"onLocationResult: loaction!==null\");\n myLocation = locationResult.getLastLocation();\n showMarker();//de show hinh len\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n Intent i = new Intent(\"location_update\");\n i.putExtra(\"coordinates\", location.getLongitude() + \" \" + location.getLatitude());\n home_loc = new FileCacher<>(getApplicationContext(), \"myloc.txt\");\n\n if (home_loc.hasCache()) {\n try {\n double lat1 = location.getLatitude();\n double long1 = location.getLongitude();\n String loc = home_loc.readCache();\n String[] coors1 = {Double.toString(long1), Double.toString(lat1)};\n if (loc != null) {\n Log.i(\"loc\", loc);\n coors1 = loc.split(\" \");\n }\n\n double lat2 = Double.parseDouble(coors1[1]);\n double long2 = Double.parseDouble(coors1[0]);\n double dist = distance(lat1, lat2, long1, long2);\n Log.i(\"dist\", Double.toString(dist));\n if (dist > thresh) {\n i.putExtra(\"exceed\", \"true\");\n } else {\n i.putExtra(\"exceed\", \"false\");\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n sendBroadcast(i);\n }", "@Override\n public void onSuccess(Location location) {\n boolean isMock = false;\n if (location != null) {\n // Logic to handle location object\n\n if (Build.VERSION.SDK_INT >= 18) {\n isMock = location.isFromMockProvider();\n } else {\n if (\"0\".equals(Settings.Secure.getString(context.getContentResolver(), Settings.Secure.ALLOW_MOCK_LOCATION)))\n isMock = false;\n else {\n isMock = true;\n }\n }\n }\n promise.resolve(isMock);\n return;\n }", "public void generateMarkers() {\n\t\tgooglemap.clear();\n\t\tgooglemap.setMyLocationEnabled(true);\n\t\t//generateRouteLine();\n\t\tdouble itinerary_latitude;\n\t\tdouble itinerary_longitude;\n\t\tString itinerary_name;\n\n\t\tLatLng latlng;\n\t\tmarkers = new ArrayList<Marker>();\n\n\t\t//zoom out to make sure all markers are displayed in screen\n\t\tLatLngBounds.Builder builder = new LatLngBounds.Builder(); \n\t\tbuilder.include(new LatLng(parentActivity.getUserLat(),parentActivity.getUserLon()));\n\n\n\t\tfor( int x=parentActivity.getItinerary().itin.size(); x > 0; x-- ){\n\t\t\tEntity obj = parentActivity.getItinerary().itin.get(x-1);\n\t\t\titinerary_latitude = Double.parseDouble( obj.getLatitude() );\n\t\t\titinerary_longitude = Double.parseDouble( obj.getLongitude() );\n\t\t\titinerary_name = obj.getName();\n\t\t\tlatlng = new LatLng(itinerary_latitude, itinerary_longitude);\n\n\t\t\tint markerImage = supportClassObj.chooseMarkerImage(x);\n\t\t\t\n\t\t\tMarker marker = googlemap.addMarker(new MarkerOptions()\n\t\t\t\t.position(latlng)\n\t\t\t\t.snippet(\"Navigate\")\n\t\t\t\t.title(itinerary_name)\n\t\t\t\t.icon(BitmapDescriptorFactory.fromResource(markerImage)));\n\t\t\t\n\t\t\tmarker.showInfoWindow();\n\t\t\tmarker.hideInfoWindow();\n\n\t\t\tmarkers.add(marker);\n\n\t\t\t//setting bounds for googlemap\n\t\t\tbuilder.include(latlng); \n\t\t}\n\t\t\n\t\tgooglemap.setOnMarkerClickListener(new OnMarkerClickListener(){\n\t\t\t@Override\n\t\t\tpublic boolean onMarkerClick(Marker marker) {\n\t\t\t\t\n\t\t\t\treturn false;\n\t\t\t}\n\t\t\t\n\t\t});\n\t\t\n\t\tfor( String leg : parentActivity.getItinerary().getPolyline() ){\n\t\t\thandleGetDirectionsResult(decodePoly(leg));\n\t\t}\n\t\t\n\t\t// multipliers for height based off percentage of screen size map will use\n\t\tint width = this.getResources().getDisplayMetrics().widthPixels;\n\t\tint padding = (int) (width * .145);\n\t\tgooglemap.moveCamera(CameraUpdateFactory.newLatLngBounds(builder.build(), \n width, \n (int)(this.getResources().getDisplayMetrics().heightPixels * 0.8 * 0.6 * 0.8), padding));\n\t\t\n\t}", "public Location getRandomLocationForPlayers() {\n\t\tfinal Location temp = getRandomLocationForMobs();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX(), temp.getBlockY() + 1, temp.getBlockZ());\n\t}", "@Override\n public void onLocationResult(LocationResult locationResult) {\n if (locationResult == null) {\n Log.w(LOG_TAG, \"LocationCallback(): locationResult == null\");\n return;\n }\n\n Location lastLocation = locationResult.getLastLocation();\n\n double latitude = lastLocation.getLatitude();\n double longitude = lastLocation.getLongitude();\n double accuracy = lastLocation.getAccuracy();\n\n userLocation = new LatLng(latitude, longitude);\n Long currentTimestamp = System.currentTimeMillis();\n\n String gpsData = \"\\nlat:\" + latitude + \"\\nlong:\" + longitude + \"\\naccuracy: \" + accuracy + \"m\\ntimestamp: \" + currentTimestamp;\n Log.d(LOG_TAG, \"onLocationResult() called: \" + gpsData);\n\n if (!checkInsideZone()) { // Check current status, but don't update outsideZone yet!\n if (!outsideZone) {\n // Transition to outside zone state (countdown to automatic termination of shift) if not already outside\n leftZoneTimestamp = System.currentTimeMillis();\n outsideZone = true;\n Log.e(LOG_TAG, \"User has left the designated zone area.\");\n\n // Alert user visually and with vibration\n Snackbar snackbar = Snackbar.make(findViewById(android.R.id.content), \"Warning! You have left the zone. Return within 2 minutes.\", Snackbar.LENGTH_LONG);\n snackbar.show();\n\n // Something like this: - du - Du!\n long[] timings = new long[]{0, 200, 200, 200}; // ms\n int[] amplitudes = new int[] {0, 128, 0, 200}; // 0-255\n vibrator.vibrate(VibrationEffect.createWaveform(timings,amplitudes, -1));\n }\n\n if (currentTimestamp - leftZoneTimestamp > leftZoneMaximum) {\n Log.e(LOG_TAG, \"User has been outside of the designated zone area for too long. Terminating shift.\");\n Toast.makeText(getApplicationContext(), \"You left the zone for more than 2 minutes - session terminated.\", Toast.LENGTH_LONG).show();\n endShift();\n }\n } else if (outsideZone) { // Outside -> inside: i.e. user has re-entered zone, transition to safe state\n outsideZone = false;\n Log.e(LOG_TAG, \"User has re-entered the designated zone area.\");\n }\n\n // Log path of user\n sessionLogList.add(new SessionLog(currentTimestamp, userLocation, !outsideZone));\n }", "public boolean checkMissingLonLatTime() {\n\t\ttry {\n _locationsChecked = true;\n\t\t\tDouble[] longitudes = getSampleLongitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( longitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(longitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[longitudeIndex]);\n\t\t\t\t\tString comment = \"missing longitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no longitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\ttry {\n\t\t\tDouble[] latitudes = getSampleLatitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( latitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(latitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[latitudeIndex]);\n\t\t\t\t\tString comment = \"missing latitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no latitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n//\t DashDataType<?> pressureColumn = findDataColumn(\"water_pressure\");\n//\t DashDataType<?> depthColumn = findDataColumn(\"sample_depth\");\n//\t if ( depthColumn != null ) {\n//\t\t\ttry {\n//\t\t\t\tDouble[] depths = getSampleDepths();\n//\t\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n//\t\t\t\t\tif ( depths[rowIdx] == null ) {\n//\t\t\t\t\t\tisOk = pressureColumn != null;\n//\t\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\t\tmsg.setSeverity(pressureColumn == null ? Severity.ERROR : Severity.WARNING);\n//\t\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\t\tmsg.setColIndex(sampleDepthIndex);\n//\t\t\t\t\t\tmsg.setColName(userColNames[sampleDepthIndex]);\n//\t\t\t\t\t\tString comment = \"missing sample depth\";\n//\t\t\t\t\t\tmsg.setGeneralComment(comment);\n//\t\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\t\tstdMsgList.add(msg);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t} catch ( Exception ex ) {\n//\t\t\t ex.printStackTrace();\n//\t\t\t}\n//\t\t} else if ( pressureColumn == null ) {\n//\t\t\tisOk = false;\n//\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\tString comment = \"no sample depth column\";\n//\t\t\tmsg.setGeneralComment(comment);\n//\t\t\tmsg.setDetailedComment(comment);\n//\t\t\tstdMsgList.add(msg);\n//\t\t}\n\n\t\tDouble[] times = null;\n\t\ttry {\n _timesChecked = true;\n\t\t\ttimes = getSampleTimes();\n\t\t\tfor (int rowIdx = 0; _timesOk && rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( times[rowIdx] == null ) {\n\t\t\t\t\t_timesOk = false;\n // XXX Messages are now added during the data standarization phase\n\t\t\t\t\t// in the StdUserDataArray constructor.\n//\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\tString comment = \"incomplete sample date/time specification\";\n//\t\t\t\t\tmsg.setGeneralComment(\"Bad date/time value\");\n//\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_timesOk = false;\n\t\t\tex.printStackTrace();\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"incomplete columns specifying sample date/time\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(ex.getMessage());\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\treturn _locationsOk && _timesOk;\n\t}", "private void getDeviceLocation(){\n if(mMap == null){\n return;\n }\n\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(activity, new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful() && task.getResult() !=null) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n } else {\n Log.d(\"error\", \"Current location is null. Using defaults.\");\n Log.e(\"error\", \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n mFusedLocationProviderClient.requestLocationUpdates(mLocationRequest,mLocationCallback,null);\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n\n mLocationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n List<Location> locationList = locationResult.getLocations();\n if (locationList.size() > 0) {\n //The last location in the list is the newest\n Location location = locationList.get(locationList.size() - 1);\n Log.i(\"MapsActivity\", \"Location: \" + location.getLatitude() + \" \" + location.getLongitude());\n mLastKnownLocation = location;\n }\n }\n };\n }", "public LocationObject getLocate() {\n LocationObject responseObject = new LocationObject();\n\n SdkObject sdkObject = checkPermission(API_LOCATION_PERMISSION);\n if (sdkObject != null) {\n responseObject.setMessage(sdkObject.getMessage());\n responseObject.setBusinessCode(sdkObject.getBusinessCode());\n return responseObject;\n }\n\n long lastSdkLocateTime = PreferencesUtils.getLong(context, CommonConstants.SP_LAST_GET_LOCATION_TIME, 0L);\n if (System.currentTimeMillis() - lastSdkLocateTime < 1000L) { //Ignore call within 60 second\n responseObject.setBusinessCode(QueryResult.GET_LOCATION_TOO_FAST.getCode());\n responseObject.setMessage(QueryResult.GET_LOCATION_TOO_FAST.getMsg());\n Log.w(TAG, QueryResult.GET_LOCATION_TOO_FAST.getMsg());\n return responseObject;\n }\n\n PreferencesUtils.putLong(context, CommonConstants.SP_LAST_GET_LOCATION_TIME, System.currentTimeMillis());\n\n responseObject = getLocationInfo();\n if (responseObject.getBusinessCode() == ResultCode.SUCCESS.getCode()) {\n responseObject.setLastLocateTime(System.currentTimeMillis());\n }\n return responseObject;\n }", "public void generate() {\n\t\tLocation location0 = new Location();\n\t\tlocation0.setAddress(\"Zhong Nan Hai\");\n\n\t\tlocation0.setLatitude(0.0);\n\t\tlocation0.setLongitude(0.0);\n;\n\t\tTestDriver.locationList.add(location0);\n\t\t\n\t\t\n\t\tLocation location1 = new Location();\n\t\tlocation1.setAddress(\"Tian An Men\");\n\t\tlocation1.setLatitude(0.1);\n\t\tlocation1.setLongitude(0.1);\n\n\t\tTestDriver.locationList.add(location1);\n\t\t\n\t\t\n\t\tLocation location2 = new Location();\n\t\tlocation2.setAddress(\"White House\");\n\t\tlocation2.setLatitude(100.21);\n\t\tlocation2.setLongitude(102.36);\n\t\tTestDriver.locationList.add(location2);\n\t}", "private void loadAllAvailableDriver(final LatLng location) {\n\n mMap.clear();\n mUserMarker = mMap.addMarker(new MarkerOptions()\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker))\n .position(location)\n .title(\"Your Location\"));\n //move camera to this position\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(location, 15.0f));\n\n\n //Load all available drivers in 3 km distance\n DatabaseReference driverLocation = FirebaseDatabase.getInstance().getReference(Common.driver_tb1);\n GeoFire gf = new GeoFire(driverLocation);\n\n GeoQuery geoQuery = gf.queryAtLocation(new GeoLocation(location.latitude, location.longitude), distance);\n geoQuery.removeAllListeners();\n\n geoQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n @Override\n public void onKeyEntered(String key, final GeoLocation location) {\n //Using key to get email from table Users\n //Table users is table when drivers register account and update information\n FirebaseDatabase.getInstance().getReference(Common.user_driver_tb1)\n .child(key)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //because rider and user model is same properties\n //so we can use Rider model to get User here\n Rider rider = dataSnapshot.getValue(Rider.class);\n\n //Add driver to map\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(location.latitude, location.longitude))\n .flat(true)\n .snippet(\"Phone :\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.car)));\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n if (distance <= LIMIT) { //distance find upto 3 km\n distance++;\n loadAllAvailableDriver(location);\n\n }\n\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n }", "public Location getRandomLocationForMobs() {\n\t\tfinal Location temp = getRandomLocation();\n\t\t\n\t\treturn new Location(temp.getWorld(), temp.getBlockX() + 0.5, temp.getBlockY() + 0.5, temp.getBlockZ() + 0.5);\n\t}", "private void getWalkerLocation(){\n walkerLocationRef = FirebaseDatabase.getInstance().getReference().child(\"walkersWorking\").child(walkerFoundID).child(\"l\"); //the child l is used by location services to store long and lang values\n walkerLocationListener = walkerLocationRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(dataSnapshot.exists() && reqBoolean){\n List<Object> map = (List<Object>) dataSnapshot.getValue();\n double LocationLat = 0;\n double LocationLng = 0;\n\n statusButtonText.setText(\"Walker Found!\");\n\n if(map.get(0) != null){\n LocationLat = Double.parseDouble(map.get(0).toString());\n }\n if(map.get(1) != null) {\n LocationLng = Double.parseDouble(map.get(1).toString());\n\n }\n\n LatLng walkerLatLng = new LatLng(LocationLat, LocationLng);\n if(walkerMarker != null){ //app will crash without this if because it will try to delete something that is not there\n walkerMarker.remove();\n }\n googleMap.clear();\n googleMap.addMarker((new MarkerOptions().position(walkerLatLng).title(\"Your Walker\")));\n\n\n\n Location loc1 = new Location(\"\"); //Location variable can give distance between two co-ordinates\n loc1.setLatitude(pickupLocation.latitude);\n loc1.setLongitude(pickupLocation.longitude);\n\n Location loc2 = new Location(\"\");\n loc2.setLatitude(walkerLatLng.latitude);\n loc2.setLongitude(walkerLatLng.longitude);\n\n float distance = loc1.distanceTo(loc2); //finds distance between the two locations\n\n if(distance < 100){\n statusButtonText.setText(\"Walker is here! \"); //notifies dog owner the walker is here\n }else {\n statusButtonText.setText(\"Walker Found! \" + String.valueOf(distance)); //shows distance between walker and owner using distance variable\n\n }\n\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n Log.i(\"MapWorks\", \"The map works\");\n mMap = googleMap;\n //center camera at her stuff\n //add pins\n // Add a marker in Sydney and move the camera\n LatLng currentLoc = new LatLng(myLat, myLong);\n mMap.addMarker(new MarkerOptions().position(currentLoc).title(\"Your Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentLoc));\n// locs[1] = new LatLng(34, 119);\n// locs[2] = new LatLng(20, 130);\n if(null != locs) {\n Log.i(\"size of message: \", \" \"+ size);\n for (int i = 0; i < size; i++) {\n LatLng l = locs[i];\n mMap.addMarker(new MarkerOptions().position(l).title(names[i] + \" is a meteor of mass \" +\n masses[i] + \" that landed here in \" + years[i]));\n }\n }\n\n }", "private void getDeviceLocation() {\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the customer_map's camera position to the current location of the device.\n mLastKnownLocation = task.getResult();\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n getNearestDriver();\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory\n .newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n\n }\n }\n });\n }\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n }", "@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}", "public void onMapSearch(View view) {\n\n EditText locationSearch = (EditText) findViewById(R.id.arrival);\n String location = locationSearch.getText().toString();\n List<Address>addressList = null;\n\n if (location != null || !location.equals(\"\")) {\n Geocoder geocoder = new Geocoder(this);\n try {\n addressList = geocoder.getFromLocationName(location, 1);\n\n } catch (IOException e) {\n Toast.makeText(this,\"Destination not found\",Toast.LENGTH_SHORT).show();\n\n }\n Address address = addressList.get(0);\n LatLng latLng = new LatLng(address.getLatitude(), address.getLongitude());\n MarkerPoints.add(latLng);\n Toast.makeText(MapsActivity.this,\"added position 2 \"+MarkerPoints.size(),Toast.LENGTH_SHORT).show();\n\n mMap.addMarker(new MarkerOptions().position(latLng).draggable(true).title(location+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\").icon(BitmapDescriptorFactory.fromResource(R.drawable.flag)));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(latLng,16));\n //listClients.add(new Client(R.drawable.flag,\"Nasser\",\"client2 requesting cab\",100,address.getLatitude(), address.getLongitude()));\n //Toast.makeText(MapsActivity.this,\"client attended at \"+\" (\"+address.getLatitude()+\",\"+address.getLongitude()+\")\",Toast.LENGTH_SHORT).show();\n\n\n\n /* if (MarkerPoints.size() > 2) {\n // MarkerPoints.clear();\n mMap.clear();\n }*/\n\n\n // Checks, whether start and end locations are captured\n if (MarkerPoints.size() >= 2) {\n LatLng origin = MarkerPoints.get(0);\n LatLng dest = MarkerPoints.get(MarkerPoints.size()-1);\n\n // Getting URL to the Google Directions API\n String url = getUrl(origin, dest);\n Log.d(\"onMapClick\", url.toString());\n FetchUrl FetchUrl = new FetchUrl();\n\n // Start downloading json data from Google Directions API\n FetchUrl.execute(url);\n //move map camera\n //mMap.moveCamera(CameraUpdateFactory.newLatLng(origin));\n //mMap.animateCamera(CameraUpdateFactory.zoomTo(11));\n\n build_retrofit_and_get_response(\"driving\");\n\n final View mapView = getSupportFragmentManager().findFragmentById(R.id.map).getView();\n if (mapView.getViewTreeObserver().isAlive()) {\n mapView.getViewTreeObserver().addOnGlobalLayoutListener(new ViewTreeObserver.OnGlobalLayoutListener() {\n @SuppressLint(\"NewApi\")\n @Override\n public void onGlobalLayout() {\n LatLngBounds.Builder bld = new LatLngBounds.Builder();\n for (int i = 0; i < MarkerPoints.size(); i++) {\n LatLng ll = new LatLng(MarkerPoints.get(i).latitude, MarkerPoints.get(i).longitude);\n bld.include(ll);\n }\n LatLngBounds bounds = bld.build();\n mMap.moveCamera(CameraUpdateFactory.newLatLngBounds(bounds, 70));\n mapView.getViewTreeObserver().removeGlobalOnLayoutListener(this);\n\n }\n });\n }\n }\n\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n getDataFromDatabase();\n\n // Add a marker in Sydney and move the camera\n //LatLng hellas = new LatLng(38.311449, 25.022821);\n // mMap.addMarker(new MarkerOptions().position(hellas).title(\"Marker in Aegean Sea\"));\n //mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(hellas,5));\n\n //Initalize MyLocation stuff\n mMap.setMyLocationEnabled(true);\n mMap.setOnMyLocationButtonClickListener(this);\n mMap.setOnMyLocationClickListener(this);\n\n //setMarkersOnMap();\n\n if(mLocationPermissionGranted){\n getDeviceLocation();\n }\n\n\n ic_plus.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n DEFAULT_ZOOM = 17f;\n getDeviceLocation();\n\n //double lat = currentLocation.getLatitude();\n //double lon = currentLocation.getLongitude();\n LatLng currlatlon = new LatLng(currentLocation.getLatitude()+0.0002,currentLocation.getLongitude()+0.0002);\n\n\n curraddmarker = mMap.addMarker(new MarkerOptions().position(currlatlon).draggable(true));\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n hideUI();\n showConfirm();\n\n }\n });\n\n addMarker.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n\n showUI();\n addMarker.setVisibility(View.GONE);\n\n //double lat = curraddmarker.getPosition().latitude;\n //double lon = curraddmarker.getPosition().longitude;\n\n //Toast.makeText(AEDMapActivity.this, \"Lat:\"+currentMarkerLat+\" Lon:\"+currentMarkerLon, Toast.LENGTH_SHORT).show();\n Intent i =new Intent(AEDMapActivity.this, addMarkerActivity.class);\n i.putExtra(\"Lat\",curraddmarker.getPosition().latitude);\n i.putExtra(\"Lon\",curraddmarker.getPosition().longitude);\n startActivity(i);\n }\n });\n\n cancel.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n\n hideConfirm();\n showUI();\n curraddmarker.remove();\n\n getDeviceLocation();\n\n }\n });\n\n\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener()\n {\n @Override\n public void onMapClick(LatLng arg0)\n {\n if(menuUI){\n if(markerInfo){\n hideMarkerInfoIcon();\n return;\n }\n\n if(adminEkav || adminDimos){\n hideReportIcon();\n }\n\n menuUI = false;\n hideUI();\n\n\n }\n else{\n menuUI = true;\n showUI();\n if(adminEkav || adminDimos){\n showReportIcon();\n }\n }\n }\n });\n\n\n\n mMap.setOnMarkerClickListener(new GoogleMap.OnMarkerClickListener() {\n @Override\n public boolean onMarkerClick(Marker marker) {\n\n showMarkerInfoIcon();\n\n Log.d(TAG,marker.getTag().toString());\n\n if(!markerMap.isEmpty()){\n for(int i=0; i<markerMap.size(); i++) {\n marker_id = (String) markerMap.get(i).get(\"Id\");\n //Log.d(TAG,id);\n if(marker_id.equals(marker.getTag().toString())){\n marker_name = (String) markerMap.get(i).get(\"Name\");\n marker_desc = (String) markerMap.get(i).get(\"Description\");\n marker_pic = (String) markerMap.get(i).get(\"ImageUrl\");\n marker_geo = (GeoPoint) markerMap.get(i).get(\"Geolocation\");\n\n Log.d(TAG,\"Marker Clicked!! - name: \"+marker_name+\" desc: \"+marker_desc+\" geo: \"+marker_geo+ \" imgurl: \"+marker_pic);\n\n ic_info.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View v) {\n Intent i =new Intent(AEDMapActivity.this, MarkerInfoActivity.class);\n i.putExtra(\"Id\",marker_id);\n i.putExtra(\"Name\",marker_name);\n i.putExtra(\"Description\",marker_desc);\n i.putExtra(\"Lat\",marker_geo.getLatitude());\n i.putExtra(\"Lon\",marker_geo.getLongitude());\n i.putExtra(\"imgUrl\",marker_pic);\n startActivity(i);\n }\n });\n\n break;\n }\n }\n }\n\n return false;\n }\n });\n\n mMap.setOnMarkerDragListener(new GoogleMap.OnMarkerDragListener() {\n\n\n @Override\n public void onMarkerDragStart(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDrag(Marker marker) {\n\n }\n\n @Override\n public void onMarkerDragEnd(Marker marker) {\n currentMarkerLat=curraddmarker.getPosition().latitude;\n currentMarkerLon=curraddmarker.getPosition().longitude;\n }\n });\n\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in current location and move the camera\n LatLng currentLocation = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(currentLocation).title(\"Current Location\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(currentLocation));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLocation, 11.5f));\n\n //The following is sample code to add a marker at a locally saved Space Needle location\n /*\n double endLat = 47.6205;\n double endLong = -122.3493;\n LatLng spaceNeedle = new LatLng(endLat, endLong);\n String distanceToMarker = String.valueOf(distance(latitude, endLat, longitude, endLong, 0.0, 0.0)) + \" mi\";\n com.example.gar_awgarrett.seeker.Location spaceNeedleLocation = new com.example.gar_awgarrett.seeker.Location(\"Space Needle testing id\", \"Space Needle 1\", endLat, endLong);\n displayLocation(mMap, spaceNeedleLocation);\n */\n\n\n //Retrieve emerald locations from Firebase database and automatically display them on the map\n mDatabase = FirebaseDatabase.getInstance().getReference().child(\"Emerald Locations\");\n ChildEventListener childEventListener = mDatabase.addChildEventListener(new ChildEventListener() {\n @Override\n public void onChildAdded(DataSnapshot dataSnapshot, String s) {\n String id = dataSnapshot.getKey();\n String name = dataSnapshot.child(\"name\").getValue().toString();\n Double latitude = Double.parseDouble(dataSnapshot.child(\"latitude\").getValue().toString());\n Double longitude = Double.parseDouble(dataSnapshot.child(\"longitude\").getValue().toString());\n com.example.gar_awgarrett.seeker.Location newLocation = new com.example.gar_awgarrett.seeker.Location(id, name, latitude, longitude);\n //mLocations.add(newLocation);\n displayLocation(mMap, newLocation);\n //next two lines keeps track of mLocations size for testing\n int size = mLocations.size();\n Log.i(\"mLocations\", \"Size is: \" + String.valueOf(size));\n }\n\n @Override\n public void onChildChanged(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onChildRemoved(DataSnapshot dataSnapshot) {\n\n }\n\n @Override\n public void onChildMoved(DataSnapshot dataSnapshot, String s) {\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n // Add a marker in Sydney and move the camera\n if (!multi) {\n LatLng localEntrega = new LatLng(latitude, longitude);\n mMap.addMarker(new MarkerOptions().position(localEntrega).title(\"Local de Entrega\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(localEntrega, 14));\n } else {\n myapp = (EntregasApp)getApplicationContext();\n manager = new Manager(myapp);\n LatLng primeiraEntrega;\n\n primeiraEntrega = new LatLng(0,0);\n\n int i = 0;\n List<Documento> documentos = manager.findDocumentoByDataRomaneio(myapp.getDate());\n\n for (Documento documento : documentos ){\n LatLng localEntrega;\n if (documento.getDestinatario().getLatitude()!=null){\n i = i + 1;\n latitude = Double.valueOf(documento.getDestinatario().getLatitude());\n longitude = Double.valueOf(documento.getDestinatario().getLongitude());\n\n localEntrega = new LatLng(latitude, longitude);\n\n if(i==1){\n primeiraEntrega = new LatLng(latitude,longitude);\n }\n\n mMap.addMarker(new MarkerOptions().position(localEntrega)\n .title(documento.getDestinatario().getNome()));\n }\n }\n\n mMap.setMyLocationEnabled(true);\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(primeiraEntrega, 10));\n\n // Check if we were successful in obtaining the map.\n /*\n if (mMap != null) {\n mMap.setOnMyLocationButtonClickListener(new GoogleMap.OnMyLocationChangeListener() {\n @Override\n public void onMyLocationChange(Location arg0) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.truck);\n mMap.addMarker(new MarkerOptions().position(new LatLng(arg0.getLatitude(), arg0.getLongitude())).title(\"Minha Localização\").icon(icon));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(arg0.getLatitude(), arg0.getLongitude()), 6));\n }\n });\n\n\n }\n\n */\n\n }\n\n }", "@Override\n public void onLocationChanged(Location location) {\n latitude=String.valueOf(location.getLatitude());\n longitude= String.valueOf(location.getLongitude());\n\n System.out.println(\"asdfgh==\"+latitude);\n\n\n /* Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(SafetyActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(location.getLatitude(), location.getLongitude(), 1);\n String address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n String city = addresses.get(0).getLocality();\n String state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n String postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName();\n\n System.out.println(\"addresses==\"+address);\n // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n } catch (IOException e) {\n e.printStackTrace();\n }*/\n }", "private void showCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(getActivity(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n return;\n }\n final Task<PlaceLikelihoodBufferResponse> placeResult =\n mPlaceDetectionClient.getCurrentPlace(null);\n placeResult.addOnCompleteListener\n (new OnCompleteListener<PlaceLikelihoodBufferResponse>() {\n @Override\n public void onComplete(@NonNull Task<PlaceLikelihoodBufferResponse> task) {\n if (task.isSuccessful() && task.getResult() != null) {\n PlaceLikelihoodBufferResponse likelyPlaces = task.getResult();\n\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (likelyPlaces.getCount() < M_MAX_ENTRIES) {\n count = likelyPlaces.getCount();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : likelyPlaces) {\n // Build a list of likely places to show the user.\n mLikelyPlaceNames[i] = (String) placeLikelihood.getPlace().getName();\n mLikelyPlaceAddresses[i] = (String) placeLikelihood.getPlace()\n .getAddress();\n mLikelyPlaceAttributions[i] = (String) placeLikelihood.getPlace()\n .getAttributions();\n mLikelyPlaceLatLngs[i] = placeLikelihood.getPlace().getLatLng();\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n // Release the place likelihood buffer, to avoid memory leaks.\n likelyPlaces.release();\n\n // Show a dialog offering the user the list of likely places, and add a\n // marker at the selected place.\n openPlacesDialog();\n\n } else {\n Log.e(TAG, \"Exception: %s\", task.getException());\n }\n }\n });\n } else {\n // The user has not granted permission.\n Log.i(TAG, \"The user did not grant location permission.\");\n\n // Add a default marker, because the user hasn't selected a place.\n mMap.addMarker(new MarkerOptions()\n .title(getString(R.string.default_info_title))\n .position(mDefaultLocation)\n .snippet(getString(R.string.default_info_snippet)))\n .setIcon(BitmapDescriptorFactory.fromResource(R.drawable.ic_car_marker));\n ;\n\n // Prompt the user for permission.\n getLocationPermission();\n }\n }", "@Override\n\tpublic void addMarkers(World world, Random random, ICoords coords) {\n\t\treturn;\n\t}", "@Override\n\tpublic List<Map<String,Object>> getLimitLocationByLatLng(double lat, double lng,\n\t\t\tint start, int count, long userId) {\n\t\tList<Map<String,Object>> list = locationDao.listBySql(\"select a.*,b.head_img,b.birth,b.user_name,b.sex,b.country,b.nick_name,b.invisible,(POWER(MOD(ABS(lng - \"+lng+\"),360),2) + POWER(ABS(lat - \"+lat+\"),2)) AS distance from tb_location a, tb_user b where a.user_id = b.user_id and a.user_id <> \"+userId+\" ORDER BY distance LIMIT \"+start+\",\"+count);\n\t\t//SELECT lng,lat, (POWER(MOD(ABS(lng - $lng),360),2) + POWER(ABS(lat - $lat),2)) AS distance FROM `user_location` ORDER BY distance LIMIT 100 \n\t\treturn list;\n\t}", "private void updateFriendsLocation(ArrayList<ObjectLocation> friends_location){\n if(mMap==null)\n return;\n //if friends names is not ready yet which should not ever happen then return\n if(friends_names.isEmpty())\n return;\n\n //this do only first time, if markers is set then just update markers location (else branch)\n if(markers.isEmpty()) {\n for (int i = 0; i < friends_location.size(); i++) {\n LatLng latLng = new LatLng(friends_location.get(i).getLat(), friends_location.get(i).getLng());\n String friendID = friends_location.get(i).getObjectId();\n\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .title(friends_names.get(friendID))//set friend name in title\n .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_default_friend));\n\n //this is necessary for onInfoWindowClick\n Marker marker = mMap.addMarker(markerOptions);\n markerOnClick.put(marker,new MyMarker(friends_location.get(i).getObjectId(),true));\n //this is necessary for later update -friend icon(once) and his location on every change\n markers.put(friendID, marker);\n\n //make request for image\n userHandler.getUserImageInBitmap(friends_location.get(i).getObjectId(), REQUEST_TAG, new GetFriendsBitmapListener(this,friendID));\n }\n Log.i(LOG_TAG,\"Friends placed on the map, for the first time.\");\n }else{\n for (int i = 0; i < friends_location.size(); i++) {\n String friendID = friends_location.get(i).getObjectId();\n animateMarker(markers.get(friendID),new LatLng(friends_location.get(i).getLat(),friends_location.get(i).getLng()),new LatLngInterpolator.Linear());\n }\n }\n }", "public static Location getLocation(boolean circle, boolean checkPlayers, int spawnAttempts, Location center, int range, int minRange, int heightRange, Location cacheLoc)\n \t{\n \t\t// Make sure the centers world is valid\n \t\tif (center.getWorld() == null)\n \t\t{\n \t\t\tP.p().getLogger().warning(\"Null world passed to location generator\");\n \t\t\treturn center;\n \t\t}\n \t\t\n \t\t// Make sure range is larger than minRange\n \t\tif (range < minRange)\n \t\t{\n \t\t\trange = range ^ minRange;\n \t\t\tminRange = range ^ minRange;\n \t\t\trange = range ^ minRange;\n \t\t}\n \t\t\n \t\t// Height range must be at least 1\n \t\tif (heightRange < 0)\n \t\t\theightRange = 1;\n \t\t\n \t\t// Make sure range is bigger than minRange\n \t\tif (range == minRange)\n \t\t\t++range;\n \n \t\t// Calculate the total (up/down) range of heightRange\n \t\tint heightRange2 = heightRange << 1;\n \t\t\n \t\t// Copy the world\n \t\tcacheLoc.setWorld(center.getWorld());\n \t\t\n \t\t// Make X attempts to find a safe spawning location\n \t\tfor (int i = 0; i < spawnAttempts; ++i)\n \t\t{\n \t\t\t// Generate the appropriate type of location\n \t\t\tif (circle)\n \t\t\t{\n \t\t\t\tgetCircularLocation(center, range, minRange, cacheLoc);\n \t\t\t}\n \t\t\telse\n \t\t\t{\n \t\t\t\tgetSquareLocation(center, range, minRange, cacheLoc);\n \t\t\t}\n \t\t\t\n \t\t\t// Generate coordinates for Y\n \t\t\tcacheLoc.setY(RandomUtil.i.nextInt(heightRange2) - heightRange + center.getBlockY() + 0.5);\n \t\t\t\t\n \t\t\t// If the location is safe we can return the location\n \t\t\tif ((!checkPlayers || !PlayerFinder.playerNear(cacheLoc, minRange, heightRange)) && findSafeY(cacheLoc, center.getBlockY(), heightRange))\n \t\t\t{\n \t\t\t\t// Generate a random Yaw/Pitch\n \t\t\t\tcacheLoc.setYaw(RandomUtil.i.nextFloat() * 360.0F);\n\t\t\t\tcacheLoc.setPitch(0.0F);\n \t\t\t\treturn cacheLoc;\n \t\t\t}\n \t\t}\n \t\t\n \t\t// If no safe location was found in a reasonable time frame just return the center\n \t\treturn center;\n \t}", "private synchronized void getpickuplist() {\n\n if (Utility.isConnectingToInternet(getActivity())) {\n if (mGpsTracker.canGetLocation()) {\n if (Utility.ischeckvalidLocation(mGpsTracker)) {\n try {\n disableEmptyView();\n setUpDummyPickUpAdapter();\n Map<String, String> param = new HashMap<>();\n if (!AppConstants.isGestLogin(getActivity())) {\n param.put(\"iduser\", SharedPref.getInstance().getStringVlue(getActivity(), userId));\n param.put(\"latitude\", \"\" + mGpsTracker.getLatitude());\n param.put(\"longitude\", \"\" + mGpsTracker.getLongitude());\n } else {\n param.put(\"iduser\", \"0\");\n param.put(\"latitude\", \"\" + mGpsTracker.getLatitude());\n param.put(\"longitude\", \"\" + mGpsTracker.getLongitude());\n if (AppConstants.getGender(getActivity()) != null && AppConstants.getGender(getActivity()) != \"\") {\n param.put(\"gender_pref\", AppConstants.getGender(getActivity()));\n } else {\n param.put(\"gender_pref\", \"Both\");\n }\n\n if (AppConstants.getRadius(getActivity()) != null && AppConstants.getRadius(getActivity()) != \"\") {\n param.put(\"radius_limit\", AppConstants.getRadius(getActivity()));\n } else {\n param.put(\"radius_limit\", \"100\");\n }\n }\n\n\n // param.put(\"iduser\", \"\" + SharedPref.getInstance().getIntVlue(getActivity(), USER_TYPE));\n if (!isRefresh) {\n progressWheel.setVisibility(View.VISIBLE);\n progressWheel.startAnimation();\n }\n btn_buddyup.setEnabled(false);\n btn_pickup.setEnabled(false);\n if (!AppConstants.isGestLogin(getActivity())) {\n RequestHandler.getInstance().stringRequestVolley(getActivity(), AppConstants.getBaseUrl(SharedPref.getInstance().getBooleanValue(getActivity(), isStaging)) + pickuplist, param, this, 1);\n } else {\n RequestHandler.getInstance().stringRequestVolley(getActivity(), AppConstants.getBaseUrl(SharedPref.getInstance().getBooleanValue(getActivity(), isStaging)) + \"pickuplist_guest\", param, this, 1);\n\n }\n\n\n } catch (Exception e) {\n e.printStackTrace();\n Log.e(\"Error on PickUp List\", \"\" + e.toString());\n }\n } else {\n mGpsTracker.showInvalidLocationAlert();\n }\n } else {\n showSettingsAlert(PICKUPUPREQUESTCODE);\n }\n } else {\n showNoInternetEmptyView();\n Utility.showInternetError(getActivity());\n }\n }", "private void addMarkerOnMap(double latitude, double longitude) {\n try {\n //System.out.println(\"LAT::: \" + latitude);\n //System.out.println(\"LONG::: \" + longitude);\n mCurrentLocationLat = latitude;\n mCurrentLocationLongitude = longitude;\n if (markerOptions == null)\n markerOptions = new MarkerOptions();\n\n // Creating a LatLng object for the current / new location\n LatLng currentLatLng = new LatLng(latitude, longitude);\n markerOptions.position(currentLatLng).icon(BitmapDescriptorFactory.defaultMarker()).title(\"Current Location\");\n\n if (mapMarker != null)\n mapMarker.remove();\n\n mapMarker = mMap.addMarker(markerOptions);\n\n// if (dlBean.getAddress() != null) {\n// if (!dlBean.getAddress().equals(\"No Location Found\") && !dlBean.getAddress().equals(\"No Address returned\") && !dlBean.getAddress().equals(\"No Network To Get Address\"))\n// mapMarker.setTitle(dlBean.getAddress());\n// }\n\n // Showing the current location in Google Map by Zooming it\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(currentLatLng, 15));\n\n for (TripsheetSOList saleOrder : tripSheetSOList) {\n AgentLatLong agentLatLong = new AgentLatLong();\n double distance;\n\n // We are calculating distance b/w current location and agent location if lat long are not empty\n if (saleOrder.getmTripshetSOAgentLatitude() != null && !saleOrder.getmTripshetSOAgentLatitude().equals(\"\") && saleOrder.getmTripshetSOAgentLongitude() != null && !saleOrder.getmTripshetSOAgentLongitude().equals(\"\")) {\n double agentLatitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLatitude());\n double agentLongitude = Double.parseDouble(saleOrder.getmTripshetSOAgentLongitude());\n\n distance = getDistanceBetweenLocationsInMeters(mCurrentLocationLat, mCurrentLocationLongitude, agentLatitude, agentLongitude);\n\n agentLatLong.setAgentName(saleOrder.getmTripshetSOAgentFirstName());\n agentLatLong.setLatitude(agentLatitude);\n agentLatLong.setLongitude(agentLongitude);\n agentLatLong.setDistance(distance);\n\n agentsLatLongList.add(agentLatLong);\n\n } else {\n distance = 0.0;\n }\n\n saleOrder.setDistance(Math.round(distance / 1000));\n }\n\n // Sorting by distance in descending order i.e. nearest destination\n Collections.sort(agentsLatLongList, new Comparator<AgentLatLong>() {\n @Override\n public int compare(AgentLatLong o1, AgentLatLong o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n Collections.sort(tripSheetSOList, new Comparator<TripsheetSOList>() {\n @Override\n public int compare(TripsheetSOList o1, TripsheetSOList o2) {\n return o1.getDistance().compareTo(o2.getDistance());\n }\n });\n\n // to update distance value in list after getting current location details.\n if (mTripsheetSOAdapter != null) {\n mTripsheetSOAdapter.setAllSaleOrdersList(tripSheetSOList);\n mTripsheetSOAdapter.notifyDataSetChanged();\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n // Add a marker in Sydney and move the camera\n /*LatLng sydney = new LatLng(-34, 151);\n mMap.addMarker(new MarkerOptions().position(sydney).title(\"Marker in Sydney\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(sydney));*/\n\n LocationManager locationManager = (LocationManager) this.getSystemService(Context.LOCATION_SERVICE);\n\n // Recherche de la derniere localisation\n Criteria criteria = new Criteria();\n String provider = locationManager.getBestProvider(criteria, false);\n if (ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = locationManager.getLastKnownLocation(provider);\n\n // Initialize the location fields\n if (location != null) {\n float lat = (float) (location.getLatitude());\n float lng = (float) (location.getLongitude());\n\n currentPosition = new Point(location.getLongitude(), location.getLatitude());\n\n // Add a marker at our position and move the camera\n LatLng lastCoord = new LatLng(lat, lng);\n mMap.addMarker(new MarkerOptions().position(lastCoord).title(\"Last time we were here\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(lastCoord));\n\n lblPosition.setText(\"Last Position: \"+location.getLatitude()+\", \"+location.getLongitude());\n\n Log.i(this.getClass().getName(), String.valueOf(lat));\n Log.i(this.getClass().getName(), String.valueOf(lng));\n } else {\n Log.w(this.getClass().getName(), \"Provider not available\");\n }\n\n // dessine points intérets et sector de la database\n loadPOI();\n loadSector();\n\n // attache le callback\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER, 10, 1, this);\n }", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n for (int i = 0; i < virtualLoc.size(); i++) {\n mMap.addMarker(new MarkerOptions().position(virtualLoc.get(i)).title(names.get(i)));\n mMap.animateCamera(CameraUpdateFactory.zoomTo(20.0f));\n mMap.moveCamera(CameraUpdateFactory.newLatLng(virtualLoc.get(i)));\n }\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(virtualLoc.get(0),15));\n\n /*for (int i = 0; i < names.size(); i++) {\n //LatLng location = new LatLng(locations.get(i).latitude, locations.get(i).longitude);\n googleMap.addMarker(new MarkerOptions()\n .position(locations.get(i))\n .title(names.get(i)));\n googleMap.moveCamera(CameraUpdateFactory.newLatLng(locations.get(i)));\n }*/\n }", "void addMarkers() {\n\n Map<String, ProductDetailsCartItem> restaurantGeolocations = new HashMap<>();\n for (UserProductsItem userProductsItem : userProductsItemList) {\n for (ProductDetailsCartItem productDetailsCartItem : userProductsItem.getCartDetails()) {\n ProductDetailsCartItem restaurantDetails = new ProductDetailsCartItem(productDetailsCartItem.getRestaurantGeolocation(), productDetailsCartItem.getRestaurantAddress());\n restaurantGeolocations.put(productDetailsCartItem.getRestaurantName(), restaurantDetails);\n\n }\n }\n restaurantListServices.removeElements();\n LatLng position = new LatLng(0, 0);\n String address = \"\";\n int restaurantPosition = 0;\n for (HashMap.Entry<String, ProductDetailsCartItem> restaurantDetails : restaurantGeolocations.entrySet()) {\n try {\n String geolocation = restaurantDetails.getValue().getRestaurantGeolocation();\n address = restaurantDetails.getValue().getRestaurantAddress();\n String[] lat_long = geolocation.split(\",\");\n\n double lat = Double.parseDouble(lat_long[0]);\n double lng = Double.parseDouble(lat_long[1]);\n position = new LatLng(lat, lng);\n } catch (NumberFormatException e) {\n e.printStackTrace();\n } finally {\n MarkerOptions mo = new MarkerOptions().position(position).title(restaurantDetails.getKey());\n mo.visible(true);\n // mo.flat(true);\n mo.snippet(address);\n\n Marker marker = googleMap.addMarker(mo);\n marker.showInfoWindow();\n // polylineOptions.add(position);\n RestaurantMapItem restaurantMapItem = new RestaurantMapItem(restaurantDetails.getKey(), restaurantDetails.getValue().getRestaurantAddress(), ++restaurantPosition, position, marker);\n restaurantListServices.addRestaurant(restaurantMapItem);\n\n }\n }\n\n UiSettings settings = googleMap.getUiSettings();\n settings.setMapToolbarEnabled(true);\n settings.setMyLocationButtonEnabled(true);\n settings.setCompassEnabled(true);\n googleMap.setContentDescription(\"restaurants\");\n googleMap.setTrafficEnabled(true);\n\n\n googleMap.animateCamera(CameraUpdateFactory.newLatLngZoom(position, 12));\n\n googleMap.setOnMyLocationButtonClickListener(this);\n googleMap.setOnMyLocationClickListener(this);\n\n checkPermissions();\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED\n && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n googleMap.setMyLocationEnabled(true);\n\n restaurantListViewAdapter.notifyDataSetChanged();\n /*if (mMutablePolyline != null) {\n mMutablePolyline.remove();\n }\n mMutablePolyline = googleMap.addPolyline(polylineOptions);\n*/\n }", "private boolean maxLocationsReached() {\n Query q = new Query(\"Location\");\n int numOfEntities = ds.prepare(q).countEntities();\n return (numOfEntities >= MAX_LOCATIONS);\n }", "private boolean isValidLocationFound() {\n return latitudeValue != null && longitudeValue != null;\n }", "private void getDeviceLocation() {\n\n /*\n * Request location permission, so that we can get the location of the\n * device. The result of the permission request is handled by a callback,\n * onRequestPermissionsResult.\n */\n if (!hasPermissions(MapActivity.this, PERMISSIONS)) {\n ActivityCompat.requestPermissions(this, PERMISSIONS, LOCATION_PERMISSION_REQUEST_CODE);\n } else {\n mLocationPermissionGranted = true;\n\n }\n\n if (mLocationPermissionGranted) {\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n mLastKnownLocation = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n source = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n googleMap.clear();\n }\n\n // Set the map's camera position to the current location of the device.\n if (mCameraPosition != null) {\n\n googleMap.moveCamera(CameraUpdateFactory.newCameraPosition(mCameraPosition));\n } else if (mLastKnownLocation != null) {\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n\n String address = getCompleteAddressString(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude());\n\n googleMap.clear();\n\n MarkerOptions markerOptions = new MarkerOptions()\n .position(new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude()))\n .title(address)\n .icon(BitmapDescriptorFactory.defaultMarker(BitmapDescriptorFactory.HUE_GREEN));\n\n mCurrLocationMarker = googleMap.addMarker(markerOptions);\n mCurrLocationMarker.showInfoWindow();\n tvAddressDisplay.setText(address);\n\n } else {\n Log.d(MapActivity.class.getSimpleName(), \"Current location is null. Using defaults.\");\n googleMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n googleMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n\n\n }", "@SuppressLint(\"MissingPermission\")\n @AfterPermissionGranted(PERMISSION_LOCATION_ID)\n private void getCurrentLocation() {\n Task<Location> task = fusedLocationProviderClient.getLastLocation();\n task.addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if(location != null) {\n currentLat = location.getLatitude();\n currentLong = location.getLongitude();\n\n String placeType = \"museum\";\n\n int radius = ProfileFragment.getRadius();\n\n String url = \"https://maps.googleapis.com/maps/api/place/nearbysearch/json\" +\n \"?location=\" + currentLat + \",\" + currentLong +\n \"&radius=\" + radius +\n \"&type=\" + placeType +\n \"&key=\" + getResources().getString(R.string.maps_api_key);\n\n new NearbyMuseumTask().execute(url);\n\n mapFragment.getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n map = googleMap;\n setMapUISettings();\n\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(currentLat,currentLong), 12\n ));\n }\n });\n }\n }\n });\n }", "private void createRandomGame() {\n ArrayList<int[]> usedCoordinates = new ArrayList<>();\n\n // make sure the board is empty\n emptyBoard();\n\n //find different coordinates\n while (usedCoordinates.size() < 25) {\n int[] temp = new int[]{randomNumberGenerator.generateInteger(size), randomNumberGenerator.generateInteger(size)};\n\n // default contains(arraylist) doesn't work because it compares hashcodes\n if (! contains(usedCoordinates, temp)) {\n usedCoordinates.add(temp);\n }\n }\n\n for (int[] usedCoordinate : usedCoordinates) {\n board.setSquare(usedCoordinate[0], usedCoordinate[1], randomNumberGenerator.generateInteger(size) + 1);\n }\n\n //save start locations\n startLocations = usedCoordinates;\n }", "private void getLocation() {\n LocationRequest mLocationRequestHighAccuracy = new LocationRequest();\n mLocationRequestHighAccuracy.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequestHighAccuracy.setInterval(UPDATE_INTERVAL);\n mLocationRequestHighAccuracy.setFastestInterval(FASTEST_INTERVAL);\n\n\n // new Google API SDK v11 uses getFusedLocationProviderClient(this)\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n Log.d(TAG, \"getLocation: stopping the location service.\");\n stopSelf();\n return;\n }\n Log.d(TAG, \"getLocation: getting location information.\");\n mFusedLocationClient.requestLocationUpdates(mLocationRequestHighAccuracy, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Log.d(TAG, \"onLocationResult: got location result.\");\n\n Location location = locationResult.getLastLocation();\n\n if (location != null) {\n\n saveUserLocation(new LatLng(location.getLatitude(),location.getLongitude()));\n }\n }\n },\n Looper.myLooper()); // Looper.myLooper tells this to repeat forever until thread is destroyed\n }", "private void getCurrentPlaceLikelihoods() {\n // Use fields to define the data types to return.\n List<Place.Field> placeFields = Arrays.asList(Place.Field.NAME, Place.Field.ADDRESS,\n Place.Field.LAT_LNG);\n\n // Get the likely places - that is, the businesses and other points of interest that\n // are the best match for the device's current location.\n @SuppressWarnings(\"MissingPermission\") final FindCurrentPlaceRequest request =\n FindCurrentPlaceRequest.builder(placeFields).build();\n Task<FindCurrentPlaceResponse> placeResponse = mPlacesClient.findCurrentPlace(request);\n placeResponse.addOnCompleteListener(this,\n new OnCompleteListener<FindCurrentPlaceResponse>() {\n @Override\n public void onComplete(@NonNull Task<FindCurrentPlaceResponse> task) {\n if (task.isSuccessful()) {\n FindCurrentPlaceResponse response = task.getResult();\n // Set the count, handling cases where less than 5 entries are returned.\n int count;\n if (response.getPlaceLikelihoods().size() < M_MAX_ENTRIES) {\n count = response.getPlaceLikelihoods().size();\n } else {\n count = M_MAX_ENTRIES;\n }\n\n int i = 0;\n mLikelyPlaceNames = new String[count];\n mLikelyPlaceAddresses = new String[count];\n mLikelyPlaceAttributions = new String[count];\n mLikelyPlaceLatLngs = new LatLng[count];\n\n for (PlaceLikelihood placeLikelihood : response.getPlaceLikelihoods()) {\n Place currPlace = placeLikelihood.getPlace();\n mLikelyPlaceNames[i] = currPlace.getName();\n mLikelyPlaceAddresses[i] = currPlace.getAddress();\n mLikelyPlaceAttributions[i] = (currPlace.getAttributions() == null) ?\n null : TextUtils.join(\" \", currPlace.getAttributions());\n mLikelyPlaceLatLngs[i] = currPlace.getLatLng();\n\n String currLatLng = (mLikelyPlaceLatLngs[i] == null) ?\n \"\" : mLikelyPlaceLatLngs[i].toString();\n\n Log.i(TAG, String.format(\"Place \" + currPlace.getName()\n + \" has likelihood: \" + placeLikelihood.getLikelihood()\n + \" at \" + currLatLng));\n\n i++;\n if (i > (count - 1)) {\n break;\n }\n }\n\n\n // COMMENTED OUT UNTIL WE DEFINE THE METHOD\n // Populate the ListView\n fillPlacesList();\n } else {\n Exception exception = task.getException();\n if (exception instanceof ApiException) {\n ApiException apiException = (ApiException) exception;\n Log.e(TAG, \"Place not found: \" + apiException.getStatusCode());\n }\n }\n }\n });\n }", "private void getDeviceLocation() {\n try {\n if (mLocationPermissionGranted) {\n Task<Location> locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(getActivity(), new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n mLastKnownLocation = (Location) task.getResult();\n if (mLastKnownLocation != null) {\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n\n\n }\n\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n }\n }\n });\n }\n\n } catch (SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n } catch (NullPointerException e) {\n Log.e(\"....\", \"Null pointer exception\");\n }\n }", "private void getUserCurrentLocation()\n\t {\n\t NicerLocationManager locationMgr = new NicerLocationManager(this.getApplicationContext());\n\t if (locationMgr.isAnyLocationServicesAvailble())\n\t {\n\t Log.i(\"MAIN\",\"retrieving current location...\");\n\n\t // get current location\n\t locationMgr.getBestGuessLocation(1000,\n\t new NicerLocationListener() {\n\n\t @Override\n\t public void locationLoaded(final Location location)\n\t {\n\t // parse the current site forecast for users current\n\t // location in the background\n\t //LocationForecastSetup currentForecast = new LocationForecastSetup();\n\t //currentForecast.execute(location);\n\n\t // QLog.i(\"location loaded. finding nearest location...\");\n\t //\n\t // // find nearest weather location\n\t // Site nearestLocation =\n\t // Utils.findNearestSite(mApp, location);\n\t //\n\t // // insert the new current user location site\n\t // SitesProviderHelper.addSavedSite(mApp,\n\t // Long.valueOf(nearestLocation.getmSiteId()), true);\n\t //\n\t Log.i(\"MAIN\",\"location found \"+location.getLatitude()+\" \"+location.getLongitude());\n\t dS.lat=(float) location.getLatitude();\n\t dS.lon=(float) location.getLongitude();\n\t //TextView versionText = (TextView) findViewById(R.id.info_area_string);\n\t //versionText.setText(\"lat \" + location.getLatitude()+\" lon \"+location.getLongitude());\n\t \n\t //\n\t // /*\n\t // * add blank site if user has no saved sites. a blank site\n\t // * forecast is also added in the WeatherService class\n\t // * (runWeatherService method) to display correctly in the\n\t // * view pager.this is later removed when a user adds a\n\t // site\n\t // * and added again when user removes last site.\n\t // */\n\t // SitesProviderHelper.addBlankSavedSite(mApp);\n\t //\n\t // // re-order sites so current location is first\n\t // SitesProviderHelper.setSiteOrder(mApp,\n\t // nearestLocation.getmSiteId(), \"0\");\n\t // SitesProviderHelper.setSiteOrder(mApp,\n\t // Consts.BLANK_SITE_ID, \"1\");\n\n\t }\n\n\t @Override\n\t public void error()\n\t {\n\t // give option to change location settings or select a\n\t // location manually\n\t Log.e(\"MAIN\",\"Error finding best guess location\");\n dS.lat=0;\n dS.lon=0;\n if(once)\n {\n\t //promptSetLocationService(MainActivity.this);\n }\n once=false;\n\t }\n\n\t @Override\n\t public void onFinished()\n\t {\n\t //runUpdateService(false, false);\n\t \tLog.i(\"MAIN\",\"onFinished\");\n\t }\n\t });\n\n\t }\n\t else\n\t {\n\t \n\t \tdS.lat=0;\n dS.lon=0;\n\t \n\t }\n\n\t }", "private void pickCurrentPlace() {\n if (mMap == null) {\n return;\n }\n\n if (mLocationPermissionGranted) {\n getDeviceLocation();\n } else {\n getLocationPermission();\n }\n }", "public static void seed() {\n\n // Get locations, employees, and custodians from database.\n ArrayList<Location> locations = new ArrayList(LocationTable.getLocations().values());\n ArrayList<User> employees = UserTable.getEmployees();\n ArrayList<User> custodians = UserTable.getCustodians();\n\n // Generate random sanitation requests\n Random rand = new Random();\n final int numEntries = 30;\n for (int i = 0; i < numEntries; i++) {\n\n // Generate location (uniform)\n Location location = locations.get(rand.nextInt(locations.size()));\n\n // Generate priority (uniform)\n Priority priority;\n switch (rand.nextInt(3)) {\n case 0: priority = Priority.HIGH; break;\n case 1: priority = Priority.MEDIUM; break;\n default: priority = Priority.LOW; break;\n }\n\n // Generate requester\n User requester = employees.get(rand.nextInt(employees.size()));\n\n // Generate request time (uniform current time + ~12 hours)\n Timestamp requestTime = new Timestamp(\n new Date().getTime() + rand.nextInt(43200000));\n\n // Generate description\n String description;\n switch (rand.nextInt(3)) {\n case 0: description = \"Drink spill\";\n case 1: description = \"Vomit\";\n default: description = \"Radioactive waste\";\n }\n\n // Add request to database\n SanitationRequest request = new SanitationRequest(\n 0, location, priority, Status.INCOMPLETE, description,\n requester, requestTime,\n null, null, null);\n\n // Mark 2/3 of requests as claimed\n int claimFlag = rand.nextInt(3);\n if (claimFlag > 0) {\n\n // Mark as claimed within 1 hour of request\n User servicer = custodians.get(rand.nextInt(custodians.size()));\n Timestamp claimedTime = new Timestamp(\n requestTime.getTime() + rand.nextInt(3600000));\n request.setServicer(servicer);\n request.setClaimedTime(claimedTime);\n\n // Mark half of claimed requests as completed within 2 hours of claim\n if (claimFlag == 2) {\n Timestamp completedTime = new Timestamp(\n claimedTime.getTime() + rand.nextInt(7200000));\n request.setCompletedTime(completedTime);\n request.setStatus(Status.COMPLETE);\n }\n\n // Update request in database\n editSanitationRequest(request);\n }\n\n // Add request to database\n addSanitationRequest(request);\n }\n }", "@Override\n protected void setUp() throws Exception {\n super.setUp();\n mapsActivity = getActivity();\n testGetActivityResourceString();\n\n realLocations = new String[]{\"Crawley\", \"Big Ben\", \"51.24423, -0.2323424\"};\n ArrayList<String> mockLocations = new ArrayList<>();\n for(int i = 0; i < 100; i++){\n mockLocations.add(randomString());\n }\n falseLocations = mockLocations.toArray();\n\n realPrices = new String[]{\"£20,000\", \"£12,123\", \"111,111\", \"32\", \"1\"};\n ArrayList<String> mockPrices = new ArrayList<>();\n for(int i = 0; i < 100; i++){\n mockPrices.add(randomIncorrectPrice());\n }\n falsePrices = mockPrices.toArray();\n setUpRandomLatLngs();\n }", "public void populateRegion(World world, String regionName, ProtectedRegion region) {\n long timeAtStart = System.currentTimeMillis();\n ProtectedPolygonalRegion polygonalRegion = (ProtectedPolygonalRegion) region;\n Location found;\n int attempt = 0;\n int minX = polygonalRegion.getMinimumPoint().getBlockX();\n int maxX = polygonalRegion.getMaximumPoint().getBlockX();\n int minY = polygonalRegion.getMinimumPoint().getBlockY();\n int maxY = polygonalRegion.getMaximumPoint().getBlockY();\n int minZ = polygonalRegion.getMinimumPoint().getBlockZ();\n int maxZ = polygonalRegion.getMaximumPoint().getBlockZ();\n List<Location> locationList = new ArrayList<>();\n // Increase the amount of attempts here.\n while (attempt < 100) {\n attempt++;\n int x = ThreadLocalRandom.current().nextInt(minX, maxX + 1);\n int z = ThreadLocalRandom.current().nextInt(minZ, maxZ + 1);\n int y = getHighestYAt(new Location(world, x, maxY, z), minY);\n if (y == -1) {\n continue;\n }\n found = new Location(world, x, y, z);\n Block block = found.getBlock();\n if (!main.validFloorMaterials.contains(block.getType()))\n continue;\n\n if (!polygonalRegion.contains(BukkitUtil.toVector(found)))\n continue;\n\n Block airSpaceAbove = found.add(0, 1, 0).getBlock();\n if (airSpaceAbove.getType() != Material.AIR)\n continue;\n\n Block airSpaceTwoAbove = found.add(0, 1, 0).getBlock();\n if (airSpaceTwoAbove.getType() != Material.AIR)\n continue;\n\n locationList.add(found.add(0, -1, 0));\n }\n main.preLoadedSpawnLocations.put(regionName, locationList);\n long duration = System.currentTimeMillis() - timeAtStart;\n System.out.print(\"Generated \" + locationList.size() + \" points for the region \" + regionName + \". (Took \" + duration + \" ms.)\");\n }", "@Test\n public void testSearch(){\n for(int i = 0; i < realLocations.length; i++) {\n try {\n String[] locationInfo = new SearchTask().execute(browserKey, realLocations[i]).get();\n assertTrue(locationInfo.length > 0);\n testLocation(locationInfo);\n }\n catch (Exception e){\n assertFalse(\"Search task failed: \" + e.getMessage(), true);\n }\n }\n for(int i = 0; i < falseLocations.length; i++){\n try {\n String[] locationInfo = new SearchTask().execute(browserKey, (String) falseLocations[i]).get();\n assertTrue(locationInfo.length > 0);\n testLocation(locationInfo);\n }\n catch (Exception e){\n assertFalse(\"Search task failed: \" + e.getMessage(), true);\n }\n }\n }", "private float randomiseLongitude(){\n return randomiseFloat(-180,180);\n }", "private void createLocationCallback() {\n mLocationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n super.onLocationResult(locationResult);\n\n mLastLocation = locationResult.getLastLocation();\n mRequestingLocationUpdate = false;\n\n startAddressLookupService();\n }\n };\n }", "public void setUpMapIfNeeded() {\n // Do a null check to confirm that we have not already instantiated the map.\n if (mMap == null) {\n // Try to obtain the map from the SupportMapFragment.\n ((SupportMapFragment) getChildFragmentManager().findFragmentById(R.id.farmMap)).getMapAsync(new OnMapReadyCallback() {\n @Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n setUpMap();\n\n db.open();\n Cursor c1 = db.getallContour(AppConstant.user_id);\n\n allFarmsArray = new ArrayList<String>();\n allFarmsContour = new ArrayList<String>();\n allFarmsArray.add(\"All\");\n\n if (c1.moveToFirst()) {\n do {\n String ss = c1.getString(c1.getColumnIndex(DBAdapter.FARM_NAME));\n String c_lat = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LAT));\n String c_lon = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LON));\n String contour = c1.getString(c1.getColumnIndex(DBAdapter.CONTOUR));\n allFarmsContour.add(contour);\n allFarmsArray.add(ss);\n\n Log.v(\"contourrrr\", \"\" + contour);\n\n FarmData data = new FarmData();\n\n data.setFarmerName(ss);\n\n if (c_lat != null) {\n data.setLatitude(Double.parseDouble(c_lat));\n data.setLongitude(Double.parseDouble(c_lon));\n }\n\n if (mMap != null) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.home);\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getLatitude(), data.getLongitude()))\n .title(\"\" + data.getFarmerName())\n .icon(icon);\n\n\n Marker mMarker = mMap.addMarker(markerOptions);\n if (mMarker != null) {\n\n Log.v(\"markerAddd\", \"Addedddd\");\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(data.getLatitude(), data.getLongitude()), 5));\n }\n data.setMarker(mMarker);\n }\n mandiArray.add(data);\n\n Log.v(\"contour\", \"-0\" + ss);\n } while (c1.moveToNext());\n }\n db.close();\n\n if (mandiArray.size() < 1) {\n if (mMap != null) {\n mMap.addMarker(new MarkerOptions().position(new LatLng(latitude, longitude)).title(\"My Home\").snippet(\"Home Address\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 12.0f));\n }\n }\n\n\n ArrayAdapter<String> chooseYourFarmSpiner = new ArrayAdapter<String>(getActivity(), android.R.layout.simple_spinner_item, allFarmsArray);\n chooseYourFarmSpiner.setDropDownViewResource(android.R.layout.simple_spinner_dropdown_item);\n farmSpinner.setAdapter(chooseYourFarmSpiner);\n\n farmSpinner.setOnItemSelectedListener(new AdapterView.OnItemSelectedListener() {\n @Override\n public void onItemSelected(AdapterView<?> adapterView, View view, int i, long l) {\n if (i > 0) {\n String conto = allFarmsContour.get(i - 1);\n if (conto != null) {\n if (mMap != null) {\n mMap.clear();\n\n }\n points = new ArrayList<LatLng>();\n List<String> l_List = Arrays.asList(conto.split(\"-\"));\n Double lat1 = null;\n Double lon1 =null;\n\n /* Double lat1 = Double.valueOf(l_List.get(0));\n Double lon1 = Double.valueOf(l_List.get(l_List.size() - 1));\n points.add(new LatLng(lat1, lon1));*/\n\n for (int j = 0; j < l_List.size(); j++) {\n String currentString = l_List.get(j);\n if (currentString != null) {\n String[] separated = currentString.split(\",\");\n if (separated.length>1) {\n String la = separated[0];\n String lo = separated[1];\n\n lat1=Double.parseDouble(la);\n lon1=Double.parseDouble(lo);\n\n points.add(new LatLng(Double.valueOf(la), Double.valueOf(lo)));\n\n Log.v(\"points\",la+\",\"+lo);\n }\n }\n }\n\n if (lat1 != null) {\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(lat1, lon1), 19.0f));\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n\n SharedPreferences prefs = getActivity().getSharedPreferences(AppConstant.SHARED_PREFRENCE_NAME, getActivity().MODE_PRIVATE);\n SharedPreferences.Editor ed = prefs.edit();\n ed.putString(\"lat\",lat1+\"\");\n ed.putString(\"lon\",lon1+\"\");\n ed.apply();\n\n } else {\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(Double.valueOf(latitude), Double.valueOf(longitude)), 13.0f));\n Log.v(\"latlon2\", lat1 + \"---\" + lon1);\n mMap.setMapType(GoogleMap.MAP_TYPE_SATELLITE);\n\n SharedPreferences prefs = getActivity().getSharedPreferences(AppConstant.SHARED_PREFRENCE_NAME, getActivity().MODE_PRIVATE);\n SharedPreferences.Editor ed = prefs.edit();\n ed.putString(\"lat\",latitude+\"\");\n ed.putString(\"lon\",longitude+\"\");\n ed.apply();\n }\n if (mMap != null) {\n mMap.clear();\n setUpMap();\n }\n }\n } else {\n\n if (mMap != null) {\n mMap.clear();\n\n }\n\n db.open();\n Cursor c1 = db.getallContour(AppConstant.user_id);\n\n allFarmsArray = new ArrayList<String>();\n allFarmsContour = new ArrayList<String>();\n allFarmsArray.add(\"All\");\n\n if (c1.moveToFirst()) {\n do {\n String ss = c1.getString(c1.getColumnIndex(DBAdapter.FARM_NAME));\n String c_lat = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LAT));\n String c_lon = c1.getString(c1.getColumnIndex(DBAdapter.CENTRE_LON));\n String contour = c1.getString(c1.getColumnIndex(DBAdapter.CONTOUR));\n allFarmsContour.add(contour);\n allFarmsArray.add(ss);\n\n FarmData data = new FarmData();\n\n data.setFarmerName(ss);\n\n if (c_lat != null) {\n data.setLatitude(Double.parseDouble(c_lat));\n data.setLongitude(Double.parseDouble(c_lon));\n }\n\n if (mMap != null) {\n BitmapDescriptor icon = BitmapDescriptorFactory.fromResource(R.drawable.home);\n\n MarkerOptions markerOptions = new MarkerOptions().position(new LatLng(data.getLatitude(), data.getLongitude()))\n .title(\"\" + data.getFarmerName())\n .icon(icon);\n\n\n Marker mMarker = mMap.addMarker(markerOptions);\n if (mMarker != null) {\n\n Log.v(\"markerAddd\", \"Addedddd\");\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(data.getLatitude(), data.getLongitude()), 5));\n }\n data.setMarker(mMarker);\n }\n mandiArray.add(data);\n\n Log.v(\"contour\", \"-0\" + ss);\n } while (c1.moveToNext());\n }\n db.close();\n\n }\n }\n\n @Override\n public void onNothingSelected(AdapterView<?> adapterView) {\n\n }\n });\n\n // Setting a custom info window adapter for the google map\n mMap.setInfoWindowAdapter(new GoogleMap.InfoWindowAdapter() {\n\n // Use default InfoWindow frame\n @Override\n public View getInfoWindow(Marker arg0) {\n return null;\n }\n\n // Defines the contents of the InfoWindow\n @Override\n public View getInfoContents(Marker arg0) {\n View v = getActivity().getLayoutInflater().inflate(R.layout.info_window, null);\n // Getting reference to the TextView to set latitude\n TextView tvLat = (TextView) v.findViewById(R.id.title);\n\n // Getting reference to the TextView to set longitude\n TextView tvLng = (TextView) v.findViewById(R.id.distance);\n System.out.println(\"Title : \" + arg0.getTitle());\n if (arg0.getTitle() != null && arg0.getTitle().length() > 0) {\n // Getting the position from the marker\n\n final String title = arg0.getTitle();\n\n db.open();\n Cursor c = db.getStateFromSelectedFarm(title);\n if (c.moveToFirst()) {\n do {\n AppConstant.stateID = c.getString(c.getColumnIndex(DBAdapter.STATE_ID));\n /* String contour = c.getString(c.getColumnIndex(DBAdapter.CONTOUR));\n getAtLeastOneLatLngPoint(contour);*/\n }\n while (c.moveToNext());\n }\n db.close();\n\n final String distance = arg0.getSnippet();\n tvLat.setText(title);\n tvLng.setText(distance);\n AlertDialog.Builder builder = new AlertDialog.Builder(getActivity());\n builder.setTitle(title).\n setMessage(distance).\n setPositiveButton(\"Farm Data\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n\n dialogInterface.cancel();\n Intent intent = new Intent(getActivity(), NavigationDrawerActivity.class);\n intent.putExtra(\"calling-activity\", AppConstant.HomeActivity);\n intent.putExtra(\"FarmName\", title);\n\n startActivity(intent);\n getActivity().finish();\n\n\n }\n }).\n setNegativeButton(\"OK\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n dialogInterface.cancel();\n }\n });\n builder.show();\n\n } else {\n // Setting the latitude\n tvLat.setText(String.valueOf(arg0.getPosition().latitude));\n // Setting the longitude\n tvLng.setText(String.valueOf(arg0.getPosition().longitude));\n }\n return v;\n }\n });\n\n\n }\n });\n // Check if we were successful in obtaining the map.\n if (mMap != null) {\n\n }\n }\n }", "private void returnDriverLocationstoMaps() {\n }", "@Override\n public void onLocationChanged(Location location) {\n for (Map.Entry<Marker, Integer> e : gameMarkers.entrySet()) {\n double distance = distFrom(\n location.getLatitude(),\n location.getLongitude(),\n e.getKey().getPosition().latitude,\n e.getKey().getPosition().longitude);\n\n if (distance < 25) {\n button.setVisibility(View.VISIBLE);\n standingOnGameId = e.getValue();\n break;\n } else {\n button.setVisibility(View.INVISIBLE);\n }\n }\n }", "LazyResponse<LocationBit> getLocation( double lon, double lat, double accuracy_in_meters);" ]
[ "0.6353253", "0.6255279", "0.6039053", "0.5945015", "0.5907173", "0.58868855", "0.57093215", "0.5703996", "0.56987244", "0.56919354", "0.56859404", "0.56580085", "0.5627557", "0.5588934", "0.5551076", "0.5551076", "0.5534697", "0.5519947", "0.5509985", "0.54900503", "0.54898167", "0.54812807", "0.54672456", "0.5462821", "0.54475206", "0.54287153", "0.5424589", "0.5424073", "0.5407563", "0.54069346", "0.53958845", "0.53806865", "0.53662586", "0.5358883", "0.53568184", "0.5328798", "0.532357", "0.5311432", "0.5297236", "0.52971417", "0.5289726", "0.5289483", "0.52746946", "0.5269804", "0.5263894", "0.52572566", "0.5253865", "0.52450913", "0.52435", "0.52371055", "0.5211079", "0.52084845", "0.5205721", "0.5203618", "0.52003276", "0.5200116", "0.5192188", "0.518919", "0.5188111", "0.5178192", "0.5177133", "0.51732653", "0.5172372", "0.5172117", "0.5163242", "0.5160964", "0.51577103", "0.51537484", "0.514644", "0.5144532", "0.51438993", "0.51430184", "0.51418394", "0.5139354", "0.51370925", "0.5136356", "0.5135017", "0.51293826", "0.51292944", "0.5123778", "0.5123128", "0.51218927", "0.5115188", "0.51137906", "0.51096463", "0.5107122", "0.51065105", "0.5103465", "0.5097699", "0.5097273", "0.5095753", "0.50950426", "0.5094532", "0.5091736", "0.5091182", "0.5084609", "0.50819224", "0.5081498", "0.5080518", "0.5075285" ]
0.7639265
0
This method is to check weather the locations were being generated according to the selected direction
public boolean cond(int i, double curLat, double curLon, double foundLat, double foundLon){ boolean condResult = true; switch (i){ case 0: condResult = curLon < foundLon; break; case 1: condResult = curLon > foundLon; break; case 2: condResult = curLat > foundLat; break; case 3: condResult = curLat < foundLat; break; case 4: condResult = false; break; } return condResult; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void locate() {\n possibleLocations[0][0] = false;\n possibleLocations[0][1] = false;\n possibleLocations[1][0] = false;\n do {\n location.randomGenerate();\n } while (!possibleLocations[location.y][location.x]);\n }", "public boolean getLocationsFrom(double curLat, double curLon, Double num) {\r\n boolean locationsFromDB = true;\r\n String previousCurLat, previousCurLon;\r\n Log.d(\"Detailed analysis\",\"getting data from db, calling getdata function\");\r\n Cursor rs1 = myDB.getData(curLat, curLon, num);\r\n //In this condition if data not found locationsFromDB is set to false and then returned\r\n if (rs1.getCount() <= 0){\r\n System.out.println(rs1.getCount());\r\n locationsFromDB = false;\r\n Log.d(\"Detailed analysis\",\"Data not found\");\r\n }\r\n //In this condition if data is found need to do the further action of finding the user has moved or not and calculating the direction and distance if user has moved\r\n else {\r\n Log.d(\"Detailed analysis\", \"data found\");\r\n Double[] latArray = new Double[rs1.getCount()];\r\n Double[] lonArray = new Double[rs1.getCount()];\r\n int z = 0;\r\n double distanceBtwLocations = 0;\r\n double finalLat = 0.0;\r\n double finalLon = 0.0;\r\n while (rs1.moveToNext()) {\r\n latArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lat)));\r\n lonArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lon)));\r\n Log.d(\"Detailed Analysis\", latArray[z] +\", \" + lonArray[z] );\r\n double tempDistance = findDistanceBetweenPoints(latArray[z], lonArray[z], Math.round(curLat * 10000.0) / 10000.0, Math.round(curLon * 10000.0) / 10000.0);\r\n System.out.println(tempDistance + \" : tempDistance\");\r\n if (distanceBtwLocations < tempDistance) {\r\n finalLat = latArray[z];\r\n finalLon = lonArray[z];\r\n distanceBtwLocations = tempDistance;\r\n System.out.println(distanceBtwLocations + \" : distanceBtwLocations\");\r\n }\r\n z++;\r\n }\r\n if (distanceBtwLocations < 100 * 1606.34) {\r\n Log.d(\"Detailed Analysis\", \"Distance is not greater than 100 miles\");\r\n previousCurLat = String.valueOf(finalLat);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lat));\r\n previousCurLon = String.valueOf(finalLon);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lon));\r\n Cursor rs = myDB.getData(finalLat, finalLon, num);\r\n rs.moveToFirst();\r\n// condChoice = Integer.parseInt(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_condChoice)));\r\n number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num)));\r\n Log.d(\"Detailed Analysis\", \"number while data found: \" + number);\r\n Log.d(\"Detailed Analysis\", \"Recent number value from getLocationsFrom: \" + number);\r\n Log.d(\"Detailed analysis\", \"Lattittude and Longitude points\" + \" \" + Double.parseDouble(previousCurLat) + \",\" + Double.parseDouble(previousCurLon) + \":\" + Math.round(curLat * 10000.0) / 10000.0 + \",\" + Math.round(curLon * 10000.0) / 10000.0);\r\n //if user has not moved then locationsFromDB is set to true and then returned\r\n if (Double.parseDouble(previousCurLat) == Math.round(curLat * 10000.0) / 10000.0 && Double.parseDouble(previousCurLon) == Math.round(curLon * 10000.0) / 10000.0) {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are same\");\r\n rs.moveToFirst();\r\n locationValues = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n locationsFromDB = true;\r\n } else {\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes are not same\");\r\n float distance = 0;\r\n LatLng movedPoints;\r\n Log.d(\"Detailed analysis\", \"finding distance between lattitudes and longitudes\");\r\n distance = findDistanceBetweenPoints(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon), curLat, curLon);\r\n Log.d(\"Detailed Analysis\", \"distance in meters\" + \" \" + distance);\r\n direction = SphericalUtil.computeHeading(new LatLng(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon)), new LatLng(curLat, curLon));\r\n Log.d(\"Detailed Analysis\", \"direction in degrees\" + \" \" + direction);\r\n String values = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results));\r\n String valuesArray[] = values.split(\":\");\r\n Log.d(\"Detailed analysis\", \"finding random locations after moving a bit\");\r\n for (int i = 0; i < valuesArray.length; i++) {\r\n String pointsArray[] = valuesArray[i].split(\",\");\r\n Log.d(\"Detailed analysis\", \"lattitudes and longitudes points\" + pointsArray[0] + \" \" + pointsArray[1]);\r\n movedPoints = findMovedPoints(Double.parseDouble(pointsArray[0]), Double.parseDouble(pointsArray[1]), distance, direction);\r\n Log.d(\"Detailed Analysis\", \"latitude and longitude points after moving\" + \" \" + movedPoints);\r\n locationValues = findRandomLocations(movedPoints.latitude, movedPoints.longitude, 1, distance + 1);\r\n }\r\n }\r\n }\r\n else{\r\n locationValues = findRandomLocations(curLat, curLon, num, 30);\r\n }\r\n locationsFromDB = true;\r\n }\r\n return locationsFromDB;\r\n }", "private void calculateDirections(){\n \t\n \tAddress start = parseAddress(jTextFieldStart);\n \tAddress end = parseAddress(jTextFieldEnd);\n \tif(DEBUG_SETDB){ start = DEBUG_START; end = DEBUG_END; }\n \t\n \t\n \tif(textFieldDefaults.get(jTextFieldStart).equals(jTextFieldStart.getText()) ||\n \t\t\ttextFieldDefaults.get(jTextFieldEnd).equals(jTextFieldEnd.getText())){\n \t\toutputResults(addressError(null, -5));\n \t\t\n \t}else if(start == null || end == null){\n \t\toutputResults(addressError(null, -4));\n \t\t\n \t}else{\n\t\t\ttry{\n\t\t\t\tif(!checkAddrInputFields()){\n\t\t\t\t\tRouteFormatter format = getTravelFormat();\n\t\t EnvironmentVariables.OPTIMIZE_FOR_PERFORMANCE_ON = jCheckBoxQuickSearch.isSelected();\n\t\t\t\t\t\n\t\t\t\t\tcurrDirections = virtualGPS.getDirections(start, end, format);\n\t\t\t\t\t// prepare the map view\n\t\t\t\t\tif(!jFrameMap.isShowing()){\n\t\t\t\t jFrameMap.setVisible(true);\n\t\t\t\t jFrameMap.setBounds(this.getX()+this.getWidth(), this.getY(), \n\t\t\t\t \t\tjFrameMap.getPreferredSize().width,\n\t\t\t\t \t\tjFrameMap.getPreferredSize().height);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutputResults(formatDirections(format));\n\t\t\t\t\t\n\t\t\t\t\tsetAddrInputFields();\n\t\t\t\t\tcheckAddrInputFields();\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tmapPanel.requestFocus();\n\t\t\t\t}\n\t\t\t\t\n\t\t generateMap();\n\t\t \n\t\t \n\t\t\t}catch(InvalidAddressException ex){\n\t\t\t\t\n\t\t \tint error = virtualGPS.checkAddress(start);\n\t\t \tif(error != DirectionsFinder.ADDRESS_VALID){ // if start address is bad\n\t\t \t\toutputResults(addressError(start, error));\n\t\t \t\n\t\t \t}else{\n\t\t\t \terror = virtualGPS.checkAddress(end);\n\t\t \t\toutputResults(addressError(end, error));\n\t\t \t}\n\t\t \t\n\t\t\t}catch(NoPathException ex){\n\t\t\t\t\n\t\t\t\toutputResults(\"No path found:\\nFrom \"+start+\"\\nTo \"+end+\"\\n\");\n\t\t\t}\n \t}\n \n }", "boolean hasLocation();", "boolean hasLocation();", "@Test\n public void readyToTravel()\n {\n Position p = country1.readyToTravel(cityA, cityB);\n assertEquals(p.getFrom(), cityA);\n assertEquals(p.getTo(), cityB);\n assertEquals(p.getDistance(),4);\n assertEquals(p.getTotal(),4);\n //From.equals(To)\n p = country1.readyToTravel(cityA, cityA);\n assertEquals(p.getFrom(), cityA);\n assertEquals(p.getTo(), cityA);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n //No direct path from from to to.\n p = country1.readyToTravel(cityB, cityC);\n assertEquals(p.getFrom(), cityB);\n assertEquals(p.getTo(), cityB);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n //From not in the country.\n p = country1.readyToTravel(cityG, cityA);\n assertEquals(p.getFrom(), cityG);\n assertEquals(p.getTo(), cityG);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n \n //To is in another country\n p = country1.readyToTravel(cityD, cityF);\n assertEquals(p.getFrom(), cityD);\n assertEquals(p.getTo(), cityF);\n assertEquals(p.getDistance(),3);\n assertEquals(p.getTotal(),3);\n }", "private boolean setLocationInformation() {\n try {\n this.mPostModel.setLocationPost(mAutoCompleteTextView.getText().toString());\n\n if (StringEmptyUtil.isEmptyString(this.mPostModel.getLocationPost())) {\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n return false;\n }\n\n this.drop_location.setVisibility(View.VISIBLE);\n this.location_view.setVisibility(View.VISIBLE);\n this.current_location.setVisibility(View.VISIBLE);\n this.current_location.setText(this.mPostModel.getLocationPost());\n return true;\n } catch (Exception ex) {\n ex.printStackTrace();\n }\n Toast.makeText(getApplicationContext(), \"Please Select Location\", Toast.LENGTH_LONG).show();\n\n return false;\n }", "private void triggerPOI() {\n double distanceThreshold = 0.01;// unit is km\n // the distance to the target // the unit is km\n double distanceToPOI_1 = GetDistance(POI_1.latitude, POI_1.longitude, latitude, longitude);\n double distanceToPOI_2 = GetDistance(POI_2.latitude, POI_2.longitude, latitude, longitude);\n double distanceToPOI_3 = GetDistance(POI_3.latitude, POI_3.longitude, latitude, longitude);\n //System.out.println(\"The distance to POI is \" + distanceToPOI);\n // 200km per degree\n if (distanceToPOI_1 < distanceThreshold) {\n mMap.addMarker(\n new MarkerOptions()\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.star))\n .position(POI_1)\n .anchor(0.5f, 0.5f)\n .title(\"Alte Mensa\")\n .snippet(\"---1st Target---\"));\n }\n if (distanceToPOI_2 < distanceThreshold) {\n mMap.addMarker(\n new MarkerOptions()\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.star))\n .position(POI_2)\n .anchor(0.5f, 0.5f)\n .title(\"Helmholtzstraße \")\n .snippet(\"---2nd Target---\"));\n }\n if (distanceToPOI_3 < distanceThreshold) {\n mMap.addMarker(\n new MarkerOptions()\n // .icon(BitmapDescriptorFactory.fromResource(R.drawable.star))\n .position(POI_3)\n .anchor(0.5f, 0.5f)\n .title(\"SLUB\")\n .snippet(\"---3rd Target---\"));\n }\n }", "public void onLocationChanged(Location location) {\n\n if (net_connection_check()) {\n\n String message = String.format(\n\n \"New Location \\n Longitude: %1$s \\n Latitude: %2$s\",\n\n location.getLongitude(), location.getLatitude());\n\n // *************************** GPS LOCATION ***************************\n\n\n driveruserid = User_id;\n driverlat = location.getLatitude();\n driverlong = location.getLongitude();\n\n\n Location driverLocation = new Location(\"user location\");\n driverLocation.setLatitude(driverlat);\n driverLocation.setLongitude(driverlong);\n\n aController.setDriverLocation(driverLocation);\n\n String drivercurrentaddress = lattoaddress(driverlat, driverlong);\n\n\n if (!checktripend && mGoogleMap != null) {\n // mGoogleMap.clear();\n\n\n }\n LatLng mark1 = new LatLng(driverlat, driverlong);\n\n if (logoutcheck) {\n//\t\t\tDriverdetails();\n }\n\n LatLng target = new LatLng(driverlat, driverlong);\n\n String check = fullbutton.getText().toString();\n if (acc.equals(\"yes\") || check.equals(\"End Trip\")) {\n if (check.equals(\"End Trip\")) {\n // mGoogleMap.clear();\n // mGoogleMap.setTrafficEnabled(true);\n }\n origin = new LatLng(driverlat, driverlong);\n /* try{\n String url = getDirectionsUrl(origin, dest);\n drawMarker(dest);\n DownloadTask downloadTask = new DownloadTask();\n //Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }catch (Exception e){\n\n }*/\n\n// checkOffRouteAndRedrwaRoute(location);\n\n }\n\n checkOffRouteAndRedrwaRoute(location);\n if (location.hasBearing() && mGoogleMap != null) {\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(target) // Sets the center of the map to current location\n .zoom(16)\n .bearing(location.getBearing()) // Sets the orientation of the camera to east\n .tilt(0) // Sets the tilt of the camera to 0 degrees\n .build(); // Creates a CameraPosition from the builder\n mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n }\n }", "List<Direction> getValidDirectionsForMovement();", "private void geolocate() throws IOException {\n\n\n List<Address> addresses = geocoder.getFromLocationName(bundle.getString(\"starting\"), 1);\n List<Address> addresses1 = geocoder.getFromLocationName(bundle.getString(\"destiny\"), 1);\n\n if (addresses!=null||addresses.size()>0||addresses1!=null||addresses1.size()>0)\n {\n try {\n\n\n Address address=addresses.get(0);\n Address address1=addresses1.get(0);\n\n Double orglat = address.getLatitude();\n Double orglng = address.getLongitude();\n Double dstlat = address1.getLatitude();\n Double dstlng = address1.getLongitude();\n\n origin = new LatLng(orglat, orglng);\n destiny = new LatLng(dstlat, dstlng);\n\n /* Constants.AddrouteOrigin=new LatLng(orglat,orglng);\n Constants.AddrouteDestiny=new LatLng(dstlat,dstlng);*/\n\n\n Log.d(\"origindest\",Constants.AddrouteOrigin+\" \"+Constants.AddrouteDestiny+\"\");\n\n Log.d(\"origindest\",origin+\" \"+destiny+\"\");\n\n }catch (IndexOutOfBoundsException e){\n Toast.makeText(getContext(),e.getMessage(),Toast.LENGTH_LONG).show();\n }\n\n }\n else {\n Toast.makeText(getContext(),\"no address found\",Toast.LENGTH_LONG).show();\n }\n }", "@Test\n public void shouldFindProperLocationBasedOnDistance() {\n assertEquals(Location.B6,\n Location.findLocation(Color.RED, Location.B2, 4));\n\n assertEquals(Location.B2,\n Location.findLocation(Color.BLACK, Location.B6, 4));\n\n // moving off the board\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 4));\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 6));\n assertEquals(Location.R_BEAR_OFF,\n Location.findLocation(Color.RED, Location.R2, 6));\n\n // moving in from the bar\n assertEquals(Location.R3,\n Location.findLocation(Color.BLACK,\n Location.B_BAR, 3));\n assertEquals(Location.B6,\n Location.findLocation(Color.RED,\n Location.R_BAR, 6));\n // passing from red to black table and opposite\n assertEquals(Location.B10,\n Location.findLocation(Color.BLACK,\n Location.R10, 5));\n assertEquals(Location.R10,\n Location.findLocation(Color.RED,\n Location.B10, 5));\n }", "@Override\n public void onLocationChanged(Location location) {\n\n if(!locationFound){\n while(mlongitude == 0.0 && mlatitude == 0.0) {\n\n mlatitude = location.getLatitude();\n mlongitude = location.getLongitude();\n }\n\n locationFound = true;\n }\n\n }", "public void findValidMoveDirections(){\n\t\t\n\t\tif(currentTile == 2 && (tileRotation == 0 || tileRotation == 180)){ // in vertical I configuration\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: T E,W: F\");\n\t\t}\n\t\telse if(currentTile == 2 && (tileRotation == 90 || tileRotation == 270)){ // in horizontal I configuration\n\t\t\tcanMoveNorth = false; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S: F E,W: T\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 3 && tileRotation == 0){ // L rotated 0 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,E: T S,W: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 90){ // L rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W: T S,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 180){ // L rotated 180 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W: T N,E: F\");\n\t\t}\n\t\telse if(currentTile == 3 && tileRotation == 270){ // L rotated 270 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,E: T N,W: F\");\n\t\t}\n\t\t\n\t\t\n\t\telse if(currentTile == 4 && tileRotation == 0){ // T rotated 0 degrees\n\t\t\tcanMoveNorth = false; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" S,W,E: T N: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 90){ // T rotated 90 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = false;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,E: T W: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 180){ // T rotated 180 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = false;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,W,E: T S: F\");\n\t\t}\n\t\telse if(currentTile == 4 && tileRotation == 270){ // T rotated 270 degrees\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = false; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W: T E: F\");\n\t\t}\n\t\telse if(currentTile == 5){ //in plus tile\n\t\t\tcanMoveNorth = true; canMoveSouth = true;\n\t\t\tcanMoveEast = true; canMoveWest = true;\n//\t\t\tSystem.out.println(\"Current Tile: \" + currentTile + \" Rotatation: \" + tileRotation +\n//\t\t\t\t\t\" N,S,W,E: T\");\n\t\t}\n\t\t\n\t}", "@Override\n protected void checkLocation() {\n // nothing\n }", "private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}", "private void sendRequest() {\n String origin = latitudewisata+\",\"+longitudewisata;\n Log.e(\"orininya\",origin);\n String destination = latitudewisata+\",\"+longitudewisata;\n Log.e(\"Dest\",destination);\n if (origin.isEmpty()) {\n Toast.makeText(this, \"Please enter origin address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n if (destination.isEmpty()) {\n Toast.makeText(this, \"Please enter destination address!\", Toast.LENGTH_SHORT).show();\n return;\n }\n\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n }", "private boolean towerLocation(final Point current_point) {\r\n\t\tfor (int i = 0; i < my_towers.size(); i++) {\r\n\t\t\tif (my_towers.get(i).getLocation().equals(current_point)) {\r\n\t\t\t\treturn true;\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn false;\r\n\t}", "private void getLocation() {\n\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "public static List<Location> generateLocations() {\n\t\tList<Location> locations = new ArrayList<Location>();\n\t\t\n\t\tfor(AREA area : AREA.values()) {\n\t\t\tLocation l = new Location(area);\n\t\t\t\n\t\t\tswitch (area) {\n\t\t\tcase Study:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Hall:\n\t\t\t\tl.neighbors.add(AREA.HW_SH);\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Lounge:\n\t\t\t\tl.neighbors.add(AREA.HW_HL);\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Library:\n\t\t\t\tl.neighbors.add(AREA.HW_SL);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase BilliardRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_HB);\n\t\t\t\tl.neighbors.add(AREA.HW_LB);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase DiningRoom:\n\t\t\t\tl.neighbors.add(AREA.HW_LD);\n\t\t\t\tl.neighbors.add(AREA.HW_BD);\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Conservatory:\n\t\t\t\tl.neighbors.add(AREA.HW_LC);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Ballroom:\n\t\t\t\tl.neighbors.add(AREA.HW_BB);\n\t\t\t\tl.neighbors.add(AREA.HW_CB);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase Kitchen:\n\t\t\t\tl.neighbors.add(AREA.HW_DK);\n\t\t\t\tl.neighbors.add(AREA.HW_BK);\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.isRoom = true;\n\t\t\t\tbreak;\n\t\t\tcase HW_SH:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tbreak;\n\t\t\tcase HW_HL:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tbreak;\n\t\t\tcase HW_SL:\n\t\t\t\tl.neighbors.add(AREA.Study);\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tbreak;\n\t\t\tcase HW_HB:\n\t\t\t\tl.neighbors.add(AREA.Hall);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LD:\n\t\t\t\tl.neighbors.add(AREA.Lounge);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LB:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BD:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tbreak;\n\t\t\tcase HW_LC:\n\t\t\t\tl.neighbors.add(AREA.Library);\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tbreak;\n\t\t\tcase HW_BB:\n\t\t\t\tl.neighbors.add(AREA.BilliardRoom);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_DK:\n\t\t\t\tl.neighbors.add(AREA.DiningRoom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\tcase HW_CB:\n\t\t\t\tl.neighbors.add(AREA.Conservatory);\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tbreak;\n\t\t\tcase HW_BK:\n\t\t\t\tl.neighbors.add(AREA.Ballroom);\n\t\t\t\tl.neighbors.add(AREA.Kitchen);\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tlocations.add(l);\n\t\t}\n\t\t\n\t\treturn locations;\n\t}", "void getDrivableLocations() {\n\t\t\tSystem.out.print(\"\\nPlaces you can drive to: \");\n\t\t\tfor (int i = 0; i < places.length; i++)\n\t\t\t\tif (places[i].drivable) //looks to see if you can drive there \n\t\t\t\t\tif ((places[i] != this)) //if it's not you're current location.\n\t\t\t\t\t\tSystem.out.print(places[i].locationName + \", \");\t//prints the name of the location\t\n\t\t\tSystem.out.println(\"\\n\");\n\t\t}", "private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }", "@Override\r\n\tpublic void newLocationHasBeenCalculated(final String LocationCalculated) {\n\t\tfinal TextView ts = (TextView) findViewById(R.id.virtualSpot);\r\n\t\td(\"newLocation = \" + LocationCalculated);\r\n\t\t//currVS.setText(\"LocationCalculated\");\r\n\t\trunOnUiThread(new Runnable() {\r\n @Override\r\n public void run() {\r\n \tts.setText(LocationCalculated);\r\n \t\r\n \tcurrentVirtualSpot = mapOfVirtualSpots.get(LocationCalculated);\r\n \t\tif (location != -1 && currentVirtualSpot != null){\r\n \t\t\troute = ninethFloor.getRoute(currentVirtualSpot.getFirstPOI(), \"\"+location);\t\r\n \t\t\tdirectionDescription = route.getDirections();\r\n \t\t\tts.setText(directionDescription);\r\n \t\t}\r\n }\r\n });\r\n\t\t\r\n\t}", "public void checkLocationPermission() {\n try {\n if (Build.VERSION.SDK_INT >= Build.VERSION_CODES.M) {\n if (checkPermission(Manifest.permission.ACCESS_FINE_LOCATION, getActivity(), getActivity())) {\n if (checkPermission(Manifest.permission.ACCESS_COARSE_LOCATION, getActivity(), getActivity())) {\n gpsTracker.getLocation();\n } else {\n requestPermission(android.Manifest.permission.ACCESS_COARSE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n requestPermission(android.Manifest.permission.ACCESS_FINE_LOCATION, PERMISSION_REQUEST_CODE_LOCATION, getActivity().getApplicationContext(),\n getActivity());\n }\n } else {\n gpsTracker.getLocation();\n }\n } catch (Exception e) {\n // logException(e, \"GpsMapManualFragment_checkLocationPermission()\");\n }\n\n\n }", "public abstract boolean isAllowableMovement(int[] location, double[] direction);", "boolean checkDir(Directions dir);", "private void handleNewLocation(Location location) {\n\n List<Address> addressList1 = null;\n Geocoder geocoder1 = new Geocoder(this);\n try {\n addressList1 = geocoder1.getFromLocationName(from_dest,1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Address address1 = addressList1.get(0);\n Position1 = new LatLng(address1.getLatitude(),address1.getLongitude());\n\n List<Address> addressList2 = null;\n Geocoder geocoder2 = new Geocoder(this);\n try {\n addressList2 = geocoder2.getFromLocationName(to_dest,1);\n } catch (IOException e) {\n e.printStackTrace();\n }\n Address address2 = addressList2.get(0);\n Position2 = new LatLng(address2.getLatitude(),address2.getLongitude());\n\n String url = getDirectionsUrl(Position1, Position2);\n DownloadTask downloadTask = new DownloadTask();\n downloadTask.execute(url);\n\n DraggableCircle circle1 = new DraggableCircle(Position1, DEFAULT_RADIUS, \"1\");\n mCircles.add(circle1);\n\n DraggableCircle circle2 = new DraggableCircle(Position2, DEFAULT_RADIUS, \"2\");\n mCircles.add(circle2);\n// ###################################################################################\n\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(Position1, 15));\n\n// CameraPosition cameraPosition = new CameraPosition.Builder()\n// .target(Position1).zoom(15).build();\n// mMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition),2000,null);\n\n }", "public String generateRandomLoc(double curLon, double curLat, double num, double r, Context mapsContext) {\r\n myDB = new DBHelper(mapsContext);\r\n boolean locationsFromDB = false;\r\n Log.d(\"Detailed analysis\",\"finding data available in db or not\");\r\n //Method to find weather there was a previous record of fake locations.\r\n locationsFromDB = getLocationsFrom(curLat, curLon, num);\r\n r = r * 1609.34;\r\n //Condition if there was no previous record\r\n if(!locationsFromDB) {\r\n //Method to generate fake locations\r\n locationValues = findRandomLocations(curLat, curLon, num, r );\r\n Log.d(\"Detailed Analysis\",\"Going to save location values in sqllite db\");\r\n //calling insertLocations in DBHelper class to insert the generated fake locations into db for further use\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,locationValues, condChoice ,false);\r\n Cursor rs = myDB.getData(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0, num);\r\n rs.moveToFirst();\r\n number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num)));\r\n Log.d(\"Detailed Analysis\",\"Recent number value from !locationsFromDB: \"+ number);\r\n Log.d(\"Detailed analysis\",\"Location Values \"+locationValues);\r\n }\r\n else{\r\n locationValues = locationValues+\"\";\r\n Log.d(\"Detailed Analysis\",\"Going to save updated location values in sqllite db\");\r\n double num1;\r\n String values = locationValues;\r\n String valuesArray[] = values.split(\":\");\r\n num1 = valuesArray.length;\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num1,locationValues, condChoice, false);\r\n Log.d(\"Detailed analysis\",\"Location Values \"+locationValues);\r\n }\r\n //Condition to check if the requested fake locations count was greater than the previous request\r\n if(num > number){\r\n Log.d(\"Detailed Analysis: \",\"num: \"+num +\" number: \"+ number);\r\n Log.d(\"Detailed Analysis\",\"Number of fake locations requested this time were higher than previous request\");\r\n Log.d(\"Detailed Analysis\",\"Generating new random locations\");\r\n String temp = locationValues;\r\n locationValues = \"\";\r\n //generating new fake locations for the extra count\r\n temp = temp + findRandomLocations(curLat, curLon, num - number, r);\r\n Log.d(\"Detailed Analysis\",\"Going to save updated location values in sqllite db after adding new random locations\");\r\n //updating the previous record with new fake locations count\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,temp, condChoice, true);\r\n locationValues = temp;\r\n }\r\n //Condition to check if the requested fake locations count was less than the previous request\r\n if(num < number){\r\n Log.d(\"Detailed Analysis: \",\"num: \"+num +\" number: \"+ number);\r\n Log.d(\"Detailed Analysis\",\"Number of fake locations requested this time were lesser than previous request\");\r\n String values = locationValues;\r\n String valuesArray[] = values.split(\":\");\r\n String temp = \"\";\r\n //trimmig the fake locations count to the requested number\r\n for(int i = 0; i < num; i++) {\r\n String pointsArray[] = valuesArray[i].split(\",\");\r\n temp = temp + Double.parseDouble(pointsArray[0]) + \",\" + Double.parseDouble(pointsArray[1]) + \":\" + \"\" ;\r\n }\r\n locationValues = temp;\r\n Log.d(\"Detailed Analysis\",\"Location values when reduced fake locations count to \"+num + \": \"+ locationValues);\r\n }\r\n Log.d(\"Detailed Analysis: \", \"number before returning locations: \"+ number);\r\n return locationValues;\r\n }", "@Test\n void calculateRoute() {\n GPSObject n2 = new GPSObject(\"Centenary 2\");\n Location n1 = new Location(\"Centenary 2\",\"0\",n2);\n GPSObject n3 = new GPSObject(\"Thuto 1-5\");\n Location n4 = new Location(\"Thuto 1-5\",\"1\",n3);\n Locations loc = new Locations();\n assertNotNull(roo.calculateRoute(loc));\n }", "private void report() {\n\n if(currentPosition.getX() == -1 && currentPosition.getY() == -1) {\n System.out.println(\"Robot is not placed, yet.\");\n return;\n }\n\n System.out.println(currentPosition.getX() + \", \"\n + currentPosition.getY() + \", \"\n + currentPosition.getDirection());\n }", "public void RunwaySystem()\r\n\t{\r\n\t\t// if the wind direction is between 136 and 225\r\n\t\tif(wind_direction >= 136 && wind_direction <= 225)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wind direction is \" + wind_direction + \"° blowing North to South\");\r\n\t\t\trunway_number = 18;\r\n\t\t\trunway_direction = \" facing South to North.\";\r\n\t\t}\r\n\t\t// if the wind direction is between 1 and 45 and between 316 and 360\r\n\t\telse if((wind_direction >= 1 && wind_direction <= 45) || \r\n\t\t\t\t(wind_direction >= 316 && wind_direction <= 360))\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wind direction is \" + wind_direction + \"° blowing South to North\");\r\n\t\t\trunway_number = 36;\r\n\t\t\trunway_direction = \" facing North to South.\";\r\n\t\t}\r\n\t\telse if(wind_direction >= 46 && wind_direction <= 135)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wind direction is \" + wind_direction + \"° blowing West to East\");\r\n\t\t\trunway_number = 9;\r\n\t\t\trunway_direction = \" facing East to West.\";\r\n\t\t}\r\n\t\t// if the wind direction is between 226 and 315\r\n\t\telse if(wind_direction >= 226 && wind_direction <= 315)\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Wind direction is \" + wind_direction + \"° blowing East to West\");\r\n\t\t\trunway_number = 27;\r\n\t\t\trunway_direction = \" facing West to East.\";\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tSystem.out.println(\"Not a valid wind direction\");\r\n\t\t}\r\n\t}", "protected final String look(int direction, boolean steps) {\r\n \t\r\n \t//pay the LOOK_ENERGY_COST\r\n \tenergy = energy - Params.LOOK_ENERGY_COST;\r\n \tint look;\r\n \t//get the x and y coordinates of the critter\r\n \tint xCoord = this.x_coord;\r\n \tint yCoord = this.y_coord;\r\n \t\r\n \tif(steps == true)\r\n \t\tlook = 2; //look 2 steps\r\n \telse \r\n \t\tlook = 1; //look 1 step\r\n \t\r\n \t//get the coordinate position of the location to look\r\n \tswitch(direction) {\r\n \tcase 0:\r\n \t\txCoord += look; //straight right \r\n \t\tbreak;\r\n \t\t\r\n \tcase 1:\r\n \t\txCoord += look; //diagonally up and to the right\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 2:\r\n \t\tyCoord -= look; //straight up\r\n \t\tbreak;\r\n \t\t\r\n \tcase 3: \r\n \t\txCoord -= look; //diagonally up and to left\r\n \t\tyCoord -= look;\r\n \t\tbreak;\r\n \t\t\r\n \tcase 4:\r\n \t\txCoord -= look; //straight left\r\n \t\tbreak;\r\n \t\r\n \tcase 5:\r\n \t\txCoord -= look; //diagonally down and to left\r\n \t\tyCoord += look; \r\n \t\tbreak;\r\n \t\t\r\n \tcase 6:\r\n \t\tyCoord += look; //diagonally down\r\n \t\tbreak;\r\n \t\t\r\n \tcase 7:\r\n \t\txCoord += look; //diagonally down and to right\r\n \t\tyCoord += look;\r\n \t\tbreak;\r\n \t}\r\n \t\r\n \t//wrap-around world, need to correct coordinates\r\n \tif(xCoord > (Params.WORLD_WIDTH - 1))\r\n \t\txCoord %= Params.WORLD_WIDTH;\r\n \telse if(xCoord < 0)\r\n \t\txCoord += Params.WORLD_WIDTH;\r\n \tif(yCoord > (Params.WORLD_HEIGHT - 1))\r\n \t\tyCoord %= Params.WORLD_HEIGHT;\r\n \telse if(yCoord < 0)\r\n \t\tyCoord += Params.WORLD_HEIGHT;\r\n \r\n \t//Iterate through population hashMap\r\n \tIterator<String> positionIter = population.keySet().iterator();\r\n \t//Iterate through all of the position keys\r\n \twhile(positionIter.hasNext()) {\r\n \t\t//get the position key\r\n \t\tString position = positionIter.next();\r\n \t\t//get the critter list in that position\r\n \t\tArrayList<Critter> critterList = population.get(position);\r\n \t\t//iterate through the critters \r\n \t\tListIterator<Critter> currCritter = critterList.listIterator();\r\n \t\twhile(currCritter.hasNext()) {\r\n \t\t\t//get a critter\r\n \t\t\tCritter c = currCritter.next();\r\n \t\t\t//check whether each critter is in the position\r\n \t\t\tif(c.x_coord == xCoord && c.y_coord == yCoord) {\r\n \t\t\t\tif(c.getEnergy() >= 0) {\r\n \t\t\t\t\treturn c.toString();\r\n \t\t\t\t}\r\n \t\t\t}\r\n \t\t}\r\n \t}\r\n \t\r\n \t//return null if the position is unoccupied\r\n \treturn null;\r\n }", "private void returnDriverLocationstoMaps() {\n }", "private boolean checkAddrInputFields(){\n \tboolean same = textFieldCurrents.get(jTextFieldStart).equals(jTextFieldStart.getText()) &&\n\t\t\t\ttextFieldCurrents.get(jTextFieldEnd).equals(jTextFieldEnd.getText()) &&\n\t\t\t\tjComboBoxFormat.getSelectedIndex() == selectedFormat &&\n\t\t\t\tjCheckBoxQuickSearch.isSelected() == quickSearch;\n \t\n \tif(DEBUG){\n \t\toutputResults(\"lasts:\");\n \t\toutputResults(textFieldCurrents.get(jTextFieldStart));\n\t\t\toutputResults(textFieldCurrents.get(jTextFieldEnd));\n\t\t\toutputResults(\"\"+jComboBoxFormat.getSelectedIndex()); \n\t\t\toutputResults(\"nows:\");\n\t\t\toutputResults(jTextFieldEnd.getText());\n\t\t\toutputResults(jTextFieldStart.getText());\n\t\t\toutputResults(\"\"+selectedFormat);\n \t}\n \t\n \tif(!same){\n \t\tjButtonGetDirections.setText(\"Find Directions!\");\n \t}else{\n \t\tjButtonGetDirections.setText(\"Refresh Map\");\n \t}\n \treturn same;\n }", "@Test\n\t\tpublic void testFindLocation1() {\n\t\t\t// Initialize 3 points\n\t\t\tPoint2D p1 = new Point2D.Double(1.848,8.331);\n\t\t\tPoint2D p2 = new Point2D.Double(10.241,9.463);\n\t\t\tPoint2D p3 = new Point2D.Double(8.889,2.456);\n\t\t\t\n\t\t\t// Initialize 3 angles in degrees.\n\t\t\tdouble ang1 = 168.7810;\n\t\t\tdouble ang2 = 64.0945;\n\t\t\tdouble ang3 = 268.5473;\n\t\t\t\n\t\t\t// Initialized the Triangulate object and load points and radii\n\t\t\tTriangulate test = new Triangulate();\n\t\t\ttest.setPoints(p1, p2, p3);\n\t\t\ttest.setAngles(ang1, ang2, ang3);\t\n\t\t\t// Set the given and actual location with the error we have\n\t\t\tPoint2D loc = test.findLocation();\n\t\t\tPoint2D actual = new Point2D.Double(9.002, 6.912);\n\t\t\tdouble err = 1e-4; \n\t\t\t\n\t\t\t// Test x and y coordinates within a certain error\n\t\t\tassertEquals(actual.getX(), loc.getX(), err);\n\t\t\tassertEquals(actual.getY(), loc.getY(), err);\n\n\t\t}", "private void drawMembersLocation () {\n // Ve tat ca cac vi tri thanh vien tren ban do\n ArrayList<TourMember> tourMembers = OnlineManager.getInstance().mTourList.get(tourOrder).getmTourMember();\n for (int i = 0; i < tourMembers.size(); i++) {\n TourMember tourMember = tourMembers.get(i);\n // Neu khong co vi tri thi khong ve\n if (tourMember.getmLocation() == null) {\n break;\n }\n // Thay doi mau vi tri thanh vien\n MapMemberPositionLayoutBinding memberLocationLayoutBinding = DataBindingUtil.inflate(getLayoutInflater(), R.layout.map_member_position_layout, null, false);\n // Thay doi trang thai markup\n // Kiem tra xem vai tro cua thanh vien trong tour\n int function = tourMember.getmFunction();\n // Kiem tra xem tour da dien ra chua\n if (function == 1) {\n // Truong doan, thay doi mau sac markup thanh do\n memberLocationLayoutBinding.memberLocationImage.setColorFilter(Color.RED, PorterDuff.Mode.SRC_ATOP);\n } else {\n // Cac thanh vien con lai, thay doi mau sac markup thanh xanh\n memberLocationLayoutBinding.memberLocationImage.setColorFilter(Color.BLUE, PorterDuff.Mode.SRC_ATOP);\n }\n // Marker google map\n View markerView = memberLocationLayoutBinding.getRoot();\n // Khoi tao marker\n MarkerOptions markerOptions = new MarkerOptions()\n .draggable(false)\n .title(tourMember.getUserInfo().getFullName())\n .position(tourMember.getmLocation())\n .icon(BitmapDescriptorFactory.fromBitmap(getMemberLocationBitmapFromView(markerView)));\n if (tourMember.getmFunction() == 0) {\n // Thanh vien\n markerOptions.snippet(getString(R.string.tour_function_member));\n } else if (tourMember.getmFunction() == 1) {\n // Truong doan\n markerOptions.snippet(getString(R.string.tour_function_leader));\n } else if (tourMember.getmFunction() == 2) {\n // Pho doan\n markerOptions.snippet(getString(R.string.tour_function_vice_leader));\n } else {\n // Phu huynh\n markerOptions.snippet(getString(R.string.tour_function_parent));\n }\n mMap.addMarker(markerOptions);\n\n // Goi su kien khi nhan vao tieu de thanh vien\n mMap.setOnInfoWindowClickListener(new GoogleMap.OnInfoWindowClickListener() {\n @Override\n public void onInfoWindowClick(Marker marker) {\n // TODO: Chuyen sang man hinh nhan tin khi nhan vao tieu de thanh vien\n return;\n// openTimesheetInfo(marker.getTitle());\n }\n });\n }\n }", "public void determineLocType() {\r\n\t\tif(usSensor.rawDistance()<WALL_THRESHOLD) { //Deciding what localizer should be used\r\n\t\t\tthis.loc = LocalizerType.RISING_EDGE;\r\n\t\t}else {\r\n\t\t\tthis.loc=LocalizerType.FALLING_EDGE;\r\n\t\t}\r\n\t}", "private void sendRequestAPI(Double lat,Double lng, String places) {\n\n String origin = String.valueOf(lat) + \",\" + String.valueOf(lng);\n Geocoder geocoder = new Geocoder(getActivity(), Locale.getDefault());\n String destination = \"0,0\";\n String wayPoints = \"0,0\";\n\n switch (places) {\n case \"Family Walk\" :\n destination = formatCoordinates(6);\n wayPoints = formatCoordinates(4) + \"|\" + formatCoordinates(5);\n break;\n\n case \"Retro Tour\" :\n destination = formatCoordinates(9);\n wayPoints =formatCoordinates(7) + \"|\" + formatCoordinates(8);\n break;\n\n case \"Sports Tour\" :\n destination = formatCoordinates(11);\n wayPoints = formatCoordinates(9) + \"|\" + formatCoordinates(8);\n break;\n case \"custom\":\n destination = getActivity().getIntent().getStringExtra(\"destination\");\n wayPoints = getActivity().getIntent().getStringExtra(\"waypoints\");\n break;\n\n }\n //String destination = \"-27.494721,153.014262\";\n //String wayPoints = \"-27.498172, 153.013585\";\n try {\n\n new Directions(this, origin, destination, wayPoints).execute();\n Double latDes= Double.parseDouble(destination.split(\",\")[0]);\n Double lngDes= Double.parseDouble(destination.split(\",\")[1]);\n String [] points = wayPoints.split(Pattern.quote(\"|\")) ;\n\n if(wayPoints.equals(\"\")){\n\n }\n else{\n for(String point : points) {\n Double latPoint = Double.parseDouble((point.split(\",\")[0]));\n Double lngPoint = Double.parseDouble((point.split(\",\")[1]));\n List<Address> addressesPoint = geocoder.getFromLocation(latPoint, lngPoint, 1);\n wayPointsMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesPoint.get(0).getAddressLine(0))\n .position(new LatLng(latPoint, lngPoint))));\n }\n }\n\n\n List<Address> addressesStart = geocoder.getFromLocation(lat, lng, 1);\n List<Address> addressesEnd = geocoder.getFromLocation(latDes,\n lngDes, 1);\n //originMarkers.add(mMap.addMarker(new MarkerOptions().title(addressesStart.get(0).getAddressLine(0))\n //.position(new LatLng(lat, lng))));\n destinationMarkers.add(mMap.addMarker((new MarkerOptions().title(addressesEnd.get(0).getAddressLine(0))\n .position(new LatLng(latDes, lngDes)))));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latDes,\n lngDes), 16));\n\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n Log.i(LOG_TAG, \"Location Change\");\n Location target = new Location(\"target\");\n String closePoint;\n int closestIndex = -1;// Default to none\n float minDistance = 1000; // Default to high value\n\n // Focus camera on initial location\n if (mapReady == true && initialCameraSet == true) {\n LatLng initialLocation = new LatLng(location.getLatitude(), location.getLongitude());\n gMap.moveCamera(CameraUpdateFactory.newLatLng(initialLocation));\n initialCameraSet = false; // Initial location already displayed\n }\n // Check if spot is close\n for (int i = 0; i < LocationsClass.spotsCoordinates.length; ++i) {\n target.setLatitude(LocationsClass.spotsCoordinates[i].latitude);\n target.setLongitude(LocationsClass.spotsCoordinates[i].longitude);\n if (location.distanceTo(target) < minDistance) {\n closestIndex = i; //Save closes index\n minDistance = location.distanceTo(target); // update minDistance\n }\n }\n\n if (minDistance < 200 && minDistance > 20) {\n Toast.makeText(getActivity(), \"Location: \" + LocationsClass.spotNames[closestIndex] +\n \" is within 200 meters!\\n\" + \"Go check it out!\", Toast.LENGTH_LONG).show();\n// pointsOfInterests.get(closestIndex).showInfoWindow();\n// gMap.getUiSettings().setMapToolbarEnabled(true);\n popNotification = true; // Allow notification to trigger when user reaches destination\n } else if (minDistance < 20) {\n if (closestIndex != currentUserLocation) {\n int locationId = getResources().getIdentifier(\"loc_\"+closestIndex, \"drawable\", getActivity().getPackageName());\n showArrivalNotification(locationId, LocationsClass.spotNames[closestIndex]);\n currentUserLocation = closestIndex; // Update user location\n }\n }\n\n if (hotspotIndex != -1) {\n pointsOfInterests.get(hotspotIndex).showInfoWindow();\n gMap.getUiSettings().setMapToolbarEnabled(true);\n }\n }", "private void QueryDirections() {\n\t\tshowProgress(true, \"正在搜索导航路线...\");\n\t\t// Spawn the request off in a new thread to keep UI responsive\n\t\tfor (final FloorInfo floorInfo : floorList) {\n\t\t\tif (floorInfo.getPoints() != null\n\t\t\t\t\t&& floorInfo.getPoints().length >= 2) {\n\n\t\t\t\tThread t = new Thread() {\n\t\t\t\t\t@Override\n\t\t\t\t\tpublic void run() {\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t// Start building up routing parameters\n\t\t\t\t\t\t\tRouteTask routeTask = RouteTask\n\t\t\t\t\t\t\t\t\t.createOnlineRouteTask(\n\t\t\t\t\t\t\t\t\t\t\tfloorInfo.getRouteServerPath(),\n\t\t\t\t\t\t\t\t\t\t\tnull);\n\n\t\t\t\t\t\t\tRouteParameters rp = routeTask\n\t\t\t\t\t\t\t\t\t.retrieveDefaultRouteTaskParameters();\n\t\t\t\t\t\t\tNAFeaturesAsFeature rfaf = new NAFeaturesAsFeature();\n\t\t\t\t\t\t\t// Convert point to EGS (decimal degrees)\n\t\t\t\t\t\t\t// Create the stop points (start at our location, go\n\t\t\t\t\t\t\t// to pressed location)\n\t\t\t\t\t\t\t// StopGraphic point1 = new StopGraphic(mLocation);\n\t\t\t\t\t\t\t// StopGraphic point2 = new StopGraphic(p);\n\t\t\t\t\t\t\trfaf.setFeatures(floorInfo.getPoints());\n\t\t\t\t\t\t\trfaf.setCompressedRequest(true);\n\t\t\t\t\t\t\trp.setStops(rfaf);\n\n\t\t\t\t\t\t\t// Set the routing service output SR to our map\n\t\t\t\t\t\t\t// service's SR\n\t\t\t\t\t\t\trp.setOutSpatialReference(wm);\n\t\t\t\t\t\t\trp.setFindBestSequence(true);\n\t\t\t\t\t\t\trp.setPreserveFirstStop(true);\n\t\t\t\t\t\t\tif (floorInfo.getEndPoint() != null) {\n\t\t\t\t\t\t\t\trp.setPreserveLastStop(true);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t// Solve the route and use the results to update UI\n\t\t\t\t\t\t\t// when received\n\t\t\t\t\t\t\tfloorInfo.setRouteResult(routeTask.solve(rp));\n\n\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\tmException = e;\n\t\t\t\t\t\t\t// mHandler.post(mUpdateResults);\n\t\t\t\t\t\t}\n\t\t\t\t\t\trouteIndex++;\n\t\t\t\t\t\tif (routeIndex >= routeCount) {\n\t\t\t\t\t\t\tmHandler.post(mSetCheckMap);\n\t\t\t\t\t\t\tmHandler.post(mUpdateResults);\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t};\n\t\t\t\t// Start the operation\n\t\t\t\tt.start();\n\t\t\t}\n\t\t}\n\n\t}", "@Override\n public void onLocationResult(LocationResult locationResult) {\n Log.d(TAG, \"onSuccess: Location : \" + locationResult);\n if (locationResult == null) {\n return;\n }\n for (Location location : locationResult.getLocations()) {\n // Update UI with location data\n Toast.makeText(MainActivity.this, \"Location : \" + location, Toast.LENGTH_SHORT).show();\n }\n }", "private void sendRequest() {\n double origLat = currLatLng.latitude;\n double origLong = currLatLng.longitude;\n double destLat = destLatLng.latitude;\n double destLong = destLatLng.longitude;\n String origin = origLat + \",\" + origLong;\n String destination = destLat + \",\" + destLong;\n Log.d(TAG, \"sendRequest: origin LatLong- \" + \" destination LaatLng- \" + destLatLng);\n try {\n new DirectionFinder(this, origin, destination).execute();\n } catch (UnsupportedEncodingException e) {\n e.printStackTrace();\n }\n\n }", "private void initLocation() {\n BaiduLocationHolder.OPTION.setLocationMode(LocationClientOption.LocationMode.Hight_Accuracy);\n //可选,默认高精度,设置定位模式,高精度,低功耗,仅设备\n\n BaiduLocationHolder.OPTION.setCoorType(\"bd09ll\");\n //可选,默认gcj02,设置返回的定位结果坐标系\n\n int span = 1000;\n BaiduLocationHolder.OPTION.setScanSpan(span);\n //可选,默认0,即仅定位一次,设置发起定位请求的间隔需要大于等于1000ms才是有效的\n\n BaiduLocationHolder.OPTION.setIsNeedAddress(true);\n //可选,设置是否需要地址信息,默认不需要\n\n BaiduLocationHolder.OPTION.setOpenGps(true);\n //可选,默认false,设置是否使用gps\n\n BaiduLocationHolder.OPTION.setLocationNotify(true);\n //可选,默认false,设置是否当GPS有效时按照1S/1次频率输出GPS结果\n\n BaiduLocationHolder.OPTION.setIsNeedLocationDescribe(true);\n //可选,默认false,设置是否需要位置语义化结果,可以在BDLocation.getLocationDescribe里得到,结果类似于“在北京天安门附近”\n\n BaiduLocationHolder.OPTION.setIsNeedLocationPoiList(true);\n //可选,默认false,设置是否需要POI结果,可以在BDLocation.getPoiList里得到\n\n BaiduLocationHolder.OPTION.setIgnoreKillProcess(false);\n //可选,默认true,定位SDK内部是一个SERVICE,并放到了独立进程,设置是否在stop的时候杀死这个进程,默认不杀死\n\n BaiduLocationHolder.OPTION.SetIgnoreCacheException(false);\n //可选,默认false,设置是否收集CRASH信息,默认收集\n\n BaiduLocationHolder.OPTION.setEnableSimulateGps(false);\n //可选,默认false,设置是否需要过滤GPS仿真结果,默认需要\n\n// BaiduLocationHolder.OPTION.setWifiValidTime(5*60*1000);\n //可选,7.2版本新增能力,如果您设置了这个接口,首次启动定位时,会先判断当前WiFi是否超出有效期,超出有效期的话,会先重新扫描WiFi,然后再定位\n\n BaiduLocationHolder.CLIENT.setLocOption(BaiduLocationHolder.OPTION);\n }", "public void checkLocation(int location2[])\n\t{\n\t\t\n\t\tif(this.eatable && this.location[0]==location2[0] && this.location[1]==location2[1])\n\t\t{\t\n\t\t\t\tthis.deadOrAlive=\"Dead\";\t\t\n\t\t}\n\t\telse\n\t\t\tthis.deadOrAlive=\"Alive\";\n\t\t\n\t}", "public boolean paths(String direction) {\n switch (direction) {\n case \"up\": if (y + 1 > world.findWorldSize()) { return false; }\n break;\n case \"down\": if (y - 1 < 0) { return false; }\n break;\n case \"left\": if (x - 1 < 0) { return false; }\n break;\n case \"right\": if (x + 1 > world.findWorldSize()) { return false; }\n break;\n }\n return true;\n }", "@Test\n\t\tpublic void testFindLocation2() {\n\t\t\t// Initialize 3 points\n\t\t\tPoint2D p1 = new Point2D.Double(0,0);\n\t\t\tPoint2D p2 = new Point2D.Double(1,1);\n\t\t\tPoint2D p3 = new Point2D.Double(10,1);\n\t\t\t\n\t\t\t// Initialize 3 angles in degrees.\n\t\t\tdouble ang1 = 187.1250;\n\t\t\tdouble ang2 = 170.5377;\n\t\t\tdouble ang3 = 4.7636;\n\t\t\t\n\t\t\t// Initialized the Triangulate object and load points and radii\n\t\t\tTriangulate test = new Triangulate();\n\t\t\ttest.setPoints(p1, p2, p3);\n\t\t\ttest.setAngles(ang1, ang2, ang3);\t\n\t\t\t// Set the given and actual location with the error we have\n\t\t\tPoint2D loc = test.findLocation();\n\t\t\tPoint2D actual = new Point2D.Double(4,0.5);\n\t\t\tdouble err = 1e-4; \n\t\t\t\n\t\t\t// Test x and y coordinates within a certain error\n\t\t\tassertEquals(actual.getX(), loc.getX(), err);\n\t\t\tassertEquals(actual.getY(), loc.getY(), err);\n\n\t\t}", "private void inputLocation() {\n// boolean googleMapExist= (ConnectionResult.SUCCESS==GooglePlayServicesUtil.isGooglePlayServicesAvailable(mContext));\n//\n// if(googleMapExist) {\n// org.wowtalk.Log.w(\"google map exist\");\n// Intent mapIntent = new Intent(mContext, PickLocActivity.class);\n// mapIntent.putExtra(\"auto_loc\", true);\n// mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n// } else {\n //org.wowtalk.Log.w(\"google map not exist\");\n Intent mapIntent = new Intent(mContext, PickLocActivityWithAMap.class);\n mapIntent.putExtra(\"auto_loc\", true);\n mContext.startActivityForResult(mapIntent, REQ_INPUT_LOC);\n //}\n }", "private void travelTo(Location destination) \n\t{\n\t\tSystem.out.println(destination.name());\n\t\tif (destination == Location.Home) {\n\t\t\t\n\t\t\tif (role == Role.Attacker) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) { \n\t\t\t\t\t/*case 1: travelTo(Location.X4); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 2: travelTo(Location.X3); travelTo(Location.AttackBase); break;\n\t\t\t\t\tcase 3: case 4: travelTo(Location.AttackBase);*/\n\t\t\t\tcase 1: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 2: travelTo(Location.AttackBase); break;\n\t\t\t\tcase 3: //travelTo(Location.X2);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\tcase 4: //travelTo(Location.X1);\n\t\t\t\t\t\ttravelTo(Location.AttackBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t} else if (role == Role.Defender) {\n\t\t\t\t\n\t\t\t\tswitch(startingCorner) {\n\t\t\t\t\tcase 1: //travelTo(Location.X4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 2: //travelTo(Location.X3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 3: travelTo(Location.DefWay3);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t\tcase 4: travelTo(Location.DefWay4);\n\t\t\t\t\t\t\ttravelTo(Location.DefenseBase); break;\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\t\n\t\telse if (destination == Location.BallPlatform)\n\t\t\tnavigator.travelTo(ballPlatform[0], ballPlatform[1]);\n\t\t\t\n\t\telse if (destination == Location.ShootingRegion)\n\t\t\tnavigator.travelTo(CENTER, 7 * 30.0); // we have to account for the case when there is an obstacle in the destination\n\t\t\t// also need to find a way of determining the y coordinate\n\n\t\telse if (destination == Location.AttackBase)\n\t\t\tnavigator.travelTo(ATTACK_BASE[0], ATTACK_BASE[1]); \n\t\t\n\t\telse if (destination == Location.DefenseBase)\n\t\t\tnavigator.travelTo(DEFENSE_BASE[0], DEFENSE_BASE[1]);\n\t\t\n\t\telse if (destination == Location.X1) \n\t\t\tnavigator.travelTo(X[0][0] * 30.0, X[0][1] * 30.0);\n\n\t\telse if (destination == Location.X2)\n\t\t\tnavigator.travelTo(X[1][0] * 30.0, X[1][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.X3) \n\t\t\tnavigator.travelTo(X[2][0] * 30.0, X[2][1] * 30.0);\n\n\t\telse if (destination == Location.X4)\n\t\t\tnavigator.travelTo(X[3][0] * 30.0, X[3][1] * 30.0);\n\t\t\n\t\telse if (destination == Location.DefWay3)\n\t\t\tnavigator.travelTo(240, 240);\n\t\t\n\t\telse if (destination == Location.DefWay4)\n\t\t\tnavigator.travelTo(60, 240);\n\n\t\t\n\t\t// return from method only after navigation is complete\n\t\twhile (navigator.isNavigating())\n\t\t{\n\t\t\tSystem.out.println(\"destX: \" + navigator.destDistance[0] + \"destY: \" + navigator.destDistance[1]);\n\t\t\ttry {\n\t\t\t\tThread.sleep(100);\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\t\n\t}", "private void checkLocationPermission() {\n\n if(ContextCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION)\n != PackageManager.PERMISSION_GRANTED){\n //location permission required\n ActivityCompat.requestPermissions(this, new String[]\n {Manifest.permission.ACCESS_FINE_LOCATION}, PERMISSION_FINE_LOCATION);\n\n }else{\n //location already granted\n checkCoarseAddress();\n }\n }", "boolean hasLocationView();", "protected final void run(int direction) {\n\t\tint temp_x = x_coord;\n\t\tint temp_y = y_coord;\n\t//Update location (*2 because we move twice in same direction)\t\n\t\tif (!hasMoved) {\n\t\t\ttemp_x += (x_directions[direction] * 2);\n\t\t\ttemp_x += Params.world_width;\n\t\t\ttemp_x %= Params.world_width;\n\t\t\ttemp_y += (y_directions[direction] * 2);\n\t\t\ttemp_y += Params.world_height;\n\t\t\ttemp_y %= Params.world_height;\n\t\t}\n\t//Specific to running during fight\n\t\tif (fightMode) {\n\t\t\tboolean critterInLocation = false;\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif ((c.x_coord == temp_x) && (c.y_coord == temp_y)) {\n\t\t\t\t\tcritterInLocation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!critterInLocation) {\n\t\t\t\tx_coord = temp_x;\n\t\t\t\ty_coord = temp_y;\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t//Specific to walking in time step\n\t\t\tx_coord = temp_x;\n\t\t\ty_coord = temp_y;\n\t\t}\n\t//Update energy\n\t\tenergy -= Params.run_energy_cost;\n\t//Update hasMoved\n\t\thasMoved = true;\n\t}", "public void updateConditions() {\n\n weatherTower = new WeatherTower();\n String newWeather = weatherTower.getWeather(coordinates); // this is the currentWeather algorythm\n\n switch (newWeather) {\n\n case WeatherType.SUN:\n coordinates.setLongitude(coordinates.getLongitude() + 2);\n coordinates.setHeight(coordinates.getHeight() + 4);\n message = \"Baloon# \" + this.getName() + \"(\" + this.getId() + \"): \" + \"It is so sunny and hot.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.RAIN:\n coordinates.setLatitude(coordinates.getLatitude() - 5);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Damn you rain! You messed up my baloon.\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.FOG:\n coordinates.setLatitude(coordinates.getLatitude() - 3);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \"Even though it's fog, let's take some pics!\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n\n case WeatherType.SNOW:\n coordinates.setHeight(coordinates.getHeight() - 15);\n message = \"Baloon#\" + this.getName() + \"(\" + this.getId() + \"): \" + \" It's snowing. We're gonna crash.\\n\";\n System.out.println(\"message\");\n try(PrintWriter pw = new PrintWriter(new FileOutputStream(new File(\"outputFile.txt\"), true))){\n pw.println(message);\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n }\n break;\n }\n }", "protected void updateLocationUI() {\n if (mCurrentLocation != null) {\n //TrackDataCSVHelper myCSV2 = new TrackDataCSVHelper();\n //mDistanceFromWaypointText.setText(String.valueOf(myCSV2.getLon(track, this))); //<-- used this to test getting proper lat/lon\n //mDistanceFromWaypointText.setText(String.format(\"%s: %f\", \"Dist from WP\", mDistanceFromWaypoint));\n //mZoneStatusText.setText(\"IN THE ZONE? \" + mIsInZone);\n //mNumberUpdates.setText(String.valueOf(mNum));\n }\n }", "@Override\n public boolean isFinished() {\n /* Need to convert distance travelled to degrees. The Standard\n Romi Chassis found here, https://www.pololu.com/category/203/romi-chassis-kits,\n has a wheel placement diameter (149 mm) - width of the wheel (8 mm) = 141 mm\n or 5.551 inches. We then take into consideration the width of the tires.\n */\n //double inchPerDegree = Math.PI * 5.551 / 360;\n // Compare distance travelled from start to distance based on degree turn\n\n if(counter == 4) {\n if(m_degrees != 0) {\n return m_drive.getGyroAngleZ() >= m_degrees - 7 && m_drive.getGyroAngleZ() <= m_degrees + 7;\n } else {\n return true;\n }\n } else {\n return false;\n }\n }", "private void checkLocation(String mapName, Set<Point> seenLocations, List<Point> wildLocations) {\n Assert.assertFalse(mapName, wildLocations.isEmpty());\n for (Point location : wildLocations) {\n Assert.assertFalse(seenLocations.contains(location));\n seenLocations.add(location);\n }\n }", "public void generate() {\n\t\tLocation location0 = new Location();\n\t\tlocation0.setAddress(\"Zhong Nan Hai\");\n\n\t\tlocation0.setLatitude(0.0);\n\t\tlocation0.setLongitude(0.0);\n;\n\t\tTestDriver.locationList.add(location0);\n\t\t\n\t\t\n\t\tLocation location1 = new Location();\n\t\tlocation1.setAddress(\"Tian An Men\");\n\t\tlocation1.setLatitude(0.1);\n\t\tlocation1.setLongitude(0.1);\n\n\t\tTestDriver.locationList.add(location1);\n\t\t\n\t\t\n\t\tLocation location2 = new Location();\n\t\tlocation2.setAddress(\"White House\");\n\t\tlocation2.setLatitude(100.21);\n\t\tlocation2.setLongitude(102.36);\n\t\tTestDriver.locationList.add(location2);\n\t}", "public boolean hasLocation()\n {\n return targetLocation != null;\n }", "public boolean foodDetection() {\n ArrayList<Creature> creatures = world.getCreatureList();\n for (Creature c : creatures) {\n if (c.creatureLocation().equals((x + 1) + \",\" + y) || c.creatureLocation().equals((x - 1) + \",\" + y) ||\n c.creatureLocation().equals(x + \",\" + (y + 1)) || c.creatureLocation().equals(x + \",\" + (y - 1))) {\n //System.out.println(\"Creature Found: \" + c.creatureLocation());\n return true;\n }\n }\n return false;\n }", "private boolean checkInDirection(Coordinate carPos,\n\t\t\t WorldSpatial.Direction direction) {\n\t\tfor (int i = 1; i <= WALL_THRESHOLD; i++) {\n\t\t\tif (map.tileAtRelative(carPos, direction, 0, i).blocking()) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "void check_alien_direction() {\n // Aliens are moving right, check if aliens will move off screen\n if (Alien.direction == Alien.Directions.RIGHT) {\n double max_x = rightmost_alien_x();\n // Alien1 has largest width, so we use that one to calculate if all aliens will fit\n if (max_x + Dimensions.ALIEN1_WIDTH + Dimensions.X_PADDING > scene_width){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving left, check if aliens will move off screen\n else if (Alien.direction == Alien.Directions.LEFT) {\n double min_x = leftmost_alien_x();\n if (min_x < Dimensions.X_PADDING){\n Alien.changeDirections();\n }\n }\n\n // Aliens are moving down, check if they finished moving down\n else if (Alien.direction == Alien.Directions.DOWN &&\n Alien.down_distance_travelled >= Dimensions.ALIEN_VERTICAL_SPACE){\n random_alien_fires(); // After aliens all descend one row, one of the ships fires at the player\n Alien.changeDirections();\n }\n }", "private void setUpDirectionIntegration() {\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(final LatLng latLng) {\n new AlertDialog.Builder(ScavengerHunt.this)\n .setTitle(\"Open Google Maps?\")\n .setMessage(\"Get directions to your selected location.\")\n .setPositiveButton(\"Continue\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n String uri = \"http://maps.google.com/maps?daddr=\" + latLng.latitude + \",\" + latLng.longitude + \" (\" + \"Where the party is at\" + \")\";\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(uri));\n intent.setPackage(\"com.google.android.apps.maps\");\n startActivity(intent);\n }\n })\n .setNegativeButton(\"Cancel\", new DialogInterface.OnClickListener() {\n @Override\n public void onClick(DialogInterface dialogInterface, int i) {\n // Do nothing\n }\n })\n .show();\n\n Log.i(\"MAP\", latLng.latitude + \", \" + latLng.longitude);\n }\n });\n }", "private void adjustObserverLocationByClick(int dir, double offset) {\n\t\tHBox n0 = (HBox) uicontrols.getChildren().get(0);\n\t\tHBox n1 = (HBox) uicontrols.getChildren().get(1);\n\t\tTextField t0 = (TextField) n0.getChildren().get(1); // Lat\n\t\tTextField t1 = (TextField) n1.getChildren().get(1); // Long\n\t\tdouble latitude = 0.0;\n\t\tdouble longitude = 0.0;\n\t\ttry {\n\t\t\tlatitude = Double.parseDouble(t0.getText());\n\t\t\tlongitude = Double.parseDouble(t1.getText());\n\t\t} catch(NumberFormatException e) {\n\t\t}\n\t\tif (dir == 1) { // NW\n\t\t\tlatitude += offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 2) { // NE\n\t\t\tlatitude += offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude > 89.99999) {\n\t\t\t\tlatitude = 89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 3) { // SW\n\t\t\tlatitude -= offset;\n\t\t\tlongitude -= (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude < -180.0) {\n\t\t\t\tlongitude += 180.0;\n\t\t\t\tlongitude = 180.0 + longitude;\n\t\t\t}\n\t\t} else if (dir == 4) { // SE\n\t\t\tlatitude -= offset;\n\t\t\tlongitude += (offset * 4);\n\t\t\tif (latitude < -89.99999) {\n\t\t\t\tlatitude = -89.99999;\n\t\t\t}\n\t\t\tif (longitude > 180.0) {\n\t\t\t\tlongitude -= 180.0;\n\t\t\t\tlongitude = -180.0 + longitude;\n\t\t\t}\n\t\t}\n\t\tt0.setText(\"\" + latitude);\n\t\tt1.setText(\"\" + longitude);\n\t}", "boolean hasLongitude();", "boolean hasLongitude();", "private void determineStartingLocation(Car carOne, Car carTwo, Car carThree) {\n ArrayList<Integer> locationPlaces = new ArrayList<Integer>();\n locationPlaces.add(1);// 0\n locationPlaces.add(2);// 1\n locationPlaces.add(3);// 2\n locationPlaces.add(4);// 3\n\n Collections.shuffle(locationPlaces);\n\n carOne.setLocation(locationPlaces.get(0));\n carTwo.setLocation(locationPlaces.get(1));\n carThree.setLocation(locationPlaces.get(2));\n }", "public void getDirections(View v) {\n\n // disable button while background processing\n // enabled again in XMLTask\n btn.setEnabled(false);\n\n // User input locations\n String origin = etFrom.getText().toString();\n String dest = etTo.getText().toString();\n\n // use input to get a url string for directions\n String url = getDirectionsUrl(origin, dest);\n\n // AsyncTask for downloading content\n DownloadTask downloadTask = new DownloadTask();\n\n // Start downloading xml data from Google Directions API\n downloadTask.execute(url);\n }", "static private void npcPath() {\n\n if (Time.secondsPassed % 45 == 44) {\n Random picker = new Random();\n while (true) {\n if (josephSchnitzel.getCurrentRoom().equals(mountain)) {\n String[] newRoomString = {\"south\"};\n int index = picker.nextInt(newRoomString.length);\n Room next = josephSchnitzel.getCurrentRoom().getExit(newRoomString[index]);\n josephSchnitzel.setCurrentRoom(next);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(beach)) {\n String[] newRoomString = {\"north\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n\n if (josephSchnitzel.getCurrentRoom().equals(jungle)) {\n String[] newRoomString = {\"north\", \"south\"};\n int indexOfNewRoomString = picker.nextInt(newRoomString.length);\n Room nextRoom = josephSchnitzel.getCurrentRoom().getExit(newRoomString[indexOfNewRoomString]);\n josephSchnitzel.setCurrentRoom(nextRoom);\n break;\n }\n }\n }\n }", "private void getWalkerLocation(){\n walkerLocationRef = FirebaseDatabase.getInstance().getReference().child(\"walkersWorking\").child(walkerFoundID).child(\"l\"); //the child l is used by location services to store long and lang values\n walkerLocationListener = walkerLocationRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(dataSnapshot.exists() && reqBoolean){\n List<Object> map = (List<Object>) dataSnapshot.getValue();\n double LocationLat = 0;\n double LocationLng = 0;\n\n statusButtonText.setText(\"Walker Found!\");\n\n if(map.get(0) != null){\n LocationLat = Double.parseDouble(map.get(0).toString());\n }\n if(map.get(1) != null) {\n LocationLng = Double.parseDouble(map.get(1).toString());\n\n }\n\n LatLng walkerLatLng = new LatLng(LocationLat, LocationLng);\n if(walkerMarker != null){ //app will crash without this if because it will try to delete something that is not there\n walkerMarker.remove();\n }\n googleMap.clear();\n googleMap.addMarker((new MarkerOptions().position(walkerLatLng).title(\"Your Walker\")));\n\n\n\n Location loc1 = new Location(\"\"); //Location variable can give distance between two co-ordinates\n loc1.setLatitude(pickupLocation.latitude);\n loc1.setLongitude(pickupLocation.longitude);\n\n Location loc2 = new Location(\"\");\n loc2.setLatitude(walkerLatLng.latitude);\n loc2.setLongitude(walkerLatLng.longitude);\n\n float distance = loc1.distanceTo(loc2); //finds distance between the two locations\n\n if(distance < 100){\n statusButtonText.setText(\"Walker is here! \"); //notifies dog owner the walker is here\n }else {\n statusButtonText.setText(\"Walker Found! \" + String.valueOf(distance)); //shows distance between walker and owner using distance variable\n\n }\n\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }", "private boolean isValidLocationFound() {\n return latitudeValue != null && longitudeValue != null;\n }", "protected final void walk(int direction) {\n\t\tint temp_x = x_coord;\n\t\tint temp_y = y_coord;\n\t//Update location\t\n\t\tif (!hasMoved) {\n\t\t\ttemp_x += x_directions[direction];\n\t\t\ttemp_x += Params.world_width;\n\t\t\ttemp_x %= Params.world_width;\n\t\t\ttemp_y += y_directions[direction];\n\t\t\ttemp_y += Params.world_height;\n\t\t\ttemp_y %= Params.world_height;\n\t\t}\t\n\t//Specific to walking during fight\n\t\tif (fightMode) {\n\t\t\tboolean critterInLocation = false;\n\t\t\tfor (Critter c: population) {\n\t\t\t\tif ((c.x_coord == temp_x) && (c.y_coord == temp_y)) {\n\t\t\t\t\tcritterInLocation = true;\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (!critterInLocation) {\n\t\t\t\tx_coord = temp_x;\n\t\t\t\ty_coord = temp_y;\n\t\t\t}\n\t\t}\n\t\telse {\t\t\t\t\t//Specific to walking in time step\n\t\t\tx_coord = temp_x;\n\t\t\ty_coord = temp_y;\n\t\t}\n\t//Update energy\n\t\tenergy -= Params.walk_energy_cost;\n\t//Update hasMoved\n\t\thasMoved = true;\n\t}", "private void displayLocation() {\n try{\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n }catch (NullPointerException e){\n e.printStackTrace();\n }\n Common.mLastLocationDriver = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n if (Common.mLastLocationDriver != null) {\n if (mSwitchButton.isChecked()) {\n final double latitude = Common.mLastLocationDriver.getLatitude();\n final double longitude = Common.mLastLocationDriver.getLongitude();\n\n // save location driver to firebase to comunicate with customer\n FirebaseDatabase.getInstance().getReference(Common.driver_working_tbl)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if(!dataSnapshot.exists() && mGeoFire!=null){\n mGeoFire.setLocation(FirebaseAuth.getInstance().getCurrentUser().getUid(),\n new GeoLocation(latitude, longitude), new GeoFire.CompletionListener() {\n @Override\n public void onComplete(String key, DatabaseError error) {\n if(oldLocation!=null){\n Location startingLocation = new Location(\"starting point\");\n startingLocation.setLatitude(oldLocation.getLatitude());\n startingLocation.setLongitude(oldLocation.getLongitude());\n\n //Get the target location\n Location endingLocation = new Location(\"ending point\");\n endingLocation.setLatitude(latitude);\n endingLocation.setLongitude(longitude);\n\n bearing = startingLocation.bearingTo(endingLocation);\n }\n //Add marker\n if (mMarker != null)\n mMarker.remove();\n mMarker = mMap.addMarker(new MarkerOptions()\n .icon(getMarkerIconFromDrawable(getResources().getDrawable(R.drawable.ic_navigation_driver)))\n .position(new LatLng(latitude, longitude))\n .anchor(0.5f, 0.5f)\n .rotation(bearing)\n .title(\"You\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 17.0f));\n }\n });\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n } else {\n Log.e(\"ERROR\", \"Can't get your location\");\n }\n }", "public boolean wander() {\n\t\tMapLocation target = sensor.findTargetLocation();\n\t\treturn(nav.moveToLocation(target));\n\t}", "public boolean checkMissingLonLatTime() {\n\t\ttry {\n _locationsChecked = true;\n\t\t\tDouble[] longitudes = getSampleLongitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( longitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(longitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[longitudeIndex]);\n\t\t\t\t\tString comment = \"missing longitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no longitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\ttry {\n\t\t\tDouble[] latitudes = getSampleLatitudes();\n\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( latitudes[rowIdx] == null ) {\n\t\t\t\t\t_locationsOk = false;\n\t\t\t\t\tADCMessage msg = new ADCMessage();\n\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\t\t\tmsg.setRowIndex(rowIdx);\n\t\t\t\t\tmsg.setColIndex(latitudeIndex);\n\t\t\t\t\tmsg.setColName(userColNames[latitudeIndex]);\n\t\t\t\t\tString comment = \"missing latitude\";\n\t\t\t\t\tmsg.setGeneralComment(comment);\n\t\t\t\t\tmsg.setDetailedComment(comment);\n\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_locationsOk = false;\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"no latitude column\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(comment);\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n//\t DashDataType<?> pressureColumn = findDataColumn(\"water_pressure\");\n//\t DashDataType<?> depthColumn = findDataColumn(\"sample_depth\");\n//\t if ( depthColumn != null ) {\n//\t\t\ttry {\n//\t\t\t\tDouble[] depths = getSampleDepths();\n//\t\t\t\tfor (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n//\t\t\t\t\tif ( depths[rowIdx] == null ) {\n//\t\t\t\t\t\tisOk = pressureColumn != null;\n//\t\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\t\tmsg.setSeverity(pressureColumn == null ? Severity.ERROR : Severity.WARNING);\n//\t\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\t\tmsg.setColIndex(sampleDepthIndex);\n//\t\t\t\t\t\tmsg.setColName(userColNames[sampleDepthIndex]);\n//\t\t\t\t\t\tString comment = \"missing sample depth\";\n//\t\t\t\t\t\tmsg.setGeneralComment(comment);\n//\t\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\t\tstdMsgList.add(msg);\n//\t\t\t\t\t}\n//\t\t\t\t}\n//\t\t\t} catch ( Exception ex ) {\n//\t\t\t ex.printStackTrace();\n//\t\t\t}\n//\t\t} else if ( pressureColumn == null ) {\n//\t\t\tisOk = false;\n//\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\tString comment = \"no sample depth column\";\n//\t\t\tmsg.setGeneralComment(comment);\n//\t\t\tmsg.setDetailedComment(comment);\n//\t\t\tstdMsgList.add(msg);\n//\t\t}\n\n\t\tDouble[] times = null;\n\t\ttry {\n _timesChecked = true;\n\t\t\ttimes = getSampleTimes();\n\t\t\tfor (int rowIdx = 0; _timesOk && rowIdx < numSamples; rowIdx++) {\n\t\t\t\tif ( times[rowIdx] == null ) {\n\t\t\t\t\t_timesOk = false;\n // XXX Messages are now added during the data standarization phase\n\t\t\t\t\t// in the StdUserDataArray constructor.\n//\t\t\t\t\tADCMessage msg = new ADCMessage();\n//\t\t\t\t\tmsg.setSeverity(Severity.CRITICAL);\n//\t\t\t\t\tmsg.setRowIndex(rowIdx);\n//\t\t\t\t\tString comment = \"incomplete sample date/time specification\";\n//\t\t\t\t\tmsg.setGeneralComment(\"Bad date/time value\");\n//\t\t\t\t\tmsg.setDetailedComment(comment);\n//\t\t\t\t\tstdMsgList.add(msg);\n\t\t\t\t}\n\t\t\t}\n\t\t} catch ( Exception ex ) {\n\t\t\t_timesOk = false;\n\t\t\tex.printStackTrace();\n\t\t\tADCMessage msg = new ADCMessage();\n\t\t\tmsg.setSeverity(Severity.CRITICAL);\n\t\t\tString comment = \"incomplete columns specifying sample date/time\";\n\t\t\tmsg.setGeneralComment(comment);\n\t\t\tmsg.setDetailedComment(ex.getMessage());\n\t\t\tstdMsgList.add(msg);\n\t\t}\n\n\t\treturn _locationsOk && _timesOk;\n\t}", "boolean hasHasLongitude();", "@Override\n public boolean isFinished() {\n \n boolean thereYet = false;\n\n double time = timer.get();\n\n \n if (Math.abs(targetDistance - distanceTraveled) <= 4){\n\n thereYet = true;\n\n // else if(Math.abs(targetDistance - distanceTraveled) <= 24){\n\n //shifter.shiftDown();\n \n //}\n\n \n\n } else if (stopTime <= time - startTime){\n\n thereYet = true;\n }\n SmartDashboard.putNumber(\"Distance Traveled\", distanceTraveled);\n\n return thereYet;\n\n }", "protected abstract void getAllUniformLocations();", "boolean hasDistance();", "void onStartFindDirection();", "public void geolocTransfered() {\n\t\tthis.geolocTransfered = true;\n\t}", "@Override\n protected boolean isFinished() {\n if(direction){\n if(leftTarget <= Robot.driveTrain.getLeftEncoderDistanceInches() || rightTarget <= Robot.driveTrain.getRightEncoderDistanceInches()){\n turnPID.resetPID();\n return true;\n } else{\n return false;\n }\n \n } else{\n if(leftTarget >= Robot.driveTrain.getLeftEncoderDistanceInches() || rightTarget >= Robot.driveTrain.getRightEncoderDistanceInches()){\n turnPID.resetPID();\n return true;\n } else{\n return false;\n }\n }\n \n \n }", "public void goToLocation (Locator checkpoint) { //Patrolling Guard and Stationary Guard\r\n\t\tVector2i start = new Vector2i((int)(creature.getXlocation()/Tile.TILEWIDTH), (int)(creature.getYlocation()/Tile.TILEHEIGHT));\r\n\t\tint destx = (int)(checkpoint.getX()/Tile.TILEWIDTH);\r\n\t\tint desty = (int)(checkpoint.getY()/Tile.TILEHEIGHT);\r\n\t\tif (!checkCollision(destx, desty)) {\r\n\t\tVector2i destination = new Vector2i(destx, desty);\r\n\t\tpath = pf.findPath(start, destination);\r\n\t\tfollowPath(path);\r\n\t\t}\r\n\t\tarrive();\r\n\t}", "public void suggestTourPlan(Tour alternativeRoute) throws JSONException, ParseException {\n String tourId = alternativeRoute.getTourName(); //get this from session\n Tour tourDetails = new TourDAOs().getTour(alternativeRoute.getTourName());\n System.out.println(\"Tour Details :\" + tourDetails.getStartDate() + \" \" + tourDetails.getEndDate());\n \n String start = tourDetails.getStartDate().substring(8);\n String end = tourDetails.getEndDate().substring(8);\n int tourDuration = Integer.parseInt(end) - Integer.parseInt(start);\n System.out.println(\"REAL DATE :\" + start + \" \" + end + \" \" + tourDuration);\n\n //get premium route details\n List<Route> routeDetails = new LocationRouteDAO().getDefaultRoute(tourId);\n //to print the locations of default route\n for (Route route : routeDetails) {\n System.out.println(\"Default Route list :\" + route.getLocationId());\n //System.out.println(location.getPoints());\n }\n\n int position = 0;\n int i = 0;\n ArrayList<Route> finalRoutes = new ArrayList<Route>();\n Route r = new Route();\n\n Route hotel = new Route();\n hotel.setDestinationPlaceName(routeDetails.get(0).getSourcePlaceName());\n hotel.setDestinationLatitude(routeDetails.get(0).getSourceLatitude());\n hotel.setDestinationLongitude(routeDetails.get(0).getSourceLongitude());\n finalRoutes.add(hotel);\n\n System.out.println(\"before proceeding with the loop :\" + finalRoutes.get(0).getDestinationPlaceName());\n\n //new code starts here\n for (Route route : routeDetails) {\n\n //get the location name of each location of the premium route\n String locName = route.getDestinationPlaceName();\n\n //find the category of the locName\n String locNameCategory = new LocationDAOs().getCategoryLocName(locName);\n\n //get all the locations that belongs to that category\n List<Location> categoryLocList = new ArrayList();\n categoryLocList = new LocationDAOs().getAllLocationsCategory(locNameCategory);\n\n //the location array that sends to the route generator algorithm\n ArrayList<Location> locations_details_ontology = new ArrayList();\n\n //to add the accommodation location as the first to the ontology array\n i++;\n\n Location loc1 = new Location();\n loc1.setLocationName(finalRoutes.get(finalRoutes.size() - 1).getDestinationPlaceName());\n loc1.setLatitude(finalRoutes.get(finalRoutes.size() - 1).getDestinationLatitude());\n loc1.setLongitude(finalRoutes.get(finalRoutes.size() - 1).getDestinationLongitude());\n locations_details_ontology.add(loc1);\n \n \n for (Location loc : categoryLocList) {\n\n if (!locations_details_ontology.get(0).getLocationName().equals(loc.getLocationName())) {\n Location l = new Location();\n l.setLocationName(loc.getLocationName());\n l.setLatitude(loc.getLatitude());\n l.setLongitude(loc.getLongitude());\n locations_details_ontology.add(l);\n }\n }\n \n //to print locations_details_ontology\n for (Location location : locations_details_ontology) {\n System.out.println(location.getLocationName() + \"----\"\n + location.getLatitude() + \"----\" + location.getLongitude());\n //System.out.println(location.getPoints());\n }\n\n //call the lagorithm to find out nearest locations to the first location in ontology array\n ArrayList<Route> routes = new RouteGenerator().RouteFinder(locations_details_ontology);\n\n // Loop all the routes to take the minimum distance of route.\n double min = 0;\n for (int k = 0; k < routes.size(); k++) {\n\n System.out.println(routes.get(k).getDistance());\n min = routes.get(0).getDistance();\n if (min >= routes.get(k).getDistance()) {\n min = routes.get(k).getDistance();\n r = routes.get(k);\n }\n }\n position++;\n r.setPosition(Integer.toString(position));\n\n boolean res = false;\n for (Route avail : finalRoutes) {\n\n if (r.getDestinationPlaceName().equals(avail.getDestinationPlaceName())) {\n res = true;\n }\n\n }\n if (res == false) {\n finalRoutes.add(r);\n }\n \n //to print final routes array\n for (Route fr : finalRoutes) {\n System.out.println(\"FINAL ROUTES ARRAY SANDUNI :\" + fr.getDestinationPlaceName());\n }\n\n }\n\n //get all location list from the database\n List<Location> allLocationList = new LocationDAOs().getAllLocationsList();\n // finalRoutes = new CustomizeRoute().DayPlanner(finalRoutes, allLocationList);\n\n //int m=0;\n //for (int es = 0; es <= m; es++) {\n for (int es = 0; es <= 4; es++) {\n finalRoutes = new CustomizeRoute().DayPlanner(finalRoutes, allLocationList);\n\n int estimatedDuration = Integer.parseInt(finalRoutes.get(finalRoutes.size() - 1).getDate());\n\n if (tourDuration < estimatedDuration) {\n finalRoutes.remove(finalRoutes.size() - 1);\n //m++;\n\n }\n }\n\n //print final routes array after customizing routes\n for (Route fr : finalRoutes) {\n System.out.println(\"FINAL ROUTES ARRAY ACCORDING TO DA PLAN :\" + fr.getDestinationPlaceName() + \" \" + fr.getDate());\n }\n\n //add alternative route to db\n int res = new LocationRouteDAO().addAlternativeRoute(finalRoutes, alternativeRoute.getTourName());\n\n if (res == 1) {\n System.out.println(\"SUCCESS!\");\n } else {\n System.out.println(\"FAILED!\");\n }\n\n }", "protected boolean isFinished() {\n \tdouble changeInX = targetX - Robot.sensors.getXCoordinate();\n \tdouble changeInY = targetY - Robot.sensors.getYCoordinate();\n \tdouble distance = Math.sqrt(Math.pow(changeInX, 2) + Math.pow(changeInY, 2));\n return distance < 8 || System.currentTimeMillis() >= stopTime;\n }", "public static void searchAlgortihm(int x, int y)\n\t{\n\t\tint dx = x;\n\t\tint dy = y;\n\t\tint numMovements = 1; // variable to indicate the distance from the user\n\t\t\n\t\t//check starting position\n\t\tcheckLocation(dx,dy, x, y);\n\n\t\tint minCoords = MAX_COORDS;\n\t\tminCoords *= -1; // max negative value of the grid\n\n\t\t// while - will search through all coordinates until it finds 5 events \n\t\twhile(numMovements < (MAX_COORDS*2)+2 && (closestEvents.size() < 5))\n\t\t{\n\t\t\t//first loop - \n\t\t\tfor(int i = 1; i <= 4; i++)\n\t\t\t{\n\t\t\t\tif(i == 1){ // // moving south-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j-x;\n\t\t\t\t\t\tdx *= -1; // reverse sign\n\t\t\t\t\t\tdy = (numMovements-j)+y;\n\t\t\t\t\t\tif((dx >= minCoords) && (dy <= MAX_COORDS)) // only check the coordinates if they are on the grid\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"1 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 2){ // moving south-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)-x;\n\t\t\t\t\t\tdx *= -1; // change sign\n\t\t\t\t\t\tdy = j-y; \n\t\t\t\t\t\tdy *= -1; // change sign\n\t\t\t\t\t\tif((dx >= minCoords) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"2 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 3){ // moving north-east\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = j+x;\n\t\t\t\t\t\tdy = (numMovements-j)-y;\n\t\t\t\t\t\tdy *= -1;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy >= minCoords))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"3 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}else if(i == 4){ // moving north-west\n\t\t\t\t\tfor(int j = 0; j < numMovements; j++){\n\t\t\t\t\t\tdx = (numMovements-j)+x;\n\t\t\t\t\t\tdy = j+y;\n\t\t\t\t\t\tif((dx <= MAX_COORDS) && (dy <= MAX_COORDS))\n\t\t\t\t\t\t\tcheckLocation(dx, dy, x, y);\n\t\t\t\t\t\t/*else\n\t\t\t\t\t\t\tSystem.out.println(\"4 out of bounds - \" + dx + \",\" + dy);*/\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\n\t\t\t// increment the number of movements, from user coordinate\n\t\t\tnumMovements++;\n\n\t\t} // End of while\n\t}", "private boolean checkInsideZone() {\n for (Zone z : shiftZones) {\n if (PolyUtil.containsLocation(userLocation, Arrays.asList(z.getCoords()), true)) {\n return true;\n }\n }\n return false;\n }", "boolean hasHasLatitude();", "private void registerForGPS() {\n Log.d(NAMAZ_LOG_TAG, \"registerForGPS:\");\n Criteria criteria = new Criteria();\n criteria.setAccuracy(Criteria.ACCURACY_COARSE);\n criteria.setPowerRequirement(Criteria.POWER_LOW);\n criteria.setAltitudeRequired(false);\n criteria.setBearingRequired(false);\n criteria.setSpeedRequired(false);\n criteria.setCostAllowed(true);\n LocationManager locationManager = ((LocationManager) getSystemService(Context.LOCATION_SERVICE));\n String provider = locationManager.getBestProvider(criteria, true);\n\n if(!isLocationEnabled()) {\n showDialog(\"Location Access\", getResources().getString(R.string.location_enable), \"Enable Location\", \"Cancel\", 1);\n } else {\n ActivityCompat.requestPermissions(QiblaDirectionActivity.this,\n new String[]{Manifest.permission. ACCESS_FINE_LOCATION},\n MY_PERMISSIONS_REQUEST_LOCATION);\n }\n\n /* if (provider != null) {\n locationManager.requestLocationUpdates(provider, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);\n }\n locationManager.requestLocationUpdates(LocationManager.GPS_PROVIDER,\n MIN_LOCATION_TIME, MIN_LOCATION_DISTANCE, qiblaManager);\n locationManager.requestLocationUpdates(\n LocationManager.NETWORK_PROVIDER, MIN_LOCATION_TIME,\n MIN_LOCATION_DISTANCE, qiblaManager);*/\n /*Location location = locationManager\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n if (location == null) {\n location = ((LocationManager) getSystemService(Context.LOCATION_SERVICE))\n .getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }*/\n\n }", "boolean land();", "public Place followDirection ( String checkDirection)\r\n\t{\t\r\n\t\t for( int i=0; i < directions.size(); i++)\r\n\t\t {\r\n\t\t\t if( directions.get(i).match( checkDirection))\r\n\t\t\t {\r\n\t\t\t\t // If direction matches with direction object's direction, now again check that if the door is unlocked or not. \r\n\t\t\t\t return directions.get(i).follow();\r\n\t\t\t\t \r\n\t\t\t }\r\n\t\t } \r\n\t\t System.out.println (\"There is no direction from this DOOR....OH No, You are stuck at this Current Place:\" + this.name());\r\n\t\t return this;\r\n\t}", "boolean checkForShortCircuit(CaveGen g) {\n int i = g.placedMapUnits.size() - 1;\n MapUnit m = g.placedMapUnits.get(i);\n if (i >= Parser.scUnitTypes.length) return false;\n if (Parser.scUnitTypes[i] != -1) {\n String targetName = g.spawnMapUnitsSorted.get(Parser.scUnitTypes[i]).name;\n if (!targetName.equals(m.name))\n return true;\n } \n if (Parser.scRots[i] != -1) {\n if (m.rotation != Parser.scRots[i])\n return true;\n } \n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1\n && Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n return true;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n return true;\n }\n else {\n if (Parser.scDoorsTo[i] != -1) {\n Door d = m.doors.get(Parser.scDoorsTo[i]);\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n return true;\n }\n if (Parser.scUnitIdsFrom[i] != -1 \n && Parser.scDoorsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n if (o.doors.indexOf(d.adjacentDoor) != Parser.scDoorsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n else if (Parser.scUnitIdsFrom[i] != -1) {\n boolean isGood = false;\n for (Door d: m.doors) {\n if (d.adjacentDoor == null || d.adjacentDoor.mapUnit == null)\n continue;\n MapUnit o = d.adjacentDoor.mapUnit;\n if (g.placedMapUnits.indexOf(o) != Parser.scUnitIdsFrom[i])\n continue;\n isGood = true;\n }\n if (!isGood) return true;\n }\n }\n return false;\n }", "private void calculateLocation()\r\n\t{\r\n\t\tdouble leftAngleSpeed \t= this.angleMeasurementLeft.getAngleSum() / ((double)this.angleMeasurementLeft.getDeltaT()/1000); //degree/seconds\r\n\t\tdouble rightAngleSpeed \t= this.angleMeasurementRight.getAngleSum() / ((double)this.angleMeasurementRight.getDeltaT()/1000); //degree/seconds\r\n\r\n\t\tdouble vLeft\t= (leftAngleSpeed * Math.PI * LEFT_WHEEL_RADIUS ) / 180 ; //velocity of left wheel in m/s\r\n\t\tdouble vRight\t= (rightAngleSpeed * Math.PI * RIGHT_WHEEL_RADIUS) / 180 ; //velocity of right wheel in m/s\t\t\r\n\t\tdouble w \t\t= (vRight - vLeft) / WHEEL_DISTANCE; //angular velocity of robot in rad/s\r\n\t\t\r\n\t\tDouble R \t= new Double(( WHEEL_DISTANCE / 2 ) * ( (vLeft + vRight) / (vRight - vLeft) ));\t\t\t\t\t\t\t\t\r\n\t\t\r\n\t\tdouble ICCx = 0;\r\n\t\tdouble ICCy = 0;\r\n\r\n\t\tdouble W_xResult \t\t= 0;\r\n\t\tdouble W_yResult \t\t= 0;\r\n\t\tdouble W_angleResult \t= 0;\r\n\t\t\r\n\t\tdouble E_xResult \t\t= 0;\r\n\t\tdouble E_yResult \t\t= 0;\r\n\t\tdouble E_angleResult \t= 0;\r\n\t\t\r\n\t\t//short axe = 0;\r\n\t\t\r\n\t\tdouble deltaT = ((double)this.angleMeasurementLeft.getDeltaT())/1000;\r\n\t\t\r\n\t\t// Odometry calculations\r\n\t\tif (R.isNaN()) \t\t\t\t//robot don't move\r\n\t\t{\r\n\t\t\tW_xResult\t\t= this.pose.getX();\r\n\t\t\tW_yResult\t\t= this.pose.getY();\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse if (R.isInfinite()) \t//robot moves straight forward/backward, vLeft==vRight\r\n\t\t{ \r\n\t\t\tW_xResult\t\t= this.pose.getX() + vLeft * Math.cos(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_yResult\t\t= this.pose.getY() + vLeft * Math.sin(this.pose.getHeading()) * deltaT;\r\n\t\t\tW_angleResult \t= this.pose.getHeading();\r\n\t\t} \r\n\t\telse \r\n\t\t{\t\t\t\r\n\t\t\tICCx = this.pose.getX() - R.doubleValue() * Math.sin(this.pose.getHeading());\r\n\t\t\tICCy = this.pose.getY() + R.doubleValue() * Math.cos(this.pose.getHeading());\r\n\t\t\r\n\t\t\tW_xResult \t\t= Math.cos(w * deltaT) * (this.pose.getX()-ICCx) - Math.sin(w * deltaT) * (this.pose.getY() - ICCy) + ICCx;\r\n\t\t\tW_yResult \t\t= Math.sin(w * deltaT) * (this.pose.getX()-ICCx) + Math.cos(w * deltaT) * (this.pose.getY() - ICCy) + ICCy;\r\n\t\t\tW_angleResult \t= this.pose.getHeading() + w * deltaT;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)W_xResult, (float)W_yResult);\r\n\t\tthis.pose.setHeading((float)W_angleResult);\r\n\t\t\r\n\t\t// Conversion to grads\r\n\t\tW_angleResult = W_angleResult/Math.PI*180;\r\n\t\t\r\n\t\t// Get the heading axe\r\n\t\t//axe = getHeadingAxe();\r\n\t\tgetHeadingAxe();\r\n\t\t\r\n\t\t// Verify the coordinates and the heading angle\r\n\t\tif (Po_Corn == 1)\r\n\t\t{\r\n\t\t\tswitch (Po_CORNER_ID)\r\n\t\t\t{\r\n\t\t\t\tcase 0:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\tPo_ExpAng = 0;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\tE_yResult = 0.11;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tE_xResult = 1.6;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.45;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 4:\r\n\t\t\t\t\tE_xResult = 1.5;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\tPo_ExpAng = 90;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 6:\r\n\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 180;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\tPo_ExpAng = 270;\r\n\t\t\t\t\tbreak;\t\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tE_angleResult = W_angleResult;\r\n\t\t}\r\n\t\telse\r\n\t\t{\r\n\t\t\tint block = 0;\r\n\t\t\t// white = 0, black = 2, grey = 1\r\n\t\t\tif ((lineSensorLeft == 0) && (lineSensorRight == 0) && (block == 0)) \t// Robot moves on the black line\r\n\t\t\t{\r\n\t\t\t\tswitch (Po_CORNER_ID)\t\t\t\t\t\t\t\t// Even numbers - x, Odd numbers - y\r\n\t\t\t\t{\r\n\t\t\t\tcase 0: \r\n\t\t\t\t\tif (this.pose.getX() < 1.6)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 1: \r\n\t\t\t\t\tif (this.pose.getY() < 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.8;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 2:\r\n\t\t\t\t\tif (this.pose.getX() > 1.65)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 3:\r\n\t\t\t\t\tif (this.pose.getY() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 1.5; \r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 4: \r\n\t\t\t\t\tif (this.pose.getX() > 0.4)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 5:\r\n\t\t\t\t\tif (this.pose.getY() < 0.5)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0.3;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 6: \r\n\t\t\t\t\tif (this.pose.getX() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_yResult = 0.6;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tcase 7:\r\n\t\t\t\t\tif (this.pose.getY() > 0.1)\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = Po_ExpAng;\r\n\t\t\t\t\t\tE_xResult = 0;\r\n\t\t\t\t\t}\r\n\t\t\t\t\telse\r\n\t\t\t\t\t{\r\n\t\t\t\t\t\tE_angleResult = W_angleResult; \r\n\t\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\t}\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\t\r\n\t\t\t\tdefault: \r\n\t\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 2)) || ((lineSensorLeft == 2) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_W)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_W;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_W))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_W;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse if(((lineSensorLeft == 0) && (lineSensorRight == 1)) || ((lineSensorLeft == 1) && (lineSensorRight == 0)))\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\t\r\n\t \tif (W_angleResult >= TRSH_G)\r\n\t \t{\r\n\t \t\tE_angleResult = TRSH_G;\r\n\t \t}\r\n\t \telse if (W_angleResult >= (360 - TRSH_G))\r\n\t \t{\r\n\t \t\tE_angleResult = 360 - TRSH_G;\r\n\t \t}\r\n\t \telse\r\n\t \t{\r\n\t \t\tE_angleResult = W_angleResult;\r\n\t \t}\r\n\t \t\r\n\t \t// test\r\n\t \tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t\telse\r\n\t\t\t{\r\n\t\t\t\tE_xResult = W_xResult;\r\n\t\t\t\tE_yResult = W_yResult;\r\n\t\t\t\tE_angleResult = W_angleResult;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\tLCD.drawString(\"AngRs: \" + (E_angleResult), 0, 7);\r\n\t\t\r\n\t\t// Conversion to rads\r\n\t\tW_angleResult = W_angleResult*Math.PI/180;\r\n\t\tE_angleResult = E_angleResult*Math.PI/180;\r\n\t\t\r\n\t\tif ((Po_CORNER_ID == 3) && (100*this.pose.getY() < 45))\r\n\t\t{\r\n\t\t\tE_angleResult = 3*Math.PI/180;;\r\n\t\t}\r\n\t\t\r\n\t\tthis.pose.setLocation((float)E_xResult, (float)E_yResult);\r\n\t\tthis.pose.setHeading((float)E_angleResult);\r\n\t\t\r\n\t\t/*\r\n\t\t// Integration deviation correction\r\n\t\tthis.pose.setLocation((float)(W_xResult), (float)(W_yResult + (0.01*22.4)/175));\r\n\t\tthis.pose.setHeading((float)((W_angleResult + 14/175)*Math.PI/180));\r\n\t\t*/\r\n\t}", "private void searchForLocation() {\n foundLocation = false;\n FusedLocationProviderClient mFusedLocationProviderClient = LocationServices\n .getFusedLocationProviderClient(getActivity());\n //Ignore the red line - we check for permissions before this function is called\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n Task<Location> lastLocation = mFusedLocationProviderClient.getLastLocation();\n lastLocation.addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n Location location = task.getResult();\n if (location != null) {\n LatLng currentLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(currentLatLng,\n DEFAULT_ZOOM);\n googleMap.moveCamera(update);\n foundLocation = true;\n }\n }\n }\n });\n }", "boolean canPlaceCity(VertexLocation vertLoc);", "public void startLocationDiscovery() {\n\t\t/*CountDownTimer gpsDelay = new CountDownTimer(\n\t\t\t\tcalculateNextInteraction(failedInteractions) * 60 * 1000, 1000) {\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onTick(long arg0) {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\t@Override\n\t\t\tpublic void onFinish() {\n\t\t\t\t// TODO Auto-generated method stub\n\t\t\t\t\n\t\t\t}\n\t\t};*/\n\t\tregisterLocationListener(locationListener);\n\t}", "boolean hasLocationNames();", "@Override\n public void onLocationChanged(Location location) {\n for (Map.Entry<Marker, Integer> e : gameMarkers.entrySet()) {\n double distance = distFrom(\n location.getLatitude(),\n location.getLongitude(),\n e.getKey().getPosition().latitude,\n e.getKey().getPosition().longitude);\n\n if (distance < 25) {\n button.setVisibility(View.VISIBLE);\n standingOnGameId = e.getValue();\n break;\n } else {\n button.setVisibility(View.INVISIBLE);\n }\n }\n }", "boolean hasLatitude();", "boolean hasLatitude();", "public void createLocations() {\n createAirports();\n createDocks();\n createEdges();\n createCrossroads();\n }", "private void lookThroughLocations(ArrayList<String> produced){\n int cnt = 0;\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Artefacts> locationArtifacts = locations.get(i).getArtefacts();\n for(int j = 0; j < locationArtifacts.size(); j++){\n for(String k : produced){\n if(locationArtifacts.get(j).getName().equals(k)){\n currentLocation.addArtefactToCurrentLocation(locationArtifacts.get(j));\n locationArtifacts.remove(j);\n }\n }\n }\n }\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Characters> locationCharacters = locations.get(i).getCharacters();\n for(int j = 0; j < locationCharacters.size(); j++){\n for(String k : produced){\n if(locationCharacters.get(j).getName().equals(k)){\n currentLocation.addCharacterToCurrentLocation(locationCharacters.get(j));\n locationCharacters.remove(j);\n }\n }\n }\n }\n }" ]
[ "0.65129435", "0.64553326", "0.6388679", "0.6177964", "0.6177964", "0.60502803", "0.5912298", "0.5905382", "0.58866113", "0.58798397", "0.58717763", "0.58324385", "0.58119446", "0.5805729", "0.58012104", "0.57980734", "0.57930636", "0.57915133", "0.5778041", "0.5774269", "0.57713044", "0.57227796", "0.57037103", "0.5666939", "0.56446797", "0.5635646", "0.56348085", "0.5628436", "0.5626375", "0.5622433", "0.5614786", "0.5597557", "0.558617", "0.5577708", "0.55773336", "0.5575762", "0.55720174", "0.55616313", "0.5560384", "0.55545825", "0.5550016", "0.55436444", "0.554173", "0.55358493", "0.55340284", "0.5531991", "0.5524206", "0.55128783", "0.55094296", "0.55035806", "0.5497404", "0.5495159", "0.5483408", "0.5481807", "0.54816115", "0.5477222", "0.54712224", "0.54614294", "0.54603076", "0.54589957", "0.54578716", "0.5452647", "0.5447627", "0.5444877", "0.5444877", "0.5443631", "0.5440382", "0.54380727", "0.54379433", "0.5437674", "0.5427102", "0.5426971", "0.542015", "0.5419184", "0.5419006", "0.54154795", "0.5413326", "0.5408467", "0.53956395", "0.5388294", "0.53882784", "0.53875494", "0.53819543", "0.53819525", "0.5381828", "0.5377597", "0.5374224", "0.5369603", "0.5368914", "0.5364802", "0.5356864", "0.53534895", "0.5352723", "0.53523487", "0.53517056", "0.5344996", "0.5340586", "0.5340448", "0.5340448", "0.5333893", "0.5327414" ]
0.0
-1
This method finds weather there was a previous record of fake locations, here if data found we have to check weather the user is in the same location or moved. If the user has moved a certain distance then all the fake locations has to be moved in the same direction and same distance
public boolean getLocationsFrom(double curLat, double curLon, Double num) { boolean locationsFromDB = true; String previousCurLat, previousCurLon; Log.d("Detailed analysis","getting data from db, calling getdata function"); Cursor rs1 = myDB.getData(curLat, curLon, num); //In this condition if data not found locationsFromDB is set to false and then returned if (rs1.getCount() <= 0){ System.out.println(rs1.getCount()); locationsFromDB = false; Log.d("Detailed analysis","Data not found"); } //In this condition if data is found need to do the further action of finding the user has moved or not and calculating the direction and distance if user has moved else { Log.d("Detailed analysis", "data found"); Double[] latArray = new Double[rs1.getCount()]; Double[] lonArray = new Double[rs1.getCount()]; int z = 0; double distanceBtwLocations = 0; double finalLat = 0.0; double finalLon = 0.0; while (rs1.moveToNext()) { latArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lat))); lonArray[z] = Double.parseDouble(rs1.getString(rs1.getColumnIndex(DBHelper.Locations_COLUMN_lon))); Log.d("Detailed Analysis", latArray[z] +", " + lonArray[z] ); double tempDistance = findDistanceBetweenPoints(latArray[z], lonArray[z], Math.round(curLat * 10000.0) / 10000.0, Math.round(curLon * 10000.0) / 10000.0); System.out.println(tempDistance + " : tempDistance"); if (distanceBtwLocations < tempDistance) { finalLat = latArray[z]; finalLon = lonArray[z]; distanceBtwLocations = tempDistance; System.out.println(distanceBtwLocations + " : distanceBtwLocations"); } z++; } if (distanceBtwLocations < 100 * 1606.34) { Log.d("Detailed Analysis", "Distance is not greater than 100 miles"); previousCurLat = String.valueOf(finalLat);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lat)); previousCurLon = String.valueOf(finalLon);//rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_lon)); Cursor rs = myDB.getData(finalLat, finalLon, num); rs.moveToFirst(); // condChoice = Integer.parseInt(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_condChoice))); number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num))); Log.d("Detailed Analysis", "number while data found: " + number); Log.d("Detailed Analysis", "Recent number value from getLocationsFrom: " + number); Log.d("Detailed analysis", "Lattittude and Longitude points" + " " + Double.parseDouble(previousCurLat) + "," + Double.parseDouble(previousCurLon) + ":" + Math.round(curLat * 10000.0) / 10000.0 + "," + Math.round(curLon * 10000.0) / 10000.0); //if user has not moved then locationsFromDB is set to true and then returned if (Double.parseDouble(previousCurLat) == Math.round(curLat * 10000.0) / 10000.0 && Double.parseDouble(previousCurLon) == Math.round(curLon * 10000.0) / 10000.0) { Log.d("Detailed analysis", "lattitudes and longitudes are same"); rs.moveToFirst(); locationValues = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results)); locationsFromDB = true; } else { Log.d("Detailed analysis", "lattitudes and longitudes are not same"); float distance = 0; LatLng movedPoints; Log.d("Detailed analysis", "finding distance between lattitudes and longitudes"); distance = findDistanceBetweenPoints(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon), curLat, curLon); Log.d("Detailed Analysis", "distance in meters" + " " + distance); direction = SphericalUtil.computeHeading(new LatLng(Double.parseDouble(previousCurLat), Double.parseDouble(previousCurLon)), new LatLng(curLat, curLon)); Log.d("Detailed Analysis", "direction in degrees" + " " + direction); String values = rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_results)); String valuesArray[] = values.split(":"); Log.d("Detailed analysis", "finding random locations after moving a bit"); for (int i = 0; i < valuesArray.length; i++) { String pointsArray[] = valuesArray[i].split(","); Log.d("Detailed analysis", "lattitudes and longitudes points" + pointsArray[0] + " " + pointsArray[1]); movedPoints = findMovedPoints(Double.parseDouble(pointsArray[0]), Double.parseDouble(pointsArray[1]), distance, direction); Log.d("Detailed Analysis", "latitude and longitude points after moving" + " " + movedPoints); locationValues = findRandomLocations(movedPoints.latitude, movedPoints.longitude, 1, distance + 1); } } } else{ locationValues = findRandomLocations(curLat, curLon, num, 30); } locationsFromDB = true; } return locationsFromDB; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private void locate() {\n possibleLocations[0][0] = false;\n possibleLocations[0][1] = false;\n possibleLocations[1][0] = false;\n do {\n location.randomGenerate();\n } while (!possibleLocations[location.y][location.x]);\n }", "@Test\n public void shouldFindProperLocationBasedOnDistance() {\n assertEquals(Location.B6,\n Location.findLocation(Color.RED, Location.B2, 4));\n\n assertEquals(Location.B2,\n Location.findLocation(Color.BLACK, Location.B6, 4));\n\n // moving off the board\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 4));\n assertEquals(Location.B_BEAR_OFF,\n Location.findLocation(Color.BLACK, Location.B2, 6));\n assertEquals(Location.R_BEAR_OFF,\n Location.findLocation(Color.RED, Location.R2, 6));\n\n // moving in from the bar\n assertEquals(Location.R3,\n Location.findLocation(Color.BLACK,\n Location.B_BAR, 3));\n assertEquals(Location.B6,\n Location.findLocation(Color.RED,\n Location.R_BAR, 6));\n // passing from red to black table and opposite\n assertEquals(Location.B10,\n Location.findLocation(Color.BLACK,\n Location.R10, 5));\n assertEquals(Location.R10,\n Location.findLocation(Color.RED,\n Location.B10, 5));\n }", "public String generateRandomLoc(double curLon, double curLat, double num, double r, Context mapsContext) {\r\n myDB = new DBHelper(mapsContext);\r\n boolean locationsFromDB = false;\r\n Log.d(\"Detailed analysis\",\"finding data available in db or not\");\r\n //Method to find weather there was a previous record of fake locations.\r\n locationsFromDB = getLocationsFrom(curLat, curLon, num);\r\n r = r * 1609.34;\r\n //Condition if there was no previous record\r\n if(!locationsFromDB) {\r\n //Method to generate fake locations\r\n locationValues = findRandomLocations(curLat, curLon, num, r );\r\n Log.d(\"Detailed Analysis\",\"Going to save location values in sqllite db\");\r\n //calling insertLocations in DBHelper class to insert the generated fake locations into db for further use\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,locationValues, condChoice ,false);\r\n Cursor rs = myDB.getData(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0, num);\r\n rs.moveToFirst();\r\n number = Double.parseDouble(rs.getString(rs.getColumnIndex(DBHelper.Locations_COLUMN_num)));\r\n Log.d(\"Detailed Analysis\",\"Recent number value from !locationsFromDB: \"+ number);\r\n Log.d(\"Detailed analysis\",\"Location Values \"+locationValues);\r\n }\r\n else{\r\n locationValues = locationValues+\"\";\r\n Log.d(\"Detailed Analysis\",\"Going to save updated location values in sqllite db\");\r\n double num1;\r\n String values = locationValues;\r\n String valuesArray[] = values.split(\":\");\r\n num1 = valuesArray.length;\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num1,locationValues, condChoice, false);\r\n Log.d(\"Detailed analysis\",\"Location Values \"+locationValues);\r\n }\r\n //Condition to check if the requested fake locations count was greater than the previous request\r\n if(num > number){\r\n Log.d(\"Detailed Analysis: \",\"num: \"+num +\" number: \"+ number);\r\n Log.d(\"Detailed Analysis\",\"Number of fake locations requested this time were higher than previous request\");\r\n Log.d(\"Detailed Analysis\",\"Generating new random locations\");\r\n String temp = locationValues;\r\n locationValues = \"\";\r\n //generating new fake locations for the extra count\r\n temp = temp + findRandomLocations(curLat, curLon, num - number, r);\r\n Log.d(\"Detailed Analysis\",\"Going to save updated location values in sqllite db after adding new random locations\");\r\n //updating the previous record with new fake locations count\r\n myDB.insertLocations(Math.round(curLat * 10000.0) / 10000.0,Math.round(curLon * 10000.0) / 10000.0,num,temp, condChoice, true);\r\n locationValues = temp;\r\n }\r\n //Condition to check if the requested fake locations count was less than the previous request\r\n if(num < number){\r\n Log.d(\"Detailed Analysis: \",\"num: \"+num +\" number: \"+ number);\r\n Log.d(\"Detailed Analysis\",\"Number of fake locations requested this time were lesser than previous request\");\r\n String values = locationValues;\r\n String valuesArray[] = values.split(\":\");\r\n String temp = \"\";\r\n //trimmig the fake locations count to the requested number\r\n for(int i = 0; i < num; i++) {\r\n String pointsArray[] = valuesArray[i].split(\",\");\r\n temp = temp + Double.parseDouble(pointsArray[0]) + \",\" + Double.parseDouble(pointsArray[1]) + \":\" + \"\" ;\r\n }\r\n locationValues = temp;\r\n Log.d(\"Detailed Analysis\",\"Location values when reduced fake locations count to \"+num + \": \"+ locationValues);\r\n }\r\n Log.d(\"Detailed Analysis: \", \"number before returning locations: \"+ number);\r\n return locationValues;\r\n }", "@Override\n public void onLocationChanged(Location location) {\n\n if(!locationFound){\n while(mlongitude == 0.0 && mlatitude == 0.0) {\n\n mlatitude = location.getLatitude();\n mlongitude = location.getLongitude();\n }\n\n locationFound = true;\n }\n\n }", "private List<Restaurant> getNearRestaurants() {\n\t\tLog.v(LOG_TAG, \"Getting near restaurants offline by the last known position \");\n\t\tList<Restaurant> restaurantsList = new ArrayList<Restaurant>();\n\t\tif (lastPositionKnown == null) {\n\t\t\tLog.e(LOG_TAG, \"Error trying to get the list of near restaurants when the user's position is null\");\n\t\t\treturn restaurantsList;\n\t\t}\n\t\t\n\t\tLog.v(LOG_TAG, \"My position is \" + lastPositionKnown.latitude + \" ,\" + lastPositionKnown.longitude);\n\n\t\tLocation myLocation = new Location(\"\");\n\t\tmyLocation.setLatitude(lastPositionKnown.latitude);\n\t\tmyLocation.setLongitude(lastPositionKnown.longitude);\n\n\t\tSet<String> ids = restaurants.keySet();\n\t\tfor (String id: ids) {\n\t\t\tRestaurant restaurant = restaurants.get(id);\n\t\t\tLatLng restaurantPosition = restaurant.getPosition();\n\t\t\tLocation restaurantLocation = new Location(\"\");\n\t\t\t\n\t\t\trestaurantLocation.setLatitude(restaurantPosition.latitude);\n\t\t\trestaurantLocation.setLongitude(restaurantPosition.longitude);\n\t\t\t\n\t\t\tint distance = (int)restaurantLocation.distanceTo(myLocation);\n\t\t\tLog.v(LOG_TAG, \"The distance to my location is \" + distance + \" \" + restaurant.getName());\n\t\t\tif (distance <= DEFAULT_RANGE ) {\n\t\t\t\trestaurantsList.add(restaurant);\n\t\t\t}\n\t\t}\n\n\t\treturn restaurantsList;\n\t}", "@Override\n public void onLocationChanged(final Location location) {\n\n if(mLastLocation==null || location.distanceTo(mLastLocation)>getResources().getInteger(R.integer.min_distance_listen))\n {\n new GetNearBy().executePreHeavy();\n }\n\n mLastLocation=location;\n\n android.util.Log.e(\"onLocationChanged\",mLastLocation.getLatitude()+\" - \"+mLastLocation.getLongitude());\n\n\n\n }", "private boolean checkPrevious(String id1, String id2, double[] distances) {\n boolean retVal;\n // Create a string pair.\n var pair = new StringPair(id1, id2);\n double[] oldDistances = this.oldResultMap.get(pair);\n if (oldDistances == null)\n retVal = false;\n else {\n // Copy the cached results to the provided result array.\n System.arraycopy(oldDistances, 0, distances, 0, distances.length);\n retVal = true;\n }\n return retVal;\n }", "@Override\n public void onLocationChanged(Location location) {\n Intent i = new Intent(\"location_update\");\n i.putExtra(\"coordinates\", location.getLongitude() + \" \" + location.getLatitude());\n home_loc = new FileCacher<>(getApplicationContext(), \"myloc.txt\");\n\n if (home_loc.hasCache()) {\n try {\n double lat1 = location.getLatitude();\n double long1 = location.getLongitude();\n String loc = home_loc.readCache();\n String[] coors1 = {Double.toString(long1), Double.toString(lat1)};\n if (loc != null) {\n Log.i(\"loc\", loc);\n coors1 = loc.split(\" \");\n }\n\n double lat2 = Double.parseDouble(coors1[1]);\n double long2 = Double.parseDouble(coors1[0]);\n double dist = distance(lat1, lat2, long1, long2);\n Log.i(\"dist\", Double.toString(dist));\n if (dist > thresh) {\n i.putExtra(\"exceed\", \"true\");\n } else {\n i.putExtra(\"exceed\", \"false\");\n }\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n sendBroadcast(i);\n }", "public void goToLocation (Locator checkpoint) { //Patrolling Guard and Stationary Guard\r\n\t\tVector2i start = new Vector2i((int)(creature.getXlocation()/Tile.TILEWIDTH), (int)(creature.getYlocation()/Tile.TILEHEIGHT));\r\n\t\tint destx = (int)(checkpoint.getX()/Tile.TILEWIDTH);\r\n\t\tint desty = (int)(checkpoint.getY()/Tile.TILEHEIGHT);\r\n\t\tif (!checkCollision(destx, desty)) {\r\n\t\tVector2i destination = new Vector2i(destx, desty);\r\n\t\tpath = pf.findPath(start, destination);\r\n\t\tfollowPath(path);\r\n\t\t}\r\n\t\tarrive();\r\n\t}", "@Override\n public void onLocationResult(LocationResult locationResult) {\n if (locationResult == null) {\n Log.w(LOG_TAG, \"LocationCallback(): locationResult == null\");\n return;\n }\n\n Location lastLocation = locationResult.getLastLocation();\n\n double latitude = lastLocation.getLatitude();\n double longitude = lastLocation.getLongitude();\n double accuracy = lastLocation.getAccuracy();\n\n userLocation = new LatLng(latitude, longitude);\n Long currentTimestamp = System.currentTimeMillis();\n\n String gpsData = \"\\nlat:\" + latitude + \"\\nlong:\" + longitude + \"\\naccuracy: \" + accuracy + \"m\\ntimestamp: \" + currentTimestamp;\n Log.d(LOG_TAG, \"onLocationResult() called: \" + gpsData);\n\n if (!checkInsideZone()) { // Check current status, but don't update outsideZone yet!\n if (!outsideZone) {\n // Transition to outside zone state (countdown to automatic termination of shift) if not already outside\n leftZoneTimestamp = System.currentTimeMillis();\n outsideZone = true;\n Log.e(LOG_TAG, \"User has left the designated zone area.\");\n\n // Alert user visually and with vibration\n Snackbar snackbar = Snackbar.make(findViewById(android.R.id.content), \"Warning! You have left the zone. Return within 2 minutes.\", Snackbar.LENGTH_LONG);\n snackbar.show();\n\n // Something like this: - du - Du!\n long[] timings = new long[]{0, 200, 200, 200}; // ms\n int[] amplitudes = new int[] {0, 128, 0, 200}; // 0-255\n vibrator.vibrate(VibrationEffect.createWaveform(timings,amplitudes, -1));\n }\n\n if (currentTimestamp - leftZoneTimestamp > leftZoneMaximum) {\n Log.e(LOG_TAG, \"User has been outside of the designated zone area for too long. Terminating shift.\");\n Toast.makeText(getApplicationContext(), \"You left the zone for more than 2 minutes - session terminated.\", Toast.LENGTH_LONG).show();\n endShift();\n }\n } else if (outsideZone) { // Outside -> inside: i.e. user has re-entered zone, transition to safe state\n outsideZone = false;\n Log.e(LOG_TAG, \"User has re-entered the designated zone area.\");\n }\n\n // Log path of user\n sessionLogList.add(new SessionLog(currentTimestamp, userLocation, !outsideZone));\n }", "private void getWalkerLocation(){\n walkerLocationRef = FirebaseDatabase.getInstance().getReference().child(\"walkersWorking\").child(walkerFoundID).child(\"l\"); //the child l is used by location services to store long and lang values\n walkerLocationListener = walkerLocationRef.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n if(dataSnapshot.exists() && reqBoolean){\n List<Object> map = (List<Object>) dataSnapshot.getValue();\n double LocationLat = 0;\n double LocationLng = 0;\n\n statusButtonText.setText(\"Walker Found!\");\n\n if(map.get(0) != null){\n LocationLat = Double.parseDouble(map.get(0).toString());\n }\n if(map.get(1) != null) {\n LocationLng = Double.parseDouble(map.get(1).toString());\n\n }\n\n LatLng walkerLatLng = new LatLng(LocationLat, LocationLng);\n if(walkerMarker != null){ //app will crash without this if because it will try to delete something that is not there\n walkerMarker.remove();\n }\n googleMap.clear();\n googleMap.addMarker((new MarkerOptions().position(walkerLatLng).title(\"Your Walker\")));\n\n\n\n Location loc1 = new Location(\"\"); //Location variable can give distance between two co-ordinates\n loc1.setLatitude(pickupLocation.latitude);\n loc1.setLongitude(pickupLocation.longitude);\n\n Location loc2 = new Location(\"\");\n loc2.setLatitude(walkerLatLng.latitude);\n loc2.setLongitude(walkerLatLng.longitude);\n\n float distance = loc1.distanceTo(loc2); //finds distance between the two locations\n\n if(distance < 100){\n statusButtonText.setText(\"Walker is here! \"); //notifies dog owner the walker is here\n }else {\n statusButtonText.setText(\"Walker Found! \" + String.valueOf(distance)); //shows distance between walker and owner using distance variable\n\n }\n\n\n }\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n\n }", "private void thinkAboutNext(ArrayList<Point> pos, boolean hit, boolean destroyedIt) {\n if (!searching && hit) {\n betweenTwo = false;\n System.out.println(\"WAS A NEW TARGET\");\n if(!destroyedIt) {\n int[] d = Direction.DOWN.getDirectionVector();\n Point n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.DOWN);\n\n d = Direction.UP.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.UP);\n\n d = Direction.LEFT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.LEFT);\n\n d = Direction.RIGHT.getDirectionVector();\n n = new Point(justBefore.x + d[0], justBefore.y + d[1]);\n if (inBounds(n) && pos.contains(n))\n directionsToGo.add(Direction.RIGHT);\n\n directionLooking = directionsToGo.get(directionsToGo.size() - 1);\n }\n }\n else if (searching) {\n //FILTER OUT ALREADY ATTACKED\n\n System.out.println(\"WAS AN OLD TARGET\");\n\n //FAILED\n if(!hit) {\n justBefore = firstHit;\n int size = directionsToGo.size();\n\n for(int i = size - 1; i >= 0; i--){\n Point n = new Point(justBefore.x + directionsToGo.get(i).getDirectionVector()[0],\n justBefore.y + directionsToGo.get(i).getDirectionVector()[1]);\n if(!pos.contains(n))\n directionsToGo.remove(i);\n }\n directionLooking = directionsToGo.get(0);\n }\n else\n if(!pos.contains(pWD(justBefore, directionLooking))) {\n justBefore = firstHit;\n directionLooking = directionLooking.getOpposite();\n }\n\n }\n if(hit) {\n searching = !destroyedIt;\n }\n }", "private void navToPoint(Unit unit){\n\t\tMapLocation currentLocation = unit.location().mapLocation();\n\t\tMapLocation locationToTest;\n\t\tMapLocation targetLocation = orderStack.peek().getLocation();\n\t\tlong smallestDist=1000000000; //arbitrary large number\n\t\tlong temp;\n\t\tDirection closestDirection=null;\n\t\tint i=1;\n\t\t\n\t\tif(gc.isMoveReady(unitID)){\n\t\t\t//first find the direction that moves us closer to the target\n\t\t\tfor(Direction dir : Direction.values()){\n\t\t\t\tif (debug) System.out.println(\"this (\"+dir.name()+\") is the \"+i+\"th direction to check, should get to 9\");\n\t\t\t\tlocationToTest=currentLocation.add(dir);\n\t\t\t\t//make sure it is on the map and is passable\n\t\t\t\tif (debug){\n\t\t\t\t\tSystem.out.println(\"testing this location: \"+locationToTest);\n\t\t\t\t\tSystem.out.println(\"valid move? \"+gc.canMove(unitID, dir));\n\t\t\t\t}\n\t\t\t\tif(gc.canMove(unitID, dir)){\n\t\t\t\t\tif (debug)System.out.println(\"we can indeed move there...\");\n\t\t\t\t\t//make sure the location hasn't already been visited\n\t\t\t\t\tif(!pastLocations.contains(locationToTest)){\n\t\t\t\t\t\tif (debug)System.out.println(\"not been there recently...\");\n\t\t\t\t\t\t//at this point its a valid location to test, check its distance\n\t\t\t\t\t\ttemp = locationToTest.distanceSquaredTo(targetLocation);\n\t\t\t\t\t\tif (debug)System.out.println(\"distance :\"+temp);\n\t\t\t\t\t\tif (temp<smallestDist){\n\t\t\t\t\t\t\tif (debug)System.out.println(\"new closest!\");\n\t\t\t\t\t\t\t//new closest point, update accordingly\n\t\t\t\t\t\t\tsmallestDist=temp;\n\t\t\t\t\t\t\tclosestDirection=dir;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}//end of for-each loop\n\t\t}//end move ready if.\n\t\t\n\t\t//actual movement and maintenance of places recently visited\n\t\tif(closestDirection!=null){\n\t\t\tif (debug){\n\t\t\t\tSystem.out.println(\"found a closest direction, calling navInDirection()\");\n\t\t\t\tSystem.out.println(\"heading \"+closestDirection.name());\n\t\t\t}\n\t\t\tmoveInDirection(closestDirection, unit);\n\t\t\tcleanUpAfterMove(unit);\n\t\t}else{\n\t\t\t//can't get any closer\n\t\t\tif (debug) System.out.println(\"can't get closer, erasing past locations\");\n\t\t\tpastLocations.clear();\n\t\t}\n\t\t\n\t\t//have we arrived close enough?\n\t\tif(unit.location().mapLocation().distanceSquaredTo(targetLocation)<=howCloseToDestination){\n\t\t\t//atTargetLocation=true;\n\t\t\t\n\t\t\t//if order was a MOVE order, it is complete, go ahead and pop it off the stack\n\t\t\tif(orderStack.peek().getType().equals(OrderType.MOVE)){\n\t\t\t\torderStack.pop();\n\t\t\t}\n\t\t\tif (debug) System.out.println(\"Unit \"+unit.id()+\" arrived at destination.\");\n\t\t}\n\t\t\n\t\t;\n\t}", "private void updateFriendsLocation(ArrayList<ObjectLocation> friends_location){\n if(mMap==null)\n return;\n //if friends names is not ready yet which should not ever happen then return\n if(friends_names.isEmpty())\n return;\n\n //this do only first time, if markers is set then just update markers location (else branch)\n if(markers.isEmpty()) {\n for (int i = 0; i < friends_location.size(); i++) {\n LatLng latLng = new LatLng(friends_location.get(i).getLat(), friends_location.get(i).getLng());\n String friendID = friends_location.get(i).getObjectId();\n\n MarkerOptions markerOptions = new MarkerOptions()\n .position(latLng)\n .title(friends_names.get(friendID))//set friend name in title\n .icon(BitmapDescriptorFactory.fromResource(R.mipmap.ic_default_friend));\n\n //this is necessary for onInfoWindowClick\n Marker marker = mMap.addMarker(markerOptions);\n markerOnClick.put(marker,new MyMarker(friends_location.get(i).getObjectId(),true));\n //this is necessary for later update -friend icon(once) and his location on every change\n markers.put(friendID, marker);\n\n //make request for image\n userHandler.getUserImageInBitmap(friends_location.get(i).getObjectId(), REQUEST_TAG, new GetFriendsBitmapListener(this,friendID));\n }\n Log.i(LOG_TAG,\"Friends placed on the map, for the first time.\");\n }else{\n for (int i = 0; i < friends_location.size(); i++) {\n String friendID = friends_location.get(i).getObjectId();\n animateMarker(markers.get(friendID),new LatLng(friends_location.get(i).getLat(),friends_location.get(i).getLng()),new LatLngInterpolator.Linear());\n }\n }\n }", "@Test\n public void moreThanOneCheckerOnToLocation() {\n\n assertTrue(game.move(Location.R1, Location.R2));\n assertTrue(game.move(Location.R1, Location.R3));\n game.nextTurn();\n // to der gerne skulle vaere lovlige og stemme med terningerne\n assertTrue(game.move(Location.R6, Location.R5));\n assertTrue(game.move(Location.R8, Location.R6));\n game.nextTurn();\n assertTrue(game.move(Location.R2, Location.R5));\n assertTrue(game.move(Location.R3, Location.R7));\n game.nextTurn();\n // der staar nu to sorte paa R4\n assertFalse(game.move(Location.R6, Location.R3));\n }", "public Location getFurthestMoveableLocation(Location otherLocation, Location currentLocation) {\n Location furthestLocation;\n List<Location> locations = getSurroundingFourLocations(currentLocation);\n List<Location> randomizedLocations = new LinkedList<Location>();\n\n while (!locations.isEmpty()) {\n int LOW = 0;\n int HIGH = locations.size();\n Random randomize = new Random();\n\n int randomIndex = randomize.nextInt(HIGH - LOW) + LOW;\n randomizedLocations.add(locations.remove(randomIndex));\n }\n\n furthestLocation = checkFurtherLocation(otherLocation, randomizedLocations.get(0), randomizedLocations.get(1));\n furthestLocation = checkFurtherLocation(otherLocation, furthestLocation, randomizedLocations.get(2));\n furthestLocation = checkFurtherLocation(otherLocation, furthestLocation, randomizedLocations.get(3));\n return furthestLocation;\n }", "@Override\n public void onLocationChanged(Location location) {\n Log.i(LOG_TAG, \"Location Change\");\n Location target = new Location(\"target\");\n String closePoint;\n int closestIndex = -1;// Default to none\n float minDistance = 1000; // Default to high value\n\n // Focus camera on initial location\n if (mapReady == true && initialCameraSet == true) {\n LatLng initialLocation = new LatLng(location.getLatitude(), location.getLongitude());\n gMap.moveCamera(CameraUpdateFactory.newLatLng(initialLocation));\n initialCameraSet = false; // Initial location already displayed\n }\n // Check if spot is close\n for (int i = 0; i < LocationsClass.spotsCoordinates.length; ++i) {\n target.setLatitude(LocationsClass.spotsCoordinates[i].latitude);\n target.setLongitude(LocationsClass.spotsCoordinates[i].longitude);\n if (location.distanceTo(target) < minDistance) {\n closestIndex = i; //Save closes index\n minDistance = location.distanceTo(target); // update minDistance\n }\n }\n\n if (minDistance < 200 && minDistance > 20) {\n Toast.makeText(getActivity(), \"Location: \" + LocationsClass.spotNames[closestIndex] +\n \" is within 200 meters!\\n\" + \"Go check it out!\", Toast.LENGTH_LONG).show();\n// pointsOfInterests.get(closestIndex).showInfoWindow();\n// gMap.getUiSettings().setMapToolbarEnabled(true);\n popNotification = true; // Allow notification to trigger when user reaches destination\n } else if (minDistance < 20) {\n if (closestIndex != currentUserLocation) {\n int locationId = getResources().getIdentifier(\"loc_\"+closestIndex, \"drawable\", getActivity().getPackageName());\n showArrivalNotification(locationId, LocationsClass.spotNames[closestIndex]);\n currentUserLocation = closestIndex; // Update user location\n }\n }\n\n if (hotspotIndex != -1) {\n pointsOfInterests.get(hotspotIndex).showInfoWindow();\n gMap.getUiSettings().setMapToolbarEnabled(true);\n }\n }", "public Location inRange()\n\t{\n\t\tboolean equals = false;\n\t\tif(getGrid() == null)\n\t\t\treturn null;\n\t\tfor(int i = -5; i < 6; i++)\n\t\t{\n\t\t\tfor(int j = -5; j < 6; j++)\n\t\t\t{\t\t\t\t\n\t\t\t\tif(getGrid().isValid(new Location(getLocation().getRow() + i, getLocation().getCol() + j)))\n\t\t\t\t{\n\t\t\t\t\tif(getGrid().get(new Location(getLocation().getRow() + i, getLocation().getCol() + j)) instanceof User)\n\t\t\t\t\t{\n\t\t\t\t\t\tequals = true;\n\t\t\t\t\t\tbreak;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\tif(!equals)\n\t\t{\n\t\t\tArrayList<Location> locs = getGrid().getEmptyAdjacentLocations(getLocation());\n\t\t\tif(locs.size() != 0)\n\t\t\t\t return locs.get( (int) (Math.random() * locs.size()));\n\t\t\telse\n\t\t\t\treturn getLocation();\n\t\t}\n\t\t\t\n\t\tLocation moveLocation;\n\t\t\n\t\t\n\t\tif(getGrid().getNeighbors(getLocation()).contains(getGrid().getUser()))\n\t\t{\n\t\t\tmoveLocation = getGrid().getUser().getLocation();\n\t\t}\n\t\telse\n {\n PathFinder a = new PathFinder(getGrid(),20);\n Path path = a.findPath(this, this.getGrid().getUser().getLocation().getRow(), this.getGrid().getUser().getLocation().getCol(),true);\n if(path.getLength() != 0)\n moveLocation = a.findPath(this, this.getGrid().getUser().getLocation().getRow(), this.getGrid().getUser().getLocation().getCol(),true).getStep(0);\n else\n moveLocation = null;\n\n }\n\n\t\tif(moveLocation == null)\n\t\t{\n\t\t\tArrayList<Location> locs = getGrid().getEmptyAdjacentLocations(getLocation());\n\t\t\tif(locs.size() != 0)\n\t\t\t\tmoveLocation = locs.get( (int) (Math.random() * locs.size()));\n\t\t\telse\n\t\t\t\tmoveLocation = getLocation();\n\t\t}\n\t\t\n\t\treturn moveLocation;\n\t}", "private void checkLocation(String mapName, Set<Point> seenLocations, List<Point> wildLocations) {\n Assert.assertFalse(mapName, wildLocations.isEmpty());\n for (Point location : wildLocations) {\n Assert.assertFalse(seenLocations.contains(location));\n seenLocations.add(location);\n }\n }", "private void getDistance() {\n\n float dist = 0;\n Location location = \n locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n while (location==null) { //If we don't know where we are right now\n Toast.makeText(this, \"No last known location. Aborting...\", \n Toast.LENGTH_LONG).show();\n location = \n locationManager.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n }\n\n createPositions();\n\n dist = location.distanceTo(mPositions.get(0).toLocation());\n distanceList.add(dist);\n\n dist = mPositions.get(0).toLocation().distanceTo(mPositions.get(1).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(1).toLocation().distanceTo(mPositions.get(2).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(2).toLocation().distanceTo(mPositions.get(3).toLocation());\n distanceList.add(dist);\n dist = mPositions.get(3).toLocation().distanceTo(mPositions.get(4).toLocation());\n distanceList.add(dist);\n \n }", "public ArrayList<Pair<Landmark, Double>> locationWithDistance(Pair<Double, Double> userLocation) {\n ArrayList<Pair<Landmark, Double>> distanceList = new ArrayList<>();\n for(int i = 0; i < this.list.size(); i++){\n Landmark landmark = list.get(i);\n double latitude = landmark.getLatitude();\n double longitude = landmark.getLongitude();\n Pair<Double, Double> coordinate = new Pair<>(latitude, longitude);\n // TODO use latitude and longitude explicitly\n double dist = distanceBetween(userLocation, coordinate);\n distanceList.add(new Pair<>(this.list.get(i), dist));\n }\n for( int i = 0; i < distanceList.size()-1; i++ ){\n for( int j = i+1; j < distanceList.size(); j++ ){\n if(distanceList.get(i).second > distanceList.get(j).second){\n Collections.swap(distanceList, i, j);\n }\n }\n }\n return distanceList;\n }", "public void checkDataOrder(Double[] times) {\n Double[] longitudes;\n Double[] latitudes;\n try {\n longitudes = getSampleLongitudes();\n latitudes = getSampleLatitudes();\n } catch ( Exception ex ) {\n // Messages about problems getting the longitudes or latitudes should already have been generated\n return;\n }\n TreeSet<DataLocation> orderedSet = new TreeSet<DataLocation>();\n for (int rowIdx = 0; rowIdx < numSamples; rowIdx++) {\n if ( times[rowIdx] != null ) {\n DataLocation dataLoc = new DataLocation();\n // Messages about missing longitude, latitude, or times should already have been generated\n if ( (times[rowIdx] == null) || (longitudes[rowIdx] == null) || (latitudes[rowIdx] == null) )\n continue;\n dataLoc.setDataDate(new Date(Math.round(times[rowIdx] * 1000.0)));\n dataLoc.setLongitude(longitudes[rowIdx]);\n dataLoc.setLatitude(latitudes[rowIdx]);\n dataLoc.setRowNumber(rowIdx + 1);\n if ( !orderedSet.add(dataLoc) )\n throw new RuntimeException(\"Unexpected duplicate data location with row number\");\n }\n }\n\n // TODO: needs a better method of figuring out which rows are actually misordered\n // the following works okay if there is only one block of misordered data\n // or if multiple blocks are consistent in the \"direction\" they are misordered.\n\n double[] maxSpeeds = DashboardConfigStore.getMaxCalcSpeedsKnots();\n double[] maxTimeGaps = DashboardConfigStore.getMaxTimeGapsDays();\n\n // The following will say:\n // 4,5,6 are misordered in 1,2,3,7,8,9,4,5,6,10,11,12;\n // 1,2 are misordered in 3,4,1,2,5,6\n // 3 is misordered in 1,2,4,5\n TreeSet<Integer> forwardErrs = new TreeSet<Integer>();\n ArrayList<ADCMessage> forwardSpeedMsgs = new ArrayList<ADCMessage>();\n ArrayList<ADCMessage> forwardTimeGapMsgs = new ArrayList<ADCMessage>();\n int lastRowNum = 0;\n int expectedRowNum = 1;\n for (DataLocation dataLoc : orderedSet) {\n int actualRowNum = dataLoc.getRowNumber();\n while ( expectedRowNum < actualRowNum ) {\n forwardErrs.add(expectedRowNum);\n expectedRowNum += 1;\n }\n if ( expectedRowNum == actualRowNum ) {\n if ( lastRowNum > 0 ) {\n double kmdelta = DashboardServerUtils.distanceBetween(longitudes[actualRowNum - 1],\n latitudes[actualRowNum - 1], longitudes[lastRowNum - 1], latitudes[lastRowNum - 1]);\n double hourdelta = (times[actualRowNum - 1] - times[lastRowNum - 1]) / 3600.0;\n double speed = 0.539957 * kmdelta / hourdelta;\n if ( (speed < 0.0) || (hourdelta < 0.0) ) {\n // Just to make sure the calculation was done correctly\n throw new RuntimeException(\"Negative calculated speed or time gap obtained\");\n }\n else if ( speed > maxSpeeds[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[1]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[1]));\n forwardSpeedMsgs.add(msg);\n }\n else if ( speed > maxSpeeds[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[0]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[0]));\n forwardSpeedMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[1]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[1]));\n forwardTimeGapMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[0]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[0]));\n forwardTimeGapMsgs.add(msg);\n }\n }\n lastRowNum = actualRowNum;\n expectedRowNum += 1;\n }\n }\n // The following will say:\n // 7,8,9 are misordered in 1,2,3,7,8,9,4,5,6,10,11,12;\n // 3,4 are misordered in 3,4,1,2,5,6\n // 3 is misordered in 1,2,4,5\n TreeSet<Integer> reverseErrs = new TreeSet<Integer>();\n ArrayList<ADCMessage> reverseSpeedMsgs = new ArrayList<ADCMessage>();\n ArrayList<ADCMessage> reverseTimeGapMsgs = new ArrayList<ADCMessage>();\n lastRowNum = 0;\n expectedRowNum = numSamples;\n for (DataLocation dataLoc : orderedSet.descendingSet()) {\n int actualRowNum = dataLoc.getRowNumber();\n while ( expectedRowNum > actualRowNum ) {\n reverseErrs.add(expectedRowNum);\n expectedRowNum -= 1;\n }\n if ( expectedRowNum == actualRowNum ) {\n if ( lastRowNum > 0 ) {\n double kmdelta = DashboardServerUtils.distanceBetween(longitudes[lastRowNum - 1],\n latitudes[lastRowNum - 1], longitudes[actualRowNum - 1], latitudes[actualRowNum - 1]);\n double hourdelta = (times[lastRowNum - 1] - times[actualRowNum - 1]) / 3600.0;\n double speed = 0.539957 * kmdelta / hourdelta;\n if ( (speed < 0.0) || (hourdelta < 0.0) ) {\n // Just to make sure the calculation was done correctly\n throw new RuntimeException(\"Negative calculated speed or time gap obtained\");\n }\n else if ( speed > maxSpeeds[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[1]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[1]));\n reverseSpeedMsgs.add(msg);\n }\n else if ( speed > maxSpeeds[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"calculated speed exceeds %g knots\", maxSpeeds[0]));\n msg.setDetailedComment(String.format(\n \"calculated speed of %g knots exceeds %g knots\", speed, maxSpeeds[0]));\n reverseSpeedMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[1] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.ERROR);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[1]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[1]));\n reverseTimeGapMsgs.add(msg);\n }\n else if ( hourdelta > 24.0 * maxTimeGaps[0] ) {\n // Add one message at this time - later repeat with all the columns\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.WARNING);\n msg.setRowNumber(actualRowNum);\n msg.setGeneralComment(String.format(\n \"time between consecutive measurements exceeds %g days\", maxTimeGaps[0]));\n msg.setDetailedComment(String.format(\n \"time between consecutive measurements %g days exceeds %g days\",\n hourdelta / 24.0, maxTimeGaps[0]));\n reverseTimeGapMsgs.add(msg);\n }\n }\n lastRowNum = actualRowNum;\n expectedRowNum -= 1;\n }\n }\n // Guess that the set with fewer errors is the correct one\n TreeSet<Integer> errorRowsNums;\n ArrayList<ADCMessage> speedMsgs;\n ArrayList<ADCMessage> timeGapMsgs;\n if ( (forwardErrs.size() + forwardSpeedMsgs.size() + forwardTimeGapMsgs.size())\n <= (reverseErrs.size() + reverseSpeedMsgs.size() + reverseTimeGapMsgs.size()) ) {\n errorRowsNums = forwardErrs;\n speedMsgs = forwardSpeedMsgs;\n timeGapMsgs = forwardTimeGapMsgs;\n }\n else {\n errorRowsNums = reverseErrs;\n speedMsgs = reverseSpeedMsgs;\n timeGapMsgs = reverseTimeGapMsgs;\n }\n for (Integer rowNum : errorRowsNums) {\n for (Integer colIdx : indicesForTime) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(Severity.CRITICAL);\n msg.setRowNumber(rowNum);\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n String comment = \"time-misordered data row\";\n msg.setGeneralComment(comment);\n msg.setDetailedComment(comment);\n stdMsgList.add(msg);\n }\n }\n for (ADCMessage spdmsg : speedMsgs) {\n // Speed problems could be in longitude ...\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(longitudeIndex + 1);\n msg.setColName(userColNames[longitudeIndex]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n // ... or latitude ...\n msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(latitudeIndex + 1);\n msg.setColName(userColNames[latitudeIndex]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n // ... or time\n for (Integer colIdx : indicesForTime) {\n msg = new ADCMessage();\n msg.setSeverity(spdmsg.getSeverity());\n msg.setRowNumber(spdmsg.getRowNumber());\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n msg.setGeneralComment(spdmsg.getGeneralComment());\n msg.setDetailedComment(spdmsg.getDetailedComment());\n stdMsgList.add(msg);\n }\n }\n for (ADCMessage tgmsg : timeGapMsgs) {\n for (Integer colIdx : indicesForTime) {\n ADCMessage msg = new ADCMessage();\n msg.setSeverity(tgmsg.getSeverity());\n msg.setRowNumber(tgmsg.getRowNumber());\n msg.setColNumber(colIdx + 1);\n msg.setColName(userColNames[colIdx]);\n msg.setGeneralComment(tgmsg.getGeneralComment());\n msg.setDetailedComment(tgmsg.getDetailedComment());\n stdMsgList.add(msg);\n }\n }\n }", "@Test\n\t\tpublic void testFindLocation1() {\n\t\t\t// Initialize 3 points\n\t\t\tPoint2D p1 = new Point2D.Double(1.848,8.331);\n\t\t\tPoint2D p2 = new Point2D.Double(10.241,9.463);\n\t\t\tPoint2D p3 = new Point2D.Double(8.889,2.456);\n\t\t\t\n\t\t\t// Initialize 3 angles in degrees.\n\t\t\tdouble ang1 = 168.7810;\n\t\t\tdouble ang2 = 64.0945;\n\t\t\tdouble ang3 = 268.5473;\n\t\t\t\n\t\t\t// Initialized the Triangulate object and load points and radii\n\t\t\tTriangulate test = new Triangulate();\n\t\t\ttest.setPoints(p1, p2, p3);\n\t\t\ttest.setAngles(ang1, ang2, ang3);\t\n\t\t\t// Set the given and actual location with the error we have\n\t\t\tPoint2D loc = test.findLocation();\n\t\t\tPoint2D actual = new Point2D.Double(9.002, 6.912);\n\t\t\tdouble err = 1e-4; \n\t\t\t\n\t\t\t// Test x and y coordinates within a certain error\n\t\t\tassertEquals(actual.getX(), loc.getX(), err);\n\t\t\tassertEquals(actual.getY(), loc.getY(), err);\n\n\t\t}", "protected Location nextLocation()\n {\n // Get list of neighboring empty locations.\n ArrayList emptyNbrs = emptyNeighbors();\n\n // Remove the location behind, since fish do not move backwards.\n Direction oppositeDir = direction().reverse();\n Location locationBehind = environment().getNeighbor(location(),\n oppositeDir);\n emptyNbrs.remove(locationBehind);\n Debug.print(\"Possible new locations are: \" + emptyNbrs.toString());\n\n // If there are no valid empty neighboring locations, then we're done.\n if ( emptyNbrs.size() == 0 )\n return location();\n\n // Return a randomly chosen neighboring empty location.\n Random randNumGen = RandNumGenerator.getInstance();\n int randNum = randNumGen.nextInt(emptyNbrs.size());\n\t return (Location) emptyNbrs.get(randNum);\n }", "@Test\n\t\tpublic void testFindLocation2() {\n\t\t\t// Initialize 3 points\n\t\t\tPoint2D p1 = new Point2D.Double(0,0);\n\t\t\tPoint2D p2 = new Point2D.Double(1,1);\n\t\t\tPoint2D p3 = new Point2D.Double(10,1);\n\t\t\t\n\t\t\t// Initialize 3 angles in degrees.\n\t\t\tdouble ang1 = 187.1250;\n\t\t\tdouble ang2 = 170.5377;\n\t\t\tdouble ang3 = 4.7636;\n\t\t\t\n\t\t\t// Initialized the Triangulate object and load points and radii\n\t\t\tTriangulate test = new Triangulate();\n\t\t\ttest.setPoints(p1, p2, p3);\n\t\t\ttest.setAngles(ang1, ang2, ang3);\t\n\t\t\t// Set the given and actual location with the error we have\n\t\t\tPoint2D loc = test.findLocation();\n\t\t\tPoint2D actual = new Point2D.Double(4,0.5);\n\t\t\tdouble err = 1e-4; \n\t\t\t\n\t\t\t// Test x and y coordinates within a certain error\n\t\t\tassertEquals(actual.getX(), loc.getX(), err);\n\t\t\tassertEquals(actual.getY(), loc.getY(), err);\n\n\t\t}", "private void getClostestWalkerAvailable(){\n DatabaseReference walkerLocation = FirebaseDatabase.getInstance().getReference().child(\"walkersAvailable\");\n\n GeoFire geofire = new GeoFire(walkerLocation);\n geoQuery = geofire.queryAtLocation(new GeoLocation(pickupLocation.latitude, pickupLocation.longitude), radius);\n geoQuery.removeAllListeners();\n geoQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n @Override\n //if walker found within radius, this method is called,\n // key is walkers's key in db and location is their location using long and lat\n public void onKeyEntered(String key, GeoLocation location) {\n if(!walkerFound && reqBoolean){\n walkerFound = true;\n walkerFoundID = key;\n\n //if walker was found within the radius their userID will be stored in the DB.\n // This lets us keep track of available walkers and working walkers.\n DatabaseReference walkerRef = FirebaseDatabase.getInstance().getReference()\n .child(\"users\").child(\"walkers\").child(walkerFoundID).child(\"ownerRequest\");\n String ownerID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n HashMap map = new HashMap();\n //updates the DB\n map.put(\"ownerWalkID\", ownerID);\n map.put(\"destination\", destination);\n map.put(\"destinationLat\", destinationLatLng.latitude);\n map.put(\"destinationLng\", destinationLatLng.longitude);\n\n walkerRef.updateChildren(map);\n DatabaseReference ownerRef = FirebaseDatabase.getInstance()\n .getReference().child(\"users\").child(\"owners\").child(ownerID);\n HashMap map2 = new HashMap();\n\n //updates the DB\n map2.put(\"notifications\", \"Walker found!\");\n\n\n ownerRef.updateChildren(map2);\n\n\n\n\n getWalkerLocation();\n getWalkerInfo();\n getHasRideEnded();\n statusButtonText.setText(\"Finding a walker...\");\n reqWalkerButton.setText(\"Cancel\");\n }\n\n\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n //if walker not found within radius, radius goes up by 1 and method is called again to check for walker with the new radius\n public void onGeoQueryReady() {\n if(!walkerFound){\n if(radius <= 20) {\n radius++;\n getClostestWalkerAvailable();\n } else {\n\n Toast.makeText(OwnerMapActivity.this, \"No walkers found...Please try again\", Toast.LENGTH_LONG).show();\n statusButtonText.setText(\"Type the name of your locak park below\");\n if (pickupLocationMarker != null) {\n pickupLocationMarker.remove();\n }\n reqWalkerButton.setText(\"Request walker\");\n reqBoolean = false;\n radius = 1;\n String userId = FirebaseAuth.getInstance().getCurrentUser().getUid();\n DatabaseReference ref = FirebaseDatabase.getInstance().getReference(\"ownerRequest\");\n GeoFire geoFire = new GeoFire(ref);\n geoFire.removeLocation(userId);\n }\n\n }\n\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n\n }", "public void foodLocated() {\n ArrayList<Creature> creatures = world.getCreatureList();\n for (Creature c : creatures) {\n if (c.creatureLocation().equals(predatorLocation())) {\n //System.out.println(\"Eating Creature: \" + c.creatureLocation());\n c.removed();\n eaten++;\n }\n }\n for (int j = 0; j < world.getCreatureList().size(); j++) {\n if (!world.getCreatureList().get(j).isSpawned()) {\n world.despawnCreature(world.getCreatureList().get(j));\n }\n }\n }", "private void initLocationData() {\n\n // init google client and request for fused location provider\n fusedLocationProviderClient = LocationServices.getFusedLocationProviderClient(context);\n\n locationRequest = new LocationRequest()\n //.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY) // GPS quality location points\n .setPriority(LocationRequest.PRIORITY_BALANCED_POWER_ACCURACY) // optimized for battery\n .setInterval(20000) // at least once every 20 seconds\n .setFastestInterval(10000); // at most once every 10 seconds\n\n locationCallback = new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Point userPoint;\n if (locationResult != null) {\n // update user location\n Location lastLocation = locationResult.getLastLocation();\n userPoint = new Point(lastLocation.getLatitude(), lastLocation.getLongitude());\n // cache location\n PreferencesCache.setLastLatitude(lastLocation.getLatitude());\n PreferencesCache.setLastLongitude(lastLocation.getLongitude());\n } else {\n // get cached data\n userPoint = new Point(PreferencesCache.getLastLatitude(), PreferencesCache.getLastLongitude());\n }\n\n navigator.updateUserLocation(userPoint);\n }\n };\n }", "private void findPath()\n\t{\n\t\tpathfinding = true;\n\n\t\tmoves = Pathfinder.calcOneWayMove(city.getDrivingMap(), x, y, destX, destY);\n\t\tpathfinding = false;\n\t}", "private void compareMove(int next){\n moveBuffer[0] = moveBuffer[1];//moveBuffer[0]=currentLocation,1 is next;\n moveBuffer[1] = next;\n if(moveBuffer[0]==moveBuffer[1]){\n flagbuffer0=0;\n return;\n }\n int currenti=0;int currentj=0;\n for ( int i = 0; i < 3; ++i ) {\n for ( int j = 0; j < 3; ++j ) {\n if ( maze[i][j] == moveBuffer[0] ) {\n currenti=i;\n currentj=j;\n break;// Found the correct i,j - print them or return them or whatever\n }\n }\n }\n int nexti=0;int nextj=0;\n for ( int i = 0; i < 3; ++i ) {\n for ( int j = 0; j < 3; ++j ) {\n if ( maze[i][j] == moveBuffer[1] ) {\n nexti=i;\n nextj=j;\n break;// Found the correct i,j - print them or return them or whatever\n }\n }\n }\n\n if( currenti== nexti){\n if(nextj > currentj && flagbuffer0==0){\n /*uiShowToast(\"Going right\");\n System.out.println(\"Going right\");\n this.sendCarMovement(\"R\");*/\n uiShowToast(\"Going right\");\n this.sendCarMovement(\"R\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\"); flagbuffer0=1;\n }\n else if(nextj < currentj && flagbuffer0==0){\n uiShowToast(\"Going left\");\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\"); flagbuffer0=1;\n }\n else if(flagbuffer0==1){\n this.sendCarMovement(\"U\");\n }\n }\n if( currentj== nextj){\n if(nexti > currenti){\n /*uiShowToast(\"Going down\");\n System.out.println(\"Going down\");\n this.sendCarMovement(\"D\");*/\n uiShowToast(\"Going down\");\n flagbuffer0=0;\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(1100);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n\n }\n else if(nexti < currenti){\n /*uiShowToast(\"Going up\");\n System.out.println(\"Going up\");\n this.sendCarMovement(\"U\");*/\n uiShowToast(\"Going up\");\n flagbuffer0=0;\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n }\n }\n /*if(movebuffer[0]==mvebuffer[1]){\n uiShowToast(\"Going up\");\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n }else{\n\n }\n\n /*\n */\n /* Damon movement code\n if(moveBuffer[1] == 100 && moveBuffer[0] == 200){\n uiShowToast(\"Going left\");\n System.out.println(\"Going left\");\n this.sendCarMovement(\"L\");\n try {\n Thread.sleep(550);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(2000);\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }else{\n uiShowToast(\"Going up\");\n //Toast.makeText(getApplicationContext(), \"Going up\", Toast.LENGTH_LONG).show();\n System.out.println(\"Going up\");\n this.sendCarMovement(\"U\");\n try {\n Thread.sleep(2000);//wait 2 sec to next command;\n } catch (InterruptedException e) {\n e.printStackTrace();\n }\n }\n */\n return;\n }", "private List<BaseLocation> getExpectedBaseLocations() {\r\n final List<BaseLocation> baseLocations = new ArrayList<>();\r\n\r\n final Position position1 = new Position(3104, 3856, PIXEL);\r\n final Position center1 = new Position(3040, 3808, PIXEL);\r\n baseLocations.add(new BaseLocation(position1, center1, 13500, 5000, true, false, true));\r\n\r\n final Position position2 = new Position(2208, 3632, PIXEL);\r\n final Position center2 = new Position(2144, 3584, PIXEL);\r\n baseLocations.add(new BaseLocation(position2, center2, 9000, 5000, true, false, false));\r\n\r\n final Position position3 = new Position(640, 3280, PIXEL);\r\n final Position center3 = new Position(576, 3232, PIXEL);\r\n baseLocations.add(new BaseLocation(position3, center3, 13500, 5000, true, false, true));\r\n\r\n final Position position4 = new Position(2688, 2992, PIXEL);\r\n final Position center4 = new Position(2624, 2944, PIXEL);\r\n baseLocations.add(new BaseLocation(position4, center4, 9000, 5000, true, false, false));\r\n\r\n final Position position5 = new Position(1792, 2480, PIXEL);\r\n final Position center5 = new Position(1728, 2432, PIXEL);\r\n baseLocations.add(new BaseLocation(position5, center5, 12000, 0, true, true, false));\r\n\r\n final Position position6 = new Position(3200, 1776, PIXEL);\r\n final Position center6 = new Position(3136, 1728, PIXEL);\r\n baseLocations.add(new BaseLocation(position6, center6, 13500, 5000, true, false, true));\r\n\r\n final Position position7 = new Position(640, 1968, PIXEL);\r\n final Position center7 = new Position(576, 1920, PIXEL);\r\n baseLocations.add(new BaseLocation(position7, center7, 9000, 5000, true, false, false));\r\n\r\n final Position position8 = new Position(1792, 1808, PIXEL);\r\n final Position center8 = new Position(1728, 1760, PIXEL);\r\n baseLocations.add(new BaseLocation(position8, center8, 12000, 0, true, true, false));\r\n\r\n final Position position9 = new Position(2336, 560, PIXEL);\r\n final Position center9 = new Position(2272, 512, PIXEL);\r\n baseLocations.add(new BaseLocation(position9, center9, 13500, 5000, true, false, true));\r\n\r\n final Position position10 = new Position(3584, 720, PIXEL);\r\n final Position center10 = new Position(3520, 672, PIXEL);\r\n baseLocations.add(new BaseLocation(position10, center10, 9000, 5000, true, false, false));\r\n\r\n final Position position11 = new Position(544, 432, PIXEL);\r\n final Position center11 = new Position(480, 384, PIXEL);\r\n baseLocations.add(new BaseLocation(position11, center11, 13500, 5000, true, false, true));\r\n\r\n return baseLocations;\r\n }", "private void loadAllAvailableDriver(final LatLng location) {\n\n mMap.clear();\n mUserMarker = mMap.addMarker(new MarkerOptions()\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.marker))\n .position(location)\n .title(\"Your Location\"));\n //move camera to this position\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(location, 15.0f));\n\n\n //Load all available drivers in 3 km distance\n DatabaseReference driverLocation = FirebaseDatabase.getInstance().getReference(Common.driver_tb1);\n GeoFire gf = new GeoFire(driverLocation);\n\n GeoQuery geoQuery = gf.queryAtLocation(new GeoLocation(location.latitude, location.longitude), distance);\n geoQuery.removeAllListeners();\n\n geoQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n @Override\n public void onKeyEntered(String key, final GeoLocation location) {\n //Using key to get email from table Users\n //Table users is table when drivers register account and update information\n FirebaseDatabase.getInstance().getReference(Common.user_driver_tb1)\n .child(key)\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n //because rider and user model is same properties\n //so we can use Rider model to get User here\n Rider rider = dataSnapshot.getValue(Rider.class);\n\n //Add driver to map\n mMap.addMarker(new MarkerOptions()\n .position(new LatLng(location.latitude, location.longitude))\n .flat(true)\n .snippet(\"Phone :\")\n .icon(BitmapDescriptorFactory.fromResource(R.drawable.car)));\n\n }\n\n @Override\n public void onCancelled(DatabaseError databaseError) {\n\n }\n });\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n if (distance <= LIMIT) { //distance find upto 3 km\n distance++;\n loadAllAvailableDriver(location);\n\n }\n\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n }", "private void moveToCurrentLocation() {\n \t\tGPSFilterLocationRetriever retriever = new GPSFilterLocationRetriever( new Criteria() );\n \t\tLocation loc = retriever.getLocation( this );\n \n \t\tif ( loc == null ) {\n \t\t\t// User turned off GPS, send it to device location settings.\n \t\t\tIntent i = new Intent( android.provider.Settings.ACTION_LOCATION_SOURCE_SETTINGS );\n \t\t\tthis.startActivity( i );\n \t\t} else {\n \t\t\t// First move to the last known location..\n \t\t\tthis.moveCameraToLocation( loc, false );\n \n \t\t\t// Check if location fix is out dated, if it is, request a new location, ONCE.\n \t\t\tlong elapsedTime = System.currentTimeMillis() - loc.getTime();\n \t\t\tif ( elapsedTime > MAX_LOCATION_FIX_AGE ) {\n \t\t\t\t// Therefore, we request a single fix.\n \t\t\t\tretriever.requestSingleUpdate( this, new LocationAdapter() {\n \t\t\t\t\t@Override\n \t\t\t\t\tpublic void onLocationChanged( Location loc ) {\n \t\t\t\t\t\tmoveCameraToLocation( loc, true );\n \t\t\t\t\t}\n \t\t\t\t} );\n \t\t\t}\n \t\t}\n \t}", "private void getDeviceLocation(){\n Log.d(TAG,\"get device location currently\");\n mFusedLocationProviderClient= LocationServices.getFusedLocationProviderClient(this);\n try{\n if(mLocationPermissionGranted){\n @SuppressLint(\"MissingPermission\") final Task location = mFusedLocationProviderClient.getLastLocation();\n location.addOnCompleteListener(new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if(task.isSuccessful()){\n Log.d(TAG,\"onComplete: found Location\");\n mLastKnownLocation= (Location) task.getResult();\n moveCamera(new LatLng(mLastKnownLocation.getLatitude(),mLastKnownLocation.getLongitude()),DEFAULT_ZOOM);\n\n Geocoder geocoder;\n List<Address> addresses;\n geocoder = new Geocoder(MapsActivity.this, Locale.getDefault());\n\n try {\n addresses = geocoder.getFromLocation(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude(), 1); // Here 1 represent max location result to returned, by documents it recommended 1 to 5\n LatLng latLng = new LatLng(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n\n address = addresses.get(0).getAddressLine(0); // If any additional address line present than only, check with max available address lines by getMaxAddressLineIndex()\n city = addresses.get(0).getLocality();\n state = addresses.get(0).getAdminArea();\n String country = addresses.get(0).getCountryName();\n postalCode = addresses.get(0).getPostalCode();\n String knownName = addresses.get(0).getFeatureName(); // Only\n MarkerOptions markerOptions = new MarkerOptions();\n markerOptions.position(latLng);\n markerOptions.title(address);\n mMap.clear();//Not sure\n mMap.addMarker(markerOptions);\n Marker here = mMap.addMarker(markerOptions.title(address + \", \" + city + \", \" + state + \", \" + country\n + \", \" + postalCode + \", \" + knownName));\n here.showInfoWindow();\n } catch (IOException e) {\n e.printStackTrace();\n } }else {\n Log.d(TAG, \"onComplete: current location is null\");\n Toast.makeText(MapsActivity.this, \"unable to get current location\",Toast.LENGTH_SHORT).show();\n getLocationPermission();\n }\n }\n });\n\n }\n }catch (SecurityException e){\n Log.e(TAG,\"getDeviceLocation: SecurityException: \" + e.getMessage() );\n }\n\n\n\n }", "private void computeDistances() {\n for (int i = 0; i < groundTruthInstant.size(); ++i)\n for (int j = 0; j < estimatedInstant.size(); ++j) {\n float currentDist = groundTruthInstant.get(i).getDistanceTo(estimatedInstant.get(j).getPos());\n if (currentDist < distToClosestEstimate[i][0]) {\n distToClosestEstimate[i][0] = currentDist;\n distToClosestEstimate[i][1] = j;\n }\n }\n }", "private void calculateDirections(){\n \t\n \tAddress start = parseAddress(jTextFieldStart);\n \tAddress end = parseAddress(jTextFieldEnd);\n \tif(DEBUG_SETDB){ start = DEBUG_START; end = DEBUG_END; }\n \t\n \t\n \tif(textFieldDefaults.get(jTextFieldStart).equals(jTextFieldStart.getText()) ||\n \t\t\ttextFieldDefaults.get(jTextFieldEnd).equals(jTextFieldEnd.getText())){\n \t\toutputResults(addressError(null, -5));\n \t\t\n \t}else if(start == null || end == null){\n \t\toutputResults(addressError(null, -4));\n \t\t\n \t}else{\n\t\t\ttry{\n\t\t\t\tif(!checkAddrInputFields()){\n\t\t\t\t\tRouteFormatter format = getTravelFormat();\n\t\t EnvironmentVariables.OPTIMIZE_FOR_PERFORMANCE_ON = jCheckBoxQuickSearch.isSelected();\n\t\t\t\t\t\n\t\t\t\t\tcurrDirections = virtualGPS.getDirections(start, end, format);\n\t\t\t\t\t// prepare the map view\n\t\t\t\t\tif(!jFrameMap.isShowing()){\n\t\t\t\t jFrameMap.setVisible(true);\n\t\t\t\t jFrameMap.setBounds(this.getX()+this.getWidth(), this.getY(), \n\t\t\t\t \t\tjFrameMap.getPreferredSize().width,\n\t\t\t\t \t\tjFrameMap.getPreferredSize().height);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\toutputResults(formatDirections(format));\n\t\t\t\t\t\n\t\t\t\t\tsetAddrInputFields();\n\t\t\t\t\tcheckAddrInputFields();\n\t\t\t\t\t\n\t\t\t\t}else{\n\t\t\t\t\tmapPanel.requestFocus();\n\t\t\t\t}\n\t\t\t\t\n\t\t generateMap();\n\t\t \n\t\t \n\t\t\t}catch(InvalidAddressException ex){\n\t\t\t\t\n\t\t \tint error = virtualGPS.checkAddress(start);\n\t\t \tif(error != DirectionsFinder.ADDRESS_VALID){ // if start address is bad\n\t\t \t\toutputResults(addressError(start, error));\n\t\t \t\n\t\t \t}else{\n\t\t\t \terror = virtualGPS.checkAddress(end);\n\t\t \t\toutputResults(addressError(end, error));\n\t\t \t}\n\t\t \t\n\t\t\t}catch(NoPathException ex){\n\t\t\t\t\n\t\t\t\toutputResults(\"No path found:\\nFrom \"+start+\"\\nTo \"+end+\"\\n\");\n\t\t\t}\n \t}\n \n }", "private void scanForBlockFarAway() {\r\n\t\tList<MapLocation> locations = gameMap.senseNearbyBlocks();\r\n\t\tlocations.removeAll(stairs);\r\n\t\tif (locations.size() == 0) {\r\n\t\t\tblockLoc = null;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t/* remove blocks that can be sensed */\r\n\t\tIterator<MapLocation> iter = locations.iterator();\r\n\t\twhile(iter.hasNext()) {\r\n\t\t\tMapLocation loc = iter.next();\r\n\t\t\tif (myRC.canSenseSquare(loc))\r\n\t\t\t\titer.remove();\r\n\t\t} \r\n\t\t\r\n\t\tlocations = navigation.sortLocationsByDistance(locations);\r\n\t\t//Collections.reverse(locations);\r\n\t\tfor (MapLocation block : locations) {\r\n\t\t\tif (gameMap.get(block).robotAtLocation == null){\r\n\t\t\t\t/* this location is unoccupied */\r\n\t\t\t\tblockLoc = block;\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\t\t}\r\n\t\tblockLoc = null;\r\n\t}", "public Location getClosestMoveableLocation(Location otherLocation, Location currentLocation) {\n Location closestLocation;\n List<Location> locations = getSurroundingFourLocations(currentLocation);\n List<Location> randomizedLocations = new LinkedList<Location>();\n\n while (!locations.isEmpty()) {\n int LOW = 0;\n int HIGH = locations.size();\n Random randomize = new Random();\n\n int randomIndex = randomize.nextInt(HIGH - LOW) + LOW;\n randomizedLocations.add(locations.remove(randomIndex));\n }\n\n closestLocation = checkClosestLocation(otherLocation, randomizedLocations.get(0), randomizedLocations.get(1));\n closestLocation = checkClosestLocation(otherLocation, closestLocation, randomizedLocations.get(2));\n closestLocation = checkClosestLocation(otherLocation, closestLocation, randomizedLocations.get(3));\n\n return closestLocation;\n }", "@Override\n\t\t\t\tpublic void onLocationChanged(Location loc) {\n\n\t\t\t\t\t//If Wifi\n\t\t\t\t\tif (monitor.isNetworkConnected()\n\t\t\t\t\t\t\t&& monitor.networkType == ConnectivityManager.TYPE_WIFI) {\n\n\t\t\t\t\t\t@SuppressWarnings(\"deprecation\")\n\t\t\t\t\t\tString locationProviders = Settings.Secure.getString(\n\t\t\t\t\t\t\t\tcont.getContentResolver(),\n\t\t\t\t\t\t\t\tSettings.Secure.LOCATION_PROVIDERS_ALLOWED);\n\t\t\t\t\t\tif (locationProviders != null\n\t\t\t\t\t\t\t\t&& !locationProviders.equals(\"\")) {\n\t\t\t\t\t\t\t//Lock our location.\n\t\t\t\t\t\t\tmonitor.locationLocked = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t\t//If we have had a steady lock\n\t\t\t\t\tif (monitor.locationLocked && (counter >= 2 || first)) {\n\n\t\t\t\t\t\t//Swap \n\t\t\t\t\t\tDouble oldLat = self.member.lat;\n\t\t\t\t\t\tDouble oldLong = self.member.lon;\n\n\t\t\t\t\t\tself.member.lat = loc.getLatitude();\n\t\t\t\t\t\tself.member.lon = loc.getLongitude();\n\n\t\t\t\t\t\tif (self.member.pic == null) {\n\t\t\t\t\t\t\tself.member.pic = Images\n\t\t\t\t\t\t\t\t\t.paintMarkerBitmap(self.member);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tplaceMarker(self.member);\n\n\t\t\t\t\t\tLog.i(\"Position\", self.member.lat.toString() + \", \"\n\t\t\t\t\t\t\t\t+ self.member.lon.toString());\n\n\t\t\t\t\t\tGCMMessage.sendLocation(self.member.lat,\n\t\t\t\t\t\t\t\tself.member.lon);\n\n\t\t\t\t\t\tMembersFragment.stopSpinning();\n\n\t\t\t\t\t\t// gcmMessage.sendLocation(self.lat, self.lon);\n\n\t\t\t\t\t\tfloat[] results = new float[1];\n\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\tLocation.distanceBetween(oldLat, oldLong,\n\t\t\t\t\t\t\t\t\tself.member.lat, self.member.lon, results);\n\n\t\t\t\t\t\t\tif (results[0] > 35 && wobble > -interval / 2) {\n\n\t\t\t\t\t\t\t} else if (results[0] <= 35\n\t\t\t\t\t\t\t\t\t&& wobble < interval / 2) {\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t} catch (NullPointerException npe) {\n\t\t\t\t\t\t\tLog.i(\"Locater\", \"Got first location\");\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tgpsTimer.removeCallbacks(r);\n\n\t\t\t\t\t\tlocationClient.disconnect();\n\n\t\t\t\t\t\tmonitor.locationLocked = false;\n\n\t\t\t\t\t\tcounter = 0;\n\n\t\t\t\t\t\tfirst = false;\n\n\t\t\t\t\t}\n\n\t\t\t\t\tcounter++;\n\t\t\t\t}", "private void searchForLocation() {\n foundLocation = false;\n FusedLocationProviderClient mFusedLocationProviderClient = LocationServices\n .getFusedLocationProviderClient(getActivity());\n //Ignore the red line - we check for permissions before this function is called\n if (ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n\n return;\n }\n Task<Location> lastLocation = mFusedLocationProviderClient.getLastLocation();\n lastLocation.addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n Location location = task.getResult();\n if (location != null) {\n LatLng currentLatLng = new LatLng(location.getLatitude(),\n location.getLongitude());\n CameraUpdate update = CameraUpdateFactory.newLatLngZoom(currentLatLng,\n DEFAULT_ZOOM);\n googleMap.moveCamera(update);\n foundLocation = true;\n }\n }\n }\n });\n }", "private void moveRemainingMhos() {\n\t\t\n\t\t//Iterate through every mho's X and Y values\n\t\tfor(int i = 0; i < mhoLocations.size()/2; i++) {\n\t\t\t\n\t\t\t//Assign mhoX and mhoY to the X and Y values of the mho that is currently being tested\n\t\t\tint mhoX = mhoLocations.get(i*2);\n\t\t\tint mhoY = mhoLocations.get(i*2+1);\n\t\t\t\n\t\t\t//Check if there is a fence 1 block away from the mho\n\t\t\tif(newMap[mhoX][mhoY+1] instanceof Fence || newMap[mhoX][mhoY-1] instanceof Fence || newMap[mhoX-1][mhoY] instanceof Fence || newMap[mhoX-1][mhoY+1] instanceof Fence || newMap[mhoX-1][mhoY-1] instanceof Fence || newMap[mhoX+1][mhoY] instanceof Fence || newMap[mhoX+1][mhoY+1] instanceof Fence || newMap[mhoX+1][mhoY-1] instanceof Fence) {\n\t\t\t\t\n\t\t\t\t//Assign the new map location as a Mho\n\t\t\t\tnewMap[mhoX][mhoY] = new BlankSpace(mhoX, mhoY, board);\n\t\t\t\t\n\t\t\t\t//Set the mho's move in the moveList\n\t\t\t\tmoveList[mhoX][mhoY] = Legend.SHRINK;\n\t\t\t\t\n\t\t\t\t//remove each X and Y from mhoLocations\n\t\t\t\tmhoLocations.remove(i*2+1);\n\t\t\t\tmhoLocations.remove(i*2);\n\t\t\t\t\n\t\t\t\t//Call moveRemainingMhos again, because the list failed to be checked through completely\n\t\t\t\tmoveRemainingMhos();\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\treturn;\n\t}", "private void updateMhoLocationList() {\n\n\t\t//clear all the mhos in mhoLocations\n\t\tmhoLocations.clear();\n\n\t\t//add the locations of all the mhos in mhoLocations\n\t\tfor (int i = 1; i < 11; i++)\n\t\t\tfor (int j = 1; j < 11; j++) \n\t\t\t\tif(newMap[i][j] instanceof Mho) {\n\t\t\t\t\tmhoLocations.add(i);\n\t\t\t\t\tmhoLocations.add(j);\n\t\t\t\t}\n\t}", "@Override\n public void onLocationChanged(Location location) {\n for (Map.Entry<Marker, Integer> e : gameMarkers.entrySet()) {\n double distance = distFrom(\n location.getLatitude(),\n location.getLongitude(),\n e.getKey().getPosition().latitude,\n e.getKey().getPosition().longitude);\n\n if (distance < 25) {\n button.setVisibility(View.VISIBLE);\n standingOnGameId = e.getValue();\n break;\n } else {\n button.setVisibility(View.INVISIBLE);\n }\n }\n }", "private void processData(List<LocationModel> locationListFromJSON) {\n\n locationListViewModels.clear();\n locationListViewModel = null;\n\n //Assign Data into ListView\n locationListViewModel = new LocationListViewModel();\n getLocationListViewModels = new ArrayList<>();\n\n //Checking Location already exist or not\n for (LocationModel item : locationListFromJSON) {\n\n\n Cursor jCursor = locationDBAdapter.checkLocationDataByLatLng(item.getGeometry().getGeoLocation().getLatitude(),\n item.getGeometry().getGeoLocation().getLongitude());\n\n //Manage lifetime of the cursor\n getActivity().startManagingCursor(jCursor);\n\n //Data already exist in database\n if (jCursor.moveToFirst()) {\n\n Log.e(\"Got it!\", item.getName());\n\n //Get Location distance from the user current location\n String distance = getDistance(getUserLatitude,\n getUserLongitude,\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()));\n\n //Get Information from database\n this.locationListViewModels.add(new LocationListViewModel(\n jCursor.getString(LocationDBAdapter.COL_LOCATION_NAME),\n jCursor.getDouble(LocationDBAdapter.COL_LOCATION_LATITUDE),\n jCursor.getDouble(LocationDBAdapter.COL_LOCATION_LONGITUDE),\n distance));\n\n this.getLocationListViewModels = locationListViewModels;\n\n } else {\n\n //Add New Data from JSON into ListViewModel\n locationListViewModels.add(new LocationListViewModel(\n item.getName(),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()),\n getDistance(getUserLatitude,\n getUserLongitude,\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()))\n ));\n\n //Assign to Global Variable\n this.getLocationListViewModels.add(new LocationListViewModel(\n item.getName(),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()),\n getDistance(getUserLatitude,\n getUserLongitude,\n Double.parseDouble(item.getGeometry().getGeoLocation().getLatitude()),\n Double.parseDouble(item.getGeometry().getGeoLocation().getLongitude()))\n ));\n }\n\n //Run UiThread (ListView)\n if (getActivity() != null) {\n getActivity().runOnUiThread(new Runnable() {\n @Override\n public void run() {\n //Set Adapter\n //RecyclerViewAdapter Setup\n Collections.sort(locationListViewModels);\n Collections.sort(getLocationListViewModels);\n binding.mapSearchResultRecyclerView.setAdapter(mapRecyclerAdapter);\n mapRecyclerAdapter.notifyDataSetChanged();\n\n }\n });\n\n }\n }\n\n }", "private void getDeviceLocation( ) {\n\n if (searchLocationMarker != null) {\n searchLocationMarker.remove();\n }\n\n mFusedLocationProviderClient =\n LocationServices.getFusedLocationProviderClient(this);\n //Task locationResult = mFusedLocationProviderClient.getLastLocation();\n try {\n if (mLocationPermissionGranted) {\n Task locationResult = mFusedLocationProviderClient.getLastLocation();\n locationResult.addOnCompleteListener(this, new OnCompleteListener() {\n @Override\n public void onComplete(@NonNull Task task) {\n if (task.isSuccessful()) {\n // Set the map's camera position to the current location of the device.\n System.out.println(\"Current location retrieved successfully!\");\n mLastKnownLocation = (Location) task.getResult(); // location?\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(\n new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()), DEFAULT_ZOOM));\n searchLocationMarker = mMap.addMarker(new MarkerOptions()\n .position(new LatLng(mLastKnownLocation.getLatitude(),\n mLastKnownLocation.getLongitude()))\n .title(\"Current Location\")\n .icon(BitmapDescriptorFactory.fromBitmap(\n getBitmapFromVectorDrawable(\n MainActivity.this, R.drawable.ic_current_location_marker))));\n getNearbyStations(mLastKnownLocation.getLatitude(), mLastKnownLocation.getLongitude());\n\n } else {\n Log.d(TAG, \"Current location is null. Using defaults.\");\n Log.e(TAG, \"Exception: %s\", task.getException());\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(mDefaultLocation, DEFAULT_ZOOM));\n mMap.getUiSettings().setMyLocationButtonEnabled(false);\n searchLocationMarker = mMap.addMarker(new MarkerOptions()\n .position(mDefaultLocation)\n .title(\"Current Location\")\n .icon(BitmapDescriptorFactory.fromBitmap(\n getBitmapFromVectorDrawable(\n MainActivity.this, R.drawable.ic_current_location_marker))));\n }\n }\n });\n }\n } catch(SecurityException e) {\n Log.e(\"Exception: %s\", e.getMessage());\n }\n\n }", "public void generateMarkers(){\n /**\n * State verification\n */\n LocationManager lm = (LocationManager) getSystemService(Context.LOCATION_SERVICE);\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n return;\n }\n Location location = lm.getLastKnownLocation(LocationManager.GPS_PROVIDER);\n final double currentlongitude = location.getLongitude();\n final double currentlatitude = location.getLatitude();\n\n final String usersCurrentState = getCurrentState(currentlatitude,currentlongitude);\n System.out.println(\"CURRENT STATE IS: \" + usersCurrentState);\n\n\n FirebaseDatabase.getInstance().getReference().child(\"Danger Zone Markers\")\n .addListenerForSingleValueEvent(new ValueEventListener() {\n @Override\n public void onDataChange(DataSnapshot dataSnapshot) {\n int numberOfMarkers = 0;\n int displayedMarkers = 0;\n for (DataSnapshot snapshot : dataSnapshot.getChildren()) {\n numberOfMarkers++;\n\n String zone_name = snapshot.child(\"zone_name\").getValue().toString();\n String risk_level = snapshot.child(\"risk_level\").getValue().toString();\n String lat = snapshot.child(\"lat\").getValue().toString();\n String longitude = snapshot.child(\"long\").getValue().toString();\n String description = snapshot.child(\"description\").getValue().toString();\n String time = snapshot.child(\"time\").getValue().toString();\n\n String dangerZoneState = getCurrentState(Double.valueOf(lat),Double.valueOf(longitude));\n System.out.println(\"DANGER ZONE STATE: \" + dangerZoneState);\n if(dangerZoneState.equals(usersCurrentState)) {\n displayedMarkers++;\n\n placeMarker(zone_name,risk_level,lat,longitude,description,time);\n\n\n }\n //placeMarker(zone_name,risk_level,lat,longitude,description);\n System.out.println(lat);\n }\n System.out.println(\"NUMBER OF TOTAL MARKERS: \" + numberOfMarkers);\n System.out.println(\"NUMBER OF DISPLAYED MARKERS: \" + displayedMarkers);\n }\n @Override\n public void onCancelled(DatabaseError databaseError) {\n }\n });\n }", "private void displayLocation() {\n try{\n if (ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED &&\n ActivityCompat.checkSelfPermission(getApplicationContext(), Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n }catch (NullPointerException e){\n e.printStackTrace();\n }\n Common.mLastLocationDriver = LocationServices.FusedLocationApi.getLastLocation(mGoogleApiClient);\n if (Common.mLastLocationDriver != null) {\n if (mSwitchButton.isChecked()) {\n final double latitude = Common.mLastLocationDriver.getLatitude();\n final double longitude = Common.mLastLocationDriver.getLongitude();\n\n // save location driver to firebase to comunicate with customer\n FirebaseDatabase.getInstance().getReference(Common.driver_working_tbl)\n .child(FirebaseAuth.getInstance().getCurrentUser().getUid())\n .addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n if(!dataSnapshot.exists() && mGeoFire!=null){\n mGeoFire.setLocation(FirebaseAuth.getInstance().getCurrentUser().getUid(),\n new GeoLocation(latitude, longitude), new GeoFire.CompletionListener() {\n @Override\n public void onComplete(String key, DatabaseError error) {\n if(oldLocation!=null){\n Location startingLocation = new Location(\"starting point\");\n startingLocation.setLatitude(oldLocation.getLatitude());\n startingLocation.setLongitude(oldLocation.getLongitude());\n\n //Get the target location\n Location endingLocation = new Location(\"ending point\");\n endingLocation.setLatitude(latitude);\n endingLocation.setLongitude(longitude);\n\n bearing = startingLocation.bearingTo(endingLocation);\n }\n //Add marker\n if (mMarker != null)\n mMarker.remove();\n mMarker = mMap.addMarker(new MarkerOptions()\n .icon(getMarkerIconFromDrawable(getResources().getDrawable(R.drawable.ic_navigation_driver)))\n .position(new LatLng(latitude, longitude))\n .anchor(0.5f, 0.5f)\n .rotation(bearing)\n .title(\"You\"));\n mMap.animateCamera(CameraUpdateFactory.newLatLngZoom(new LatLng(latitude, longitude), 17.0f));\n }\n });\n }\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }\n } else {\n Log.e(\"ERROR\", \"Can't get your location\");\n }\n }", "public void updateGoalPositions() {\n // Convert angle to unit vector\n double downUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI));\n double downUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI));\n double sideUnitX = MathUtils.quickCos((float) (anchorAngle + Math.PI / 2));\n double sideUnitY = MathUtils.quickSin((float) (anchorAngle + Math.PI / 2));\n\n // Create troops and set starting positions for each troop\n double topX = anchorX - (width - 1) * unitStats.spacing * sideUnitX / 2;\n double topY = anchorY - (width - 1) * unitStats.spacing * sideUnitY / 2;\n\n // Update troops goal positions\n for (int row = 0; row < aliveTroopsFormation.length; row++) {\n for (int col = 0; col < aliveTroopsFormation[0].length; col++) {\n BaseSingle troop = aliveTroopsFormation[row][col];\n if (troop == null) continue;\n double xGoalSingle;\n double yGoalSingle;\n // If the person is the flanker, go straight to the assigned position in flankers offset.\n if (state == UnitState.FIGHTING) {\n if (row < flankersCount[col]) {\n double offsetSide = flankerOffsets[col].get(row)[0];\n double offsetDown = flankerOffsets[col].get(row)[1];\n xGoalSingle = this.unitFoughtAgainst.getAverageX() + offsetSide * sideUnitX + offsetDown * downUnitX;\n yGoalSingle = this.unitFoughtAgainst.getAverageY() + offsetSide * sideUnitY + offsetDown * downUnitY;\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + (row - flankersCount[col]) * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + (row - flankersCount[col]) * unitStats.spacing * downUnitY;\n }\n } else {\n xGoalSingle = topX + col * unitStats.spacing * sideUnitX\n + row * unitStats.spacing * downUnitX;\n yGoalSingle = topY + col * unitStats.spacing * sideUnitY\n + row * unitStats.spacing * downUnitY;\n }\n // Set the goal and change the state\n troop.setxGoal(xGoalSingle);\n troop.setyGoal(yGoalSingle);\n troop.setAngleGoal(anchorAngle);\n }\n }\n }", "private void getLastKnownLocation() {\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n Task<Location> task = fusedLocationProviderClient.getLastLocation();\n task.addOnSuccessListener(new OnSuccessListener<Location>() {\n @Override\n public void onSuccess(Location location) {\n if (location != null) {\n lastKnownLocation = location;\n lastKnownLatLng = new LatLng(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude());\n riderMarker = mMap.addMarker(new MarkerOptions().position(lastKnownLatLng).title(\"Your Location\")); // adding marker to rider location\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(lastKnownLatLng, 18)); // focusing on rider location\n if (ActivityCompat.checkSelfPermission(RiderMapsActivity.this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(RiderMapsActivity.this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n return;\n }\n mMap.setMyLocationEnabled(true);\n mMap.getUiSettings().setMyLocationButtonEnabled(true);\n\n riderInfoHashMap.put(NodeNames.RIDERID,currentUserId);\n riderInfoHashMap.put(NodeNames.RIDERLATITUDE,lastKnownLocation.getLatitude());\n riderInfoHashMap.put(NodeNames.RIDERLONGITUDE,lastKnownLocation.getLongitude());\n\n nodeReference = NodeNames.RIDERS + \"/\" + currentUserId;\n referenceHashMap = new HashMap<>();\n referenceHashMap.put(nodeReference,riderInfoHashMap);\n databaseReference.updateChildren(referenceHashMap, new DatabaseReference.CompletionListener() {\n @Override\n public void onComplete(@Nullable DatabaseError error, @NonNull DatabaseReference ref) {\n if(error==null){\n Toast.makeText(RiderMapsActivity.this,\"Request your Cab ride\",Toast.LENGTH_SHORT).show();\n }else {\n Toast.makeText(RiderMapsActivity.this,\"error: \" + error.getMessage(),Toast.LENGTH_LONG).show();\n }\n }\n });\n\n // searching for nearby available driver\n\n searchCab.setOnClickListener(new View.OnClickListener() {\n @Override\n public void onClick(View view) {\n\n if(requestCancelled){\n rideEndedByRider(); // rider cancelled ride\n }else {\n requestCancelled = true;\n GeoFire geoFire = new GeoFire(riderRequestsDatabaseReference);\n geoFire.setLocation(currentUserId, new GeoLocation(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude()));\n\n progressDialog.setTitle(\"Getting Your Driver\");\n progressDialog.setMessage(\"Please wait while we are looking for nearby drivers\");\n progressDialog.show();\n\n getClosestDriver();\n }\n }\n });\n }\n }\n });\n }", "private void compareSavedUser( ArrayList<NetworkGPS.UserFetchedGPS> fetched) throws IOException, JSONException {\n for(int i=0; i< fetched.size(); i++)\n {\n NetworkGPS.UserFetchedGPS curFetched = fetched.get(i);\n if(userList.containsKey(curFetched.facebookId))\n {\n UserMap curUser = userList.get(curFetched.facebookId);\n curUser.position = new LatLng(curFetched.latitude,curFetched.longitude);\n }\n else\n {\n networkGPS.fetchUserPicture(curFetched.facebookId);\n UserMap curUser = new UserMap();\n curUser.position = new LatLng(curFetched.latitude,curFetched.longitude);\n curUser.facebookId = curFetched.facebookId;\n curUser.icon = createMarker(new BitmapDrawable(getResources(), networkGPS.getLastPicture()));\n userList.put(curFetched.facebookId,curUser);\n }\n }\n }", "private void getLocation() {\n LocationRequest mLocationRequestHighAccuracy = new LocationRequest();\n mLocationRequestHighAccuracy.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequestHighAccuracy.setInterval(UPDATE_INTERVAL);\n mLocationRequestHighAccuracy.setFastestInterval(FASTEST_INTERVAL);\n\n if (ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED || ActivityCompat.checkSelfPermission(this,\n Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n stopSelf();\n return;\n } else\n mFusedLocationClient.requestLocationUpdates(mLocationRequestHighAccuracy, new LocationCallback() {\n @Override\n public void onLocationResult(LocationResult locationResult) {\n\n Log.d(TAG, \"onLocationResult: got location result.\");\n\n Location location = locationResult.getLastLocation();\n if (location != null) {\n db.getReference(\"Users\").child(FirebaseAuth.getInstance().getCurrentUser().getUid()).addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot snapshot) {\n user=snapshot.getValue(User.class);\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError error) {\n\n }\n });\n\n\n LocationModel geoPoint = new LocationModel(location.getLatitude(), location.getLongitude());\n UserLocation userLocation = new UserLocation(geoPoint, user);\n saveUserLocation(userLocation);\n }\n\n /*if (location != null) {\n DocumentReference u = db.collection(\"Users\").document(FirebaseAuth.getInstance().getCurrentUser().getUid());\n u.get().addOnCompleteListener(new OnCompleteListener<DocumentSnapshot>() {\n @Override\n public void onComplete(@NonNull Task<DocumentSnapshot> task) {\n if (task.isSuccessful()) {\n user = task.getResult().toObject(User.class);\n }\n }\n });\n\n GeoPoint geoPoint = new GeoPoint(location.getLatitude(), location.getLongitude());\n UserLocation userLocation = new UserLocation(geoPoint, null, user);\n saveUserLocation(userLocation);\n }*/\n\n }\n },\n Looper.myLooper()); // Looper.myLooper tells this to repeat forever until thread is destroyed\n }", "private boolean allGPSDataExists() {\n for(int i = 0; i < 6; i++) {\n if(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE).equals(\"-1\"))\n return false;\n }\n return true;\n }", "private void getUserCurrentLocation()\n\t {\n\t NicerLocationManager locationMgr = new NicerLocationManager(this.getApplicationContext());\n\t if (locationMgr.isAnyLocationServicesAvailble())\n\t {\n\t Log.i(\"MAIN\",\"retrieving current location...\");\n\n\t // get current location\n\t locationMgr.getBestGuessLocation(1000,\n\t new NicerLocationListener() {\n\n\t @Override\n\t public void locationLoaded(final Location location)\n\t {\n\t // parse the current site forecast for users current\n\t // location in the background\n\t //LocationForecastSetup currentForecast = new LocationForecastSetup();\n\t //currentForecast.execute(location);\n\n\t // QLog.i(\"location loaded. finding nearest location...\");\n\t //\n\t // // find nearest weather location\n\t // Site nearestLocation =\n\t // Utils.findNearestSite(mApp, location);\n\t //\n\t // // insert the new current user location site\n\t // SitesProviderHelper.addSavedSite(mApp,\n\t // Long.valueOf(nearestLocation.getmSiteId()), true);\n\t //\n\t Log.i(\"MAIN\",\"location found \"+location.getLatitude()+\" \"+location.getLongitude());\n\t dS.lat=(float) location.getLatitude();\n\t dS.lon=(float) location.getLongitude();\n\t //TextView versionText = (TextView) findViewById(R.id.info_area_string);\n\t //versionText.setText(\"lat \" + location.getLatitude()+\" lon \"+location.getLongitude());\n\t \n\t //\n\t // /*\n\t // * add blank site if user has no saved sites. a blank site\n\t // * forecast is also added in the WeatherService class\n\t // * (runWeatherService method) to display correctly in the\n\t // * view pager.this is later removed when a user adds a\n\t // site\n\t // * and added again when user removes last site.\n\t // */\n\t // SitesProviderHelper.addBlankSavedSite(mApp);\n\t //\n\t // // re-order sites so current location is first\n\t // SitesProviderHelper.setSiteOrder(mApp,\n\t // nearestLocation.getmSiteId(), \"0\");\n\t // SitesProviderHelper.setSiteOrder(mApp,\n\t // Consts.BLANK_SITE_ID, \"1\");\n\n\t }\n\n\t @Override\n\t public void error()\n\t {\n\t // give option to change location settings or select a\n\t // location manually\n\t Log.e(\"MAIN\",\"Error finding best guess location\");\n dS.lat=0;\n dS.lon=0;\n if(once)\n {\n\t //promptSetLocationService(MainActivity.this);\n }\n once=false;\n\t }\n\n\t @Override\n\t public void onFinished()\n\t {\n\t //runUpdateService(false, false);\n\t \tLog.i(\"MAIN\",\"onFinished\");\n\t }\n\t });\n\n\t }\n\t else\n\t {\n\t \n\t \tdS.lat=0;\n dS.lon=0;\n\t \n\t }\n\n\t }", "private void correctJumpPaths(Field origin, Field lastField, Field currentField) {\n Field [] neighbours = currentField.getNeighbours();\n Random random = new Random();\n for(int i = 0; i < neighbours.length; ++i) { // jump move validation\n if((neighbours[i] != null) && (neighbours[i].getPlayer() != null)) {\n Field nextField = neighbours[i].getNeighbours()[i];\n if(nextField != null && !nextField.equals(lastField) && nextField.getPlayer() == null) {\n if(valueOfMove(origin, nextField) >= valueOfMove(bestMove[0], bestMove[1])) {\n bestMove[0] = origin;\n bestMove[1] = nextField;\n } else if(valueOfMove(origin, nextField) == valueOfMove(bestMove[0], bestMove[1])) {\n if(random.nextBoolean()) {\n bestMove[0] = origin;\n bestMove[1] = nextField;\n }\n }\n //correctJumpPaths(origin, currentField, nextField);\n }\n }\n }\n }", "@Test\n public void readyToTravel()\n {\n Position p = country1.readyToTravel(cityA, cityB);\n assertEquals(p.getFrom(), cityA);\n assertEquals(p.getTo(), cityB);\n assertEquals(p.getDistance(),4);\n assertEquals(p.getTotal(),4);\n //From.equals(To)\n p = country1.readyToTravel(cityA, cityA);\n assertEquals(p.getFrom(), cityA);\n assertEquals(p.getTo(), cityA);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n //No direct path from from to to.\n p = country1.readyToTravel(cityB, cityC);\n assertEquals(p.getFrom(), cityB);\n assertEquals(p.getTo(), cityB);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n //From not in the country.\n p = country1.readyToTravel(cityG, cityA);\n assertEquals(p.getFrom(), cityG);\n assertEquals(p.getTo(), cityG);\n assertEquals(p.getDistance(),0);\n assertEquals(p.getTotal(),0);\n \n //To is in another country\n p = country1.readyToTravel(cityD, cityF);\n assertEquals(p.getFrom(), cityD);\n assertEquals(p.getTo(), cityF);\n assertEquals(p.getDistance(),3);\n assertEquals(p.getTotal(),3);\n }", "public boolean pathfinder(Coordinate kioskLocation, Coordinate productLocation)\n {\n // Variable used to return whether or not a path was found\n boolean pathFound = false;\n\n // Variables used to store the X/Y position of the pathfinder\n int xPos = kioskLocation.getX();\n int yPos = kioskLocation.getY();\n\n // Variables used for randomly deciding which direction the pathfinder should try to go.\n Random rng = new Random();\n int randomMove;\n\n // load map from database\n ChangeEvent loadMapAttempt = new ChangeEvent(this);\n\n for(ChangeListener listener : mapLoadListener)\n {\n listener.stateChanged(loadMapAttempt);\n }\n\n // Generate a map of the distance from the product tile for every tile on the map grid\n generateDistanceMap(productLocation);\n\n // Draw the path to the product\n while ((!pathFound) & (distanceMap[xPos][yPos] >= 0))\n {\n // Set the current tile as part of the path\n gridArray[xPos][yPos].setGridState(4);\n\n // Check if the pathfinder on the product tile\n if (distanceMap[xPos][yPos] == 0)\n {\n // Pathfinder is on the product tile, so the path has been found\n pathFound = true;\n }\n else // The pathfinder is not on the product tile, so look for a adjacent tile that is closer to the product\n {\n // Pick a random direction to try and move.\n randomMove = rng.nextInt(4);\n\n // Check if the tile that was picked is closer to the product. If it is, move to the tile.\n // Move to the left (-X Direction)\n if (randomMove == 0) { if (xPos > 0) { if (distanceMap[xPos - 1][yPos] == (distanceMap[xPos][yPos] - 1)) { xPos--; } } }\n\n // Move to the right (+X Direction)\n if (randomMove == 1) { if (xPos < (mapSizeX - 1)) { if (distanceMap[xPos + 1][yPos] == (distanceMap[xPos][yPos] - 1)) { xPos++; } } }\n\n // Move up (-Y Direction)\n if (randomMove == 2) { if (yPos > 0) { if (distanceMap[xPos][yPos - 1] == (distanceMap[xPos][yPos] - 1)) { yPos--; } } }\n\n // Move down (+Y Direction)\n if (randomMove == 3) { if (yPos < (mapSizeY - 1)) { if (distanceMap[xPos][yPos + 1] == (distanceMap[xPos][yPos] - 1)) { yPos++; } } }\n }\n }\n\n // Add the kiosk and product to the map display\n drawKiosk(kioskLocation);\n drawProductLocation(productLocation);\n\n return pathFound;\n }", "public void setEstimatedTrainLocations() {\n\t\t// TODO: for each train\n\t\tfor (Train t : trains) {\n\t\t\t// calculate the distance traveled since the last tick\n\t\t\tdouble speed = t.currSpeed * 0.488888889; // in yards/second\n\t\t\tdouble elapsedTime = SimClock.getDeltaMs() * 0.001; //in seconds\n\t\t\tdouble distanceTraveled = speed*elapsedTime; //yards\n\t\t\tDefaultBlock block = ((DefaultBlock)blockData.get(t.currentBlock));\n\t\t\tif (distanceTraveled > t.authority) {\n\t\t\t\tdistanceTraveled = t.authority;\n\t\t\t\tt.currSpeed = 0;\n\t\t\t}\n\t\t\telse if (trainRoutes.get(t.trainId).route.size() == 1) {\n\t\t\t\tif (t.distanceTraveledOnBlock + distanceTraveled > block.blockLength/2) {\n\t\t\t\t\tdistanceTraveled = block.blockLength/2 - t.distanceTraveledOnBlock;\n\t\t\t\t\tt.distanceTraveledOnBlock = block.blockLength/2;\n\t\t\t\t\tt.currSpeed = 0;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// check if the train has entered a new block\n\t\t\tif (block.occupied == false) {\n\t\t\t\t// it has.\n\t\t\t\tt.currentBlock = trainRoutes.get(t.trainId).route.get(1);\n\t\t\t\tt.distanceTraveledOnBlock = block.blockLength - t.distanceTraveledOnBlock;\n\t\t\t\tt.currSpeed = ((DefaultBlock) blockData.get(t.currentBlock)).speedLimit;\n\t\t\t\tif (t.currSpeed > t.maxSpeed) {\n\t\t\t\t\tt.currSpeed = t.maxSpeed;\n\t\t\t\t}\n\t\t\t}\n\t\t\t// calculate the distance traveled on block\n\t\t\telse if ((t.distanceTraveledOnBlock + distanceTraveled) > block.blockLength) {\n\t\t\t\tt.distanceTraveledOnBlock = block.blockLength;\n\t\t\t}\n\t\t\tt.authority -= distanceTraveled;\n\t\t\tt.currSpeed = trainRoutes.get(t.trainId).speed;\n\t\t\tt.distanceTraveledOnBlock += distanceTraveled;\n\t\t\t\n\t\t}\n\t}", "public static long updateClimbLogData(String routeName, boolean locationIsNew, String locationName, int locationId, int ascentType, int gradeType, int gradeNumber, long date, int firstAscent, int gpsCode, double latitude, double longitude, int rowID, Context mContext) {\n\n // Gets the database in write mode\n //Create handler to connect to SQLite DB\n DatabaseHelper handler = new DatabaseHelper(mContext);\n SQLiteDatabase database = handler.getWritableDatabase();\n\n // Load existing location data\n Bundle climbDataBundle = EditClimbLoadEntry(rowID, mContext);\n int existingLocationId = climbDataBundle.getInt(\"outputLocationId\");\n Bundle locationDataBundle = LocationLoadEntry(locationId, mContext);\n int locationClimbCountCurrent = locationDataBundle.getInt(\"outputClimbCount\");\n int locationIsGpsCurrent = locationDataBundle.getInt(\"outputIsGps\");\n String locationNameCurrent = locationDataBundle.getString(\"outputLocationName\");\n\n //Check if updated location is the same as old\n if (existingLocationId == locationId) {\n Log.i(\"DBRW\", \"existingLocationId == locationId = true\");\n // check if existing has no GPS and whether GPS is being saved\n if (locationIsGpsCurrent == DatabaseContract.IS_GPS_FALSE && gpsCode == DatabaseContract.IS_GPS_TRUE) {\n Log.i(\"DBRW\", \"locationIsGpsCurrent == DatabaseContract.IS_GPS_FALSE && gpsCode == DatabaseContract.IS_GPS_TRUE = true\");\n // If \"yes\", update location data\n //TODO: Ask user if they even want to store the new gps data\n ContentValues updatedLocationValues = new ContentValues();\n updatedLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_ISGPS, gpsCode); // Updated\n updatedLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_GPSLATITUDE, latitude); // Updated\n updatedLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_GPSLONGITUDE, longitude); // Updated\n String whereClause = DatabaseContract.LocationListEntry._ID + \"=?\";\n String[] whereValue = {String.valueOf(locationId)};\n database.update(DatabaseContract.LocationListEntry.TABLE_NAME, updatedLocationValues, whereClause, whereValue);\n\n } else if (locationIsGpsCurrent == DatabaseContract.IS_GPS_TRUE && gpsCode == DatabaseContract.IS_GPS_TRUE) {\n // if \"no\" warn user that will nto overwrite existing saved GPS data\n //TODO: give the user a choice about whether they want to overwrite the data or not\n Log.i(\"DBRW\", \"locationIsGpsCurrent == DatabaseContract.IS_GPS_TRUE && gpsCode == DatabaseContract.IS_GPS_TRUE = true\");\n Toast.makeText(mContext, \"GPS data already stored will not be overwritten.\", Toast.LENGTH_SHORT).show();\n }\n } else if (locationIsNew) {\n // if location is a new location, create a new location in the DB\n Log.i(\"DBRW\", \"locationIsNew = true\");\n ContentValues newLocationValues = new ContentValues(); // Updated\n newLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_LOCATIONNAME, locationName); // Updated\n newLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_CLIMBCOUNT, 1); // Updated\n newLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_ISGPS, gpsCode); // Updated\n newLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_GPSLATITUDE, latitude); // Updated\n newLocationValues.put(DatabaseContract.LocationListEntry.COLUMN_GPSLONGITUDE, longitude); // Updated\n locationId = (int) database.insert(DatabaseContract.LocationListEntry.TABLE_NAME, null, newLocationValues);\n } else if (!locationIsNew && existingLocationId != locationId) {\n // if location is neither new, nor the old (i.e. picked a different one from the list\n incrementLocationClimbCount(existingLocationId, -1, mContext);\n incrementLocationClimbCount(locationId, 1, mContext);\n }\n\n // Create a ContentValues object where column names are the keys,\n ContentValues values = new ContentValues();\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_DATE, date);\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_NAME, routeName);\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_GRADETYPECODE, gradeType);\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_GRADECODE, gradeNumber);\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_ASCENTTYPECODE, ascentType);\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_LOCATION, locationId);\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_FIRSTASCENTCODE, firstAscent);\n values.put(DatabaseContract.ClimbLogEntry.COLUMN_ISCLIMB, DatabaseContract.IS_CLIMB);\n\n String whereClauseFive = DatabaseContract.ClimbLogEntry._ID + \"=?\";\n String[] whereValueFive = {String.valueOf(rowID)};\n\n long newRowId = database.update(DatabaseContract.ClimbLogEntry.TABLE_NAME, values, whereClauseFive, whereValueFive);\n database.close();\n return newRowId;\n\n }", "public List<Location> getPreviousLocations();", "@Override\n public void onLocationChanged(Location location) {\n if(!firstLocCheck){\n drive = new Drive(location.getLatitude(),location.getLongitude(),Car.carList.get(carIndex),startTime);\n firstLocCheck = true;\n } else {\n Drive.curLat = location.getLatitude();\n Drive.curLong = location.getLongitude();\n }\n System.out.println(\"Location has changed\");\n System.out.println(location.getLatitude() + \" | \" + location.getLongitude());\n\n //updateLoc(location);\n //locProvider = location.getProvider();\n }", "public boolean getNearestTownforTheFirstTime() {\n\t\tint eigenePositionX = stadtposition.x;\r\n\t\tint eigenePositionY = stadtposition.y;\r\n\t\tint anderePositionX, anderePositionY;\r\n\t\tint deltaX, deltaY;\r\n\t\tint distance;\r\n\t\tint distancesum;\r\n\t\tint mindistance = 1200;\r\n\t\tint minIndex = 0;\r\n\r\n\t\tfor (int i = 0; i < otherTowns.size(); i++) {\r\n\t\t\tanderePositionX = otherTowns.get(i).stadtposition.x;\r\n\t\t\tanderePositionY = otherTowns.get(i).stadtposition.y;\r\n\t\t\tdeltaX = eigenePositionX - anderePositionX;\r\n\t\t\tdeltaY = eigenePositionY - anderePositionY;\r\n\t\t\tdistancesum = deltaX * deltaX + deltaY * deltaY;\r\n\t\t\tdistance = (int) Math.sqrt(distancesum);\r\n\r\n\t\t\tif (distance == 0) {\r\n\t\t\t\tdistance = 1500;\r\n\t\t\t}\r\n\r\n\t\t\tif (distance < mindistance) {\r\n\t\t\t\t// System.out.println(distance+\" von minindex i \"+i+\"ist kleiner\");\r\n\t\t\t\tminIndex = i;\r\n\t\t\t\tmindistance = distance;\r\n\t\t\t\tif (mindistance < 33) {\r\n\t\t\t\t\tmindistance = 1200;\r\n\t\t\t\t\ti = 0;\r\n\t\t\t\t\tstadtposition.x = (int) (Math.random() * 1000);\r\n\t\t\t\t\tstadtposition.y = (int) ((Math.random() * 680) + 100);\r\n\r\n//\t\t\t\t\tSystem.out.println(\"stadt ist zu nahe, ändere stadtposition\");\r\n\t\t\t\t\treturn false;\r\n\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t}\r\n//\t\tSystem.out.println(\"minIndex: \" + minIndex + \" ist mit mindistance \" + mindistance + \" am nahsten\");\r\n\t\tnahsteStadt = otherTowns.get(minIndex);\r\n\t\treturn true;\r\n\r\n\t}", "private void determineStartingLocation(Car carOne, Car carTwo, Car carThree) {\n ArrayList<Integer> locationPlaces = new ArrayList<Integer>();\n locationPlaces.add(1);// 0\n locationPlaces.add(2);// 1\n locationPlaces.add(3);// 2\n locationPlaces.add(4);// 3\n\n Collections.shuffle(locationPlaces);\n\n carOne.setLocation(locationPlaces.get(0));\n carTwo.setLocation(locationPlaces.get(1));\n carThree.setLocation(locationPlaces.get(2));\n }", "public void updateTravelledAndVisited() {\n Storage storage = Main.getStorage();\n routeStatsCalculator.updateLeastTravelledRoute(storage.getHistory());\n routeStatsCalculator.updateMostTravelledRoute(storage.getHistory());\n airportStatsCalculator.updateMostVisitedSrcAirports(storage.getHistorySrcAirports());\n airportStatsCalculator.updateLeastVisitedSrcAirports(storage.getHistorySrcAirports());\n airportStatsCalculator.updateMostVisitedDestAirports(storage.getHistoryDestAirports());\n airportStatsCalculator.updateLeastVisitedDestAirports(storage.getHistoryDestAirports());\n }", "public void calcDistance() {\n if (DataManager.INSTANCE.getLocation() != null && location.getLength() == 2) {\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n Log.e(\"asdf\", DataManager.INSTANCE.getLocation().getLength() + \"\");\n double dLat = Math.toRadians(location.getLatitude() - DataManager.INSTANCE.getLocation().getLatitude()); // deg2rad below\n double dLon = Math.toRadians(location.getLongitude() - DataManager.INSTANCE.getLocation().getLongitude());\n double a =\n Math.sin(dLat / 2) * Math.sin(dLat / 2) +\n Math.cos(Math.toRadians(location.getLatitude()))\n * Math.cos(Math.toRadians(location.getLatitude()))\n * Math.sin(dLon / 2)\n * Math.sin(dLon / 2);\n double c = 2 * Math.atan2(Math.sqrt(a), Math.sqrt(1 - a));\n double d = KM_IN_RADIUS * c; // Distance in km\n distance = (float) d;\n } else distance = null;\n }", "public void onLocationChanged(Location location) {\n\n if (net_connection_check()) {\n\n String message = String.format(\n\n \"New Location \\n Longitude: %1$s \\n Latitude: %2$s\",\n\n location.getLongitude(), location.getLatitude());\n\n // *************************** GPS LOCATION ***************************\n\n\n driveruserid = User_id;\n driverlat = location.getLatitude();\n driverlong = location.getLongitude();\n\n\n Location driverLocation = new Location(\"user location\");\n driverLocation.setLatitude(driverlat);\n driverLocation.setLongitude(driverlong);\n\n aController.setDriverLocation(driverLocation);\n\n String drivercurrentaddress = lattoaddress(driverlat, driverlong);\n\n\n if (!checktripend && mGoogleMap != null) {\n // mGoogleMap.clear();\n\n\n }\n LatLng mark1 = new LatLng(driverlat, driverlong);\n\n if (logoutcheck) {\n//\t\t\tDriverdetails();\n }\n\n LatLng target = new LatLng(driverlat, driverlong);\n\n String check = fullbutton.getText().toString();\n if (acc.equals(\"yes\") || check.equals(\"End Trip\")) {\n if (check.equals(\"End Trip\")) {\n // mGoogleMap.clear();\n // mGoogleMap.setTrafficEnabled(true);\n }\n origin = new LatLng(driverlat, driverlong);\n /* try{\n String url = getDirectionsUrl(origin, dest);\n drawMarker(dest);\n DownloadTask downloadTask = new DownloadTask();\n //Start downloading json data from Google Directions API\n downloadTask.execute(url);\n }catch (Exception e){\n\n }*/\n\n// checkOffRouteAndRedrwaRoute(location);\n\n }\n\n checkOffRouteAndRedrwaRoute(location);\n if (location.hasBearing() && mGoogleMap != null) {\n CameraPosition cameraPosition = new CameraPosition.Builder()\n .target(target) // Sets the center of the map to current location\n .zoom(16)\n .bearing(location.getBearing()) // Sets the orientation of the camera to east\n .tilt(0) // Sets the tilt of the camera to 0 degrees\n .build(); // Creates a CameraPosition from the builder\n mGoogleMap.animateCamera(CameraUpdateFactory.newCameraPosition(cameraPosition));\n }\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n //update current lacation when the GPS changed\n c = new LatLng(location.getLatitude(), location.getLongitude());\n updateCameraBearing(map, location.getBearing());\n nearestPointIndex = findNearestPoint(c,points2);\n if(nearestPointIndex>0){\n ArrayList p3 = new ArrayList();\n for (int j = nearestPointIndex; j < points2.size(); j++) {\n LatLng point = (LatLng) points2.get(j);\n p3.add(point);\n }\n points2 = p3;\n DrawDots(listResult,points2);\n }\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "public static boolean isBetterLocation(Location location, Location anotherLocation) {\n\t\t\n\t\tif (anotherLocation == null) {\n\t\t\treturn true;\n\t\t}else if (anotherLocation.getAltitude() <= 0){\n\t\t\treturn true;\n\t\t}\n\n\t\t//Comprobar si la nueva ubicación es más o menos reciente que la anterior\n\t\tlong timeDelta = location.getTime() - anotherLocation.getTime();\n\t\tboolean isNewer = timeDelta > 0;\n//\t\tLog.d(log,\"1.1: \"+location.getLatitude() + \",\"+location.getLongitude()+\" AC:\"+location.getAccuracy()+\" aLT:\"+location.getAltitude()+\"\\n\");\n//\t\tLog.d(log,\"1.2: \"+anotherLocation.getLatitude() + \",\"+anotherLocation.getLongitude()+\" AC:\"+anotherLocation.getAccuracy()+\" aLT:\"+anotherLocation.getAltitude()+\"\\n\");\n // Si hace más de dos minutos de la última ubicación ->nueva es mejor\n\t\tif (timeDelta > TWO_MINUTES) {\n//\t\t\tLog.d(log,\"2\");\n\t\t\treturn true;\n\t\t\t//Si la nueva ubicación es antigua -> nueva es peor\n\t\t} else if (timeDelta < -TWO_MINUTES) {\n//\t\t\tLog.d(log,\"3\");\n\t\t\treturn false;\n\t\t}\n\n\n\t\tint accuracyDelta = (int) (location.getAccuracy() - anotherLocation.getAccuracy());\n\t\tboolean isLessAccurate = accuracyDelta > 0;\n\t\tboolean isMoreAccurate = accuracyDelta < 0;\n\t\tboolean isSignificantlyLessAccurate = accuracyDelta > 200;\n\n \n\t\tboolean isFromSameProvider = isSameProvider(location.getProvider(),\n\t\t\t\tanotherLocation.getProvider());\n//\t\tLog.d(log,\"4\");\n\t\t// Determinar la mejor localización según las variables calculadas\n\t\tif (isMoreAccurate) {\n//\t\t\tLog.d(log,\"5\");\n\t\t\treturn true;\n\t\t} else if (isNewer && !isLessAccurate) {\n//\t\t\tLog.d(log,\"6\");\n\t\t\treturn true;\n\t\t} else if (isNewer && !isSignificantlyLessAccurate && isFromSameProvider) {\n//\t\t\tLog.d(log,\"7\");\n\t\t\treturn true;\n\t\t}\n//\t\tLog.d(log,\"8\");\n\t\treturn false;\n\t}", "@Test\n\t\tpublic void canGiveTheseusLocation() {\n\t\t\tPoint whereTheseus = new Pointer(3,3);\n\t\t\tgameLoader.addTheseus(whereTheseus);\n\t\t\tPoint expected = whereTheseus;\n\t\t\tPoint actual = gameSaver.wheresTheseus();\n\t\t\t\n\t\t\tassertEquals(expected.across(), actual.across());\n\t\t\tassertEquals(expected.down(), actual.down());\n\t\t}", "@Override\n public void onMapReady(GoogleMap googleMap) {\n map = googleMap;\n map.setMyLocationEnabled(true);\n currentLatLang = new LatLng(currentLoc.getLatitude(),currentLoc.getLongitude());\n preLati = currentLoc.getLatitude();\n preLogi = currentLoc.getLongitude();\n //map.moveCamera(CameraUpdateFactory.newLatLng(currentLatLang));\n // map.animateCamera(CameraUpdateFactory.newLatLng(currentLatLang));\n map.animateCamera(CameraUpdateFactory.newLatLngZoom(currentLatLang,13));//zoom to current location animation\n //map.addMarker(new MarkerOptions().position(currentLatLang).title(\"You are here\"));\n\n\n //after map assign we are going to do database work here\n //hierarchy is on top Datas there\n //after that Sensor name comes, each sensor child contains two values location and radius\n databaseReference.addValueEventListener(new ValueEventListener() {\n @Override\n public void onDataChange(@NonNull DataSnapshot dataSnapshot) {\n //dataSnapshot.key will give \"Datas\" but here i am not using that key\n int sensorReading1,sensorReading2;\n\n if( dangerCircleSensor1!=null) dangerCircleSensor1.remove(); // every time data changes on database\n if( dangerCircleSensor2!=null) dangerCircleSensor2.remove(); // here we delete all marker and\n\n if( warningCircleSensor1!=null) warningCircleSensor1.remove();\n if( warningCircleSensor2!=null) warningCircleSensor2.remove();\n\n if(dangerMarkerSensor1!=null) dangerMarkerSensor1.remove(); // circle if it is on map\n if(dangerMarkerSensor2!=null) dangerMarkerSensor2.remove(); // later we adding marker and circle again using database value\n\n if(warningMarkerSensor1!=null) warningMarkerSensor1.remove();\n if(warningMarkerSensor2!=null) warningMarkerSensor2.remove();\n\n double db = Double.parseDouble(dataSnapshot.child(\"CITY1LOC1\")\n .child(\"reading\").getValue().toString());\n\n dangerZoneRadSensor1 = Calculator.getDistance(db,highdb,sourceDistance);\n warningZoneRadSensor1 = Calculator.getDistance(db, warningDB,sourceDistance);\n LatLng latLng = new LatLng(sorceLati,sourceLongti);\n dangerMarkerSensor1 = map.addMarker(new MarkerOptions().position(latLng).title(\"Sensor 1 is here\"));// added into\n dangerMarkerSensor1.showInfoWindow();//to display tag always\n Log.d(TAG, \"onDataChange: dangerZoneRadSensor1\" +(int) dangerZoneRadSensor1 );\n dangerCircleSensor1 = map.addCircle(getCircleOption(latLng,(int) dangerZoneRadSensor1,Color.RED));//draw the circle on map added\n // into Circle object\n warningCircleSensor1 = map.addCircle(getCircleOption(latLng,(int)warningZoneRadSensor1,Color.GREEN));\n /*for (DataSnapshot postSnapshot: dataSnapshot.getChildren()){\n String sensor = postSnapshot.getKey().toLowerCase().trim();//it give the sensor name\n //we have to handle the cases for all sensors in our list\n double latitude,longitude;//location in database look like this \"12.3,45.754\" we have to decode this\n // for decoding we use locationDecoder and it will return an array of length 2\n // index 0 gives latitude\n // index 1 gives longitude\n if (sensor.equalsIgnoreCase(\"sensor1\")){\n String location = postSnapshot.child(\"location\").getValue().toString() ;\n double[] locationArray = Calculator.getLocation(location);\n latitude = locationArray[0];\n longitude = locationArray[1];\n LatLng latLng = new LatLng(latitude,longitude);//create location coordinates with lati and longi\n // using latitude and longitude we can mark position in map using below line\n dangerMarkerSensor1 = map.addMarker(new MarkerOptions().position(latLng).title(\"Sensor 1 is here\"));// added into\n dangerMarkerSensor1.showInfoWindow();//to display tag always\n // Marker object\n int dangerRadius = ((Long)postSnapshot.child(\"dangerRadius\").getValue()).intValue();//radius is in long we haveto\n // convert it into int\n int warningRadius = ((Long)postSnapshot.child(\"warningRadius\").getValue()).intValue();\n dangerZoneRadSensor1 = dangerRadius;\n warningZoneRadSensor1 = warningRadius;\n dangerCircleSensor1 = map.addCircle(getCircleOption(latLng,dangerRadius,Color.RED));//draw the circle on map added\n // into Circle object\n warningCircleSensor1 = map.addCircle(getCircleOption(latLng,warningRadius,Color.GREEN));\n }\n else if (sensor.equalsIgnoreCase(\"sensor2\")){\n String location = postSnapshot.child(\"location\").getValue().toString().trim() ;\n double[] locationArray = Calculator.getLocation(location);\n latitude = locationArray[0];\n longitude = locationArray[1];\n LatLng latLng = new LatLng(latitude,longitude);\n dangerMarkerSensor2 = map.addMarker(new MarkerOptions().position(new LatLng(latitude,longitude)).title(\"Sensor 2 is here\"));\n dangerMarkerSensor2.showInfoWindow();//to display tag always\n int dangerRadius = ((Long)postSnapshot.child(\"dangerRadius\").getValue()).intValue();\n int warningRadius = ((Long)postSnapshot.child(\"warningRadius\").getValue()).intValue();\n dangerCircleSensor2 = map.addCircle(getCircleOption(latLng,dangerRadius,Color.BLACK));\n warningCircleSensor2 = map.addCircle(getCircleOption(latLng,warningRadius,Color.GREEN));\n }\n }*/\n\n double latitude=currentLoc.getLatitude();\n double longitude=currentLoc.getLongitude();\n double distance = Calculator.distance(sensor1Lati,latitude,sensor2Longi,longitude,0,0); //gives the distance changed\n preLati = latitude;\n preLogi = longitude;\n // String msg=\"New Latitude: \"+latitude + \"New Longitude: \"+longitude;\n\n if (distance <= dangerZoneRadSensor1)\n Toast.makeText(MapActivity.this,\"You are in danger zone. Move \" + (dangerZoneRadSensor1 - distance) + \" m backwards\" ,Toast.LENGTH_LONG).show();\n else if (distance <= warningZoneRadSensor1 )\n Toast.makeText(MapActivity.this,\"You are in warning zone. \" ,Toast.LENGTH_LONG).show();\n\n }\n\n @Override\n public void onCancelled(@NonNull DatabaseError databaseError) {\n\n }\n });\n }", "private ArrayList<Location> canMoveInit() {\n if (last == null) {\n ArrayList<Location> firstList = new ArrayList<>();\n firstList.add(getLocation());\n firstList.add(null);\n crossLocation.push(firstList);\n }\n if (crossLocation.empty() || isEnd) {\n return null;\n }\n Grid gr = getGrid();\n if (gr == null) {\n return null;\n }\n last = getLocation();\n return getValid(getLocation());\n }", "@SuppressLint(\"MissingPermission\")\n private void requestNewLocationData() {\n LocationRequest mLocationRequest = new LocationRequest();\n mLocationRequest.setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY);\n mLocationRequest.setInterval(5);\n mLocationRequest.setFastestInterval(0);\n mLocationRequest.setNumUpdates(1);\n\n // setting LocationRequest\n // on FusedLocationClient\n FusedLocationProviderClient mFusedLocationClient = LocationServices.getFusedLocationProviderClient(this);\n mFusedLocationClient.requestLocationUpdates(mLocationRequest, mLocationCallback, Looper.myLooper());\n }", "private boolean isBetterLocation(Location location, Location otherLocation) {\n\t\tfinal int DISTANCE = 200;\n\t\t\n\t // Check whether the new location fix is newer or older\n\t long timeDelta = location.getTime() - otherLocation.getTime();\n\t boolean isSignificantlyNewer = timeDelta > TIME_THRESHOLD;\n\t boolean isSignificantlyOlder = timeDelta < -TIME_THRESHOLD;\n\t boolean isNewer = timeDelta > 0;\n\n\t // If it's been more than two minutes since the current location, use the new location\n\t // because the user has likely moved\n\t if (isSignificantlyNewer) {\n\t return true;\n\t // If the new location is more than two minutes older, it must be worse\n\t } else if (isSignificantlyOlder) {\n\t return false;\n\t }\n\n\t // Check whether the new location fix is more or less accurate\n\t int accuracyDelta = (int) (location.getAccuracy() - otherLocation.getAccuracy());\n\t boolean isLessAccurate = accuracyDelta > 0;\n\t boolean isMoreAccurate = accuracyDelta < 0;\n\t boolean isSignificantlyLessAccurate = DISTANCE > 200;\n\n\t // Check if the old and new location are from the same provider\n\t boolean isFromSameProvider = isSameProvider(location.getProvider(),\n\t otherLocation.getProvider());\n\n\t // Determine location quality using a combination of timeliness and accuracy\n\t if (isMoreAccurate) {\n\t return true;\n\t } else if (isNewer && !isLessAccurate) {\n\t return true;\n\t } else if (isNewer && !isSignificantlyLessAccurate && isFromSameProvider) {\n\t return true;\n\t }\n\t return false;\n\t}", "ArrayList<Location> getMoveLocations();", "@Override\n public void onMapReady(GoogleMap googleMap) {\n mMap = googleMap;\n\n\n if ((getIntent().getDoubleExtra(\"locationLat\", 0)) != 0\n && (getIntent().getDoubleExtra(\"locationLon\", 0)) != 0\n && !((getIntent().getIntExtra(\"origin\",0))==1)) {\n LatLng company = new LatLng((getIntent().getDoubleExtra(\"locationLat\", 0)), (getIntent().getDoubleExtra(\"locationLon\", 0)));\n mMap.addMarker(new MarkerOptions().position(company).title(getIntent().getStringExtra(\"companyname\")));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(company, 16));\n check = 1;\n } else if ((getIntent().getIntExtra(\"origin\",0))==1\n && (getIntent().getDoubleExtra(\"locationLat\", 0)) != 0\n && (getIntent().getDoubleExtra(\"locationLon\", 0)) != 0) {\n LatLng company = new LatLng((getIntent().getDoubleExtra(\"locationLat\", 0)), (getIntent().getDoubleExtra(\"locationLon\", 0)));\n previousLocation = mMap.addMarker(new MarkerOptions().position(company).title(getIntent().getStringExtra(\"companyname\")));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(company, 16));\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 101);\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n previousLocation.remove();\n if (marker != null) {\n marker.setPosition(latLng);\n } else {\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Your Location\").draggable(true));\n }\n companyLocation = latLng;\n }\n });\n } else {\n LatLng nepal = new LatLng(27.7172, 85.3240);\n kathmandu = mMap.addMarker(new MarkerOptions().position(nepal).title(\"Marker in Kathmandu\"));\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(nepal, 14));\n if (ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(this, Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n // TODO: Consider calling\n // ActivityCompat#requestPermissions\n // here to request the missing permissions, and then overriding\n // public void onRequestPermissionsResult(int requestCode, String[] permissions,\n // int[] grantResults)\n // to handle the case where the user grants the permission. See the documentation\n // for ActivityCompat#requestPermissions for more details.\n ActivityCompat.requestPermissions(this, new String[]{Manifest.permission.ACCESS_FINE_LOCATION}, 101);\n return;\n }\n mMap.setMyLocationEnabled(true);\n\n mMap.setOnMapClickListener(new GoogleMap.OnMapClickListener() {\n @Override\n public void onMapClick(LatLng latLng) {\n kathmandu.remove();\n if (marker != null) {\n marker.setPosition(latLng);\n } else {\n marker = mMap.addMarker(new MarkerOptions().position(latLng).title(\"Your Location\").draggable(true));\n }\n companyLocation = latLng;\n }\n });\n }\n }", "@Override\n public void onLocationChanged(Location location) {\n mPreviousLocation = mCurrentLocation;\n mCurrentLocation = location;\n //This causes the app to crash during first permission checks\n /* //Distance from current location to previous location\n mDistanceTravelled = mCurrentLocation.distanceTo(mPreviousLocation);*/\n //Distance from current location to waypoint location\n mDistanceFromWaypoint = mCurrentLocation.distanceTo(mWaypoint);\n mNum++;\n\n //Controls lap timer functionality based on location relative to the user and the waypoint\n isUserInStartZone();\n\n //mNumberUpdates++;\n updateLocationUI();\n\n }", "@Override\n\t//loc1 is the start location,loc2 is the destination\n\tpublic ArrayList<MapCoordinate> bfsSearch(MapCoordinate loc1, MapCoordinate loc2, Map m) {\n\t\tSystem.out.println(\"come into bfsSearch\");\n\t\tif(m.isAgentHasAxe() && m.isAgentHasKey()){\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add to visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){ //this is important else if(cTemp!='~'), not barely else,\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' ){\n\t\t\t\t\t\t\tif(cTemp=='~' &&s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\t\n\t\t\t}\n\t\t\treturn null;\n\t\t}else if(m.isAgentHasAxe()){ //only have axe\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited every loop\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0,s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move north\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){//state move south\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\treturn null;\n\t\t}else if(m.isAgentHasKey()){ //only have key\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\t//Visited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation());\n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head,in this fashion, return the right order of route\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY()); \n\t\t\t\tif(m.hasCoordinate(temp)){//state move east\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY()); //state that move west\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1); //state move north\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1); //state move south\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){//at least has 1 stone\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for initial state\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\treturn null;\n\t\t}\n\t\t\n\t\t\n\t\t/*\n\t\t * \n\t\t **/\t\t\n\t\telse{ //have no key and axe\n\t\t\tSystem.out.println(\"come into the last elas clause\");\n\t\t\tLinkedList<State> queue=new LinkedList<State>();\n\t\t\tArrayList<MapCoordinate> Visited=new ArrayList<MapCoordinate>();\n\t\t\t\n\t\t\tVisited.add(loc1);\n\t\t\tState s1=new State(loc1,m.getAgentHasNStones(),null);\n\t\t\tqueue.add(s1);\n\t\t\t\n\t\t\t//int i=0;\n\t\t\twhile(!queue.isEmpty()){\n\t\t\t\t//i++;\n\t\t\t\t//System.out.println(\"come into while: \"+i);\n\t\t\t\tState s=queue.remove();\n\t\t\t\tMapCoordinate currentLocation=s.getLocation();\n\t\t\t\tVisited.add(s.getLocation()); //add visited, let program won't stuck in \n\t\t\t\tif(loc2.equals(currentLocation)){\n\t\t\t\t\t//means could reach loc2 from loc1\n\t\t\t\t\tSystem.out.println(\"return computed route\");\n\t\t\t\t\tArrayList<MapCoordinate> route=new ArrayList<MapCoordinate>();\n\t\t\t\t\twhile(s.getPrevState()!=null){\n\t\t\t\t\t\troute.add(0, s.getLocation()); //add to head\n\t\t\t\t\t\ts=s.getPrevState();\n\t\t\t\t\t}\n\t\t\t\t\tfor(MapCoordinate mc:route){\n\t\t\t\t\t\t//System.out.println(\"print returned route in bfssearch\");\n\t\t\t\t\t\tSystem.out.print(\"mc:\"+mc.getX()+\" \"+mc.getY()+\"->\");\n\t\t\t\t\t\t\n\t\t\t\t\t}\n\t\t\t\t\treturn route;\n\t\t\t\t}\n\t\t\t\tMapCoordinate temp=new MapCoordinate(currentLocation.getX()+1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\t//System.out.println(\"1 if\");\n\t\t\t\t\tif(s.getPrevState()!=null &&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if\");\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 if\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 if\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 else\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX()-1,currentLocation.getY());\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.add(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tSystem.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()+1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*'&&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\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\ttemp=new MapCoordinate(currentLocation.getX(),currentLocation.getY()-1);\n\t\t\t\tif(m.hasCoordinate(temp)){\n\t\t\t\t\tif(s.getPrevState()!=null&&!temp.equals(s.getPrevState().getLocation())){\n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\tif(!Visited.contains(temp)&&cTemp!='*' &&cTemp!='T' &&cTemp!='-' ){\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\n\t\t\t\t\t\t}\n\t\t\t\t\t}else if(s.getPrevState()==null){ //for the initial state \n\t\t\t\t\t\tchar cTemp=m.getSymbol(temp);\n\t\t\t\t\t\t//System.out.println(\"2 if lalala\");\n\t\t\t\t\t\tif(cTemp!='*' &&cTemp!='T'&&cTemp!='-' ){\n\t\t\t\t\t\t\t//System.out.println(\"3 iflalala\");\n\t\t\t\t\t\t\tif(cTemp=='~' && s.getStoneNumber()>0){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 iflalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber()-1,s);\n\t\t\t\t\t\t\t\tqueue.addLast(newState);\n\t\t\t\t\t\t\t}else if(cTemp!='~'){\n\t\t\t\t\t\t\t\t//System.out.println(\"4 elselalala\");\n\t\t\t\t\t\t\t\tState newState=new State(new MapCoordinate(temp),s.getStoneNumber(),s);\n\t\t\t\t\t\t\t\tqueue.addFirst(newState);\n\t\t\t\t\t\t\t}//do not do any action for not enough stones situation\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\treturn null;\n\t\t}\n\t}", "public void showBeforeAfterLocation() {\n\t\tfor (Integer key : afterLoc.keySet()) {\n\t\t\tdouble[] ary = afterLoc.get(key);\n\n\t\t\tString locationA = \"\";\n\t\t\tfor (int i = 0; i < ary.length; i++) {\n\t\t\t\tlocationA += Config.roundTwoDecimals(ary[i]) + \"\\t\";\n\t\t\t}\n\n\t\t\tdouble[] ary2 = beforeLoc.get(key);\n\n\t\t\tString locationB = \"\";\n\t\t\tfor (int i = 0; i < ary2.length; i++) {\n\t\t\t\tlocationB += Config.roundTwoDecimals(ary2[i]) + \"\\t\";\n\t\t\t}\n\t\t\tCaller.log(\" AFTER: \" + key + \" | \" + locationA + \"\\t|\" + attractors.get(key).count);\n\t\t}\n\t}", "@Test\n\tvoid allUsersWithin50MilesOfLondon_expectResults() {\n\t\tList<User> result = locationService.filterUsersWithinDistanceOfLocation(allUserList, 50, LocationEnum.LONDON);\n\t\tassertTrue(result.size() == 3);\n\t}", "@Transactional \n\tpublic List<PharmacyDto> getTheNeartsPharmacy(double userLon, double userLat, double userdistance) {\n\t\t\n\t\t\n\t\tIterator <PharmacyDto> pharmacyListDto = pharmacyRepository1.getAllPharmaciesDto().iterator();\n\t\t\n\t\tList <PharmacyDto> nearestList = new ArrayList<PharmacyDto>() ;\n\t\t\n\t\twhile (pharmacyListDto.hasNext()) {\n\t\t\t\n\t\t\tPharmacyDto pharmacyToAdd = pharmacyListDto.next();\n\t\t\t\n\t\t\tNearLocationBusiness userlocation = new NearLocationBusiness(userLon,userLat);\n\t\t\t\n\t\t\tNearLocationBusiness pharmacy = new NearLocationBusiness(pharmacyToAdd.getLonLocation(),pharmacyToAdd.getLatLocation());\n\t\t\t\n\t\t\tdouble distance= pharmacy.distanceTo(userlocation);\n\t\t\t\n\t\t\tif(distance<userdistance) {\n\t\t\t\tnearestList.add(pharmacyToAdd);\n\t\t\t}\t\t\n\t\t}\n\t\t\n\t\treturn nearestList;\n\t}", "private Obs findTrips(String[] towers, String[] tstamps, Hashtable<Integer, Vertex> towersXY, int dist_th,\n\t\t\tint time_th) {\n\t\t/**\n\t\t * Marks array contain index of the towers that represent the starting\n\t\t * observation of a new trip.\n\t\t */\n\t\tboolean[] marks = new boolean[tstamps.length];\n\t\tDateFormat formatter = new SimpleDateFormat(\"HH:mm:ss\");\n\t\tCalendar cal = Calendar.getInstance();\n\t\t/**\n\t\t * add 0 as the start of the first tower in this seq.\n\t\t */\n\t\t// int mIndex = 0;\n\t\t// marks[mIndex++] = 0;\n\n\t\tint current = 0;\n\t\tfor (int i = 1; i < tstamps.length; i++) {\n\t\t\ttry {\n\t\t\t\tString tstamp = tstamps[i];\n\n\t\t\t\t/**\n\t\t\t\t * if the time exceeds timing threshold, then check the distance\n\t\t\t\t * between towers. If this distance less than the distance\n\t\t\t\t * threshold, then previous tower is the end of the current\n\t\t\t\t * trip.\n\t\t\t\t *\n\t\t\t\t */\n\t\t\t\tDate sTime = formatter.parse(tstamps[current]);\n\t\t\t\tDate eTime = formatter.parse(tstamp);\n\t\t\t\tcal.setTime(sTime);\n\t\t\t\tint hour = cal.get(Calendar.HOUR);\n\t\t\t\tint minute = cal.get(Calendar.MINUTE);\n\n\t\t\t\tcal.setTime(eTime);\n\t\t\t\tint ehour = cal.get(Calendar.HOUR);\n\t\t\t\tint eminute = cal.get(Calendar.MINUTE);\n\n\t\t\t\tint diff = (ehour - hour) * HOUR + (eminute - minute);\n\t\t\t\t/**\n\t\t\t\t * check time difference with time threshold whatever the\n\t\t\t\t * distance between the starting tower\n\t\t\t\t */\n\t\t\t\tif (diff > time_th) {\n\t\t\t\t\t/**\n\t\t\t\t\t * Check distance, if it distance less than distance\n\t\t\t\t\t * threshold mark the current tower as the start of a new\n\t\t\t\t\t * trip.\n\t\t\t\t\t */\n\t\t\t\t\tVertex sTower = towersXY.get(Integer.parseInt(towers[i - 1]));\n\t\t\t\t\tVertex tower = towersXY.get(Integer.parseInt(towers[i]));\n\n\t\t\t\t\tif (eculidean(sTower.getX(), tower.getX(), sTower.getY(), tower.getY()) < dist_th) {\n\t\t\t\t\t\t/**\n\t\t\t\t\t\t * Update the trip sequences\n\t\t\t\t\t\t */\n\t\t\t\t\t\tmarks[i] = true;\n\t\t\t\t\t\tcurrent = i;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t} catch (ParseException ex) {\n\t\t\t\tLogger.getLogger(ObsTripsBuilder.class.getName()).log(Level.SEVERE, null, ex);\n\t\t\t}\n\t\t}\n\n\t\t/**\n\t\t * construct observations and time stamps\n\t\t */\n\t\tString time = \"\";\n\t\tString obs = \"\";\n\t\t// time += tstamps[0];\n\t\t// obs += towers[0];\n\t\tfor (int i = 0; i < marks.length; i++) {\n\t\t\tif (marks[i]) {\n\n\t\t\t\ttime += RLM + tstamps[i];\n\t\t\t\tobs += RLM + towers[i];\n\t\t\t} else {\n\t\t\t\t// if (towers[i].equals(towers[i - 1])) {\n\t\t\t\t// System.out.println(towers[i] + \"\\t=\\t\" + towers[i - 1]);\n\t\t\t\t// continue;\n\t\t\t\t// }\n\t\t\t\t/**\n\t\t\t\t * Add comma separators\n\t\t\t\t */\n\t\t\t\tif (!time.isEmpty()) {\n\t\t\t\t\ttime += CLM;\n\t\t\t\t\tobs += CLM;\n\t\t\t\t}\n\t\t\t\ttime += tstamps[i];\n\t\t\t\tobs += towers[i];\n\t\t\t}\n\n\t\t}\n\t\treturn new Obs(obs, time);\n\t}", "private void checkLocationandAddToMap() {\n if (ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_FINE_LOCATION) != PackageManager.PERMISSION_GRANTED && ActivityCompat.checkSelfPermission(getActivity(), android.Manifest.permission.ACCESS_COARSE_LOCATION) != PackageManager.PERMISSION_GRANTED) {\n //Requesting the Location permission\n ActivityCompat.requestPermissions(getActivity(), new String[]{android.Manifest.permission.ACCESS_FINE_LOCATION}, LOCATION_REQUEST_CODE);\n return;\n }\n\n locationManager = (LocationManager) getActivity().getSystemService(LOCATION_SERVICE);\n criteria = new Criteria();\n bestProvider = locationManager.getBestProvider(criteria, true);\n\n\n //Fetching the last known location using the Fus\n Location location = locationManager.getLastKnownLocation(bestProvider);\n\n\n if (location != null) {\n\n onLocationChanged(location);\n\n\n } else {\n //This is what you need:\n locationManager.requestLocationUpdates(bestProvider, 1000, 0, (LocationListener) getActivity());\n }\n\n\n }", "public Actor getLocation(Location currentLocation, GameMap map) {\n Map<Actor, Location> dinosaursList = new HashMap<>();\n dinosaursList = getAllActors(map);\n Location minimalLocation = null;\n\n for (Map.Entry<Actor, Location> spot: dinosaursList.entrySet()) {\n Actor actor = spot.getValue().getActor();\n int x = spot.getValue().x();\n int y = spot.getValue().y();\n Location there = map.at(x,y);\n if (actor instanceof Dinosaur) {\n if (currentLocation != there) {\n if (minimalLocation == null) {\n minimalLocation = there;\n } else if (super.distance(currentLocation, there) < super.distance(currentLocation, minimalLocation)) {\n minimalLocation = there;\n }\n }\n }\n }\n\n return map.getActorAt(minimalLocation);\n }", "private void lookThroughLocations(ArrayList<String> produced){\n int cnt = 0;\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Artefacts> locationArtifacts = locations.get(i).getArtefacts();\n for(int j = 0; j < locationArtifacts.size(); j++){\n for(String k : produced){\n if(locationArtifacts.get(j).getName().equals(k)){\n currentLocation.addArtefactToCurrentLocation(locationArtifacts.get(j));\n locationArtifacts.remove(j);\n }\n }\n }\n }\n for(int i = 0; i < locations.size(); i++){\n ArrayList<Characters> locationCharacters = locations.get(i).getCharacters();\n for(int j = 0; j < locationCharacters.size(); j++){\n for(String k : produced){\n if(locationCharacters.get(j).getName().equals(k)){\n currentLocation.addCharacterToCurrentLocation(locationCharacters.get(j));\n locationCharacters.remove(j);\n }\n }\n }\n }\n }", "private static void detectStayPoints() {\n \tLOG.info(\"Begin detection of stay points.\");\n \t\n \tDBUtil.open();\n \t\n \tLOG.debug(\"Create a UserReader.\");\n \t// Create a reader for users\n \tUserReader userReader = (UserReader) ReaderFactory.instance().getUserReader();\n \t\n \tLOG.info(\"Create a GeoStayPointProcessor with distance threshold {} and time threshold {}.\", clArgs.spdDistanceThreshold, clArgs.spdTimeThreshold);\n \t// Create a processor for stay points\n \tGeoStayPointProcessor processor = new GeoStayPointProcessor(clArgs.spdDistanceThreshold, clArgs.spdTimeThreshold, false);\n \t\n \tLOG.debug(\"Initialize the UserReader with the GeoStayPointProcessor.\");\n \t// Initialize the reader\n \tuserReader.setProcessor(processor);\n \t\n \tLOG.debug(\"Read users out of the database with a minimum of {} and a maximum of {} points.\", userReader.getMinUserPoints(), userReader.getMaxUserPoints());\n \t// Read and save the data\n \tuserReader.read();\n \t\n \tLOG.info(\"Finished detection of stay points.\");\n }", "private void getClosestDriver() {\n availableDriverDatabaseReference = databaseReference.child(NodeNames.AVAILABLEDRIVERS);\n\n // uses the Firebase Realtime Database for data storage to read and write geo location data to your Firebase database and to create queries\n\n GeoFire geoFire = new GeoFire(availableDriverDatabaseReference);\n\n geoQuery = geoFire.queryAtLocation(new GeoLocation(lastKnownLocation.getLatitude(), lastKnownLocation.getLongitude()),radius); // creating radius around customer requests\n geoQuery.removeAllListeners();\n\n geoQuery.addGeoQueryEventListener(new GeoQueryEventListener() {\n @Override\n public void onKeyEntered(String key, GeoLocation location) {\n // triggered when driver is found within the radius\n if(!driverFound && requestCancelled){\n driverFound = true;\n driverFoundId = key;\n\n HashMap<String,Object> hashMap = new HashMap<>();\n hashMap.put(NodeNames.RIDERID,currentUserId);\n hashMap.put(NodeNames.DRIVERID,driverFoundId);\n hashMap.put(NodeNames.RIDERDESTINATION,riderDestination);\n hashMap.put(NodeNames.DESTINATIONLATITUDE,destinationLatLng.latitude);\n hashMap.put(NodeNames.DESTINATIONLONGITUDE,destinationLatLng.longitude);\n\n driverDatabaseReference.child(driverFoundId).updateChildren(hashMap).addOnCompleteListener(new OnCompleteListener<Void>() {\n @Override\n public void onComplete(@NonNull Task<Void> task) {\n if(task.isSuccessful()){\n progressDialog.dismiss();\n searchCab.setText(\"Driver Found\");\n progressDialog.setTitle(\"Fetching Driver Location\");\n progressDialog.setMessage(\"Please wait while we are retrieving drivers location\");\n progressDialog.show();\n\n getDriverLocation();\n checkIfRideEnded();\n }\n }\n });\n }\n }\n\n @Override\n public void onKeyExited(String key) {\n\n }\n\n @Override\n public void onKeyMoved(String key, GeoLocation location) {\n\n }\n\n @Override\n public void onGeoQueryReady() {\n if(!driverFound){\n radius++; // if driver is not found in previous radius, increment driver search radius\n getClosestDriver();\n }\n }\n\n @Override\n public void onGeoQueryError(DatabaseError error) {\n\n }\n });\n }", "public ArrayList<Pair<Landmark, Double>> nearestLocations(Pair<Double, Double> userLocation, int num){\n ArrayList<Pair<Landmark, Double>> nearestList = new ArrayList<>();\n for(int i = 0; i < this.list.size(); i++){\n Landmark landmark = list.get(i);\n double latitude = landmark.getLatitude();\n double longitude = landmark.getLongitude();\n Pair<Double, Double> coordinate = new Pair<>(latitude, longitude);\n // TODO use latitude and longitude explicitly\n double dist = distanceBetween(userLocation, coordinate);\n int origin = nearestList.size();\n for( int j = 0; j < nearestList.size(); j++ ){\n if( dist < nearestList.get(j).second ){\n nearestList.add(j, new Pair<>(this.list.get(i), dist));\n if(nearestList.size() > num){\n nearestList.remove(num);\n }\n break;\n }\n }\n if( origin == nearestList.size() ){\n if( nearestList.size() < num ){\n nearestList.add(new Pair<>(this.list.get(i), dist));\n }\n }\n }\n return nearestList;\n }", "private void enterDiffValuesIntoDB() {\n Location senderLocation = new Location(\"\");\n senderLocation.setLatitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LATITUDE)));\n senderLocation.setLongitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_LONGITUDE)));\n\n Location receiverLocation = new Location(\"\");\n receiverLocation.setLatitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_LATITUDE)));\n receiverLocation.setLongitude(Double.parseDouble(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_LONGITUDE)));\n String distance = Float.toString(senderLocation.distanceTo(receiverLocation));\n databaseHandler.setValueInExpInfo(distance, \"actual_distance\", experimentNumber);\n\n float altDiff = Float.parseFloat(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.SENDER_ALTITUDE))\n - Float.parseFloat(databaseHandler.getSingleExperimentInfoValue(experimentNumber, DatabaseHandler.RECEIVER_ALTITUDE));\n String altitudeDifference = Float.toString(altDiff);\n databaseHandler.setValueInExpInfo(altitudeDifference, \"altitude_difference\", experimentNumber);\n\n getWeatherData();\n }", "@Override\n public void onLocationChanged(final Location location) {\n // Lay vi tri hien tai cua minh\n myLocation = new LatLng(location.getLatitude(), location.getLongitude());\n if (firstLocation == true) {\n // Neu day la lan dau co thong tin vi tri thi chuyen camera ve vi tri nay\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myLocation, 15));\n firstLocation = false;\n }\n // Gui vi tri cua minh len server\n String myLocationMessage = String.format(\"{\\\"COMMAND\\\":\\\"MEMBER_CURRENT_LOCATION\\\", \\\"LATITUDE\\\": \\\"%s\\\", \\\"LONGITUDE\\\": \\\"%s\\\"}\", myLocation.latitude, myLocation.longitude);\n OnlineManager.getInstance().sendMessage(myLocationMessage);\n // Refresh danh sach timesheet\n if (tourTimesheetAdapter != null) {\n tourTimesheetAdapter.notifyDataSetChanged();\n }\n }", "private boolean checkMovePrevious(PositionTracker tracker) {\n\t\t \n\t\t if(tracker.getExactRow() == 0) { //initiate if statement\n\t\t\t if(tracker.getExactColumn() == 0) //initiate if statement\n\t\t\t\t return false; //returns the value false\n\t\t }\n\t\t \n\t\t return true; //returns the boolean value true\n\t }", "private Location pickLocation(List<Location> locations){\n\t\tList<Location> temp =new ArrayList<Location>(locations); \n\t\t\n\t\ttemp = filterOnAffordancesL(temp); //Easier to give a new list back and change ref.\n\t\tList<Location> aFiltered = new ArrayList<Location>(temp);\n\t\tif(isHomogenous(aFiltered)) return pickAccordingToPreference(temp);\n\t\t\n\t\tList<Location> hFiltered= new ArrayList<Location>(temp);; //hack\n\t\tif(CFG.isFilteredOnHabits()){\n\t\ttemp = filterOnHabitsL(temp);\n\t\thFiltered = new ArrayList<Location>(temp);\n\t\tif(hFiltered.isEmpty()) temp = new ArrayList<Location>(aFiltered); //Reroll if empty\n\t\telse if(isHomogenous(hFiltered)) return pickAccordingToPreference(temp);\n\t\t}\n\t\t\n\t\tif(CFG.isIntentional()){\n\t\ttemp = filterOnIntentionsL(temp);\n\t\tList<Location> iFiltered = new ArrayList<Location>(temp);\n\t\tif(iFiltered.isEmpty()){\n\t\t\ttemp = new ArrayList<Location>(hFiltered); //unique case where habits for non-prefered stuff'\n\t\t\tif(hFiltered.isEmpty()){\n\t\t\t\tSystem.out.println(\"This can't be\");\n\t\t\t\ttemp = new ArrayList<Location>(aFiltered);\n\t\t\t}\n\t\t}\n\t\t}\n\t\t\n\t\treturn pickAccordingToPreference(temp);\n\t}", "private void updateItemLocation(Item item) {\n Item existingItem = null;\n ItemElementRelationship itemElementRelationship = null;\n\n if (item.getId() != null) {\n existingItem = itemFacade.findById(item.getId());\n // Item is not new\n if (existingItem != null) {\n setItemLocationInfo(existingItem);\n itemElementRelationship = findItemLocationRelationship(item);\n }\n }\n\n Boolean newItemWithNewLocation = (existingItem == null\n && (item.getLocation() != null || (item.getLocationDetails() != null && !item.getLocationDetails().isEmpty())));\n\n Boolean locationDifferentOnCurrentItem = false;\n\n if (existingItem != null) {\n // Empty String should be the same as null for comparison puposes. \n String existingLocationDetails = existingItem.getLocationDetails();\n String newLocationDetails = item.getLocationDetails();\n\n if (existingLocationDetails != null && existingLocationDetails.isEmpty()) {\n existingLocationDetails = null;\n }\n if (newLocationDetails != null && newLocationDetails.isEmpty()) {\n newLocationDetails = null;\n }\n\n locationDifferentOnCurrentItem = ((!Objects.equals(existingItem.getLocation(), item.getLocation())\n || !Objects.equals(existingLocationDetails, newLocationDetails)));\n }\n\n if (newItemWithNewLocation || locationDifferentOnCurrentItem) {\n\n if (item.getLocation() != null) {\n logger.debug(\"Updating location for Item \" + item.toString()\n + \" to: \" + item.getLocation().getName());\n } else if (item.getLocationDetails() != null) {\n logger.debug(\"Updating location details for Item \" + item.toString()\n + \" to: \" + item.getLocationDetails());\n }\n\n if (itemElementRelationship == null) {\n itemElementRelationship = new ItemElementRelationship();\n itemElementRelationship.setRelationshipType(getLocationRelationshipType());\n itemElementRelationship.setFirstItemElement(item.getSelfElement());\n List<ItemElementRelationship> itemElementRelationshipList = item.getSelfElement().getItemElementRelationshipList();\n if (itemElementRelationshipList == null) {\n itemElementRelationshipList = new ArrayList<>();\n item.getSelfElement().setItemElementRelationshipList(itemElementRelationshipList);\n }\n itemElementRelationshipList.add(itemElementRelationship);\n }\n\n List<ItemElementRelationship> itemElementRelationshipList = item.getSelfElement().getItemElementRelationshipList();\n\n Integer locationIndex = itemElementRelationshipList.indexOf(itemElementRelationship);\n\n if (item.getLocation() != null && item.getLocation().getSelfElement() != null) {\n itemElementRelationshipList.get(locationIndex).setSecondItemElement(item.getLocation().getSelfElement());\n } else {\n // No location is set. \n itemElementRelationshipList.get(locationIndex).setSecondItemElement(null);\n }\n itemElementRelationshipList.get(locationIndex).setRelationshipDetails(item.getLocationDetails());\n\n // Add Item Element relationship history record. \n ItemElementRelationship ier = itemElementRelationshipList.get(locationIndex);\n ItemElementRelationshipHistory ierh;\n ierh = ItemElementRelationshipUtility.createItemElementHistoryRecord(\n ier, (UserInfo) SessionUtility.getUser(), new Date());\n List<ItemElementRelationshipHistory> ierhList;\n ierhList = item.getSelfElement().getItemElementRelationshipHistoryList();\n if (ierhList == null) {\n ierhList = new ArrayList<>();\n item.getSelfElement().setItemElementRelationshipHistoryList(ierhList);\n }\n\n ierhList.add(ierh);\n }\n }", "public void makeMove() {\n ArrayList<Field> myFields = new ArrayList<>();\n for (Field[] fieldsRow : fields) {\n for (Field field : fieldsRow) {\n if(field != null && this.equals(field.getPlayer())) {\n myFields.add(field);\n }\n }\n }\n bestMove[0] = myFields.get(0);\n bestMove[1] = myFields.get(0);\n\n Random rand = new Random();\n for(Field destination : destinationFields) {\n if(canMove()) break;\n destinationField = destination;\n for (Field origin : myFields) {\n for(int i = 0; i < origin.getNeighbours().length; ++i) {\n Field neighbour = origin.getNeighbours()[i];\n if(neighbour != null) {\n if(neighbour.getPlayer() == null) {\n if(valueOfMove(origin, neighbour) > valueOfMove(bestMove[0], bestMove[1])) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n } else if(valueOfMove(origin, neighbour) == valueOfMove(bestMove[0], bestMove[1])) {\n if(rand.nextBoolean()) {\n bestMove[0] = origin;\n bestMove[1] = neighbour;\n }\n }\n } else {\n Field nextField = neighbour.getNeighbours()[i];\n if(nextField != null) {\n correctJumpPaths(origin,null, origin);\n }\n }\n }\n }\n }\n }\n }", "@SuppressLint(\"MissingPermission\")\n private void getCurrentLocation() {\n //inititalize location Manager\n LocationManager manager = (LocationManager)getSystemService(Context.LOCATION_SERVICE);\n //Check Condition\n if(manager.isProviderEnabled(LocationManager.GPS_PROVIDER) || manager.isProviderEnabled(LocationManager.NETWORK_PROVIDER)){\n //When Location Service is enabled.\n //Get Last Location.\n fusedLocationProviderClient.getLastLocation().addOnCompleteListener(new OnCompleteListener<Location>() {\n @Override\n public void onComplete(@NonNull Task<Location> task) {\n Location location = task.getResult();\n //Checl condiitom\n if(location!=null){\n //set Latitude\n CurrentLat = location.getLatitude();\n CurrentLong = location.getLongitude();\n //------------------- //marking loc -------------------------------------- idhar se location mil rhi hai\n LatLng myloc = new LatLng(CurrentLat, CurrentLong);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myloc,16f));\n mMap.setMyLocationEnabled(true);\n\n // String userID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n // DatabaseReference DriverAvailabilityRef = FirebaseDatabase.getInstance().getReference().child(\"Cab\").child(\"Drivers Available\");\n // GeoFire geoFire = new GeoFire(DriverAvailabilityRef);\n // geoFire.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n\n // DatabaseReference DriverWorkingRef = FirebaseDatabase.getInstance().getReference().child(\"Cab\").child(\"Drivers Working\");\n // GeoFire geoFireWorking = new GeoFire(DriverWorkingRef);\n // geoFireWorking.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n\n //------------------------------------------------------------------------------------------------------------------------------------------------------\n String userID = FirebaseAuth.getInstance().getCurrentUser().getUid(); //\n DatabaseReference DriverAvailabilityRef = FirebaseDatabase.getInstance().getReference().child(\"Cab\").child(\"Drivers Available\"); //\n GeoFire geoFire = new GeoFire(DriverAvailabilityRef); //\n\n DatabaseReference DriverWorkingRef = FirebaseDatabase.getInstance().getReference().child(\"Cab\").child(\"Drivers Working\");\n GeoFire geoFireWorking = new GeoFire(DriverWorkingRef);\n\n switch (CustID){\n case \"\":\n Toast.makeText(DriverFinalActivity.this,\"CustID null\",Toast.LENGTH_LONG).show();\n geoFireWorking.removeLocation(userID);\n geoFire.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n break;\n default:\n Toast.makeText(DriverFinalActivity.this,\"CustID: \"+ CustID,Toast.LENGTH_LONG).show();\n geoFire.removeLocation(userID);\n geoFireWorking.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n break;\n\n }\n // -----------------------------------------------------------------------------------------------------------------------------------------------------\n\n /*switch (CustID){\n case \"\":\n geoFireWorking.removeLocation(userID);\n geoFire.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n break;\n default:\n geoFire.removeLocation(userID);\n geoFireWorking.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n break;\n }*/\n\n }else{\n LocationRequest locationRequest = new LocationRequest()\n .setPriority(LocationRequest.PRIORITY_HIGH_ACCURACY)\n .setInterval(5000)\n .setFastestInterval(5000)\n .setNumUpdates(1);\n //initialize location CallBack\n LocationCallback locationCallback = new LocationCallback(){\n @Override\n public void onLocationResult(LocationResult locationResult) {\n Location location = locationResult.getLastLocation();\n CurrentLat = location.getLatitude();\n CurrentLong = location.getLongitude();\n LatLng myloc = new LatLng(CurrentLat, CurrentLong);\n mMap.moveCamera(CameraUpdateFactory.newLatLngZoom(myloc,16f));\n mMap.setMyLocationEnabled(true);\n\n String userID = FirebaseAuth.getInstance().getCurrentUser().getUid();\n DatabaseReference DriverAvailabilityRef = FirebaseDatabase.getInstance().getReference().child(\"Cab\").child(\"Drivers Available\");\n GeoFire geoFire = new GeoFire(DriverAvailabilityRef);\n //geoFire.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n\n DatabaseReference DriverWorkingRef = FirebaseDatabase.getInstance().getReference().child(\"Cab\").child(\"Drivers Working\");\n GeoFire geoFireWorking = new GeoFire(DriverWorkingRef);\n //geoFireWorking.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n\n switch (CustID){\n case \"\":\n Toast.makeText(DriverFinalActivity.this,\"CustID2 null\",Toast.LENGTH_LONG).show();\n geoFireWorking.removeLocation(userID);\n geoFire.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n break;\n default:\n Toast.makeText(DriverFinalActivity.this,\"CustID2: \"+ CustID,Toast.LENGTH_LONG).show();\n geoFire.removeLocation(userID);\n geoFireWorking.setLocation(userID,new GeoLocation(location.getLatitude(),location.getLongitude()));\n break;\n }\n\n\n }\n };\n //Request Location Updates\n fusedLocationProviderClient.requestLocationUpdates(locationRequest,locationCallback, Looper.myLooper());\n }\n }\n });\n }else{\n // When location service is not enables\n Toast.makeText(this,\"Location Off\",Toast.LENGTH_LONG).show();\n }\n }", "@Test\n \tpublic void testTargetLocationLastVisited(){\n \t\tComputerPlayer player = new ComputerPlayer();\n \t\tplayer.setLastVistedRoom('B');\n \t\tint enteredRoom = 0;\n \t\tint loc_7_5Tot = 0;\n \t\tboard.calcTargets(6, 7, 3);\n \t\t//pick a location with at least one room as a target that already been visited\n \t\tfor(int i = 0; i < 100; i++) {\n \t\t\tBoardCell selected = player.pickLocation(board.getTargets());\n \t\t\tif (selected == board.getRoomCellAt(4, 6))\n \t\t\t\tenteredRoom++;\n \t\t\telse if (selected == board.getRoomCellAt(7, 5));\n \t\t}\n \t\t//ensure room is never taken\n \t\tAssert.assertEquals(enteredRoom, 0);\n \t\tAssert.assertTrue(loc_7_5Tot > 0);\n \t}", "private void exploreUnseenMap(Coordinate currPos) {\n\t\tif (control.currentPath == null) {\n\t\t\t//loop through unseen coords, finding best path there\n\t\t\tArrayList<Coordinate> path = null;\n\t\t\tArrayList<Coordinate> bestPath = null;\n\t\t\tfor (Coordinate coord: control.unseenCoords) {\n\t\t\t\tSet<Coordinate> tempHazards = new HashSet<>(control.hazardsMap.keySet());\n\t\t\t\tpath = control.findPath(currPos, coord, tempHazards);\n\t\t\t\tif (path.size() > 0) {\n\t\t\t\t\tif (bestPath == null || path.size() < bestPath.size()) {\n\t\t\t\t\t\tbestPath = path;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif (bestPath == null || bestPath.size() == 0) {\n\t\t\t\tfor (Coordinate coord: control.unseenCoords) {\n\t\t\t\t\tSet<Coordinate> tempHazards = new HashSet<>(control.hazardsMap.keySet());\n\t\t\t\t\tpath = control.findPath(currPos, coord, tempHazards);\n\t\t\t\t\tfor (Coordinate hazard : control.hazardsMap.keySet()) {\n\t\t\t\t\t\ttempHazards.remove(hazard);\n\t\t\t\t\t\tpath = control.findPath(currPos, coord, tempHazards);\n\t\t\t\t\t\tif (path.size() > 0) {\n\t\t\t\t\t\t\tif (bestPath == null || path.size() < bestPath.size()) {\n\t\t\t\t\t\t\t\tbestPath = path;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tcontrol.setPath(bestPath);\n\t\t}\n\t}", "private void cleanUpAfterMove(Unit unit){\n\t\t\t//add current location\n\t\t\tpastLocations.add(unit.location().mapLocation());\n\t\t\t//get rid of oldest to maintain recent locations\n\t\t\tif (pastLocations.size()>9)\n\t\t\t\tpastLocations.remove(0);\t\n\t}", "public ArrayList< LocationHandler >findNear ( double lat, double lon){\n\t\tArrayList< LocationHandler> locationList = new ArrayList< LocationHandler>();\n\t\tString selectQuery = \"SELECT \"+ table_location +\".*, \" +\n\t\t\t\t\"(( \" + lat +\" - \" + table_location+\".\"+ key_latitude +\") * (\" + lat +\" - \" + table_location+\".\"+ key_latitude +\") + \" +\n\t\t\t\t\"(\" + lon +\" - \" + table_location+\".\"+ key_longitude +\") * (\" + lon +\" - \" + table_location+\".\"+ key_longitude +\"))\" +\n\t\t\t\t\" AS distance \"+ \n\t\t\t\t\" FROM \" + table_location + \" LEFT JOIN \" + table_locationType + \" ON \" +\n\t\t\t\ttable_location +\".\"+key_type + \" = \" + table_locationType+ \".\" +key_base_id +\n\t\t\t\t\" ORDER BY distance\";\n\t\t//\t\t\t\t\t\" ORDER BY \" + \"ABS( \" + table_location +\".\" +key_latitude + \" - \" + lon + \") \" + \" AND \" \n\t\t//\t\t\t\t\t + \"ABS( \" + table_location +\".\"+ key_longitude + \" - \" + lat + \") \" + \" DESC\";\n\t\tLog.i(TAG, \"near \" + selectQuery);\n\t\tSQLiteDatabase db = this.getWritableDatabase();\n\t\tCursor cursor = db.rawQuery(selectQuery, null);\n\t\tif (cursor.moveToFirst()) {\n\t\t\tdo {\n\t\t\t\tLocationHandler locationHandlerArray = new LocationHandler();\n\t\t\t\tlocationHandlerArray.setId(cursor.getInt(0)); \n\t\t\t\tlocationHandlerArray.setBase_id(cursor.getInt(1)); \n\t\t\t\tlocationHandlerArray.setDate_entry(cursor.getString(2)); \n\t\t\t\tlocationHandlerArray.setLongitude(cursor.getDouble(3)); \n\t\t\t\tlocationHandlerArray.setLatitude(cursor.getDouble(4)); \n\t\t\t\tlocationHandlerArray.setName(cursor.getString(5)); \n\t\t\t\tlocationHandlerArray.setType(cursor.getString(6));\n\t\t\t\tlocationHandlerArray.setSearchTag(cursor.getString(7));\n\t\t\t\tlocationHandlerArray.setAmountables(cursor.getDouble(8));\n\t\t\t\tlocationHandlerArray.setDescription(cursor.getString(9));\n\t\t\t\tlocationHandlerArray.setBestSeller(cursor.getString(10));\n\t\t\t\tlocationHandlerArray.setWebsite(cursor.getString(11));\n\t\t\t\tlocationList.add(locationHandlerArray);\n\t\t\t} while (cursor.moveToNext());\n\t\t}\n\t\tdb.close();\n\t\treturn locationList;\n\t}", "private static Point chooseNextPos(Point currPos, Point droneNextDes, Point coord1, Point coord2, double buildingSideGrad, Point buildingCentre, List<List<List<Point>>> noFlyZonesCoords, Point previous1, Point previous2) throws IOException, InterruptedException {\r\n\t\tvar possibleNextPos = possibleNextPos(currPos, coord1, coord2, buildingSideGrad, buildingCentre);\r\n\t\tvar nextPosTemp1 = possibleNextPos.get(0);\r\n\t\tvar nextPosTemp2 = possibleNextPos.get(1);\r\n\t\t\r\n\t\tvar euclidDist1 = euclidDist(droneNextDes, nextPosTemp1); \r\n\t\tvar euclidDist2 = euclidDist(droneNextDes, nextPosTemp2);\r\n\t\t\r\n\t\tPoint nextPos = droneNextDes;\r\n\t\t\r\n\r\n\t\t//in the case that both directions result in no intersection, \r\n\t\t//it chooses the one that minimises the distance between the drone's next position and desired position \r\n\t\t//and doesn't result in the drone going back and fourth continuously \r\n\t\tif(noIntersections(currPos, nextPosTemp1, noFlyZonesCoords)==true && noIntersections(currPos, nextPosTemp2, noFlyZonesCoords)==true) {\r\n\t\t\tvar repeatedMoveDir1 = false; //in the case that previous1 and previous2 are null\r\n\t\t\tvar repeatedMoveDir2 = false;\r\n\t\t\tif(previous1!=null && previous2!=null) {\r\n\t\t\t\trepeatedMoveDir1 = computeDir(previous2, previous1)==computeDir(currPos, nextPosTemp1); //next move is equal to 2 moves before, indicating repeated move\r\n\t\t\t\trepeatedMoveDir2 = computeDir(previous2, previous1)==computeDir(currPos, nextPosTemp2);\r\n\t\t\t}\r\n\t\t\t\r\n\t\t\tif(euclidDist1<euclidDist2 && repeatedMoveDir1==false || repeatedMoveDir2==true) {\r\n\t\t\t\tnextPos = nextPosTemp1;\r\n\t\t\t}\r\n\t\t\tif(repeatedMoveDir1==true || euclidDist2<euclidDist1 && repeatedMoveDir2==false){\r\n\t\t\t\tnextPos = nextPosTemp2;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse if(noIntersections(currPos, nextPosTemp1, noFlyZonesCoords)==true && noIntersections(currPos, nextPosTemp2, noFlyZonesCoords)==false) {\r\n\t\t\tnextPos = nextPosTemp1;\r\n\t\t}\r\n\t\telse if(noIntersections(currPos, nextPosTemp1, noFlyZonesCoords)==false && noIntersections(currPos, nextPosTemp2, noFlyZonesCoords)==true) { //\r\n\t\t\tnextPos = nextPosTemp2;\r\n\t\t}\r\n\t\t\r\n\r\n\t\treturn nextPos;\r\n\t}" ]
[ "0.61099136", "0.59226465", "0.59039813", "0.58727527", "0.57691014", "0.56505364", "0.5588289", "0.55603796", "0.55549175", "0.5529923", "0.5491642", "0.54847336", "0.54750377", "0.54688203", "0.5458533", "0.54554605", "0.54510987", "0.5438554", "0.5438246", "0.5420918", "0.54188305", "0.5408351", "0.5380528", "0.5361153", "0.5344474", "0.53289306", "0.5324809", "0.5323263", "0.5320931", "0.5311492", "0.53044087", "0.52999574", "0.52995706", "0.5285926", "0.5276884", "0.52745104", "0.5273113", "0.5272446", "0.5263443", "0.5248483", "0.5243641", "0.5242208", "0.5237423", "0.52360564", "0.52321506", "0.52315915", "0.52270186", "0.52168524", "0.5214896", "0.52138466", "0.5213208", "0.52114064", "0.520246", "0.5198661", "0.519544", "0.51756334", "0.51724416", "0.5169176", "0.5165598", "0.51632816", "0.51608515", "0.5156921", "0.515563", "0.5143598", "0.513042", "0.5120999", "0.5120004", "0.5120004", "0.5118112", "0.51116", "0.51108915", "0.51099366", "0.51092404", "0.5108538", "0.5097182", "0.5093", "0.50855535", "0.50834084", "0.5079712", "0.50776273", "0.50770056", "0.50641423", "0.506408", "0.50535184", "0.50509006", "0.5048125", "0.5045604", "0.50406075", "0.50353163", "0.5027885", "0.5022765", "0.5020528", "0.50195456", "0.5007768", "0.5000435", "0.4994375", "0.49916863", "0.49912065", "0.49895445", "0.4984963" ]
0.6977675
0
special treatment of the CallExpression in Aggregation
@Override public RowExpression rewrite(RowExpression expression, Rule.Context context) { if (expression instanceof CallExpression && ((CallExpression) expression).getArguments().stream().anyMatch(OriginalExpressionUtils::isExpression)) { return removeOriginalExpressionArguments((CallExpression) expression, context.getSession(), context.getSymbolAllocator(), context); } return removeOriginalExpression(expression, context, new HashMap<>()); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void extractAggFn(List<Expr> collector) {\n\n\t}", "@Override\n\tpublic void visit(AnalyticExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic void visit(JsonExpression arg0) {\n\t\t\n\t}", "@Override\r\n\tpublic void visit(FunctionCallExpression functionCallExpression) {\n\r\n\t}", "public Object getExpression();", "@Override\n public Object build() {\n String countFilterField = null;\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n countFilterField = (String)param.getValue();\n break;\n case \"operator\":\n operator = (BiPredicate) param.getValue();\n break;\n case \"operands\":\n operands = (List<String>)param.getValue();\n break;\n\n }\n }\n\n if (countFilterField != null) {\n String fieldName = (this.getName()+ COUNT_FIELD).replace(\".\",\"_\");\n TermsAggregationBuilder aggregation = AggregationBuilders.terms(this.getName()).field(this.getName())\n .subAggregation(PipelineAggregatorBuilders.bucketSelector(countFilterField,\n Collections.singletonMap(fieldName,\"_count\"),\n BuildFilterScript.script(fieldName, operator,operands)));\n return aggregation;\n }\n\n return this;\n }", "@Override\n public Object build() {\n AvgAggregationBuilder avg = AggregationBuilders.avg(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n avg.field((String)param.getValue());\n /*case \"script\":\n avg.script((String)param.getValue());*/\n }\n }\n\n return avg;\n }", "public Type getAggregateFunction() {\n return this.aggregate;\n }", "@Test\n public void complex_subQuery() {\n NumberPath<BigDecimal> sal = Expressions.numberPath(BigDecimal.class, \"sal\");\n // alias for the subquery\n PathBuilder<BigDecimal> sq = new PathBuilder<BigDecimal>(BigDecimal.class, \"sq\");\n // query execution\n query().from(query().from(Constants.employee).select(Constants.employee.salary.add(Constants.employee.salary).add(Constants.employee.salary).as(sal)).as(sq)).select(sq.get(sal).avg(), sq.get(sal).min(), sq.get(sal).max()).fetch();\n }", "@Override\n public Object build() {\n TermsAggregationBuilder terms = AggregationBuilders.terms(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n terms.field((String)param.getValue());\n break;\n\n case \"size\":\n terms.size((int)param.getValue());\n break;\n\n case \"shard_size\":\n terms.shardSize((int)param.getValue());\n break;\n\n case \"execution_hint\":\n terms.executionHint((String)param.getValue());\n break;\n\n case \"collect_mode\":\n terms.collectMode((Aggregator.SubAggCollectionMode)param.getValue());\n break;\n }\n }\n\n for (Composite childComposite : this.getChildren().stream()\n .filter(child -> !ParamComposite.class.isAssignableFrom(child.getClass()) &&\n !HavingComposite.class.isAssignableFrom(child.getClass())).collect(Collectors.toList())) {\n\n applySubAggregationFromChild(terms, childComposite);\n }\n\n return terms;\n }", "@Override\n\tpublic void visit(ExtractExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic void aggregate(Scan scan) {\n\n\t}", "@Override\n public Object build() {\n return innerAggregationBuilder.getAggregations();\n }", "private Expression transform(Expression exp)\n {\n return UseContracts.execute(exp, fun, callers);\n }", "@Override\n public Object build() {\n String filterField = null;\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n filterField = (String)param.getValue();\n break;\n }\n }\n\n if (filterField != null) {\n ValueCountAggregationBuilder count = AggregationBuilders.count(this.getName());\n count.field(filterField);\n return count;\n }\n\n return null;\n }", "AggregationBuilder buildAggregation();", "@Override\n public void visit(CalcExpr node) {\n }", "@Override\n public Object build() {\n return AggregationBuilders.filter(this.getName(),\n (org.opensearch.index.query.QueryBuilder)this.queryBuilder.seekRoot().query().filtered().filter().getCurrent().build());\n }", "@Override\n protected Object aggregateResult(Object aggregate, Object nextResult)\n {\n if (nextResult == null) {\n throw new UnsupportedOperationException(\"not yet implemented\");\n }\n if (aggregate == null) {\n return nextResult;\n }\n throw new UnsupportedOperationException(format(\"Cannot combine %s and %s\", aggregate, nextResult));\n }", "protected AggregateSymbol(String name, Type aggregateFunction, boolean isDistinct, Expression[] args) {\n super(name, args);\n this.aggregate = aggregateFunction;\n this.distinct = isDistinct;\n }", "AnalyticExprArg createAnalyticExprArg();", "@Override\n public Object build() {\n StatsAggregationBuilder stats = AggregationBuilders.stats(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n stats.field((String)param.getValue());\n }\n }\n\n return stats;\n }", "public void visit(BinFieldInvocationExpression x){\n }", "@Override\n\tpublic void visit(JsonOperator arg0) {\n\t\t\n\t}", "@Override\n protected Object aggregateResult(Object aggregate, Object nextResult) {\n if (aggregate == null && nextResult == null) {\n return null;\n }\n if (nextResult == null) {\n return aggregate;\n }\n return nextResult;\n }", "public interface Aggregation {\n\n final int SST = 0;\n final int SST_ANOMALY = 1;\n final int RANDOM_UNCERTAINTY = 2;\n final int COVERAGE_UNCERTAINTY = 3;\n final int LARGE_SCALE_UNCERTAINTY = 4;\n final int ADJUSTMENT_UNCERTAINTY = 5;\n final int SYNOPTIC_UNCERTAINTY = 6;\n final int SEA_ICE_FRACTION = 7;\n\n long getSampleCount();\n\n Number[] getResults();\n\n public double getSeaSurfaceTemperature();\n\n public double getSeaSurfaceTemperatureAnomaly();\n\n public double getRandomUncertainty();\n\n public double getLargeScaleUncertainty();\n\n public double getCoverageUncertainty();\n\n public double getAdjustmentUncertainty();\n\n public double getSynopticUncertainty();\n\n public double getSeaIceFraction();\n}", "AnalyticExprArgs createAnalyticExprArgs();", "@SuppressWarnings(\"unchecked\")\n @Override\n public Expression asExpression(Rule rule, Deque<Value<Expression>> args) {\n if (args.size() == 1) {\n // a single term is not a sum\n return args.pollFirst().getTarget();\n } else {\n Expression signedTerm = args.removeFirst().getTarget();\n if (! (signedTerm instanceof Term<?>)\n || ! (((Term<?>) signedTerm).operation instanceof Additive)) {\n // force \"x\" to be \"+x\"\n signedTerm = new Term<>(Additive.PLUS, signedTerm);\n }\n List<Term<Additive>> arguments = new LinkedList<>();\n arguments.add((Term<Additive>) signedTerm);\n args.stream()\n // next arguments are all Term<Additive>\n .map(v -> (Term<Additive>) v.getTarget())\n .forEachOrdered(arguments::add);\n return new Sum(arguments);\n }\n }", "@Override\n\tpublic boolean isAggregate() {\n\t\treturn true;\n\t}", "@Override\n\tpublic void outAMethodCallExpr(AMethodCallExpr node){\n\t\tString methodName = node.getId().getText();\n\t\tType targetType = nodeTypes.get(node.getTarget());\n\t\tboxIt(targetType); \n\t\tClassAttributes targetClass = topLevelSymbolTable.get(targetType.getTypeName());\n\t\tMethodAttributes methodAttributes = targetClass.getMethod(methodName);\n\t\tif (!(node.getTarget() instanceof ASuperExpr)){\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()) , Constants.INVOKEVIRTUAL));\n\t\t}\n\t\telse {\n\t\t\til.append(fi.createInvoke(targetType.getTypeName(), methodName, getBecelType(methodAttributes.getReturnType()), getBecelType(methodAttributes.getParameterTypes()), Constants.INVOKESPECIAL)); \n\t\t}\n\t\tunboxIt(methodAttributes.getReturnType()); \n\t}", "SubQueryOperand createSubQueryOperand();", "public void testGroupFilterOnComputedColumnsWithAggregations( ) throws Exception\n \t{\n \t\tccName = new String[] { \"cc1\", \"cc2\", \"cc3\", \"cc4\" };\n \t\tccExpr = new String[] {\n \t\t\t\t\"row.COL0+row.COL1\",\n \t\t\t\t\"Total.sum(row.COL1+row.cc1)\",\n \t\t\t\t\"Total.ave(row.cc1+row.COL2+row.COL3, null, 0)*81\",\n \t\t\t\t\"Total.sum(row.COL1+row.COL2+row.COL3+row.COL0)\" };\n \t\t\n \t\tfor (int i = 0; i < ccName.length; i++) {\n \t\t\tComputedColumn computedColumn = new ComputedColumn(ccName[i],\n \t\t\t\t\tccExpr[i], DataType.ANY_TYPE);\n \t\t\t((BaseDataSetDesign) this.dataSet)\n \t\t\t\t\t.addComputedColumn(computedColumn);\n \t\t}\n \t\t\n \t\tString[] bindingNameGroup = new String[1];\n \t\tbindingNameGroup[0] = \"GROUP_GROUP1\";\n \t\tIBaseExpression[] bindingExprGroup = new IBaseExpression[1];\n \t\tbindingExprGroup[0] = new ScriptExpression(\"dataSetRow.cc1\");\n \n \t\tGroupDefinition[] groupDefn = new GroupDefinition[] {\n \t\t\t\tnew GroupDefinition(\"group1\") };\t\n \t\tgroupDefn[0].setKeyExpression(\"row.GROUP_GROUP1\");\n \t\t\n \t\tFilterDefinition filter = new FilterDefinition(new ScriptExpression(\n \t\t\t\t\"Total.sum(dataSetRow.COL0)>400\"));\n \t\tgroupDefn[0].addFilter(filter);\n \n \t\tString[] bindingNameRow = new String[8];\n \t\tbindingNameRow[0] = \"ROW_COL0\";\n \t\tbindingNameRow[1] = \"ROW_COL1\";\n \t\tbindingNameRow[2] = \"ROW_COL2\";\n \t\tbindingNameRow[3] = \"ROW_COL3\";\n \t\tbindingNameRow[4] = \"ROW_cc1\";\n \t\tbindingNameRow[5] = \"ROW_cc2\";\n \t\tbindingNameRow[6] = \"ROW_cc3\";\n \t\tbindingNameRow[7] = \"ROW_cc4\";\n \t\tScriptExpression[] bindingExprRow = new ScriptExpression[] {\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL0\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL1\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL2\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL3\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[0], 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[1], 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[2], 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[3], 0) };\n \n \t\ttry {\n \t\t\tthis.executeQuery(this.createQuery(null, null, null, null, null,\n \t\t\t\t\tnull, null, null, null, bindingNameRow, bindingExprRow));\n \t\t\t// fail( \"Should not arrive here\" );\n \t\t} catch (DataException e) {\n \n \t\t}\n \t}", "public static MethodCallExpression accept(ExpressionVisitor visitor) { throw Extensions.todo(); }", "OperationCallExp createOperationCallExp();", "@Override\n public Object build() {\n MinAggregationBuilder min = AggregationBuilders.min(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n min.field((String)param.getValue());\n }\n }\n\n return min;\n }", "@Override\r\n\tpublic void visit(UnaryExpression unaryExpression) {\n\r\n\t}", "private List<Object> handleResult(List<Object> resultSet)\n {\n List<Object> result = new ArrayList<>();\n final Expression[] grouping = compilation.getExprGrouping();\n if (grouping != null)\n {\n Comparator<Object> c = new Comparator<>()\n {\n public int compare(Object arg0, Object arg1)\n {\n for (int i = 0; i < grouping.length; i++)\n {\n state.put(candidateAlias, arg0);\n Object a = grouping[i].evaluate(evaluator);\n state.put(candidateAlias, arg1);\n Object b = grouping[i].evaluate(evaluator);\n\n // Put any null values at the end\n if (a == null && b == null)\n {\n return 0;\n }\n else if (a == null)\n {\n return -1;\n }\n else if (b == null)\n {\n return 1;\n }\n else\n {\n int result = ((Comparable)a).compareTo(b);\n if (result != 0)\n {\n return result;\n }\n }\n }\n return 0;\n }\n };\n \n List<List<Object>> groups = new ArrayList<>();\n List<Object> group = new ArrayList<>();\n if (!resultSet.isEmpty())\n {\n groups.add(group);\n }\n for (int i = 0; i < resultSet.size(); i++)\n {\n if (i > 0)\n {\n if (c.compare(resultSet.get(i - 1), resultSet.get(i)) != 0)\n {\n group = new ArrayList<>();\n groups.add(group);\n }\n }\n group.add(resultSet.get(i));\n }\n\n // Apply the result to the generated groups\n for (int i = 0; i < groups.size(); i++)\n {\n group = groups.get(i);\n result.add(result(group));\n }\n }\n else\n {\n boolean aggregates = false;\n Expression[] resultExprs = compilation.getExprResult();\n if (resultExprs.length > 0 && resultExprs[0] instanceof CreatorExpression)\n {\n Expression[] resExpr = ((CreatorExpression)resultExprs[0]).getArguments().toArray(\n new Expression[((CreatorExpression)resultExprs[0]).getArguments().size()]);\n for (int i = 0; i < resExpr.length; i++)\n {\n if (resExpr[i] instanceof InvokeExpression)\n {\n String method = ((InvokeExpression) resExpr[i]).getOperation().toLowerCase();\n if (method.equals(\"count\") || method.equals(\"sum\") || method.equals(\"avg\") || method.equals(\"min\") || method.equals(\"max\"))\n {\n aggregates = true;\n }\n }\n }\n }\n else\n {\n for (int i = 0; i < resultExprs.length; i++)\n {\n if (resultExprs[i] instanceof InvokeExpression)\n {\n String method = ((InvokeExpression)resultExprs[i]).getOperation().toLowerCase();\n if (method.equals(\"count\") || method.equals(\"sum\") || method.equals(\"avg\") || method.equals(\"min\") || method.equals(\"max\"))\n {\n aggregates = true;\n }\n }\n }\n }\n \n if (aggregates)\n {\n result.add(result(resultSet));\n }\n else\n {\n for (int i = 0; i < resultSet.size(); i++)\n {\n result.add(result(resultSet.get(i)));\n }\n }\n }\n\n if (!result.isEmpty() && ((Object[])result.get(0)).length == 1)\n {\n List r = result;\n result = new ArrayList<>();\n for (int i = 0; i < r.size(); i++)\n {\n result.add(((Object[]) r.get(i))[0]);\n }\n }\n return result;\n }", "public void testFilterOnAggregationColumn() throws Exception {\n \t\tccName = new String[] { \"cc1\", \"cc2\", \"cc3\" };\n \t\tccExpr = new String[] { \"row.COL0+row.COL1\",\n \t\t\t\t\"Total.runningSum(row.cc1,row.COL0==0,0)\",\n \t\t\t\t\"Total.runningSum(row.cc1,row.COL0>0,0)\" };\n \n \t\tfor (int i = 0; i < ccName.length; i++) {\n \t\t\tComputedColumn computedColumn = new ComputedColumn(ccName[i],\n \t\t\t\t\tccExpr[i], DataType.ANY_TYPE);\n \t\t\t((BaseDataSetDesign) this.dataSet)\n \t\t\t\t\t.addComputedColumn(computedColumn);\n \t\t}\n \n \t\tString[] bindingNameRow = new String[7];\n \t\tbindingNameRow[0] = \"ROW_COL0\";\n \t\tbindingNameRow[1] = \"ROW_COL1\";\n \t\tbindingNameRow[2] = \"ROW_COL2\";\n \t\tbindingNameRow[3] = \"ROW_COL3\";\n \t\tbindingNameRow[4] = \"ROW_cc1\";\n \t\tbindingNameRow[5] = \"ROW_cc2\";\n \t\tbindingNameRow[6] = \"ROW_cc3\";\n \t\tScriptExpression[] bindingExprRow = new ScriptExpression[] {\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL0\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL1\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL2\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL3\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[0], 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[1], 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[2], 0) };\n \n \t\tIResultIterator resultIt = this.executeQuery(this.createQuery(null,\n \t\t\t\tnull, null, null, null, null, null, null, null, bindingNameRow,\n \t\t\t\tbindingExprRow));\n \n \t\tprintResult(resultIt, bindingNameRow, bindingExprRow);\n \t\t// assert\n \t\tcheckOutputFile();\n \n \t}", "@Override\n public Object getValueObject()\n {\n return aggVal;\n }", "@Override\n public Object getValueObject()\n {\n return aggVal;\n }", "ExpressionCalculPrimary getExpr();", "public void visit(Call call) {}", "@Override\n public Object build() {\n Map<String, org.opensearch.index.query.QueryBuilder> filterMap = new HashMap<>();\n for (FilterComposite filter : this.getChildren().stream()\n .filter(child -> FilterComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (FilterComposite) child).collect(Collectors.toList())) {\n\n org.opensearch.index.query.QueryBuilder filterBuilder = (org.opensearch.index.query.QueryBuilder)filter.queryBuilder.seekRoot().query().filtered().filter().getCurrent().build();\n filterMap.put(filter.getName(), filterBuilder);\n }\n\n FiltersAggregationBuilder filtersAggsBuilder = AggregationBuilders.filters(this.getName(),\n Stream.ofAll(filterMap.entrySet())\n .map(entry -> new FiltersAggregator.KeyedFilter(entry.getKey(), entry.getValue()))\n .toJavaArray(FiltersAggregator.KeyedFilter.class));\n\n for (Composite childComposite : this.getChildren().stream()\n .filter(child -> !FilterComposite.class.isAssignableFrom(child.getClass()) &&\n !ParamComposite.class.isAssignableFrom(child.getClass()) &&\n !HavingComposite.class.isAssignableFrom(child.getClass())).collect(Collectors.toList())) {\n\n applySubAggregationFromChild(filtersAggsBuilder, childComposite);\n }\n\n return filtersAggsBuilder;\n }", "long addExpression(Expression expression);", "@Override\n public void agg(Object newVal)\n {\n aggVal += (Double)newVal;\n firstTime = false;\n }", "public static MethodCallExpression call(Expression expression, Method method, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "PropertyCallExp createPropertyCallExp();", "@Override\n public Expression[] accumulateExpressions() {\n if (arguments == 0 || countLiteral) {\n return new Expression[] {/* count = */ plus(count, literal(1L))};\n }\n\n // other case need to determine the value of the element\n List<Expression> operandExpressions = new ArrayList<>();\n for (int i = 0; i < arguments; i++) {\n operandExpressions.add(operand(i));\n }\n Expression operandExpression =\n operandExpressions.stream()\n .map(ExpressionBuilder::isNull)\n .reduce(ExpressionBuilder::or)\n .get();\n return new Expression[] {\n /* count = */ ifThenElse(operandExpression, count, plus(count, literal(1L)))\n };\n }", "Builder addAggregateRating(AggregateRating value);", "@SuppressWarnings({ \"unchecked\", \"rawtypes\" })\n \tprivate <X, C extends Collection<E>, E> AbstractExpression<X> getExpression(CriteriaBuilderImpl cb, Object q, Tree exprDef, Class<X> javaType) {\n \t\tif ((exprDef.getType() == JpqlParser.Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Not_Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Greater_Than_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Greater_Or_Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Less_Than_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Less_Or_Equals_Operator) //\n \t\t\t|| (exprDef.getType() == JpqlParser.BETWEEN)) {\n \n \t\t\tfinal AbstractExpression<X> left;\n \t\t\tfinal AbstractExpression<X> right;\n \n \t\t\tif ((exprDef.getChild(0).getType() == JpqlParser.ST_SUBQUERY) || (exprDef.getChild(1).getType() == JpqlParser.ST_SUBQUERY)) {\n \t\t\t\t// left side is sub query\n \t\t\t\tif (exprDef.getChild(0).getType() == JpqlParser.ST_SUBQUERY) {\n \t\t\t\t\tright = this.getExpression(cb, q, exprDef.getChild(1), null);\n \t\t\t\t\tleft = (AbstractExpression<X>) this.constructSubquery(cb, q, exprDef.getChild(0), right.getJavaType());\n \n \t\t\t\t\t// right side is sub query\n \t\t\t\t}\n \t\t\t\telse if (exprDef.getChild(1).getType() == JpqlParser.ST_SUBQUERY) {\n \t\t\t\t\tleft = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\t\t\tright = (AbstractExpression<X>) this.constructSubquery(cb, q, exprDef.getChild(1), left.getJavaType());\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tthrow new PersistenceException(\"Both sides of the comparison cannot be sub query, line \" + exprDef.getLine() + \":\"\n \t\t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tfinal Tree leftExpr = exprDef.getChild(0);\n \t\t\t\tfinal Tree rightExpr = exprDef.getChild(1);\n \n \t\t\t\tif ((leftExpr.getType() == JpqlParser.Named_Parameter) || (leftExpr.getType() == JpqlParser.Ordinal_Parameter)) {\n \t\t\t\t\tleft = (AbstractExpression<X>) this.getExpression(cb, q, rightExpr, null);\n \t\t\t\t\tright = (AbstractExpression<X>) this.getExpression(cb, q, leftExpr, left.getJavaType());\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tleft = this.getExpression(cb, q, leftExpr, null);\n \t\t\t\t\tright = (AbstractExpression<X>) this.getExpression(cb, q, rightExpr, left.getJavaType());\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.Equals_Operator:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.equal(left, right);\n \n \t\t\t\tcase JpqlParser.Not_Equals_Operator:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.notEqual(left, right);\n \n \t\t\t\tcase JpqlParser.Greater_Than_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.greaterThan((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.gt((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \n \t\t\t\tcase JpqlParser.Greater_Or_Equals_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.greaterThanOrEqualTo((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.ge((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \n \t\t\t\tcase JpqlParser.Less_Than_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.lessThan((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.lt((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \n \t\t\t\tcase JpqlParser.Less_Or_Equals_Operator:\n \t\t\t\t\tif (Comparable.class.isAssignableFrom(left.getJavaType())) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.lessThanOrEqualTo((Expression<Comparable>) left, (Expression<Comparable>) right);\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\treturn (AbstractExpression<X>) cb.le((Expression<? extends Number>) left, (Expression<? extends Number>) right);\n \t\t\t\t\t}\n \t\t\t\tcase JpqlParser.BETWEEN:\n \t\t\t\t\tfinal AbstractExpression<?> right2 = this.getExpression(cb, q, exprDef.getChild(2), left.getJavaType());\n \n \t\t\t\t\tfinal PredicateImpl between = cb.between((AbstractExpression) left, (AbstractExpression) right, (AbstractExpression) right2);\n \t\t\t\t\tif (exprDef.getChildCount() == 4) {\n \t\t\t\t\t\treturn (AbstractExpression<X>) between.not();\n \t\t\t\t\t}\n \n \t\t\t\t\treturn (AbstractExpression<X>) between;\n \t\t\t}\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.LIKE) {\n \t\t\tfinal AbstractExpression<String> inner = this.getExpression(cb, q, exprDef.getChild(0), String.class);\n \t\t\tfinal AbstractExpression<String> pattern = this.getExpression(cb, q, exprDef.getChild(1), String.class);\n \n \t\t\tif ((exprDef.getChildCount() > 2) && (exprDef.getChild(2).getType() == JpqlParser.STRING_LITERAL)) {\n \t\t\t\tfinal Expression<Character> escape = this.getExpression(cb, q, exprDef.getChild(2), Character.class);\n \n \t\t\t\tif (exprDef.getChild(exprDef.getChildCount() - 1).getType() == JpqlParser.NOT) {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.notLike(inner, pattern, escape);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.like(inner, pattern, escape);\n \t\t\t\t}\n \t\t\t}\n \t\t\telse {\n \t\t\t\tif (exprDef.getChild(exprDef.getChildCount() - 1).getType() == JpqlParser.NOT) {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.notLike(inner, pattern);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.like(inner, pattern);\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.ST_IN) {\n \t\t\tAbstractExpression<X> left = null;\n \n \t\t\tif ((exprDef.getChild(0).getType() != JpqlParser.Named_Parameter) && (exprDef.getChild(0).getType() != JpqlParser.Ordinal_Parameter)) {\n \t\t\t\tleft = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\t}\n \n \t\t\tfinal List<AbstractExpression<X>> expressions = Lists.newArrayList();\n \n \t\t\tfinal Tree inDefs = exprDef.getChild(1);\n \t\t\tif ((inDefs.getType() == JpqlParser.Ordinal_Parameter) || (inDefs.getType() == JpqlParser.Ordinal_Parameter)) {\n \t\t\t\treturn (AbstractExpression<X>) left.in(this.getExpression(cb, q, inDefs, left.getJavaType()));\n \t\t\t}\n \n \t\t\tif (inDefs.getType() == JpqlParser.ST_SUBQUERY) {\n \t\t\t\tfinal SubqueryImpl<? extends X> subquery = this.constructSubquery(cb, q, inDefs, left.getJavaType());\n \n \t\t\t\treturn (AbstractExpression<X>) left.in(subquery);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tfor (int i = 0; i < inDefs.getChildCount(); i++) {\n \t\t\t\t\texpressions.add((AbstractExpression<X>) this.getExpression(cb, q, inDefs.getChild(i), left != null ? left.getJavaType() : null));\n \t\t\t\t}\n \t\t\t}\n \n \t\t\tif (left == null) {\n \t\t\t\tleft = (AbstractExpression<X>) this.getExpression(cb, q, exprDef.getChild(0), expressions.get(0).getJavaType());\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) left.in(expressions);\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.ST_NULL) {\n \t\t\tfinal AbstractExpression<Object> expr = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tif (exprDef.getChildCount() == 2) {\n \t\t\t\treturn (AbstractExpression<X>) cb.isNotNull(expr);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) cb.isNull(expr);\n \t\t}\n \n \t\t// identification variable\n \t\tif (exprDef.getType() == JpqlParser.ID) {\n \t\t\treturn (AbstractExpression<X>) this.getAliased(q, exprDef.getText());\n \t\t}\n \n \t\t// single valued state field expression\n \t\tif (exprDef.getType() == JpqlParser.ST_PARENTED) {\n \t\t\tAbstractSelection<?> expression = this.getAliased(q, exprDef.getChild(0).getText());\n \n \t\t\tfinal Qualified qualified = new Qualified(exprDef.getChild(1));\n \t\t\tfinal Iterator<String> i = qualified.getSegments().iterator();\n \t\t\twhile (i.hasNext()) {\n \t\t\t\tfinal String segment = i.next();\n \n \t\t\t\tif (expression instanceof ParentPath) {\n \t\t\t\t\texpression = ((ParentPath<?, ?>) expression).getExpression(segment);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tthrow new PersistenceException(\"Cannot dereference: \" + segment + \", line \" + exprDef.getLine() + \":\" + exprDef.getCharPositionInLine());\n \t\t\t\t}\n \n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) expression;\n \t\t}\n \n \t\t// negation\n \t\tif (exprDef.getType() == JpqlParser.ST_NEGATION) {\n \t\t\treturn (AbstractExpression<X>) cb.neg(this.<Number, Collection<Object>, Object> getExpression(cb, q, exprDef.getChild(0), null));\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.Named_Parameter) {\n \t\t\treturn cb.parameter(javaType, exprDef.getText().substring(1));\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.Ordinal_Parameter) {\n \t\t\tfinal String strPos = exprDef.getText().substring(1);\n \n \t\t\ttry {\n \t\t\t\tfinal int position = Integer.parseInt(strPos);\n \n \t\t\t\tAbstractParameterExpressionImpl<X> parameter = null;\n \n \t\t\t\tObject q2 = q;\n \n \t\t\t\twhile (q2 instanceof SubqueryImpl) {\n \t\t\t\t\tq2 = ((SubqueryImpl<?>) q2).getParent();\n \t\t\t\t}\n \n \t\t\t\tif (q2 instanceof CriteriaQueryImpl) {\n \t\t\t\t\tparameter = (AbstractParameterExpressionImpl<X>) ((CriteriaQueryImpl<?>) q2).getParameter(position);\n \t\t\t\t}\n \t\t\t\telse if (q2 instanceof CriteriaDeleteImpl) {\n \t\t\t\t\tparameter = (AbstractParameterExpressionImpl<X>) ((CriteriaDeleteImpl<?>) q2).getParameter(position);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tparameter = (AbstractParameterExpressionImpl<X>) ((CriteriaUpdateImpl<?>) q2).getParameter(position);\n \t\t\t\t}\n \n \t\t\t\tif (parameter == null) {\n \t\t\t\t\tparameter = new ParameterExpressionImpl<X>((BaseQueryImpl<?>) q2, this.metamodel.type(javaType), javaType, position);\n \t\t\t\t}\n \n \t\t\t\treturn parameter;\n \n \t\t\t}\n \t\t\tcatch (final NumberFormatException e) {\n \t\t\t\tthrow new PersistenceException(\"Invalid ordinal query parameter declaration: \" + strPos);\n \t\t\t}\n \t\t}\n \n \t\t// arithmetic operation\n \t\tif ((exprDef.getType() == JpqlParser.Plus_Sign) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Minus_Sign) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Multiplication_Sign) //\n \t\t\t|| (exprDef.getType() == JpqlParser.Division_Sign)) {\n \n \t\t\tfinal AbstractExpression<Number> left = this.getExpression(cb, q, exprDef.getChild(0), Number.class);\n \t\t\tfinal AbstractExpression<? extends Number> right = this.getExpression(cb, q, exprDef.getChild(1), left.getJavaType());\n \n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.Plus_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.sum(left, right);\n \n \t\t\t\tcase JpqlParser.Minus_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.diff(left, right);\n \n \t\t\t\tcase JpqlParser.Multiplication_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.prod(left, right);\n \n \t\t\t\tcase JpqlParser.Division_Sign:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.quot(left, right);\n \t\t\t}\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.ST_BOOLEAN) {\n \t\t\treturn (AbstractExpression<X>) this.getExpression(cb, q, exprDef, Boolean.class);\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.NUMERIC_LITERAL) {\n \t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<Long>(this.metamodel.createBasicType(Long.class), Long.valueOf(exprDef.getText()));\n \t\t}\n \n \t\t// string literal\n \t\tif (exprDef.getType() == JpqlParser.STRING_LITERAL) {\n \t\t\tif (javaType == Character.class) {\n \t\t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<Character>(this.metamodel.type(Character.class), //\n \t\t\t\t\texprDef.getText().substring(1, 2).toCharArray()[0]);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<String>(this.metamodel.type(String.class), //\n \t\t\t\texprDef.getText().substring(1, exprDef.getText().length() - 1));\n \t\t}\n \n \t\t// functions returning string\n \t\tif ((exprDef.getType() == JpqlParser.UPPER) //\n \t\t\t|| (exprDef.getType() == JpqlParser.LOWER) //\n \t\t\t|| (exprDef.getType() == JpqlParser.SUBSTRING)) {\n \n \t\t\tfinal AbstractExpression<String> argument = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.UPPER:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.upper(argument);\n \n \t\t\t\tcase JpqlParser.LOWER:\n \t\t\t\t\treturn (AbstractExpression<X>) cb.lower(argument);\n \n \t\t\t\tcase JpqlParser.SUBSTRING:\n \t\t\t\t\tfinal AbstractExpression<Integer> start = this.getExpression(cb, q, exprDef.getChild(1), Integer.class);\n \t\t\t\t\tfinal AbstractExpression<Integer> end = exprDef.getChildCount() == 3 ? //\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(2), Integer.class) : null;\n \n \t\t\t\t\treturn (AbstractExpression<X>) new SubstringExpression(argument, start, end);\n \t\t\t}\n \t\t}\n \n \t\t// concat function\n \t\tif (exprDef.getType() == JpqlParser.CONCAT) {\n \t\t\tfinal List<Expression<String>> arguments = Lists.newArrayList();\n \t\t\tfor (int i = 0; i < exprDef.getChildCount(); i++) {\n \t\t\t\targuments.add(this.getExpression(cb, q, exprDef.getChild(i), String.class));\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new ConcatExpression(arguments.toArray(new Expression[arguments.size()]));\n \t\t}\n \n \t\t// trim function\n \t\tif (exprDef.getType() == JpqlParser.TRIM) {\n \t\t\tTrimspec trimspec = null;\n \t\t\tExpression<Character> trimChar = null;\n \t\t\tExpression<String> inner = null;\n \n \t\t\tint i = 0;\n \t\t\tfinal int type = exprDef.getChild(i).getType();\n \n \t\t\t// trim spec\n \t\t\tif (type == JpqlParser.BOTH) {\n \t\t\t\ttrimspec = Trimspec.BOTH;\n \t\t\t\ti++;\n \t\t\t}\n \t\t\telse if (type == JpqlParser.LEADING) {\n \t\t\t\ttrimspec = Trimspec.LEADING;\n \t\t\t\ti++;\n \t\t\t}\n \t\t\telse if (type == JpqlParser.TRAILING) {\n \t\t\t\ttrimspec = Trimspec.TRAILING;\n \t\t\t\ti++;\n \t\t\t}\n \n \t\t\tif (exprDef.getChildCount() > (i + 1)) {\n \t\t\t\ttrimChar = this.getExpression(cb, q, exprDef.getChild(i), Character.class);\n \t\t\t\tinner = this.getExpression(cb, q, exprDef.getChild(i + 1), String.class);\n \t\t\t}\n \t\t\telse {\n \t\t\t\tinner = this.getExpression(cb, q, exprDef.getChild(i), String.class);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new TrimExpression(trimspec, trimChar, inner);\n \t\t}\n \n \t\t// type functions\n \t\tif ((exprDef.getType() == JpqlParser.TYPE) || (exprDef.getType() == JpqlParser.ST_ENTITY_TYPE)) {\n \t\t\tswitch (exprDef.getType()) {\n \t\t\t\tcase JpqlParser.TYPE:\n \t\t\t\t\tfinal AbstractExpression<?> inner = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\t\t\treturn (AbstractExpression<X>) ((AbstractPath<?>) inner).type();\n \n \t\t\t\tcase JpqlParser.ST_ENTITY_TYPE:\n \t\t\t\t\tfinal EntityTypeImpl<?> entity = this.getEntity(exprDef.getChild(0).getText());\n \t\t\t\t\tif (entity.getRootType().getInheritanceType() == null) {\n \t\t\t\t\t\tthrow new PersistenceException(\"Entity does not have inheritence: \" + entity.getName() + \", line \" + exprDef.getLine() + \":\"\n \t\t\t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t\t\t}\n \n \t\t\t\t\treturn (AbstractExpression<X>) new SimpleConstantExpression<String>(null, entity.getDiscriminatorValue());\n \t\t\t}\n \t\t}\n \n \t\t// date time functions\n \t\tswitch (exprDef.getType()) {\n \t\t\tcase JpqlParser.CURRENT_DATE:\n \t\t\t\treturn (AbstractExpression<X>) cb.currentDate();\n \n \t\t\tcase JpqlParser.CURRENT_TIME:\n \t\t\t\treturn (AbstractExpression<X>) cb.currentTime();\n \n \t\t\tcase JpqlParser.CURRENT_TIMESTAMP:\n \t\t\t\treturn (AbstractExpression<X>) cb.currentTimestamp();\n \n \t\t\tcase JpqlParser.SECOND:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.SECOND, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.MINUTE:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.MINUTE, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.HOUR:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.HOUR, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.DAY:\n \t\t\tcase JpqlParser.DAYOFMONTH:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.DAYOFMONTH,\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.DAYOFWEEK:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.DAYOFWEEK, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.DAYOFYEAR:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.DAYOFYEAR, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.MONTH:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.MONTH, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.WEEK:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.WEEK, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \n \t\t\tcase JpqlParser.YEAR:\n \t\t\t\treturn (AbstractExpression<X>) cb.dateTimeExpression(DateTimeFunctionType.YEAR, this.getExpression(cb, q, exprDef.getChild(0), Date.class));\n \t\t}\n \n \t\t// arithmetic functions\n \t\tswitch (exprDef.getType()) {\n \t\t\tcase JpqlParser.ABS:\n \t\t\t\treturn (AbstractExpression<X>) cb.abs(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \n \t\t\tcase JpqlParser.SQRT:\n \t\t\t\treturn (AbstractExpression<X>) cb.sqrt(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \n \t\t\tcase JpqlParser.MOD:\n \t\t\t\treturn (AbstractExpression<X>) cb.mod(//\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), Integer.class), //\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(1), Integer.class));\n \n \t\t\tcase JpqlParser.LOCATE:\n \t\t\t\tif (exprDef.getChildCount() == 3) {\n \t\t\t\t\treturn (AbstractExpression<X>) cb.locate(//\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), String.class), //\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(1), String.class), //\n \t\t\t\t\t\tthis.getExpression(cb, q, exprDef, Integer.class));\n \t\t\t\t}\n \n \t\t\t\treturn (AbstractExpression<X>) cb.locate(//\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(0), String.class), //\n \t\t\t\t\tthis.getExpression(cb, q, exprDef.getChild(1), String.class));\n \n \t\t\tcase JpqlParser.LENGTH:\n \t\t\t\treturn (AbstractExpression<X>) cb.length(this.getExpression(cb, q, exprDef.getChild(0), String.class));\n \t\t}\n \n \t\t// aggregate functions\n \t\tswitch (exprDef.getType()) {\n \t\t\tcase JpqlParser.AVG:\n \t\t\t\treturn (AbstractExpression<X>) cb.avg(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \t\t\tcase JpqlParser.SUM:\n \t\t\t\treturn (AbstractExpression<X>) cb.sum(this.getExpression(cb, q, exprDef.getChild(0), Long.class));\n \t\t\tcase JpqlParser.MAX:\n \t\t\t\treturn (AbstractExpression<X>) cb.max(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \t\t\tcase JpqlParser.MIN:\n \t\t\t\treturn (AbstractExpression<X>) cb.min(this.getExpression(cb, q, exprDef.getChild(0), Number.class));\n \t\t}\n \n \t\t// count function\n \t\tif (exprDef.getType() == JpqlParser.COUNT) {\n \t\t\tif (exprDef.getChildCount() == 2) {\n \t\t\t\treturn (AbstractExpression<X>) new CountExpression(this.getExpression(cb, q, exprDef.getChild(1), null), true);\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) new CountExpression(this.getExpression(cb, q, exprDef.getChild(0), null), false);\n \t\t}\n \n \t\t// all or any operator\n \t\tif (exprDef.getType() == JpqlParser.ST_ALL_OR_ANY) {\n \t\t\t// all, any, some expressions\n \t\t\tswitch (exprDef.getChild(0).getType()) {\n \t\t\t\tcase JpqlParser.ALL:\n \t\t\t\t\treturn new AllAnyExpression<X>(true, this.constructSubquery(cb, q, exprDef.getChild(1), javaType));\n \n \t\t\t\tcase JpqlParser.ANY:\n \t\t\t\tcase JpqlParser.SOME:\n \t\t\t\t\treturn new AllAnyExpression<X>(false, this.constructSubquery(cb, q, exprDef.getChild(1), javaType));\n \t\t\t}\n \t\t}\n \n \t\t// exists operator\n \t\tif (exprDef.getType() == JpqlParser.EXISTS) {\n \t\t\treturn (AbstractExpression<X>) new ExistsExpression(this.constructSubquery(cb, q, exprDef.getChild(0), javaType));\n \t\t}\n \n \t\t// not operator\n \t\tif (exprDef.getType() == JpqlParser.NOT) {\n \t\t\tfinal Tree innerExpression = exprDef.getChild(0);\n \n \t\t\tfinal AbstractExpression<Boolean> expression = innerExpression.getType() == JpqlParser.LOR ? this.constructJunction(cb, q, innerExpression)\n \t\t\t\t: this.getExpression(cb, q, innerExpression, Boolean.class);\n \n \t\t\treturn (AbstractExpression<X>) new PredicateImpl(true, BooleanOperator.AND, expression);\n \t\t}\n \n \t\t// general case\n \t\tif (exprDef.getType() == JpqlParser.ST_GENERAL_CASE) {\n \t\t\tfinal CaseImpl<Object> caseExpr = cb.selectCase();\n \n \t\t\tfor (int i = 0; i < exprDef.getChildCount(); i++) {\n \t\t\t\tfinal Tree caseDef = exprDef.getChild(i);\n \n \t\t\t\tif (caseDef.getType() == JpqlParser.WHEN) {\n \t\t\t\t\tcaseExpr.when(this.constructJunction(cb, q, caseDef.getChild(0)), this.getExpression(cb, q, caseDef.getChild(1), null));\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tcaseExpr.otherwise(this.getExpression(cb, q, caseDef, null));\n \t\t\t\t}\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) caseExpr;\n \t\t}\n \n \t\t// simple case\n \t\tif (exprDef.getType() == JpqlParser.CASE) {\n \t\t\tfinal AbstractExpression<X> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tfinal SimpleCaseImpl<X, Object> caseExpr = cb.selectCase(expression);\n \n \t\t\tfor (int i = 1; i < exprDef.getChildCount(); i++) {\n \t\t\t\tfinal Tree caseDef = exprDef.getChild(i);\n \n \t\t\t\tif (caseDef.getType() == JpqlParser.WHEN) {\n \t\t\t\t\tfinal AbstractExpression<Object> result = this.getExpression(cb, q, caseDef.getChild(1), null);\n \n \t\t\t\t\tfinal AbstractExpression<X> condition;\n \n \t\t\t\t\tif (exprDef.getChild(0).getType() == JpqlParser.TYPE) {\n \t\t\t\t\t\tfinal EntityTypeImpl<Object> entity = this.getEntity(caseDef.getChild(0).getText());\n \n \t\t\t\t\t\tif (entity.getRootType().getInheritanceType() == null) {\n \t\t\t\t\t\t\tthrow new PersistenceException(\"Entity does not have inheritence: \" + entity.getName() + \", line \" + exprDef.getLine() + \":\"\n \t\t\t\t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t\t\t\t}\n \n \t\t\t\t\t\tcondition = (AbstractExpression<X>) new SimpleConstantExpression<String>(null, entity.getDiscriminatorValue());\n \t\t\t\t\t}\n \t\t\t\t\telse {\n \t\t\t\t\t\tcondition = this.getExpression(cb, q, caseDef.getChild(0), null);\n \t\t\t\t\t}\n \n \t\t\t\t\tcaseExpr.when(condition, result);\n \t\t\t\t}\n \t\t\t\telse {\n \t\t\t\t\tcaseExpr.otherwise(this.getExpression(cb, q, caseDef, null));\n \t\t\t\t}\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) caseExpr;\n \t\t}\n \n \t\t// nullif function\n \t\tif (exprDef.getType() == JpqlParser.NULLIF) {\n \t\t\tfinal AbstractExpression<X> left = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tfinal AbstractExpression<?> right = this.getExpression(cb, q, exprDef.getChild(1), null);\n \n \t\t\treturn new NullIfExpression<X>(left, right);\n \t\t}\n \n \t\t// coalesce function\n \t\tif (exprDef.getType() == JpqlParser.ST_COALESCE) {\n \t\t\tfinal CoalesceExpression<X> coalesce = cb.coalesce();\n \t\t\tfor (int i = 0; i < exprDef.getChildCount(); i++) {\n \t\t\t\tcoalesce.value(this.getExpression(cb, q, exprDef.getChild(i), javaType));\n \t\t\t}\n \n \t\t\treturn coalesce;\n \t\t}\n \n \t\t// db func\n \t\tif (exprDef.getType() == JpqlParser.FUNC) {\n \t\t\tfinal List<AbstractExpression<?>> arguments = Lists.newArrayList();\n \t\t\tfinal String function = exprDef.getChild(0).getText();\n \n \t\t\tfor (int i = 1; i < exprDef.getChildCount(); i++) {\n \t\t\t\targuments.add(this.getExpression(cb, q, exprDef.getChild(i), null));\n \t\t\t}\n \n \t\t\treturn new FunctionExpression<X>((Class<X>) (javaType != null ? javaType : Object.class), //\n \t\t\t\tfunction, arguments.toArray(new Expression<?>[arguments.size()]));\n \t\t}\n \n \t\t// index expression\n \t\tif (exprDef.getType() == JpqlParser.INDEX) {\n \t\t\tfinal AbstractExpression<Object> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tif (expression instanceof ListJoinImpl) {\n \t\t\t\treturn (AbstractExpression<X>) ((ListJoinImpl<?, ?>) expression).index();\n \t\t\t}\n \n \t\t\tthrow new PersistenceException(\"Reference is not a list join, line \" + exprDef.getLine() + \":\" + exprDef.getCharPositionInLine());\n \t\t}\n \n \t\t// empty operation\n \t\tif (exprDef.getType() == JpqlParser.ST_EMPTY) {\n \t\t\tAbstractExpression<?> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \n \t\t\tif (expression instanceof MapExpression) {\n \t\t\t\texpression = ((MapExpression<Map<?, ?>, ?, ?>) expression).values();\n \t\t\t}\n \n \t\t\tif (!(expression instanceof CollectionExpression<?, ?>)) {\n \t\t\t\tthrow new PersistenceException(\"Reference is not a collection, line \" + exprDef.getLine() + \":\" + exprDef.getCharPositionInLine());\n \t\t\t}\n \n \t\t\tif (exprDef.getChildCount() == 2) {\n \t\t\t\treturn (AbstractExpression<X>) cb.isNotEmpty((Expression<Collection<?>>) expression);\n \t\t\t}\n \t\t\telse {\n \t\t\t\treturn (AbstractExpression<X>) cb.isEmpty((Expression<Collection<?>>) expression);\n \t\t\t}\n \t\t}\n \n \t\t// member of operation\n \t\tif (exprDef.getType() == JpqlParser.ST_MEMBER) {\n \t\t\tfinal AbstractExpression<?> expression = this.getExpression(cb, q, exprDef.getChild(1), null);\n \t\t\tif (!(expression instanceof CollectionExpression)) {\n \t\t\t\tthrow new PersistenceException(\"Member of expression must evaluate to a collection expression, \" + exprDef.getLine() + \":\"\n \t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t}\n \n \t\t\tfinal CollectionExpression<C, E> collection = (CollectionExpression<C, E>) expression;\n \t\t\tfinal PluralAttributeImpl<?, C, E> attribute = (PluralAttributeImpl<?, C, E>) collection.getMapping().getAttribute();\n \n \t\t\tfinal AbstractExpression<E> elem = this.getExpression(cb, q, exprDef.getChild(0), attribute.getElementType().getJavaType());\n \n \t\t\tif (exprDef.getChildCount() == 3) {\n \t\t\t\treturn (AbstractExpression<X>) cb.isNotMember(elem, collection);\n \t\t\t}\n \t\t\telse {\n \t\t\t\treturn (AbstractExpression<X>) cb.isMember(elem, collection);\n \t\t\t}\n \t\t}\n \n \t\t// size operation\n \t\tif (exprDef.getType() == JpqlParser.SIZE) {\n \t\t\tfinal AbstractExpression<?> expression = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tif (!(expression instanceof CollectionExpression)) {\n \t\t\t\tthrow new PersistenceException(\"Member of expression must evaluate to a collection expression, \" + exprDef.getLine() + \":\"\n \t\t\t\t\t+ exprDef.getCharPositionInLine());\n \t\t\t}\n \n \t\t\tfinal CollectionExpression<C, E> collection = (CollectionExpression<C, E>) expression;\n \n \t\t\treturn (AbstractExpression<X>) cb.size(collection);\n \t\t}\n \n \t\tif (exprDef.getType() == JpqlParser.CAST) {\n \t\t\tfinal AbstractExpression<?> left = this.getExpression(cb, q, exprDef.getChild(0), null);\n \t\t\tClass<?> clazz = null;\n \n \t\t\tswitch (exprDef.getChild(1).getType()) {\n \t\t\t\tcase JpqlParser.BYTE:\n \t\t\t\t\tclazz = Byte.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.SHORT:\n \t\t\t\t\tclazz = Short.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.INT:\n \t\t\t\tcase JpqlParser.INTEGER:\n \t\t\t\t\tclazz = Integer.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.LONG:\n \t\t\t\t\tclazz = Long.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.FLOAT:\n \t\t\t\t\tclazz = Float.class;\n \t\t\t\t\tbreak;\n \t\t\t\tcase JpqlParser.DOUBLE:\n \t\t\t\t\tclazz = Double.class;\n \t\t\t\t\tbreak;\n \t\t\t\tdefault:\n \t\t\t\t\tclazz = String.class;\n \t\t\t}\n \n \t\t\treturn (AbstractExpression<X>) cb.cast(left, clazz);\n \t\t}\n \n \t\tthrow new PersistenceException(\"Unhandled expression: \" + exprDef.toStringTree() + \", line \" + exprDef.getLine() + \":\"\n \t\t\t+ exprDef.getCharPositionInLine());\n \t}", "@Override\r\n\tpublic BasicDBObject getExpression() {\n\t\treturn null;\r\n\t}", "@Override\n public Object build() {\n MaxAggregationBuilder max = AggregationBuilders.max(this.getName());\n\n for (ParamComposite param : this.getChildren().stream()\n .filter(child -> ParamComposite.class.isAssignableFrom(child.getClass()))\n .map(child -> (ParamComposite) child).collect(Collectors.toList())) {\n switch (param.getName().toLowerCase()) {\n case \"field\":\n max.field((String)param.getValue());\n }\n }\n\n return max;\n }", "@Override\n public void visitClosureExpression(ClosureExpression expression) {\n }", "public static Expression reduce(Expression expression) { throw Extensions.todo(); }", "String getExpression();", "String getExpression();", "@Override\n\tpublic void visit(NextValExpression arg0) {\n\t\t\n\t}", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "Expression getExpression();", "@Override\n public List<ExpenceSummary> getReportsForMonth(String owner,int year, int month) {\n\n AggregationResults<ExpenceSummary> results = operations.aggregate(newAggregation(Expence.class, //\n match(where(\"owner\").is(owner))\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n // .andOperator(where(\"date\").regex(\"2016\")\n // .andOperator(where(\"owner\").is(\"admin\")))\n , //\n // unwind(\"items\"), //\n // project(\"id\", \"customerId\", \"items\") //\n // .andExpression(\"'$items.price' * '$items.quantity'\").as(\"lineTotal\"), //\n project()\n .andExpression(\"type\").as(\"type\")\n .andExpression(\"year(date)\").as(\"year\")\n .andExpression(\"month(date)\").as(\"month\")\n .andExpression(\"amount\").as(\"amount\")\n ,\n match(where(\"year\").is(year)\n .andOperator(where(\"month\").is(month))\n )\n // .andOperator(where(\"date\").lte(LocalDateTime.now())\n //.andOperator(where(\"year(date)\").is(year)\n ,\n group(\"type\",\"year\",\"month\")\n\n // .addToSet(\"type\").as(\"type\")//, //\n // .addToSet(\"year\").as(\"year\")//, //\n // .addToSet(\"month\").as(\"month\")//, //\n .sum(\"amount\").as(\"totalAmount\") //\n .count().as(\"count\")\n // project(\"id\", \"items\", \"netAmount\") //\n // .and(\"orderId\").previousOperation() //\n // .andExpression(\"netAmount * [0]\", 1).as(\"taxAmount\") //\n // .andExpression(\"netAmount * (1 + [0])\", 1).as(\"totalAmount\") //\n ), Expence.class,ExpenceSummary.class);\n logger.info(\"getReportsForMonth results.size=\"+results.getMappedResults().size());\n return results.getMappedResults();\n }", "Expression createExpression();", "@Override\n\tprotected String aggregateResult(String aggregate, String nextResult) {\n\t\tif(aggregate==null)\n\t\t\treturn nextResult;\n\t\tif(nextResult==null)\n\t\t\treturn aggregate;\n\t\t\n\t\treturn aggregate+ \"\\n\"+ nextResult;\n\t}", "@Override\n\tpublic void visit(CastExpression arg0) {\n\t\t\n\t}", "@Override\n\tpublic void visit(OracleHierarchicalExpression arg0) {\n\t\t\n\t}", "Object getExpressionValue(ExpressionParams params);", "public AggregateFunctionBuilder<T> createAggregate(){\r\n return AggregateFunction.forType(this);\r\n }", "@Override\n public R visit(CFunctionCallExpression exp) throws X {\n return visit((AFunctionCallExpression) exp);\n }", "public SqlNode toSql(AggregateCall aggCall, Aggregate aggregate) {\n return getDialect().decorateSqlNode(aggCall,\n () -> SqlTypeUtil.projectTypes(aggregate.getInput().getRowType(), aggCall.getArgList()),\n () -> super.toSql(aggCall));\n }", "public static MethodCallExpression call(Expression expression, Method method, Expression argument0, Expression argument1, Expression argument2) { throw Extensions.todo(); }", "public T expr(final Expression expression) {\r\n\t\tif (expression.values() == null)\r\n\t\t\treturn expr(expression.expression());\r\n\t\treturn expr(expression.expression(), expression.values()\r\n\t\t\t\t.toArray());\r\n\t}", "@Test\n public void test() {\n final ZuluCompileResult result = this.engine.compile(\"{ \"\n // + \"a: hello(name: 'theo'),\"\n // + \"b: child { a: hello(name: 'alice'), b: hello(name: 'bob') }, \"\n // + \"c: sum(xa: 1, b: 2)\"\n + \"d: child { g: id, f: id, child { id, A: intcount, b: intcount, longcount } } \"\n + \"other { typeAfield } \"\n + \" }\");\n\n if (!result.warnings().isEmpty()) {\n result.warnings().forEach(System.err::println);\n }\n\n final ZuluExecutable executable = result.executable();\n\n System.err.println(\" --- executing\");\n\n // bind executable to a context.\n final ZuluContext context = executable.bind(new QueryRoot(), new ZuluExecutionScope());\n\n // now invoke a single field without parameters.\n final Map<ZuluSelection, Object> values = context.execute();\n\n values.forEach((sel, val) -> System.err.println(sel.path() + \"[\" + sel.fieldType() + \"]\" + \": \" + val));\n\n // System.err.println(context.execute(new DebugZuluResultReceiver(), \"d\"));\n\n // and then execute all fields in the operation at once.\n // context.execute()\n // .forEach((outputField, fieldValue) -> System.err.println(outputField + \" = \" + fieldValue));\n\n }", "@Override\n public void agg(double newVal)\n {\n aggVal += newVal;\n firstTime = false;\n }", "@Override\n\tpublic void visit(MySQLGroupConcat arg0) {\n\t\t\n\t}", "public Rule call()\n \t{\n \t\treturn sequence(id(),\n \t\t\t\tfirstOf(\n \t\t\t\tsequence(enforcedSequence(PAR_L, optional(args()), PAR_R), optional(closure())), //params & opt. closure\n \t\t\t\tclosure())); // closure only\n \t}", "Builder addAggregateRating(String value);", "@Override\n\tpublic void visit(Addition arg0) {\n\t\t\n\t}", "public String visit(PrimaryExpression n, String argu) {\n return n.f0.accept(this, null); \n }", "public void testNestedAggregationOnComputedColumn( ) throws Exception\n \t{\n \t\tccName = new String[] { \"cc1\", \"cc2\", \"cc3\" };\n \t\tccExpr = new String[] {\n \t\t\t\t\"row.COL0+row.COL1\",\n \t\t\t\t\"Total.runningSum(row.cc1/Total.sum(row.cc1))*100\",\n \t\t\t\t\"Total.runningSum(Total.sum(row.cc1/Total.sum(row.cc1)))\" };\n \n \t\tfor (int i = 0; i < ccName.length; i++) {\n \t\t\tComputedColumn computedColumn = new ComputedColumn(ccName[i],\n \t\t\t\t\tccExpr[i], DataType.ANY_TYPE);\n \t\t\t((BaseDataSetDesign) this.dataSet)\n \t\t\t\t\t.addComputedColumn(computedColumn);\n \t\t}\n \t\t\n \t\tString[] bindingNameRow = new String[7];\n \t\tbindingNameRow[0] = \"ROW_COL0\";\n \t\tbindingNameRow[1] = \"ROW_COL1\";\n \t\tbindingNameRow[2] = \"ROW_COL2\";\n \t\tbindingNameRow[3] = \"ROW_COL3\";\n \t\tbindingNameRow[4] = \"ROW_cc1\";\n \t\tbindingNameRow[5] = \"ROW_cc2\";\n \t\tbindingNameRow[6] = \"ROW_cc3\";\n \t\tScriptExpression[] bindingExprRow = new ScriptExpression[] {\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL0\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL1\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL2\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + \"COL3\", 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[0], 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[1], 0),\n \t\t\t\tnew ScriptExpression(\"dataSetRow.\" + ccName[2], 0) };\n \n \t\tIResultIterator resultIt = this.executeQuery(this.createQuery(null,\n \t\t\t\tnull, null, null, null, null, null, null, null, bindingNameRow,\n \t\t\t\tbindingExprRow));\n \n \t\tprintResult(resultIt, bindingNameRow, bindingExprRow);\n \t\t// assert\n \t\tcheckOutputFile();\n \t\t\n \t}", "@Override\n public Void visit(IInvocationExpression expr, Set<String> overallContext) {\n overallContext.add(expr.getMethodName().getName());\n return null;\n }", "public static MethodCallExpression call(Expression expression, Method method) { throw Extensions.todo(); }", "@Override\n public String toString() {\n return \"Expression\";\n }", "public interface ExpressionVisitor{\n\n void handel(BracketExpression bracketExpression);\n\n void handel(NaturalNumber naturalNumber);\n\n\n void handel(Sum sum);\n void handel(Difference difference);\n void handel(Product product);\n void handel(Quotient quotient);\n\n void handel(VariableExpression variableExpression);\n}", "public static MethodCallExpression call(Method method, Expression expression0, Expression expression1) { throw Extensions.todo(); }", "@Override\n public OneRow emitAggObject() {\n if (!statsInitialized) {\n throw new IllegalStateException(\"retrieveStats() should be called before calling emitAggObject()\");\n }\n OneRow row = null;\n if (context.getAggType() == null)\n throw new UnsupportedOperationException(\"Aggregate operation is required\");\n if (context.getAggType() != EnumAggregationType.COUNT)\n throw new UnsupportedOperationException(\"Aggregation operation is not supported.\");\n\n if (objectsEmitted < count) {\n objectsEmitted++;\n row = rowToEmitCount;\n }\n return row;\n }", "@Override\r\n\tpublic void visit(BinaryExpression binaryExpression) {\n\r\n\t}", "@Override\n\tpublic void visit(Addition arg0) {\n\n\t}", "@Override \n\tpublic void caseAMethodCallExpr(AMethodCallExpr node){\n\t\t inAMethodCallExpr(node);\n\t if(node.getTarget() != null)\n\t {\n\t node.getTarget().apply(this);\n\t }\n\t if(node.getId() != null)\n\t {\n\t node.getId().apply(this);\n\t }\n\t {\n\t List<PExpr> copy = new ArrayList<PExpr>(node.getExpr());\n\t for(PExpr e : copy)\n\t {\n\t e.apply(this);\n\t \n\t boxIt(nodeTypes.get(e));\n\t }\n\t }\n\t outAMethodCallExpr(node);\n\t\t\n\t}", "public interface SOSLWithDivisionFilterExpressionTree extends ExpressionTree{\n public LiteralTree getDivisionField();\n}", "@Override\n public Object build() {\n return this.getChildren().stream()\n .map(child -> (org.opensearch.search.aggregations.AbstractAggregationBuilder) child.build()).collect(Collectors.toList());\n }", "public R visit(com.biosimilarity.lift.lib.scalar.Absyn.Calculation p, A arg)\n {\n\n p.arithmeticexpr_.accept(new ArithmeticExprVisitor<R,A>(), arg);\n\n return null;\n }", "DExpression getExpression();", "Builder addAggregateRating(AggregateRating.Builder value);", "public double computeExpression(Expression exp, DataRow data) {\n\n //TODO all cases\n\n //------ net.sf.jsqlparser.expression.operators.* ---------\n if (exp instanceof Parenthesis) {\n return computeExpression(((Parenthesis) exp).getExpression(), data);\n }\n\n\n //------ net.sf.jsqlparser.expression.operators.conditional.* ---------\n if (exp instanceof AndExpression) {\n return computeAnd((AndExpression) exp, data);\n }\n if (exp instanceof OrExpression) {\n return computeOr((OrExpression) exp, data);\n }\n\n\n //------ net.sf.jsqlparser.expression.operators.relational.* ---------\n if(exp instanceof Between){\n return computeBetween((Between)exp, data);\n }\n if (exp instanceof ComparisonOperator) {\n // this deals with 6 subclasses:\n return computeComparisonOperator((ComparisonOperator) exp, data);\n }\n if(exp instanceof ExistsExpression){\n //TODO\n }\n if(exp instanceof ExpressionList){\n //TODO\n }\n if (exp instanceof InExpression) {\n return computeInExpression((InExpression) exp, data);\n }\n if (exp instanceof IsNullExpression) {\n return computeIsNull((IsNullExpression) exp, data);\n }\n if(exp instanceof JsonOperator){\n //TODO\n }\n if(exp instanceof LikeExpression){\n //TODO\n }\n if(exp instanceof Matches){\n //TODO\n }\n if(exp instanceof MultiExpressionList){\n //TODO\n }\n if(exp instanceof NamedExpressionList){\n //TODO\n }\n if(exp instanceof RegExpMatchOperator){\n //TODO\n }\n\n return cannotHandle(exp);\n }", "AggregateFunction getAggregateFunctions(int index);", "@Test\n public void testAggregateFunction() throws Exception {\n String sql = \"SELECT COUNT(a) AS c FROM m.g\";\n Node fileNode = sequenceSql(sql, TSQL_QUERY);\n\n Node queryNode = verify(fileNode, Query.ID, Query.ID);\n\n Node selectNode = verify(queryNode, Query.SELECT_REF_NAME, Select.ID);\n Node aggregateNode = verifyAliasSymbol(selectNode, Select.SYMBOLS_REF_NAME, \"c\", AggregateSymbol.ID);\n verifyProperty(aggregateNode, AggregateSymbol.AGGREGATE_FUNCTION_PROP_NAME, \"COUNT\");\n verifyProperty(aggregateNode, AggregateSymbol.DISTINCT_PROP_NAME, false);\n verifyElementSymbol(aggregateNode, AggregateSymbol.ARGS_REF_NAME, \"a\");\n\n Node fromNode = verify(queryNode, Query.FROM_REF_NAME, From.ID);\n verifyUnaryFromClauseGroup(fromNode, From.CLAUSES_REF_NAME, 1, \"m.g\");\n \n verifySql(sql, fileNode);\n }", "@Override public JannotTreeJCExpression getLeftOperand()\n{\n return createTree(getNode().getLeftOperand()); \n}", "public static MethodCallExpression call(Expression expression, Method method, Iterable<Expression> arguments) { throw Extensions.todo(); }", "private void jetInvokeExpr(){\n\t\tInvokeExpr invokeExpr = (InvokeExpr) rExpr;\n\t\tSootMethodRef methodRef = invokeExpr.getMethodRef();\n\t\tif(StringModeling.stringMethods.contains(methodRef.getSignature())){\n\t\t\tjetStringOperation(invokeExpr);\n\t\t}else{\n\t\t\tValue thisBase = null;\n\t\t\tif(invokeExpr instanceof InterfaceInvokeExpr){\n\t\t\t\tthisBase = ((InterfaceInvokeExpr) invokeExpr).getBase();\n\t\t\t}else if(invokeExpr instanceof SpecialInvokeExpr){\n\t\t\t\tthisBase = ((SpecialInvokeExpr) invokeExpr).getBase();\n\t\t\t}else if(invokeExpr instanceof VirtualInvokeExpr){\n\t\t\t\tthisBase = ((VirtualInvokeExpr) invokeExpr).getBase();\n\t\t\t}\n\t\t\tString funStr = constructFunStr(invokeExpr);\n\t\t\tStringBuilder sb = new StringBuilder();\n\t\t\tsb.append(\"(\");\n\t\t\tsb.append(funStr);\n\t\t\tsb.append(\" \");\n\t\t\t\n\t\t\tif(thisBase != null){\n\t\t\t\tString thisBaseName = fileGenerator.getRenameOf(thisBase, false, this.stmtIdx);\n\t\t\t\tsb.append(thisBaseName);\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t\t\n\t\t\tfor(Value param : invokeExpr.getArgs()){\n\t\t\t\tif(param instanceof Constant){\n\t\t\t\t\tsb.append(param.toString());\n\t\t\t\t}else{\n\t\t\t\t\tString paramName = fileGenerator.getRenameOf(param, false, this.stmtIdx);\n\t\t\t\t\tif(param instanceof NumericConstant && paramName.startsWith(\"-\")){\n\t\t\t\t\t\t//-1 --> (- 0 1)\n\t\t\t\t\t\tsb.append(\"(- 0 \");\n\t\t\t\t\t\tsb.append(paramName.substring(1));\n\t\t\t\t\t\tsb.append(\")\");\n\t\t\t\t\t}else{\n\t\t\t\t\t\tsb.append(paramName);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tsb.append(\" \");\n\t\t\t}\n\t\t\t\n\t\t\tsb.append(\")\");\n\t\t\tthis.exprStr = sb.toString();\n\t\t}\n\t}" ]
[ "0.63131416", "0.61282", "0.60241836", "0.59598565", "0.5788855", "0.56767035", "0.5646658", "0.55581594", "0.5527334", "0.55154866", "0.5510873", "0.55031073", "0.5488263", "0.5454775", "0.54492414", "0.5440748", "0.5438667", "0.5425762", "0.5399131", "0.5354794", "0.5342701", "0.53317827", "0.53289884", "0.5315194", "0.5300268", "0.530001", "0.5269019", "0.52641684", "0.52547354", "0.5253022", "0.5249394", "0.5209014", "0.52084094", "0.5190457", "0.5167699", "0.5157211", "0.51539445", "0.5153761", "0.512838", "0.512838", "0.51133585", "0.511181", "0.5102626", "0.5102073", "0.50944483", "0.5082791", "0.507827", "0.5056846", "0.50534934", "0.505264", "0.5047963", "0.5025557", "0.50116396", "0.50062394", "0.49823892", "0.49823892", "0.49822292", "0.4975074", "0.4975074", "0.4975074", "0.4975074", "0.4973841", "0.4968208", "0.49664423", "0.49624223", "0.49505454", "0.49456286", "0.4920717", "0.491639", "0.49152404", "0.49139875", "0.49063063", "0.4906168", "0.49046528", "0.48974666", "0.48906296", "0.48894587", "0.4888027", "0.48860002", "0.48840678", "0.4882558", "0.4880921", "0.48806655", "0.48800775", "0.48796466", "0.48794976", "0.48776206", "0.48754784", "0.48742372", "0.48677823", "0.48662576", "0.48633823", "0.48615652", "0.4860693", "0.4859898", "0.48588136", "0.4858218", "0.48557964", "0.48522308", "0.48483056" ]
0.4921627
67
TODO Autogenerated method stub
@Override public void onItemSelected(AdapterView<?> arg0, View arg1, int arg2, long arg3) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void onNothingSelected(AdapterView<?> arg0) { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
creates list of all touch events
@Override public void update(float deltaTime) { List<TouchEvent> touchEvents = game.getInput().getTouchEvents(); int len = touchEvents.size(); for (int i = 0; i < len; i++) { TouchEvent event = touchEvents.get(i); // **add error detection if (event.type == TouchEvent.TOUCH_UP) { // Play button if (PersonalMethods.touchInBounds(event, 140, 435, 440, 200)) { Assets.tap.play(tapVol); //start game game.setScreen(new GameScreen(majorProjectGame)); } if (PersonalMethods.touchInBounds(event, 700, 435, 440, 200)) { Assets.tap.play(tapVol); // loads tutorial game.setScreen(new TutorialScreen(majorProjectGame)); } // Sign In/Out button if (PersonalMethods.touchInBounds(event, 7, 7, 180, 60)) { Assets.tap.play(tapVol); signInOutPressed = i; if (majorProjectGame.isLoggedIn()) { try{ majorProjectGame.onSignOutButtonClicked(); } catch (Exception e) { // error checking Log.d("MajorProjectGame", "Unable to log out" + e); } } else { majorProjectGame.onSignInButtonClicked(); } } // Highscores button if (PersonalMethods.touchInBounds(event, 1175, 5, 100, 80)) { Assets.tap.play(tapVol); if (majorProjectGame.isLoggedIn()){ majorProjectGame.onShowLeaderboardsRequested(""); } } // Achievements button if (PersonalMethods.touchInBounds(event, 1175, 105, 100, 80)) { Assets.tap.play(tapVol); if (majorProjectGame.isLoggedIn()){ majorProjectGame.onShowAchievementsRequested(""); } } } else{ signInOutPressed = -1; } } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public List<InputEvent> getEvents() {\n return new ArrayList<>(events);\n }", "void touchEvent(MotionEvent event);", "private double[] handleTouches(InkEventType event, float x, float y, float pressure) {\n/* 226 */ switch (event) {\n/* */ case ON_TOUCH_DOWN:\n/* 228 */ return handleOnDown(x, y, pressure);\n/* */ case ON_TOUCH_MOVE:\n/* 230 */ return handleOnMove(x, y, pressure);\n/* */ \n/* */ \n/* */ case ON_TOUCH_UP:\n/* 234 */ return handleOnUp(pressure);\n/* */ } \n/* 236 */ throw new RuntimeException(\"Missing check for event type\");\n/* */ }", "private void dumpEvent(MotionEvent event) \n {\n String names[] = { \"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\",\"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\" };\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) \n {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) \n {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n sb.append(\"]\");\n Log.d(\"Touch Events ---------\", sb.toString());\n }", "Collection<EventDetector> getEventsDetectors();", "private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n sb.append(\"]\");\n Log.d(\"Touch Events ---------\", sb.toString());\n }", "public interface TouchHandler extends View.OnTouchListener {\n public boolean isTouchDown(int pointer);\n public int getTouchX(int pointer);\n public int getTouchY(int pointer);\n public List<Input.TouchEvent> getTouchEvents();\n}", "public List<KeyEvent> getKeyEvents() {\n synchronized (this) {\n int len = keyEvents.size();\n for (int i = 0; i < len; i++) {\n keyEventPool.free(keyEvents.get(i));\n }\n keyEvents.clear();\n keyEvents.addAll(keyEventsBuffer);\n keyEventsBuffer.clear();\n return keyEvents;\n }\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n int pointerIndex = event.getActionIndex();\n\n // get pointer ID\n int pointerId = event.getPointerId(pointerIndex);\n\n // get masked (not specific to a pointer) action\n int maskedAction = event.getActionMasked();\n\n switch (maskedAction) {\n\n case MotionEvent.ACTION_DOWN:\n case MotionEvent.ACTION_POINTER_DOWN: {\n // We have a new pointer. Lets add it to the list of pointers\n\n Point point = new Point();\n point.x = (int)event.getX(pointerIndex);\n point.y = (int)event.getY(pointerIndex);\n mActivePointers.put(pointerId, point);\n break;\n }\n case MotionEvent.ACTION_MOVE: { // a pointer was moved\n for (int size = event.getPointerCount(), i = 0; i < size; i++) {\n Point point = mActivePointers.get(event.getPointerId(i));\n if (point != null) {\n point.x = (int)event.getX(i);\n point.y = (int)event.getY(i);\n }\n }\n break;\n }\n case MotionEvent.ACTION_UP:\n case MotionEvent.ACTION_POINTER_UP:\n case MotionEvent.ACTION_CANCEL: {\n mActivePointers.remove(pointerId);\n break;\n }\n }\n\n return true;\n }", "IEvent[] getEvents();", "@Override\r\n\tpublic boolean dispatchTouchEvent( MotionEvent e ) {\n\t\tint action = e.getAction();\r\n\t\tfloat x = e.getRawX();\r\n\t\tfloat y = e.getRawY();\r\n\t\tLog.d(TAG, \"onTouch dev:\" + e.getDeviceId() + \" act:\" + action + \" ind:\" + e.getActionIndex() + \" @ \"+ x + \",\" + y );\r\n\t\tnativeTouch( appPtr, action, x, y );\r\n\t\treturn true;\r\n\t}", "public GameEvent[] getEvents();", "public void onTouch(final int pointerCount);", "public boolean onListTouchEvent(View view, MotionEvent event) {\n return false;\n }", "private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n\n\n\n }", "@SuppressWarnings(\"deprecation\")\n @TargetApi(Build.VERSION_CODES.ECLAIR)\n @SuppressLint(\"NewApi\")\n private void dumpEvent(MotionEvent event) {\n String names[] = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\",\n \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN\n || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(\n action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n sb.append(\"]\");\n }", "private static void dumpEvent(MotionEvent event)\n {\n String[] names = {\"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\",\n \"POINTER_DOWN\", \"POINTER_UP\", \"7?\", \"8?\", \"9?\"};\n StringBuilder sb = new StringBuilder();\n int action = event.getAction();\n int actionCode = action & MotionEvent.ACTION_MASK;\n sb.append(\"event ACTION_\").append(names[actionCode]);\n if (actionCode == MotionEvent.ACTION_POINTER_DOWN\n || actionCode == MotionEvent.ACTION_POINTER_UP) {\n sb.append(\"(pid \").append(\n action >> MotionEvent.ACTION_POINTER_ID_SHIFT);\n sb.append(\")\");\n }\n sb.append(\"[\");\n for (int i = 0; i < event.getPointerCount(); i++) {\n sb.append(\"#\").append(i);\n sb.append(\"(pid \").append(event.getPointerId(i));\n sb.append(\")=\").append((int) event.getX(i));\n sb.append(\",\").append((int) event.getY(i));\n if (i + 1 < event.getPointerCount())\n sb.append(\";\");\n }\n sb.append(\"]\");\n LogHelper.d(TAG, sb.toString());\n }", "@DISPID(7) //= 0x7. The runtime will prefer the VTID if present\r\n @VTID(14)\r\n visiotool.IVEventList eventList();", "public void onTouchEvent(MotionEvent event) {\n\t\t// history\n\t\t// pointers\n\t\tmDurationLogger.start();\n\t\tevent.getPointerCount();\n\t\tevent.getAction();\n\t\tif (event.getHistorySize() > 0){\n\t\t\tLog.i(\"TouchLogger\",\n\t\t\t\t\t\" x:\" + event.getX() +\n\t\t\t\t\t\"Touch duration:\"\n\t\t\t\t\t+ (event.getEventTime() - event\n\t\t\t\t\t\t\t.getHistoricalEventTime(0)) + \" size:\"\n\t\t\t\t\t\t\t+ event.getHistorySize()\n\t\t\t\t\t\t\t+ \"action:\"\n\t\t\t\t\t\t\t+ event.getAction());\n\t\t\tfor (int h = 0 ; h < event.getHistorySize() ; h ++){\n\n\t\t\t\tfor (int i = 0 ; i < event.getPointerCount() ; i++){\n\n\t\t\t\t\tLog.i(\"TouchLogger\",\n\t\t\t\t\t\t\t\" h \" \n\t\t\t\t\t\t\t+ h\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ i\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalEventTime(h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalX(i,h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalY(i,h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalPressure(i,h)\n\t\t\t\t\t\t\t+ \" \"\n\t\t\t\t\t\t\t+ event.getHistoricalSize(i,h));\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor (int i = 0 ; i < event.getPointerCount() ; i++){\n\t\t\tLog.i(\"TouchLogger\",\n\t\t\t\t\t\" current \" \n\t\t\t\t\t+ getActionName(event.getAction() & MotionEvent.ACTION_MASK)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ (event.getAction() & MotionEvent.ACTION_POINTER_ID_MASK)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getEventTime()\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ i\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getX(i)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getY(i)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getPressure(i)\n\t\t\t\t\t+ \" \"\n\t\t\t\t\t+ event.getSize(i));\n\t\t}\n\n\t\tmDurationLogger.end();\n\t}", "public abstract Event[] getInitialEvents();", "@Override\n public void onTouch(int index) {\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tint action = event.getActionMasked();\n\t\t// action point status\n\t\tint actionIndex = event.getActionIndex();\n\t\t// event的id直接對應到pointer的id\n\t\tint actionPointIndex = event.getPointerId(actionIndex);\n\t\tfloat actionPointX = event.getX(actionIndex);\n\t\tfloat actionPointY = event.getY(actionIndex);\n\t\tfloat actionPointPressure = event.getPressure(actionIndex);\n\t\tfloat actionPointSize = event.getSize(actionIndex);\n\t\tlong time = System.currentTimeMillis();\n\t\tpointers = event.getPointerCount();\n\n\t\tswitch (action) {\n\t\t// 更新pointer的內容\n\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t// if (flagIsLighting && flagcnt < 100) {\n\t\t\tflagTouching = true;\n\t\t\t// }\n\t\t\tpointer[actionPointIndex].touchDown(actionPointIndex, actionPointX,\n\t\t\t\t\tactionPointY, actionPointPressure, actionPointSize, time);\n\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_POINTER_DOWN:\n\t\t\t// if (flagIsLighting && flagcnt < 100) {\n\t\t\tflagTouching = true;\n\t\t\t// }\n\t\t\tpointer[actionPointIndex].touchDown(actionPointIndex, actionPointX,\n\t\t\t\t\tactionPointY, actionPointPressure, actionPointSize, time);\n\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_POINTER_UP:\n\t\t\tpointer[actionPointIndex].touchUp();\n\t\t\tbreak;\n\t\tcase MotionEvent.ACTION_UP:\n\t\t\tpointer[actionPointIndex].touchUp();\n\t\t\t((Circle) circle).tapping = 0;\n\t\t\trgb = 100;\n\t\t\t((Circle) circle).flagIsLighting = false;\n\t\t\tflagIsLighting = false;\n\t\t\t// Log.e(\"tap0\", ((Circle) circle).tapping + \"\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tfor (int i = 0; i < event.getPointerCount(); ++i) {\n\n\t\t\t\tpointer[event.getPointerId(i)].touchDown(event.getPointerId(i),\n\t\t\t\t\t\tevent.getX(i), event.getY(i), event.getPressure(i),\n\t\t\t\t\t\tevent.getSize(i), time);\n\n\t\t\t\tint hz = 100;\n\t\t\t\tint e = 0;\n\t\t\t\tString s = \"! \";\n\t\t\t\tfor (int j = 0; j < 10; j++) {\n\n\t\t\t\t\tif (pointer[j].exist) {\n//\t\t\t\t\t\tint tmp = (int) ((pointer[j].nowHz + 5) / 10);\n\t\t\t\t\t\tif (hz > pointer[j].showHz && pointer[j].showHz != 0) {\n\t\t\t\t\t\t\t// if (hz > tmp && tmp != 0) {\n\t\t\t\t\t\t\thz = pointer[j].showHz;\n//\t\t\t\t\t\t\thz = tmp;\n\t\t\t\t\t\t\ts = s + hz + \" \";\n\t\t\t\t\t\t\trgb = hz;\n\t\t\t\t\t\t\t((Circle) circle).id = e;\n\t\t\t\t\t\t\tid = j;\n\t\t\t\t\t\t}\n\t\t\t\t\t\te++;\n\t\t\t\t\t}\n\n\t\t\t\t}\n\t\t\t\t// Log.e(\"hz\", s);\n\t\t\t\tif (flagIsLighting) {\n\t\t\t\t\tif (hz > 6 && hz < 11 && hzcnt < 10) {\n\t\t\t\t\t\thza[hzcnt] = hz;\n\t\t\t\t\t\thzcnt++;\n\t\t\t\t\t\t// flagcnt = 0;\n\t\t\t\t\t\tLog.e(\"+hz\", hz + \"\");\n\t\t\t\t\t}\n\t\t\t\t\t// else if (hz > 15 || hz < 4) {\n\t\t\t\t\t// Log.e(\"cnt\", flagcnt + \"\");\n\t\t\t\t\t// flagcnt++;\n\t\t\t\t\t// if (flagcnt > 100) {\n\t\t\t\t\t//\n\t\t\t\t\t// flagTouching = false;\n\t\t\t\t\t// }\n\t\t\t\t\t// }\n\t\t\t\t}\n\t\t\t\t// if (rgb > hz) {\n\t\t\t\t//\n\t\t\t\t// rgb = hz;\n\t\t\t\t// }\n\t\t\t\tif (e == 2 || e == 3) {\n\t\t\t\t\tint k = 0;\n\t\t\t\t\tfor (int j = 0; j < 10; j++) {\n\t\t\t\t\t\tif (pointer[j].exist) {\n\t\t\t\t\t\t\tif (j != id) {\n\t\t\t\t\t\t\t\t((Circle) circle).tri[k][0] = pointer[j].x;\n\t\t\t\t\t\t\t\t((Circle) circle).tri[k][1] = pointer[j].y;\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tk++;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tint k = 0;\n\t\t\t\tif (hz >= 6 && hz <= 10) {\n\t\t\t\t\t((Circle) circle).tapping = 1;\n\t\t\t\t\t// Log.e(\"tap1\", ((Circle) circle).tapping + \"\");\n\t\t\t\t\tfor (int j = 0; j < 10; j++) {\n\n\t\t\t\t\t\tpointer[j].hzCnt = 0;\n\t\t\t\t\t\tpointer[j].showHz = 0;\n\t\t\t\t\t}\n\t\t\t\t\tif (flagIsLighting == false) {\n\t\t\t\t\t\t// Log.e(\"fa\", hz + \" \" + flagIsLighting);\n\t\t\t\t\t\t// Log.e(\"rgb\", (hz - 5) + \"\");\n\t\t\t\t\t\tflagIsLighting = true;\n\t\t\t\t\t\tLog.e(\"+hz\", hz + \"\");\n\t\t\t\t\t\tif (hzcnt < 10) {\n\t\t\t\t\t\t\thza[hzcnt] = hz;\n\t\t\t\t\t\t\thzcnt++;\n\t\t\t\t\t\t}\n\t\t\t\t\t\t// ((Circle) circle).showRGB = hz - 5;\n\t\t\t\t\t\t// Log.e(\"fa\", \"\" + flagIsLighting);\n\t\t\t\t\t\tmyHandler.sendEmptyMessage(0x102);\n\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\tbreak;\n\t\t}\n\n\t\t// 重新繪圖\n\t\tcircle.invalidate();\n\t\treturn super.onTouchEvent(event);\n\t}", "private void dumpEvent(MotionEvent event) {\n\t\tString names[] = { \"DOWN\", \"UP\", \"MOVE\", \"CANCEL\", \"OUTSIDE\", \"POINTER_DOWN\", \"POINTER_UP\",\n\t\t\t\t\"7?\", \"8?\", \"9?\" };\n\t\tStringBuilder sb = new StringBuilder();\n\t\tint action = event.getAction();\n\t\tint actionCode = action & MotionEvent.ACTION_MASK;\n\t\tsb.append(\"event ACTION_\").append(names[actionCode]);\n\t\tif (actionCode == MotionEvent.ACTION_POINTER_DOWN\n\t\t\t\t|| actionCode == MotionEvent.ACTION_POINTER_UP) {\n\t\t\tsb.append(\"(pid \").append(action >> MotionEvent.ACTION_POINTER_INDEX_SHIFT);\n\t\t\tsb.append(\")\");\n\t\t}\n\t\tsb.append(\"[\");\n\t\tfor (int i = 0; i < event.getPointerCount(); i++) {\n\t\t\tsb.append(\"#\").append(i);\n\t\t\tsb.append(\"(pid \").append(event.getPointerId(i));\n\t\t\tsb.append(\")=\").append((int) event.getX(i));\n\t\t\tsb.append(\",\").append((int) event.getY(i));\n\t\t\tif (i + 1 < event.getPointerCount())\n\t\t\t\tsb.append(\";\");\n\t\t}\n\t\tsb.append(\"]\");\n\t\tLog.d(TAG_DUMP, sb.toString());\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n int action = event.getActionMasked(); // event type\n int actionIndex = event.getActionIndex(); // pointer (i.e., finger)\n\n // determine which type of action the given MotionEvent\n // represents, then call the corresponding handling method\n if (action == MotionEvent.ACTION_DOWN ||\n action == MotionEvent.ACTION_POINTER_DOWN)\n {\n touchStarted(event.getX(actionIndex), event.getY(actionIndex),\n event.getPointerId(actionIndex));\n } // end if\n else if (action == MotionEvent.ACTION_UP ||\n action == MotionEvent.ACTION_POINTER_UP)\n {\n touchEnd(event.getPointerId(actionIndex));\n } // end else if\n else\n {\n touchMoved(event);\n } // end else\n\n invalidate(); // redraw\n return true; // consume the touch event\n }", "private void listEvents() {\n System.out.println(\"\\nEvents:\");\n for (Event event: world.getEvents()) {\n String name = event.getName();\n String coords = \" with x = \" + event.getX() + \" light seconds and t = \" + event.getTime() + \" seconds \";\n String frame = \"in \" + event.getFrame().getName() + \".\";\n System.out.println(name + coords + frame);\n }\n }", "@NonNull\n/* */ private Observable<double[]> touchEventToOutlineSegmentArray() {\n/* 207 */ return this.mTouchEventSubject.serialize().observeOn(Schedulers.computation()).map(new Function<InkEvent, double[]>()\n/* */ {\n/* */ public double[] apply(InkEvent inkEvent) throws Exception {\n/* 210 */ Utils.throwIfOnMainThread();\n/* */ \n/* */ \n/* 213 */ InkEventType eventType = inkEvent.eventType;\n/* 214 */ float x = inkEvent.x;\n/* 215 */ float y = inkEvent.y;\n/* 216 */ float pressure = inkEvent.pressure;\n/* */ \n/* 218 */ return PointProcessor.this.handleTouches(eventType, x, y, pressure);\n/* */ }\n/* */ });\n/* */ }", "public List<Events> getAllSystemEventsListForAll();", "@Override\r\n\t\tpublic boolean onTouchEvent(MotionEvent event) {\n\r\n\t\t\treturn true;\r\n\t\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent ev) {\n\t\tLog.i(\"TestEvent\", \"activity->onTouchEvent \" + TouchEventUtil.getTouchAction(ev.getAction()));\n\t\treturn super.onTouchEvent(ev);\n\t}", "private void checkTouchTouch() {\n ArrayList<TuioCursor> cursors = GameManager.getInstance().getTouchHandler().getTuioCursors();\n for (int z = 0; z < cursors.size(); z++){\n try{\n Point2D pixelPoint = new Point2D.Double(cursors.get(z).getX()*Game.WIDTH, cursors.get(z).getY()*Game.HEIGHT);\n int pixelX = (int) pixelPoint.getX();\n int pixelY = (int) pixelPoint.getY();\n\n //Combine the lists with actors to one big list\n List<UsableActor> combinedList = getAllUsableObjects();\n\n //Check for every actor if this touchpoint touches this actor\n for (UsableActor actor : combinedList){\n double actorPixelX = actor.getLocationInsideActorContainer().getX();\n double actorPixelY = actor.getLocationInsideActorContainer().getY();\n\n int actorWidth = actor.getWidth();\n int actorHeight = actor.getHeight();\n\n actorPixelX -= actorWidth/2; \n actorPixelY -= actorWidth/2;\n\n if (( pixelX >= actorPixelX && pixelX <= actorPixelX + actorWidth) && ( pixelY >= actorPixelY && pixelY <= actorPixelY + actorHeight) ){\n pickObject(actor);\n break;\n }\n }\n }\n catch(Exception e)\n {\n \n }\n }\n }", "public void enableMultiTouchElementListeners() {\r\n\t\tif (itemListeners == null) {\r\n\t\t\titemListeners = new ArrayList<ItemListener>();\r\n\t\t}\r\n\t\tif (screenCursorListeners == null) {\r\n\t\t\tscreenCursorListeners = new ArrayList<ScreenCursorListener>();\r\n\t\t}\r\n\t\tif (orthoControlPointRotateTranslateScaleListeners == null) {\r\n\t\t\torthoControlPointRotateTranslateScaleListeners = new ArrayList<OrthoControlPointRotateTranslateScaleListener>();\r\n\t\t}\r\n\t\tif (bringToTopListeners == null) {\r\n\t\t\tbringToTopListeners = new ArrayList<BringToTopListener>();\r\n\t\t}\r\n\t\tif (orthoSnapListeners == null) {\r\n\t\t\torthoSnapListeners = new ArrayList<OrthoSnapListener>();\r\n\t\t}\r\n\t\tif (flickListeners == null) {\r\n\t\t\tflickListeners = new ArrayList<OrthoFlickListener>();\r\n\t\t}\r\n\t\t\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addBringToTopListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addItemListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addOrthoControlPointRotateTranslateScaleListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addSnapListener(this);\r\n\t\t((IOrthoContentItemImplementation) this.contentItemImplementation)\r\n\t\t\t\t.addFlickListener(this);\r\n\t}", "public ArrayList<Event> getEvents(){return new ArrayList<Event>(events);}", "private void createEvents() {\n\t}", "@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n LogUtil.d(TAG,\"onTouchEvent()\");\r\n int MAX_TOUCHPOINTS=3;\r\n int pointerCount = event.getPointerCount();\r\n if (pointerCount>MAX_TOUCHPOINTS){\r\n pointerCount = MAX_TOUCHPOINTS;\r\n }\r\n //判断触摸事件是单触摸还是多触摸,\r\n\r\n int touchType = event.getActionMasked();\r\n switch (touchType){\r\n //第一个按下\r\n case MotionEvent.ACTION_DOWN:\r\n ;\r\n break;\r\n //非第一个按下\r\n case MotionEvent.ACTION_POINTER_DOWN:\r\n for(int i=0;i<pointerCount;i++){\r\n int j=event.getPointerId(i);\r\n int x1=(int) event.getX(j);\r\n int y1= (int) event.getY(j);\r\n }\r\n ;\r\n break;\r\n }\r\n\r\n if(event.getAction()==MotionEvent.ACTION_UP){\r\n rocker.reset();\r\n }else{\r\n TouchX=(int) event.getX();\r\n TouchY=(int) event.getY();\r\n if (event.getAction()==MotionEvent.ACTION_DOWN){\r\n rocker.begin(TouchX,TouchY);\r\n }else if (event.getAction()==MotionEvent.ACTION_MOVE){\r\n rocker.update(TouchX,TouchY);\r\n }\r\n }\r\n return true;\r\n }", "private void startTouch(final MotionEvent event) {\n // save the start place\n mTouchStartX = (int)event.getX();\n mTouchStartY = (int)event.getY();\n mListTopStart = getChildTop(getChildAt(0)) - mListTopOffset;\n\n // start checking for a long press\n startLongPressCheck();\n\n // we don't know if it's a click or a scroll yet, but until we know\n // assume it's a click\n mTouchState = TOUCH_STATE_CLICK;\n }", "public List<Event> getEvents() {\n List<Event> events = new ArrayList<>();\n\n Query query = new Query(\"Event\");\n PreparedQuery results = datastore.prepare(query);\n\n for (Entity entity : results.asIterable()) {\n try {\n String idString = entity.getKey().getName();\n UUID eventId = UUID.fromString(idString);\n String speaker = (String) entity.getProperty(\"speaker\");\n String organization = (String) entity.getProperty(\"organization\");\n String eventDate = (String) entity.getProperty(\"eventDate\");\n Location location = (Location) entity.getProperty(\"location\");\n List<String> amenities = getAmenities(eventId);\n String externalLink = (String) entity.getProperty(\"externalLink\");\n PublicType publicType = (PublicType) entity.getProperty(\"publicType\");\n long ownerId = (long) entity.getProperty(\"ownerId\");\n List<ThreadComment> thread = getThread(eventId);\n // long timeStamp = (long) entity.getProperty(\"timestamp\");\n\n Event event = new Event(eventId, speaker, organization, eventDate, location, amenities, externalLink,\n publicType, ownerId);\n event.copyThread(thread);\n events.add(event);\n // An exception can occur here for multiple reasons (Type casting error, any\n // property not existing, key error, etc...)\n } catch (Exception e) {\n System.err.println(\"Error reading event.\");\n System.err.println(entity.toString());\n e.printStackTrace();\n }\n }\n\n return events;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n int action = event.getAction();\n tb.tbOnTouch(action);\n return true;\n }", "public final synchronized IGestureEventListener[] getListeners() {\n if (this.gestureSenderToGestureListener == null) {\n return newArray(0);\n }\n List<IGestureEventListener> list = new ArrayList<IGestureEventListener>();\n\n IGestureEventListener[] listeners = this.gestureSenderToGestureListener.get(null);\n if (listeners != null) {\n list.addAll(Arrays.asList(listeners));\n //for (IGestureEventListener listener : listeners) {\n // list.add(listener);\n //}\n }\n\n for (Entry<Class<? extends IInputProcessor>, IGestureEventListener[]> entry : this.gestureSenderToGestureListener.entrySet()) {\n Class<? extends IInputProcessor> gestureEvtSender = entry.getKey();\n if (gestureEvtSender != null) {\n list.addAll(Arrays.asList(entry.getValue()));\n //for (IGestureEventListener listener : entry.getValue()) {\n // list.add(listener);\n //}\n }\n }\n return list.toArray(newArray(list.size()));\n }", "public final void handleTouchEvent(MotionEvent event, Screen screen)\n {\n\n \tswitch (event.getActionMasked())\n \t{\t\n \t\tcase MotionEvent.ACTION_DOWN:\n \t\tcase MotionEvent.ACTION_POINTER_DOWN:\n \t\t{\tint aidx = event.getActionIndex ();\n\t\t\t\tint id = event.getPointerId(aidx);\n\t\t\t\tif (numactivepointers<activepointerids.length && findActivePointer(id)<0)\n\t\t\t\t{\tactivepointerids[numactivepointers] = id;\n\t\t\t\t\tnumactivepointers++;\n\t\t\t\t\tif (numactivepointers==1)\n\t\t\t\t\t{\tscreen.onPointerDown((int)event.getX(aidx), (int)event.getY(aidx));\n\t\t\t\t\t}\n\t\t\t\t}\n \t\t\tbreak; \t\t\n \t\t}\n \t\tcase MotionEvent.ACTION_UP:\n \t\tcase MotionEvent.ACTION_POINTER_UP:\n \t\t{\t// compensate bug in android: when receiving an up action where pointers are no longer sent, consider the missing pointer as having gone up also\n \t\t\tfor (int i=numactivepointers-1; i>=0; i--)\n \t\t\t{\tif (event.findPointerIndex (activepointerids[i]) < 0)\n \t\t\t\t{\tremoveActivePointerAnSendNotifications(i, screen);\n \t\t\t\t}\n \t\t\t} \t\t \t\t\t\n \t\t\tint aidx = event.getActionIndex ();\n\t\t\t\tint id = event.getPointerId(aidx);\n \t\t\tint activepos = findActivePointer(id);\n \t\t\tif (activepos>=0) \t\t\t\n \t\t\t{\tremoveActivePointerAnSendNotifications(activepos, screen);\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n \t\tcase MotionEvent.ACTION_MOVE:\n \t\t{\t// compensate bug in android: when receiving a move where pointers are no longer sent, consider the missing pointer as having gone up\n \t\t\tfor (int i=numactivepointers-1; i>=0; i--)\n \t\t\t{\tif (event.findPointerIndex (activepointerids[i]) < 0)\n \t\t\t\t{\tremoveActivePointerAnSendNotifications(i, screen);\n \t\t\t\t}\n \t\t\t} \t\t\n \t\t\t// traverse the movement info and build up data accordingly\n \t\t\tfor (int aidx=0; aidx<event.getPointerCount(); aidx++)\n \t\t\t{\tint id = event.getPointerId(aidx);\n \t\t\t\tint activepos = findActivePointer(id);\n \t\t\t\t// sanity check: must have this pointer as active\n \t\t\t\tif (activepos==0)\n \t\t\t\t{\tscreen.onPointerMove((int)event.getX(aidx), (int)event.getY(aidx)); \t\t\t\t\n \t\t\t\t} \t\t\t\n \t\t\t\t// compensate bug in android - when receiving a move without previous pointer-down, inject one \n \t\t\t\telse if (numactivepointers<activepointerids.length)\n\t\t\t\t\t{\tactivepointerids[numactivepointers] = id;\n\t\t\t\t\t\tnumactivepointers++;\n\t\t\t\t\t\tif (numactivepointers==1)\n\t\t\t\t\t\t{\tscreen.onPointerDown((int)event.getX(aidx), (int)event.getY(aidx));\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n \t\tcase MotionEvent.ACTION_CANCEL:\n \t\t{\tif (numactivepointers>0)\n \t\t\t{\tnumactivepointers=0;\n \t\t\t\tscreen.onPointerUp();\n \t\t\t}\n \t\t\tbreak;\n \t\t}\n \t}\n }", "@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tLog.i(\"TestEvent\", \"activity->dispatchTouchEvent \" + TouchEventUtil.getTouchAction(ev.getAction()));\n\t\treturn super.dispatchTouchEvent(ev);\n\t}", "List<IEvent> getEventList(IShape shape);", "public static ArrayList<Events> getEventsArrayList(){\n if (EVENTS_ARRAY_LIST.isEmpty()){\n EVENTS_ARRAY_LIST.addAll(generateEventList());\n }\n return EVENTS_ARRAY_LIST;\n }", "private List<Event> generateEvents() {\n\t\tList<Event> events = new ArrayList<Event>();\n\t\tint numEvents = random.nextInt(2) + 1;\n\t\tfor (int i = 0; i < numEvents; i++) {\n\t\t\tEvent newEvent = null;\n\t\t\tdo {\n\t\t\t\tnewEvent = new Event(db);\n\t\t\t} while (events.contains(newEvent)); // make sure only one instance of an event occurs per turn\n\t\t\tevents.add(newEvent);\t\t\t\n\t\t}\n\t\treturn events;\n\t}", "@Override\n\tprotected void registerTouch() {\n\t\t\n\t}", "public LinearLayout[] Events(){\n Resources r = getResources();\n String name = getPackageName();\n String EventNames[]={\"M\",\"T\",\"W\",\"TH\",\"FR\",\"SA\",\"SU\"};\n LinearLayout Events[]=new LinearLayout[77];\n int value=0;\n for(int i=0;i<7;++i){\n String column=EventNames[i];\n for(int j=8;j<=18;++j){\n LinearLayout temp=(LinearLayout)findViewById(r.getIdentifier(column+\"\"+j,\"id\",name));\n Events[value]=temp;\n ++value;\n }\n\n }\n return Events;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n gestureDetectorCompat.onTouchEvent(event);\n // Return true to tell android OS that event has been consumed, do not pass it to other event list\n // eners.\n return true;\n }", "@Override\r\n\tpublic boolean onTouchEvent(final MotionEvent e) {\n\t\t\r\n\t\treturn true;\r\n\t}", "public boolean onTouchEvent(MotionEvent event) {\n\tif(state==MAIN_MENU || state==RESUME)\n\t{ags.onTouchEvent(event);}\n\t\n\telse if(state==GAME_SCREEN){\n\t//\tat= new AndroidTouch(ag);\n\t\tag.onTouchEvent(event);\n\t}\n\t\n\t\n\treturn super.onTouchEvent(event);\n\t\n}", "public ArrayList<FbEvent> getOngoingEvents() throws SQLException {\n\t\tArrayList<FbEvent> events = new ArrayList<FbEvent>();\n\t\tSQLiteDatabase db = tableHelper.getReadableDatabase();\n\t\ttry {\n\t\t\tCursor cursor = db.query(SQLTablesHelper.MY_EVENT_TABLE_NAME, columns,\n\t\t\t\t\tSQLTablesHelper.MY_EVENT_START_TIME + \" >= ?\",\n\t\t\t\t\tnew String[] {String.valueOf(TimeFrame.getUnixTime(TimeFrame.getTodayDate()))}, \n\t\t\t\t\tnull, null, null);\n\t\t\tcursor.moveToFirst();\n\t\t\twhile (!cursor.isAfterLast()) {\n\t\t\t\tFbEvent event = cursorToEvent(cursor);\n\t\t\t\tevents.add(event);\n\t\t\t\tcursor.moveToNext();\n\t\t\t}\n\t\t\tcursor.close();\n\t\t} finally {\n\t\t\tdb.close();\n\t\t}\n\t\treturn events;\n\t}", "public void onTouchEvent(MotionEvent event) {\n Vector3 v = GLHelper.projectTouchToWorld(renderer.getWidth(), renderer.getHeight(),\n renderer.getCurrentModelView(), renderer.getCurrentProjection(), event.getX(), event.getY());\n\n if (BuildConfig.DEBUG) Log.d(TAG, \"touch: \" + v);\n\n flock.touch(v);\n }", "@Override\n public void touch()\n {\n\n }", "public static void eventList() {\n\t\tfor (Map.Entry<Calendar, TreeSet<Event>> entry : calendarToEvent.entrySet()) {\n\t\t\tTreeSet<Event> value = entry.getValue();\n\t\t\tfor (Event e: value) {\n\t\t\t\tSystem.out.println(e.toString());\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n manager.receiveTouch(event);\n\n return true;\n }", "private void touchStart(float x,float y){\n redoList.clear();\n path = new Path();\n FingerPath fingerPath = new FingerPath(currentColor,strokeWidth,path);\n pathsList.add(fingerPath);\n path.reset();\n path.moveTo(x,y);\n pointX=x;\n pointY=y;\n }", "private void setTouchListener() {\n OnTouchListener mTouchListener = new OnTouchListener() {\n\n private float mLastTouchY;\n private float mLastTouchX;\n private int mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n private int counter = 0; // counter to draw only a second for better rendering\n\n @Override\n public boolean onTouch(View view, MotionEvent motionEvent) {\n\n final int action = motionEvent.getActionMasked();\n\n switch (action) {\n case MotionEvent.ACTION_DOWN: {\n final int pointerIndex = motionEvent.getActionIndex();\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n mLastTouchX = x;\n mLastTouchY = y;\n mActivePointerId = motionEvent.getPointerId(0);\n break;\n }\n\n case MotionEvent.ACTION_MOVE: {\n counter++;\n final int pointerIndex = motionEvent.findPointerIndex(mActivePointerId);\n final float x = motionEvent.getX(pointerIndex);\n final float y = motionEvent.getY(pointerIndex);\n final float dx = x - mLastTouchX;\n final float dy = y - mLastTouchY;\n\n setPositions(dx, dy);\n mLastTouchX = x;\n mLastTouchY = y;\n\n if (counter % 2 == 0) {\n counter = 0;\n mListener.onPositionUpdated();\n }\n break;\n }\n\n case MotionEvent.ACTION_UP: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_CANCEL: {\n mActivePointerId = MotionEvent.INVALID_POINTER_ID;\n break;\n }\n\n case MotionEvent.ACTION_POINTER_UP: {\n\n final int pointerIndex = motionEvent.getActionIndex();\n final int pointerId = motionEvent.getPointerId(pointerIndex);\n\n if (pointerId == mActivePointerId) {\n final int newPointerIndex = pointerIndex == 0 ? 1 : 0;\n mLastTouchX = motionEvent.getX(newPointerIndex);\n mLastTouchY = motionEvent.getY(newPointerIndex);\n setX(mLastTouchX);\n setY(mLastTouchY);\n mActivePointerId = motionEvent.getPointerId(newPointerIndex);\n }\n break;\n }\n }\n return true;\n }\n\n /**update the view position after validate the position is in the parent view\n * @param dx x delta\n * @param dy y delta\n * @return\n */\n private void setPositions(float dx, float dy) {\n\n // prevent the point to be drag outside of the parent layout on the X axis\n if (getX() + dx + 2 * POINT_RADIUS >= ((View) getParent()).getWidth())\n setX(((View) getParent()).getWidth() - 2 * POINT_RADIUS);\n else if (getX() + dx < 0)\n setX(0);\n else\n setX(getX() + dx);\n\n\n // prevent the point to be drag outside of the parent layout on the Y axis\n if (getY() + dy + 2 * POINT_RADIUS > ((View) getParent()).getHeight())\n setY(((View) getParent()).getHeight() - 2 * POINT_RADIUS);\n else if (getY() + dy < 0)\n setY(0);\n else\n setY(getY() + dy);\n\n }\n };\n setOnTouchListener(mTouchListener);\n }", "@Override\n\t\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\t\ttry {\n\t\t\t\treturn super.dispatchTouchEvent(ev);\n\t\t\t} catch (IndexOutOfBoundsException e) {\n\t\t\t\te.printStackTrace();\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}", "@Override\r\n public boolean onTouchEvent(MotionEvent event) {\n return super.onTouchEvent(event);\r\n }", "private ArrayList<Item> getEvents() {\n\t\tArrayList<Item> events = Magical.getStorage().getList(\n\t\t\t\tStorage.EVENTS_INDEX);\n\t\treturn events;\n\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tint action = event.getActionMasked();\n\n\t\tfor(int i = 0; i < event.getPointerCount(); ++i) {\n\t\t\tint id = event.getPointerId(i);\n\t\t\tswitch(action) {\n\t\t\t\tcase MotionEvent.ACTION_DOWN:\n\t\t\t\tcase MotionEvent.ACTION_POINTER_DOWN:\n\t\t\t\t\tif(!circle.select(event.getX(i), event.getY(i), id)) {\n\t\t\t\t\t\t// both should be mutually exclusive\n\t\t\t\t\t\ttriangle.select(event.getX(i), event.getY(i), id);\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_MOVE:\n\t\t\t\t\tcircle.dragTo(event.getX(i), event.getY(i), id);\n\t\t\t\t\ttriangle.dragTo(event.getX(i), event.getY(i), id);\n\t\t\t\t\tbreak;\n\t\t\t\tcase MotionEvent.ACTION_POINTER_UP:\n\t\t\t\tcase MotionEvent.ACTION_UP:\n\t\t\t\t\tcircle.unselect(id);\n\t\t\t\t\ttriangle.unselect(id);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\t\tsuper.onTouchEvent(event);\n\t\t\t}\n\t\t}\n\n\t\treturn true; // fixme\n\t}", "public void listReceivedEvents() {\r\n for (Event event : receivedEvents) {\r\n System.out.print(event);\r\n }\r\n }", "public List<Event> getAllEventsByResponder(String responder_name) {\n List<Event> events = new ArrayList<Event>();\n\n String selectQuery = \"SELECT * FROM \" + EVENTS_TABLE_NAME + \" evt, \"\n + EVENTS_TABLE_NAME + \" resp, \" + RESPONDERS_EVENTS_TABLE_NAME + \" resp_evt WHERE resp.\"\n + EVENT_NAME + \" = '\" + responder_name + \"'\" + \" AND resp.\" + KEY_ID\n + \" = \" + \"resp_evt.\" + RESPONDERS_EVENTS_EVENTS_ID + \" AND evt.\" + KEY_ID + \" = \"\n + \"resp_evt.\" + RESPONDERS_EVENTS_RESPONDERS_ID;\n\n Log.e(LOG, selectQuery);\n\n SQLiteDatabase db = this.getReadableDatabase();\n Cursor c = db.rawQuery(selectQuery, null);\n\n // looping through all rows and adding to list\n if (c.moveToFirst()) {\n do {\n Event evt = new Event();\n evt.setId(c.getInt((c.getColumnIndex(KEY_ID))));\n evt.setEventName((c.getString(c.getColumnIndex(EVENT_NAME))));\n evt.setDate(c.getString(c.getColumnIndex(EVENT_DATE)));\n\n events.add(evt);\n } while (c.moveToNext());\n }\n\n return events;\n }", "public AbstractList<Event> getEvents() {\r\n\t\treturn (AbstractList<Event>) events;\r\n\t}", "static Map<Integer, Event> getEvents() {\n\t\treturn events;\n\t}", "@Test\n public void createManyEventsTest() {\n int numEvents = 8;\n Set<Long> eventSet = new HashSet<>();\n try (Context context = GrCUDATestUtil.buildTestContext().build()) {\n Value createEvent = context.eval(\"grcuda\", \"cudaEventCreate\");\n IntStream.range(0, numEvents).forEach(i -> {\n Value event = createEvent.execute();\n eventSet.add(event.asNativePointer());\n assertNotNull(event);\n assertTrue(event.isNativePointer());\n });\n assertEquals(numEvents, eventSet.size());\n }\n }", "public interface TouchEventListener extends SgEventListener<TouchEvent> {\n}", "@Override\n public boolean onTouchEvent(MotionEvent event)\n {\n return gestureDetector.onTouchEvent(event);\n }", "@Override\n\tpublic Set<Event> getEventsToProcess(Context baseContext) {\n\t\tSet<Event> eventsToProcess = new HashSet<Event>();\n\t\teventsToProcess.add(Event.ElectricOn);\n\t\teventsToProcess.add(Event.ElectricOff);\n\t\teventsToProcess.add(Event.Heat);\n\t\teventsToProcess.add(Event.Water);\n\t\treturn eventsToProcess;\n\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n switch (event.getAction()) {\n case MotionEvent.ACTION_DOWN:\n orig_x = event.getX();\n orig_y = event.getY();\n Log.d(LOGNAME, \"Action down\");\n if (tool == MainActivity.Tool.PENCIL || tool == MainActivity.Tool.HIGHLIGHTER) {\n touch_down_draw(event.getX(), event.getY());\n }\n break;\n case MotionEvent.ACTION_MOVE:\n Log.d(LOGNAME, \"Action move\");\n if (tool == MainActivity.Tool.PENCIL || tool == MainActivity.Tool.HIGHLIGHTER) {\n touch_move_draw(event.getX(), event.getY());\n }\n break;\n case MotionEvent.ACTION_UP:\n Log.d(LOGNAME, \"Action up\");\n if (tool == MainActivity.Tool.PENCIL || tool == MainActivity.Tool.HIGHLIGHTER) {\n touch_up_draw(event.getX(), event.getY());\n }\n if (tool == MainActivity.Tool.ERASER) {\n touch_up_erase(event.getX(), event.getY());\n }\n break;\n }\n return true;\n }", "@SuppressLint(\"ClickableViewAccessibility\")\n @Override\n public boolean onTouchEvent(MotionEvent event) {\n return true;\n }", "public ArrayList<TimeLineEvent> getTimeLineEvents() {\n\t\treturn info;\n\t}", "public ArrayList<Event> getEvents(){\n return this.events;\n }", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\r\n\t}", "public List<EventDesc> getEvents()\r\n {\r\n return Collections.unmodifiableList(events);\r\n }", "@Override\r\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\tthis.mGestureDetector.onTouchEvent( event );\r\n\t\t\r\n\t\t\r\n\t\treturn true;\r\n\t}", "public AutoEvents() {\n super();\n _autoEventList = new ArrayList();\n }", "protected EventListenerList getEventListenerList() {\r\n return listenerList;\r\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event){\n\t\tLog.d(TAG,\"Event \" + event.toString());\n\t\tfloat x = event.getRawX();\n\t\tfloat y = event.getRawY();\n\t\tRectF rect = mView1Enable ? mVirtualRect[0] : mVirtualRect[1];\n\n\t\tif (rect.contains(x,y)) {\n\t\t\tMotionEvent cloneEvent = MotionEvent.obtain(event);\n\t\t\tcloneEvent.offsetLocation(-rect.left, -rect.top);\n\t\t\tLog.d(TAG,\"Event , convent : \" + cloneEvent.toString());\n\t\t\ttry {\n\t\t\t\tmInjectEvent.prepareEvent(cloneEvent, 3);\n\t\t\t\tnew Thread(mInjectEvent).start();\n\t\t\t} catch (Exception e) {\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t}\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\r\n\tpublic void onTouchMove(LTouch e) {\n\t\t\r\n\t}", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n \tthis.count();\n\t\treturn super.onTouchEvent(event);\n\t}", "@Override\n protected void initializeEventList()\n {\n }", "public void processEvents() {\n for(InputEvent event : events) {\n KeyInputEvent keyEvent = (event instanceof KeyInputEvent) ? (KeyInputEvent) event : null;\n if(keyEvent == null) continue;\n\n KeyInputEvent.Type type = keyEvent.getType();\n InputKey key = keyEvent.getKey();\n\n if(type == KeyInputEvent.Type.PRESS) {\n keyStates.put(key, true);\n justPressedKeys.add(keyEvent.getKey());\n } else if(type == KeyInputEvent.Type.RELEASE) {\n keyStates.put(key, false);\n justReleasedKeys.add(keyEvent.getKey());\n }\n }\n }", "@Override\n public boolean onTouchEvent( MotionEvent event )\n {\n if ( gesture_detector.onTouchEvent( event ) )\n {\n return true;\n }\n else\n {\n return super.onTouchEvent( event );\n }\n }", "@Override\n\tpublic Set<Event> getEvents() {\n return events;\n }", "public void onSurfaceCreated(GL10 na, EGLConfig config) {\n //Initializes the touchQueue\n touchQueue = new LinkedList<MotionEvent>();\n }", "java.util.List<tendermint.abci.EventAttribute> \n getAttributesList();", "@Override\n\tpublic double getTouchTime();", "@Override\n\t\t\t\tpublic void onTouchMove() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onTouchMove() {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tsuper.dispatchTouchEvent(ev);\n\t\treturn gdDetector.onTouchEvent(ev);\n\t}", "@Override\r\n\tpublic boolean dispatchTouchEvent(MotionEvent ev) {\n\t\tmGestureDetector.onTouchEvent(ev);\r\n\t\treturn super.dispatchTouchEvent(ev);\r\n\t}", "public int[] enabledEvents() {\n boolean[] userRecordableEvts0 = userRecordableEvts;\n\n int[] enabledEvts = new int[len];\n int enabledEvtsLen = 0;\n\n for (int type = 0; type < len; type++) {\n if (userRecordableEvts0[type])\n enabledEvts[enabledEvtsLen++] = type;\n }\n\n return U.unique(enabledEvts, enabledEvtsLen, inclEvtTypes, inclEvtTypes.length);\n }", "@Override\n public boolean onTouchEvent(MotionEvent e) {\n return gestureDetector.onTouchEvent(e);\n }", "BasicEvents createBasicEvents();", "public void iterateEventList();", "private static List<Event> getMyEvents(List<Registration> registrations) {\n List<Event> result = new ArrayList<>();\n for (Registration registration : registrations) {\n result.add(registration.getEvent());\n }\n return result;\n }", "@Override\n\tpublic boolean onTouchEvent(MotionEvent event) {\n\t\treturn false;\n\t}", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }", "@Override\n public boolean onTouchEvent(MotionEvent event) {\n return false;\n }", "public boolean onTouch(android.view.View r9, android.view.MotionEvent r10) {\n /*\n r8 = this;\n int r9 = r10.getActionMasked()\n r0 = 1\n if (r9 != 0) goto L_0x00b0\n float r9 = r10.getX()\n float r10 = r10.getY()\n int[] r1 = p145c.p146a.p147a.C3243f.C32539.f8747a\n c.a.a.f r2 = p145c.p146a.p147a.C3243f.this\n c.a.a.g r2 = r2.f8735x\n int r2 = r2.ordinal()\n r1 = r1[r2]\n r2 = 0\n switch(r1) {\n case 1: goto L_0x006f;\n case 2: goto L_0x0024;\n default: goto L_0x0021;\n }\n L_0x0021:\n r9 = 0\n goto L_0x00a0\n L_0x0024:\n android.graphics.Rect r1 = new android.graphics.Rect\n r1.<init>()\n c.a.a.f r3 = p145c.p146a.p147a.C3243f.this\n int r3 = r3.getFocusCenterX()\n c.a.a.f r4 = p145c.p146a.p147a.C3243f.this\n int r4 = r4.getFocusWidth()\n int r4 = r4 / 2\n int r3 = r3 - r4\n c.a.a.f r4 = p145c.p146a.p147a.C3243f.this\n int r4 = r4.getFocusCenterX()\n c.a.a.f r5 = p145c.p146a.p147a.C3243f.this\n int r5 = r5.getFocusWidth()\n int r5 = r5 / 2\n int r4 = r4 + r5\n c.a.a.f r5 = p145c.p146a.p147a.C3243f.this\n int r5 = r5.getFocusCenterY()\n c.a.a.f r6 = p145c.p146a.p147a.C3243f.this\n int r6 = r6.getFocusHeight()\n int r6 = r6 / 2\n int r5 = r5 - r6\n c.a.a.f r6 = p145c.p146a.p147a.C3243f.this\n int r6 = r6.getFocusCenterY()\n c.a.a.f r7 = p145c.p146a.p147a.C3243f.this\n int r7 = r7.getFocusHeight()\n int r7 = r7 / 2\n int r6 = r6 + r7\n r1.set(r3, r5, r4, r6)\n int r9 = (int) r9\n int r10 = (int) r10\n boolean r9 = r1.contains(r9, r10)\n goto L_0x00a0\n L_0x006f:\n c.a.a.f r1 = p145c.p146a.p147a.C3243f.this\n int r1 = r1.getFocusCenterX()\n float r1 = (float) r1\n float r1 = r1 - r9\n double r3 = (double) r1\n r5 = 4611686018427387904(0x4000000000000000, double:2.0)\n double r3 = java.lang.Math.pow(r3, r5)\n c.a.a.f r9 = p145c.p146a.p147a.C3243f.this\n int r9 = r9.getFocusCenterY()\n float r9 = (float) r9\n float r9 = r9 - r10\n double r9 = (double) r9\n double r9 = java.lang.Math.pow(r9, r5)\n double r3 = r3 + r9\n double r9 = java.lang.Math.sqrt(r3)\n double r9 = java.lang.Math.abs(r9)\n c.a.a.f r1 = p145c.p146a.p147a.C3243f.this\n float r1 = r1.getFocusRadius()\n double r3 = (double) r1\n int r9 = (r9 > r3 ? 1 : (r9 == r3 ? 0 : -1))\n if (r9 >= 0) goto L_0x0021\n r9 = 1\n L_0x00a0:\n if (r9 == 0) goto L_0x00a3\n return r2\n L_0x00a3:\n c.a.a.f r9 = p145c.p146a.p147a.C3243f.this\n boolean r9 = r9.f8732u\n if (r9 == 0) goto L_0x00b0\n c.a.a.f r9 = p145c.p146a.p147a.C3243f.this\n r9.mo10438b()\n L_0x00b0:\n return r0\n */\n throw new UnsupportedOperationException(\"Method not decompiled: p145c.p146a.p147a.C3243f.C32452.onTouch(android.view.View, android.view.MotionEvent):boolean\");\n }", "public List<ServiceEvent> genEventQueue(){\n for(int i=0; i<serviceNum; i++){\n genEvent(i);\n }\n Collections.sort(eventQueue, new EventComparator());\n return eventQueue;\n }" ]
[ "0.6289324", "0.62176985", "0.6083575", "0.60009366", "0.5968001", "0.5951427", "0.5835167", "0.57553285", "0.5737459", "0.57057863", "0.57003045", "0.56945086", "0.566197", "0.5643141", "0.56064963", "0.5554107", "0.55428493", "0.55337393", "0.5528153", "0.5525259", "0.5504284", "0.5493425", "0.5493313", "0.5481375", "0.5427187", "0.5421007", "0.5408061", "0.53800297", "0.5367339", "0.5347262", "0.53248304", "0.5322983", "0.53136235", "0.5299336", "0.52863675", "0.52854097", "0.5283172", "0.52734286", "0.52690476", "0.52641267", "0.5250395", "0.5246907", "0.5237442", "0.5230883", "0.5229451", "0.52200305", "0.5216602", "0.52051526", "0.520485", "0.5197442", "0.5186913", "0.51427746", "0.51292264", "0.51223934", "0.5112668", "0.5105708", "0.51027936", "0.50883096", "0.508182", "0.5073088", "0.5072657", "0.5070093", "0.50682616", "0.5060633", "0.5052099", "0.5047237", "0.503661", "0.5033679", "0.50259", "0.5025462", "0.50238174", "0.5017964", "0.5017622", "0.5003917", "0.50033873", "0.49951327", "0.49950644", "0.4983409", "0.49637508", "0.49580994", "0.49488088", "0.49479127", "0.4942855", "0.49420622", "0.493781", "0.49311978", "0.49301773", "0.49267587", "0.49267587", "0.49206498", "0.4919241", "0.49184915", "0.4911951", "0.49076027", "0.49045676", "0.49041677", "0.49010208", "0.48966068", "0.48966068", "0.48794153", "0.48753184" ]
0.0
-1
TODO Autogenerated method stub
@Override public void dispose() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
Funcion que rellena la matriz asignacion con valores aleatorios. Los valores aleatorios no superaran la cantidad de recursos existentes
private int[][] llenarAsignacion(int asignacion[][], int maximos[][], int disponibles[]) { //Variables para llenar la matriz asignacion int max, disp, random; int asignados[][] = asignacion; int maxarr[][] = maximos; int disparr[] = disponibles; for(int j = 0; j < asignacion[0].length; j++){ //Extraer la cantidad de tipo de recurso disponible disp = disparr[j]; for(int i = 0; i < asignacion.length; i++){ if(disp > 0){ //Si la cantidad de tipo recurso disponibles es 0, asignar 0 //Extraer valor maximo de tipo de recurso que requiere el proceso max = maxarr[i][j]; //Si el proceso requiere mas recursos de los disponibles, limitar los recursos asignables a los disponibles if(max > disp) { max = disp; } //Asignar una cantidad aleatoria del tipo de recurso, entre 0 y la cantidad maxima posible random = ThreadLocalRandom.current().nextInt(0, max + 1); asignados[i][j] = random; //System.out.println("as "+asignados[i][j]); //Actualizar la cantidad de tipo de recurso disponible disp = disp - random; } else { asignados[i][j] = disp; } } } return asignados; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }", "public void ConceptosMatrices() {\n int[][] maX={{5,6,6},\n {5,6,2},\n {5,12,2},\n {5,6,2}};\n //Obtener el tamaño de la fila de la matriz maX\n System.out.println(\"Tamaño en fila matriz maX=\"+maX.length);\n //Obtener el tamaño de la columna de la matriz maX\n System.out.println(\"Tamaño en fila matriz maX=\"+maX[0].length);\n System.out.println(\"Mostrar el valor 12 de la matriz maX=\"+maX[2][1]);\n //Cambiar el elemento 12 de la matriz maX por 16\n maX[2][1]=16;\n Scanner sc=new Scanner(System.in);\n System.out.println(\"Ingrese un valor en los indices 2,2\");\n maX[2][2]=sc.nextInt();\n \n System.out.println(\"Defina el indice para fila:\");\n int iFx=sc.nextInt(); \n int iCx=sc.nextInt(); \n System.out.println(\"Ingrese un valor en los indices \"+iFx+\", \"+iCx+\":\");\n maX[iFx][iCx]=sc.nextInt(); \n \n imprimirMatriz(maX);\n \n //defenir matrices sin dimensiones\n int[][] matrizN;\n //definiendo dimensiones a una matriz\n System.out.println(\"Ingrese la dimension en fila para la MatrizN=\");\n int inFi=sc.nextInt();\n System.out.println(\"Ingrese la dimension en columna para la MatrizN=\");\n int inCo=sc.nextInt();\n matrizN=new int[inFi][inCo]; \n int vi=0;\n //Rellenando una matriz con una serie de numeros\n for (int f = 0; f < matrizN.length; f++) {\n for (int c = 0; c < matrizN[0].length; c++) {\n System.out.println(\"Ingrese un valor en matrizN[\"+f+\"][\"+c+\"]:=\");\n matrizN[f][c]=sc.nextInt();\n vi=vi+2;\n } \n } \n System.out.println(\"la nueva matrizN es de: \"+matrizN.length+\"x\"+matrizN[0].length);\n imprimirMatriz(matrizN); \n\n }", "public void matrizInversa(){\n for (int i = 0; i < 3; i++) {\n for (int j = 0; j < 3; j++) {\n //System.out.println(\"\");getDeter();\n getMatriz()[i][j] = getMatrizAdjunta()[i][j]/getDeter();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inversa\");\n }", "public static void main(String[] args) {\n int cols1, cols2, rows1, rows2, num_usu1, num_usu2;\r\n \r\n try{\r\n \r\n cols1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a primeira matriz:\"));\r\n rows1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a primeira matriz:\"));\r\n cols2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de colunas para a segunda matriz:\"));\r\n rows2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe o numero de linhas para a segunda matriz:\"));\r\n \r\n int[][] matriz1 = MatrixInt.newRandomMatrix(cols1, rows1);\r\n int[][] matriz2 = MatrixInt.newSequentialMatrix(cols2, rows2);\r\n \r\n System.out.println(\"Primeira matriz:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Segunda matriz:\");\r\n MatrixInt.imprimir(matriz2);\r\n System.out.println(\" \");\r\n \r\n MatrixInt.revert(matriz2);\r\n \r\n System.out.println(\"Matriz sequancial invertida:\");\r\n MatrixInt.imprimir(matriz2);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n System.out.println(\" \");\r\n \r\n num_usu1 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero qualquer:\"));\r\n \r\n for1: for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 == matriz1[i][j]){\r\n System.out.println(\"O numero '\"+num_usu1+\"' foi encontardo na posição:\" + i);\r\n break for1;\r\n }else if(j == (matriz1[i].length - 1) && i == (matriz1.length - 1)){\r\n System.out.println(\"Não foi encontrado o numero '\"+num_usu1+\"' no vetor aleatorio.\");\r\n break for1;\r\n } \r\n }\r\n }\r\n \r\n String menores = \"\", maiores = \"\";\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n if(num_usu1 > matriz1[i][j]){\r\n menores = menores + matriz1[i][j] + \", \";\r\n }else if(num_usu1 < matriz1[i][j]){\r\n maiores = maiores + matriz1[i][j] + \", \";\r\n }\r\n }\r\n }\r\n System.out.println(\" \");\r\n System.out.print(\"Numeros menores que '\"+num_usu1+\"' :\");\r\n System.out.println(menores);\r\n System.out.print(\"Numeros maiores que '\"+num_usu1+\"' :\");\r\n System.out.println(maiores);\r\n \r\n num_usu2 = Integer.parseInt(JOptionPane.showInputDialog(\"Informe um numero que exista na matriz aleatoria:\"));\r\n \r\n int trocas = MatrixInt.replace(matriz1, num_usu2, num_usu1);\r\n \r\n if (trocas == 0) {\r\n System.out.println(\" \");\r\n System.out.println(\"Não foi realizada nenhuma troca de valores.\");\r\n }else{\r\n System.out.println(\" \");\r\n System.out.println(\"O numero de trocas realizadas foi: \"+trocas);\r\n }\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria:\");\r\n MatrixInt.imprimir(matriz1);\r\n \r\n int soma_total = 0;\r\n for (int i = 0; i < matriz1.length; i++) {\r\n for (int j = 0; j < matriz1[i].length; j++) {\r\n soma_total += matriz1[i][j];\r\n }\r\n \r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"A soma dos numeros da matriz foi: \" + soma_total);\r\n \r\n System.out.println(\" \");\r\n System.out.println(\"Matriz aleatoria\");\r\n Exercicio2.imprimir(matriz1);\r\n System.out.println(\" \");\r\n System.out.println(\"Matriz sequencial\");\r\n Exercicio2.imprimir2(matriz2);\r\n \r\n }catch(Exception e){\r\n System.out.println(e);\r\n }\r\n \r\n \r\n \r\n }", "void iniciaMatriz() {\r\n int i, j;\r\n for (i = 0; i < 5; i++) {\r\n for (j = 0; j <= i; j++) {\r\n if (j <= i) {\r\n m[i][j] = 1;\r\n } else {\r\n m[i][j] = 0;\r\n }\r\n }\r\n }\r\n m[0][1] = m[2][3] = 1;\r\n\r\n// Para los parentesis \r\n for (j = 0; j < 7; j++) {\r\n m[5][j] = 0;\r\n m[j][5] = 0;\r\n m[j][6] = 1;\r\n }\r\n m[5][6] = 0; // Porque el m[5][6] quedo en 1.\r\n \r\n for(int x=0; x<7; x++){\r\n for(int y=0; y<7; y++){\r\n // System.out.print(\" \"+m[x][y]);\r\n }\r\n //System.out.println(\"\");\r\n }\r\n \r\n }", "void resDiagonale(){ \r\n for (int i = 0; i<N; i=i+nCarre) \r\n \tresCarre(i, i); \r\n }", "public void matrizAdjunta (){\n float tablaA[][]= getMatriz();\n setMatrizAdjunta(new float[3][3]);\n getMatrizAdjunta()[0][0]=(tablaA[1][1]*tablaA[2][2]) - (tablaA[1][2]*tablaA[2][1]);\n getMatrizAdjunta()[0][1]=-((tablaA[0][1]*tablaA[2][2]) - (tablaA[0][2]*tablaA[2][1]));\n getMatrizAdjunta()[0][2]=(tablaA[0][1]*tablaA[1][2]) - (tablaA[0][2]*tablaA[1][1]);\n \n getMatrizAdjunta()[1][0]=-((tablaA[1][0]*tablaA[2][2]) - (tablaA[1][2]*tablaA[2][0]));\n getMatrizAdjunta()[1][2]=-((tablaA[0][0]*tablaA[1][2]) - (tablaA[0][2]*tablaA[1][0]));\n getMatrizAdjunta()[1][1]=(tablaA[0][0]*tablaA[2][2]) - (tablaA[0][2]*tablaA[2][0]);\n \n getMatrizAdjunta()[2][0]=(tablaA[1][0]*tablaA[2][1]) - (tablaA[1][1]*tablaA[2][0]);\n getMatrizAdjunta()[2][1]=-((tablaA[0][0]*tablaA[2][1]) - (tablaA[0][1]*tablaA[2][0]));\n getMatrizAdjunta()[2][2]=(tablaA[0][0]*tablaA[1][1]) - (tablaA[0][1]*tablaA[1][0]);\n mostrarMatriz(getMatrizAdjunta(),\"Matriz adjunta\");\n }", "Matriz evaluar(Matriz A);", "public Matrix[] palu() {\n\t\tHashMap<Integer, Integer> permutations = new HashMap<Integer,Integer>();\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tpermutations.put(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\tMatrix p = identity(m.M);\n\t\tfor (Integer rowI : permutations.keySet()) {\n\t\t\tp.rowSwitch(rowI, permutations.get(rowI));\n\t\t}\n\t\tMatrix l = identity(m.M);\n\t\tMatrix u = p.multiply(copy());\n\t\t\n\t\tpivotRow = 0;\n\t\tfor (int col = 0; col < u.N; col++) {\n\t\t\tif (pivotRow < u.M) {\n\t\t\t\t// Should not have to do any permutations\n\t\t\t\tif (!u.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < u.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = u.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = u.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tu = u.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t\tl = l.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\t\n\t\tl = l.inverse();\n\t\tMatrix[] palu = {p, this, l, u};\n\t\treturn palu;\n\t}", "public void inicialAleatorio() {\n //aqui adiciona naquele vetor que de auxilio\n alocacao.add(Estados.ELETRICISTAS);\n alocacao.add(Estados.ELETRICISTAS2);\n alocacao.add(Estados.QUALIDADE);\n alocacao.add(Estados.QUALIDADE2);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL2);\n alocacao.add(Estados.FABRICACAO_ESTRUTURAL3);\n alocacao.add(Estados.PLANEJAMENTO);\n\n //biblioteca que sorteia aleatoriamente os departamentos\n Collections.shuffle(alocacao);\n\n for (int i = 0; i < 4; i++) {\n matrix[1][i] = alocacao.get(i);\n\n }\n\n for (int i = 0; i < 4; i++) {\n matrix[3][i] = alocacao.get(i + 4);\n }\n\n }", "public static String[][] acomodamiento(char direccion, String[][] cuadricula) {\n int numeroA;\n int espacios;\n for (int fila = 0; fila < 4; fila++) {\n\n for (int columna = 0; columna < 4; columna++) {\n\n switch (direccion) {\n case 'w':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia, cuando la encuentra mueve desde esa posicion hacia arriba\n del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[columna][fila].equals(\" \") == false) {\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n //Verigica si hay un numero igual arriba suyo para sumarse\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento - 1][fila])) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de arriba\n */\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento - 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento - 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento - 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion arriba la sustituye la de abajo\n else if (cuadricula[vecesMovimiento - 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento - 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 's':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de abajo para arriba, cuando la encuentra mueve\n desde esa posicion hacia abajo del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[3 - columna][fila].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de abajo de la matriz\n // llegaremos hasta 2 ya que sigue comparando con una posicion abajo extra gracias al +1\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de abajo\n */\n if (cuadricula[vecesMovimiento][fila].equals(cuadricula[vecesMovimiento + 1][fila])) {\n numeroA = Integer.parseInt(cuadricula[vecesMovimiento][fila].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[vecesMovimiento + 1][fila] = Integer.toString(numeroA);\n /* desde la parte de espacios = 4 - cuadricula[vecesMovimiento-1]... hasta el for solo es el numero de espacios agregados al numero que dara\n para que se mantenga posicionado junto con la cuadricula\n */\n espacios = 4 - cuadricula[vecesMovimiento + 1][fila].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[vecesMovimiento + 1][fila] += \" \";\n }\n cuadricula[vecesMovimiento][fila] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion abajo la sustituye la de arriba\n else if (cuadricula[vecesMovimiento + 1][fila].equals(\" \")) {\n cuadricula[vecesMovimiento + 1][fila] = cuadricula[vecesMovimiento][fila];\n cuadricula[vecesMovimiento][fila] = \" \";\n }\n }\n }\n break;\n\n case 'a':\n /*Creamos una condicion que empezara a mover los numeros si la posicion en esa parte\n de la matriz no esta vacia,tomando en cuenta que inicia a contar de izquierda a derecha, cuando la encuentra mueve\n desde esa posicion hacia la izquierda del cuadro y si se encuentra alguna parte igual la suma , si esta vacia la remplaza y si no se queda igual\n */\n if (cuadricula[fila][columna].equals(\" \") == false) {\n //Empezamos el ciclo en una posicion de la izquierda de la matriz, es decir inicializada en 0\n for (int vecesMovimiento = columna; vecesMovimiento > 0; vecesMovimiento--) {\n /* Como los numeros son iguales se toma uno, se convierte el string de esa parte de la cuadricula a\n numeroA la duplica y se la agrega a la posicion de izquierda\n */\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento - 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento - 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento - 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento - 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } //Condicion que indica si hay un espacio vacio en una posicion izquierda la sustituye la de derecha\n else if (cuadricula[fila][vecesMovimiento - 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento - 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n //Lo mismo establecido pero orientado a la derecha, y en lugar del -1 de los vectores lo pasamos como +1 siguiendo la estructura\n //de la opcion 's'\n case 'd':\n if (cuadricula[fila][3 - columna].equals(\" \") == false) {\n for (int vecesMovimiento = 3 - columna; vecesMovimiento < 3; vecesMovimiento++) {\n if (cuadricula[fila][vecesMovimiento].equals(cuadricula[fila][vecesMovimiento + 1])) {\n numeroA = Integer.parseInt(cuadricula[fila][vecesMovimiento].replaceAll(\" \", \"\"));\n numeroA += numeroA;\n cuadricula[fila][vecesMovimiento + 1] = Integer.toString(numeroA);\n espacios = 4 - cuadricula[fila][vecesMovimiento + 1].length();\n for (int barras = espacios; barras > 0; barras--) {\n cuadricula[fila][vecesMovimiento + 1] += \" \";\n }\n cuadricula[fila][vecesMovimiento] = \" \";\n } else if (cuadricula[fila][vecesMovimiento + 1].equals(\" \")) {\n cuadricula[fila][vecesMovimiento + 1] = cuadricula[fila][vecesMovimiento];\n cuadricula[fila][vecesMovimiento] = \" \";\n }\n }\n }\n break;\n\n }\n\n }\n }\n return cuadricula;\n }", "public void llenarMatriz(){\n Scanner in = new Scanner(System.in);\n setMatriz(new float[3][3]);\n //int matriz1[][] ={{2,3,1},{1,-1,2},{0,1,0}};\n //int matriz1[][] ={{5,-2,3},{1,2,2},{-4,-1,3}};\n //float matriz1[][] ={{1,-2,5},{3,3,-1},{0,4,-2}};\n for(int i=0;i<3;i++){\n for(int j=0;j<3;j++){\n System.out.println(\"Ingresa valor la posición [\"+i+\"][\"+j+\"]\");\n getMatriz()[i][j]= in.nextInt();\n }\n }\n mostrarMatriz(getMatriz(),\"Matriz inicial\");\n }", "private static int[][] fillWithSum(int[][] matrix) {\n if (null == matrix || matrix.length == 0) {\n return null;\n }\n\n int M = matrix.length;\n int N = matrix[0].length;\n\n // fill leetcoce.matrix such that at given [i,j] it carries the sum from [0,0] to [i,j];\n int aux[][] = new int[M][N];\n\n // 1 2 3\n // 4 5 6\n // 7 8 9\n\n // 1. copy first row of leetcoce.matrix to aux\n for (int j = 0; j < N; j++) {\n aux[0][j] = matrix[0][j];\n }\n // after 1,\n // 1 2 3\n // 0 0 0\n // 0 0 0\n\n // 2. Do column wise sum\n for (int i = 1; i < M; i++) {\n for (int j = 0; j < N; j++) {\n aux[i][j] = matrix[i][j] + aux[i-1][j]; // column wise sum\n }\n }\n // after 2,\n // 1 2 3\n // 5 7 9\n // 12 15 18\n\n // 3. Do row wise sum\n for (int i = 0; i < M; i++) {\n for (int j = 1; j < N; j++) {\n aux[i][j] += aux[i][j-1];\n }\n }\n // after 3,\n // 1 3 6\n // 5 12 21\n // 12 27 45\n\n // sum between [1,1] to [2,2] = 45 + 1 - 12 - 6 = 46 - 18 = 28\n return aux;\n }", "private void buildMatrix() {\n\n int totalnumber=this.patents.size()*this.patents.size();\n\n\n\n int currentnumber=0;\n\n\n for(int i=0;i<this.patents.size();i++) {\n ArrayList<Double> temp_a=new ArrayList<>();\n for (int j=0;j<this.patents.size();j++) {\n if (i==j) temp_a.add(0.0); else if (i<j)\n {\n double temp = distance.distance(this.patents.get(i), this.patents.get(j));\n temp = (new BigDecimal(temp).setScale(2, RoundingMode.UP)).doubleValue();\n temp_a.add(temp);\n\n\n // simMatrix.get(i).set(j, temp);\n // simMatrix.get(j).set(i, temp);\n } else {\n temp_a.add(simMatrix.get(j).get(i));\n }\n currentnumber++;\n System.out.print(\"\\r\"+ProgressBar.barString((int)((currentnumber*100/totalnumber)))+\" \"+currentnumber);\n\n }\n simMatrix.add(temp_a);\n }\n System.out.println();\n\n }", "public static void main(String[] args) {\r\n\t\t\r\n\t\tScanner input = new Scanner(System.in);\r\n\t\t\r\n\t\tSystem.out.print(\"Unesite velicinu n x n matrice: \");\r\n\t\tint n = input.nextInt(); // unos n x n matrice n = broj redova i kolona matrice\r\n\r\n\t\tint[][] matrix = new int[n][n];\r\n\t\tArrayList<Integer> maxR = new ArrayList<>();\r\n\t\tArrayList<Integer> maxK = new ArrayList<>();\r\n\r\n\t\tSystem.out.println(\"Matrica: \");\r\n\t\tfor(int i=0; i<matrix.length; i++) {\r\n\t\t\tfor(int j=0; j<matrix[0].length; j++) {\r\n\t\t\t\tmatrix[i][j] = (int)(Math.random()*2); // punjenje matrice integerima 0 i 1\r\n\t\t\t\tSystem.out.print(matrix[i][j] + \" \"); // ispis matrice u konzolu\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t\t\r\n\t\tint sumaR = 0, sumaK = 0, totalSumaR, totalSumaK, nula = 0;\r\n\t\t\r\n\t\tfor(int j=0; j<matrix[0].length; j++) {\r\n\t\t\tsumaR += matrix[0][j]; // suma reda matrice\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i=0; i<matrix.length; i++) {\r\n\t\t\tsumaK += matrix[i][0]; // suma kolona matrice\r\n\t\t}\r\n\t\tfor(int i=0; i<matrix.length; i++) { // za sve elemente matrice\r\n\t\t\ttotalSumaR = 0;\r\n\t\t\ttotalSumaK = 0;\r\n\t\t\tfor(int j=0; j<matrix[i].length; j++) {\r\n\t\t\t\ttotalSumaR += matrix[i][j]; // suma svih redova matrice\r\n\t\t\t\ttotalSumaK += matrix[j][i]; // suma svih kolona matrice\r\n\t\t\t\tif(totalSumaR > sumaR) { // ako bilo koji red matrice ima vecu sumu od sume prvog reda matrice\r\n\t\t\t\t\tsumaR = totalSumaR; // taj red postaje red sa najvecom sumom\r\n\t\t\t\t\tmaxR.clear(); // brisu se stare pozicije redova sa najvecom sumom\r\n\t\t\t\t\tmaxR.add(i); // ubacivanje broja indexa reda sa najvecom sumom u listu\t\r\n\t\t\t\t} else if(totalSumaR == sumaR) { // ako je ukupna suma zadnjeg reda jednak najvecoj sumi reda\r\n\t\t\t\t\t//maxR.clear(); brisu se ostale pozicije redova sa najvecom sumom u listi (ako trazimo samo zadnji red sa najvise 1)\r\n\t\t\t\t\tmaxR.add(i); // dodaje se krajnja pozicija najvece sume reda u listi\r\n\t\t\t\t}\r\n\t\t\t\tif(totalSumaK > sumaK) { // ako bilo koja kolona matrice ima vecu sumu od sume prve kolone matrice\r\n\t\t\t\t\tsumaK = totalSumaK; // ta kolona postaje kolona sa najvecom sumom\r\n\t\t\t\t\tmaxK.clear(); // brisu se stare pozicije kolone sa najvecom sumom\r\n\t\t\t\t\tmaxK.add(i); // ubacivanje broja indexa kolone sa najvecom sumom u listu\r\n\t\t\t\t} else if(totalSumaK == sumaK) { // ako je ukupna suma zadnje kolone jednaka najvecoj sumi kolone\r\n\t\t\t\t\t//maxK.clear(); brisu se ostale pozicije kolona sa najvecom sumom u listi (ako trazimo samo zadnju kolonu sa najvise 1)\r\n\t\t\t\t\tmaxK.add(i); // dodaje se krajnja pozicija najvece sume kolone u listi\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tif(maxR.isEmpty()) { // ako je lista prazna\r\n\t\t\tmaxR.add(nula); // ubaci u listu 0\r\n\t\t}\r\n\t\tSystem.out.print(\"Redovi sa najvise jedinica su: \");\r\n\t\tfor(int i=0; i<maxR.size(); i++) {\r\n\t\t\tSystem.out.print(maxR.get(i) + \" \"); // ispis pozicija najvece sume redova iz liste\r\n\t\t}\r\n\t\tif(maxK.isEmpty()) { // ako je lista prazna\r\n\t\t\tmaxK.add(nula); // ubaci u listu 0\r\n\t\t}\r\n\t\tSystem.out.print(\"\\nKolone sa najvise jedinica su: \");\r\n\t\tfor(int i=0; i<maxK.size(); i++) {\r\n\t\t\tSystem.out.print(maxK.get(i) + \" \"); // ispis pozicija najvece sume kolona iz liste\r\n\t\t}\r\n\t\t\r\n\t\tinput.close();\r\n\t}", "public int[][] turfu() {\r\n\t\tint[][] tab = new int[matrice[0].length][matrice.length]; \r\n\t\tint n =0; \r\n\t\tfor(int i=0; i<tab.length; i++) {\r\n\t\t\tfor(int j=0; j< tab[0].length; j++) {\r\n\t\t\t\ttab[i][j] = matrice[j][n]; \r\n\t\t\t}\r\n\t\t\tn++;\r\n\t\t}\r\n\t\treturn tab; \r\n\t}", "public void actualizarAristas(Arista movimiento){\n \n //Actualizamos la ubicacion de la hormiga\n for (int i = 0; i < matriz.length; i++) {\n if (movimiento.getFin().equals(matriz[0][i].getFin())) {\n ubicacion = i; \n }\n }\n \n //Actualizamos la lista de aristas a la cual se puede viajar desde la ubicacion actual\n aristas.clear();\n \n for (int i = 0; i < matriz.length; i++) { \n if (i != ubicacion) {\n aristas.add(matriz[ubicacion][i]);\n } \n }\n \n //Actualizamos las ciudades que ha visitado la hormiga\n visitados.add(aristas.get(0).getInicio());\n \n //A la lista de aristas, le borramos las aristas que conducen a ciudades que ya ha visitado la hormiga\n for (int k = 0; k < visitados.size(); k++) {\n for (int i = 0; i < aristas.size(); i++) {\n for (int j = 0; j < visitados.size(); j++) {\n if (aristas.get(i).getFin().equals(visitados.get(j))) { \n aristas.remove(i);\n i = 20;\n j = 20;\n }\n }\n }\n }\n \n //Continuamos actualizando la historia del recorrido de la hormiga\n recorrido = recorrido + \" \" + String.valueOf(movimiento.getDistancia()) + \" unidades hasta \" + movimiento.getFin() + \",\";\n \n }", "private void pasar_a_matriz_adyacencia() {\n table_panel1.eliminar_All();//elimino todo los elemento de la matrices\n Grafo g = panel.getGrafo();//saco el grafo del panel\n data_fila[] dato = new data_fila[g.size_vertice()];//hago de una arreglo de vectores \n for (int i = 0; i < g.size_vertice(); i++) {//estructuras de datos\n dato[i] = new data_fila();\n }\n\n for (int i = 0; i < g.size_vertice(); i++) {\n Vertices A = g.get_vertices(i);\n dato[i].setNombre(A.getNombre());\n for (int j = 0; j < g.size_vertice(); j++) {\n if (j != i) {\n Vertices B = g.get_vertices(j);\n int peso =A.adyacencia(B);\n if (peso != Integer.MIN_VALUE) {\n dato[i].setArry(j, peso);\n }\n\n }\n }\n table_panel1.add(dato[i]);\n }\n }", "private static void calcularRota() throws CloneNotSupportedException {\n Entregas matriz = new Entregas(entradas);\n rotas = matriz.processarEntregas();\n }", "@Override\n\tpublic void setMatrix(int n) {\n\t\tthis.baris = DeretAngka.getLastTriAngluar(n);\n\t\tthis.kolom = n*n;\n\t\tthis.matrix = new String[this.baris][this.kolom];\n\t\t//int[] bil1 = {1,2,3,4};\n\t\t//int[] bil2 = {1,3,5,7};\n\t\t//int[] bil3 = {0,1,2,3};\n\t\tint[] bil4 = DeretAngka.getTriAngluar(n);//{0,1,3,6};\n\t\tint[] bil5 = DeretAngka.getPangkat(n);//{0,1,4,9};\n\t\tint addBangun = 1;\n\t\tint addGanjil = 1;\n\t\tfor(int bangun =0; bangun < n; bangun++) {\n\t\t\t//int pangkat = bangun * bangun; //0*0,1*1,2*2,3*3\n\t\t\tfor (int i = 0; i < addBangun; i++) {\n\t\t\t\tfor (int j = 0; j < addGanjil; j++) {\n\t\t\t\t\tif(i+j >= bangun && j - i <= bangun) {\n\t\t\t\t\t\tthis.matrix[i + bil4[bangun]][j+bil5[bangun]] = \"*\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\taddBangun = addBangun + 1;\n\t\t\taddGanjil = addGanjil + 2;\n\t\t}\n\t\t\n\t\t\n//\t\tfor (int i = 0; i < bil1[0]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[0]; j++) {\n//\t\t\t\tif(i+j >= 0 && j - i <= 0) {\n//\t\t\t\t\tthis.matrix[i+0][j+0] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[1]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[1]; j++) {\n//\t\t\t\tif(i+j >= 1 && j - i <= 1) {\n//\t\t\t\t\tthis.matrix[i+1][j+1] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n//\t\tfor (int i = 0; i < bil1[2]; i++) {\n//\t\t\tfor (int j = 0; j < bil2[2]; j++) {\n//\t\t\t\tif(i+j >= 2 && j - i <= 2) {\n//\t\t\t\t\tthis.matrix[i+3][j+4] = \"*\";\n//\t\t\t\t}\n//\t\t\t\t\n//\t\t\t}\n//\t\t}\n\t\t\n\t}", "public static void matrixDis()\n\t{\n\t\t\n\t\tclade = clad[k];\n\t\t//System.err.println(\"\\n\\n\" + clade.cladeName);\n\n\t\tfor(c=0; c<clade.numSubClades; c++)\n\t\t{\n\t\t\tclade.Dc[c]=0;\n\t\t\tclade.Dn[c]=0;\n\t\t\t//clade.varDc[c]=0;\n\t\t\t//clade.varDn[c]=0;\n\t\t\tsum1 = sum2 = sum3 = 0;\n\t\t\tsumc1 = sumc2 = sumc3 = 0;\n\n\t\t\tfor(i=0; i<clade.numCladeLocations; i++) \t\n\t\t\t{\t\n\t\t\t\t\n\t\t\t\tsum2 += clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2 ;\n\t\t\t\tsumc2 += (clade.obsMatrix[c][i] * (clade.obsMatrix[c][i]-1) / 2) + \n\t\t\t (clade.obsMatrix[c][i] * (clade.columnTotal[i] - clade.obsMatrix[c][i]));\t\n\t\t\t\n\t\t\t\tfor (j=0; j<clade.numCladeLocations; j++)\n\t\t\t\t{\t\n\t\t\t\t\tpopA = clade.cladeLocIndex[i];\n\t\t\t\t\tpopB = clade.cladeLocIndex[j];\n\t\t\t\t\t\n\t\t\t\t\tif (j != i)\n\t\t\t\t\t{\n\t\t\t\t\t\tsum1 += (double) clade.obsMatrix[c][i] * clade.obsMatrix[c][j] * distance[popA-1][popB-1];\n\t\t\t\t\t\tsum3 += clade.obsMatrix[c][i] * clade.obsMatrix[c][j];\t\t\t\n\t\t\t\t\t\tsumc1 += (double) clade.obsMatrix[c][i] * clade.columnTotal[j] * distance[popA-1][popB-1];\t\n\t\t\t\t\t\tsumc3 += clade.obsMatrix[c][i] * clade.columnTotal[j];\n\t\t\t\t\t\t//System.err.println(\"\\npopA = \" + popA + \" popB = \" + popB + \" dist= \" + distance[popA-1][popB-1]);\n\t\t\t\t\t\t//System.err.println(\"sumc1: \" + clade.obsMatrix[c][i] + \" * \" + clade.columnTotal[j] +\" * \" + distance[popA-1][popB-1] + \" = \" + sumc1); \n\t\t\t\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\t\t\t\t//System.err.println(\"\\nCT[\" + j +\"]= \" + clade.columnTotal[j]); \n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} \n\n\t\t\t//System.err.println(\"\\nOBS[\" + c +\"][\" + i+ \"]= \" + clade.obsMatrix[c][i]); \n\t\t\n\t\t\t\n\t\t\tif (sum3 == 0.0)\n\t\t\t\tclade.Dc[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dc[c] = sum1 / (sum2 + sum3);\t\t\t\t\n\t\n\t\n\t\t\tif (sumc3 == 0.0)\n\t\t\t\tclade.Dn[c] = 0.0;\n\t\t\telse\n\t\t\t\tclade.Dn[c] = sumc1 / (sumc2 + sumc3);\t\t\t\t\t\t\t\n\t\t\t\t\n\t\t\t//System.err.println(\"\\nClade \" + clade.cladeName + \" subclade \" + c + \n\t\t\t// \" Dc= \" + clade.Dc[c] + \" Dn= \" + clade.Dn[c]); \t\t\n\t\t\t//System.err.println(\"sum1= \" + sum1 + \" sum2= \" + sum2 + \" sum3= \" + sum3); \n\t\t\t//System.err.println(\"sumc1= \" + sumc1 + \" sumc2= \" + sumc2 + \" sumc3= \" + sumc3); \t\n\t\t}\t\t\n\n\t}", "public static List<List<Integer>> findMatrix(List<List<Integer>> a) {\n List<List<Integer>> res = new ArrayList<>();\n for (int i = 0; i < a.size(); i++) {\n List<Integer> rowi = a.get(i);\n List<Integer> temp = new ArrayList<>();\n int prev = 0;\n for (int j = 0; j < rowi.size(); j++) {\n if (i == 0) {\n int curr = rowi.get(j);\n temp.add(prev + curr);\n prev += curr;\n } else {\n int curr = rowi.get(j);\n int lastSum = res.get(i - 1).get(j);\n temp.add(prev + curr + lastSum);\n prev += curr;\n }\n }\n res.add(temp);\n }\n return res;\n }", "public static String[][] leerPedidosUsuario(String matricula) {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales where matricula = '\" + matricula + \"'\");\n \n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM totales where matricula = '\" + matricula + \"'\");\n while (result.next()) {\n //leo los registros y los guardo cada uno en un renglon de la matriz \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"Enter n :\");\n\t\tScanner scanner = new Scanner(System.in);\n\t\tint num = scanner.nextInt();\n\t\t\n\t\tint mat[][] = new int[num][num];\n\t\tint mirr[][] = new int[num][num];\n\t\t\n\t\tint sum =0;\n\t\t\n\t\tfor(int i =0; i<num;i++)\n\t\t{\n\t\t\tfor(int j=0;j<num;j++)\n\t\t\t{\n\t\t\t System.out.println(\"Enter \"+i+\"\"+j+\" matrix\");\n\t\t\t int data = scanner.nextInt();\n\t\t\t\tmat[i][j]=data;\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t\n\t\t System.out.println(\"Original Matrix is :\");\n\t \n\t \n\t for(int i =0; i<num;i++)\n\t\t\t{\n\t\t\t\tfor(int j=0;j<num;j++)\n\t\t\t\t{\n\t\t\t\t \n\t System.out.print(mat[i][j]+\" \");\n\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t \n\t\t\n\t\t\n\t\tfor(int i =0; i<num;i++)\n\t\t{\n\t\t\tint img = 0;\n\t\t\tfor(int j=num-1;j>=0;j--)\n\t\t\t{\n\t\t\t \n\n int temp = mat[i][j];\n mirr[i][img]=temp;\n img++;\n\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\t\n\t\n\t \n\t\t\n\t\t\n\t\t\n System.out.println(\"\\n2Mirror Matrix is :\");\n \n \n for(int i =0; i<num;i++)\n\t\t{\n\t\t\tfor(int j=0;j<num;j++)\n\t\t\t{\n\t\t\t \n System.out.print(mirr[i][j]+\" \");\n\t\t\t\n\t\t\t\t\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n \n \n \n\t}", "public void redimensionarArray() {\r\n\t\t\r\n\t\tint nuevaCapacidad = tamanioArrayPosicionesCelulas * 2;\r\n\t\t// Copia los arrays originales y les da la nueva capacidad se quiere tener.\r\n\t\tfilasDeCelulas = Arrays.copyOf(filasDeCelulas, nuevaCapacidad);\r\n\t\tcolumnasDeCelulas = Arrays.copyOf(columnasDeCelulas, nuevaCapacidad);\r\n\t\t\r\n\t\t// Actualizamos el valor del array.\r\n\t\ttamanioArrayPosicionesCelulas = nuevaCapacidad;\r\n\t}", "public static int[][] trabalhaMatriz(QRCode qr, BitVector vector){\n \tint versao = qr.getVersion().getBits();\n \tint ecLevel = qr.getErrorCorrectionLevel().getBits();\n int[][] a = new int[largura][altura];\n\n //instanciacao elemento a elemento dos arrays\n int m=0, n=0;\n for(m=0; m<largura; m++)\n for(n=0; n<altura; n++)\n a[m][n]=3; //valor de iniciacao = indica disponibilidade de uso\n\n //System.err.println(\"Debugando em 2\");\n \n //Desenha os Detectores de Posicao da Mascara\n int aX=3, aY=3;\n\n //formando os quadrados de dentro pra fora\n //quadrado superior esquerdo\n a[aX][aY]=1;\n a[aX-1][aY-1]=1; a[aX][aY-1]=1;a[aX+1][aY-1]=1;a[aX+1][aY]=1;a[aX+1][aY+1]=1;a[aX][aY+1]=1;a[aX-1][aY+1]=1;a[aX-1][aY]=1;\n a[aX-2][aY-2]=0;a[aX-1][aY-2]=0;a[aX][aY-2]=0;a[aX+1][aY-2]=0;a[aX+2][aY-2]=0;a[aX+2][aY-1]=0;a[aX+2][aY]=0;a[aX+2][aY+1]=0;a[aX+2][aY+2]=0;a[aX+1][aY+2]=0;a[aX][aY+2]=0;a[aX-1][aY+2]=0;a[aX-2][aY+2]=0;a[aX-2][aY+1]=0;a[aX-2][aY]=0;a[aX-2][aY-1]=0;\n a[aX-3][aY-3]=1;a[aX-2][aY-3]=1;a[aX-1][aY-3]=1;a[aX][aY-3]=1;a[aX+1][aY-3]=1;a[aX+2][aY-3]=1;a[aX+3][aY-3]=1;a[aX+3][aY-2]=1;a[aX+3][aY-1]=1;a[aX+3][aY]=1;a[aX+3][aY+1]=1;a[aX+3][aY+2]=1;a[aX+3][aY+3]=1;a[aX+2][aY+3]=1;a[aX+1][aY+3]=1;a[aX][aY+3]=1;a[aX-1][aY+3]=1;a[aX-2][aY+3]=1;a[aX-3][aY+3]=1;a[aX-3][aY+2]=1;a[aX-3][aY+1]=1;a[aX-3][aY]=1;a[aX-3][aY-1]=1;a[aX-3][aY-2]=1;\n for(int g=aX-3; g<8; g++)\n a[g][aY+4]=0;\n for(int f=aY+4; f>=0; f--)\n a[aX+4][f]=0;\n\n //quadrado inferior esquerdo\n aX=3; aY=altura-4;\n a[aX][aY]=1;\n a[aX-1][aY-1]=1; a[aX][aY-1]=1;a[aX+1][aY-1]=1;a[aX+1][aY]=1;a[aX+1][aY+1]=1;a[aX][aY+1]=1;a[aX-1][aY+1]=1;a[aX-1][aY]=1;\n a[aX-2][aY-2]=0;a[aX-1][aY-2]=0;a[aX][aY-2]=0;a[aX+1][aY-2]=0;a[aX+2][aY-2]=0;a[aX+2][aY-1]=0;a[aX+2][aY]=0;a[aX+2][aY+1]=0;a[aX+2][aY+2]=0;a[aX+1][aY+2]=0;a[aX][aY+2]=0;a[aX-1][aY+2]=0;a[aX-2][aY+2]=0;a[aX-2][aY+1]=0;a[aX-2][aY]=0;a[aX-2][aY-1]=0;\n a[aX-3][aY-3]=1;a[aX-2][aY-3]=1;a[aX-1][aY-3]=1;a[aX][aY-3]=1;a[aX+1][aY-3]=1;a[aX+2][aY-3]=1;a[aX+3][aY-3]=1;a[aX+3][aY-2]=1;a[aX+3][aY-1]=1;a[aX+3][aY]=1;a[aX+3][aY+1]=1;a[aX+3][aY+2]=1;a[aX+3][aY+3]=1;a[aX+2][aY+3]=1;a[aX+1][aY+3]=1;a[aX][aY+3]=1;a[aX-1][aY+3]=1;a[aX-2][aY+3]=1;a[aX-3][aY+3]=1;a[aX-3][aY+2]=1;a[aX-3][aY+1]=1;a[aX-3][aY]=1;a[aX-3][aY-1]=1;a[aX-3][aY-2]=1;\n for(int g=aX-3; g<8; g++)\n a[g][aY-4]=0;\n for(int f=aY-4; f<altura; f++)\n a[aX+4][f]=0;\n\n //quadrado superior direito\n aX=largura-4; aY=3;\n a[aX][aY]=1;\n a[aX-1][aY-1]=1; a[aX][aY-1]=1;a[aX+1][aY-1]=1;a[aX+1][aY]=1;a[aX+1][aY+1]=1;a[aX][aY+1]=1;a[aX-1][aY+1]=1;a[aX-1][aY]=1;\n a[aX-2][aY-2]=0;a[aX-1][aY-2]=0;a[aX][aY-2]=0;a[aX+1][aY-2]=0;a[aX+2][aY-2]=0;a[aX+2][aY-1]=0;a[aX+2][aY]=0;a[aX+2][aY+1]=0;a[aX+2][aY+2]=0;a[aX+1][aY+2]=0;a[aX][aY+2]=0;a[aX-1][aY+2]=0;a[aX-2][aY+2]=0;a[aX-2][aY+1]=0;a[aX-2][aY]=0;a[aX-2][aY-1]=0;\n a[aX-3][aY-3]=1;a[aX-2][aY-3]=1;a[aX-1][aY-3]=1;a[aX][aY-3]=1;a[aX+1][aY-3]=1;a[aX+2][aY-3]=1;a[aX+3][aY-3]=1;a[aX+3][aY-2]=1;a[aX+3][aY-1]=1;a[aX+3][aY]=1;a[aX+3][aY+1]=1;a[aX+3][aY+2]=1;a[aX+3][aY+3]=1;a[aX+2][aY+3]=1;a[aX+1][aY+3]=1;a[aX][aY+3]=1;a[aX-1][aY+3]=1;a[aX-2][aY+3]=1;a[aX-3][aY+3]=1;a[aX-3][aY+2]=1;a[aX-3][aY+1]=1;a[aX-3][aY]=1;a[aX-3][aY-1]=1;a[aX-3][aY-2]=1;\n for(int g=aX-3; g<largura; g++)\n a[g][aY+4]=0;\n for(int f=aY-3; f<8; f++)\n a[aX-4][f]=0;\n\n //Adjustment Pattern = ajuste padronizado\n int auxilia0[]=getListaAdjustmentPattern(versao);\n if(auxilia0[0]!=0){\n for(int hi=0; hi<auxilia0.length; hi++){\n aX=auxilia0[hi];\n for(int hj=0; hj<auxilia0.length; hj++){\n aY=auxilia0[hj];\n if(a[aX][aY]==3){\n a[aX][aY]=1;\n a[aX-1][aY-1]=0;a[aX][aY-1]=0;a[aX+1][aY-1]=0;a[aX+1][aY]=0;a[aX+1][aY+1]=0;a[aX][aY+1]=0;a[aX-1][aY+1]=0;a[aX-1][aY]=0;\n a[aX-2][aY-2]=1;a[aX-1][aY-2]=1;a[aX][aY-2]=1;a[aX+1][aY-2]=1;a[aX+2][aY-2]=1;a[aX+2][aY-1]=1;a[aX+2][aY]=1;a[aX+2][aY+1]=1;a[aX+2][aY+2]=1;a[aX+1][aY+2]=1;a[aX][aY+2]=1;a[aX-1][aY+2]=1;a[aX-2][aY+2]=1;a[aX-2][aY+1]=1;a[aX-2][aY]=1;a[aX-2][aY-1]=1;\n }\n }\n }\n }\n\n //System.err.println(\"Debugando em 3\");\n\n //Caminho dos Timing Patterns\n // *Horizontal\n int x=0, y=0;\n for(x=3+5, y=6; x<largura-8; x++){\n if(x%2==0){\n a[x][y]=1;//infoTimingH[x-8];}\n } else {\n a[x][y]=0;}\n }\n // *Vertical\n for(x=3+3, y=3+5; y<largura-8; y++){\n if(y%2==0){\n a[x][y]=1;//infoTimingV[x-8];}\n } else {\n a[x][y]=0;}\n }\n\n //Desenha o Black pixel\n a[8][altura-8]=1;\n\n\n int z=0;\n //Type Version Information = Tipo de Informacao\n int[] typeInformationMask = getTypeInformationMask(ecLevel, 0);\n\n // *bit 0 a 7\n x=0; y=0;\n for(x=largura-1, y=8, z=14; x>largura-9; x--, z--)\n a[x][y]=typeInformationMask[z];\n for(x=8, y=0, z=14; y<9; y++)\n if(a[x][y]==3){\n a[x][y]=typeInformationMask[z];\n z--;\n }\n // *bit 8 a 14\n for(x=7, y=8, z=6; x>=0; x--)\n if(a[x][y]==3){\n a[x][y]=typeInformationMask[z];\n z--;\n }\n for(x=8, y=altura-7, z=6; y<altura; y++, z--)\n a[x][y]=typeInformationMask[z];\n\n //System.err.println(\"Debugando em 4\");\n\n //Version Information\n if(versao>=7){\n int[] versionInformation = getVersionInformation(versao);\n // *Vertical\n x=0; y=0; z=0;\n for(y=0, x=largura-11, z=0; y<7 && z<18; y++)\n for(x=largura-11; x<largura-8; x++, z++)\n a[x][y]=versionInformation[z];\n\n // *Horizontal\n x=0; y=0; z=0;\n for(x=0, y=altura-11, z=0; x<7 && z<18; x++)\n for(y=altura-11; y<largura-8; y++, z++)\n a[x][y]=versionInformation[z];\n }\n\n //System.err.println(\"Debugando em 5\");\n \n //Insercao do Vetor Data de Binario\n int loop=largura-1;\n int aI=0;\n x=largura-1; y=altura-1;\n int teste=0;\n int itera=0;\n do{\n \t System.out.println(vector.getBitWise(itera));\n for(y=largura-1, x=loop; y>=0 && (x==loop || x==loop-1) && loop>=0; y--){\n x=loop;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n if(loop>0){\n x=loop-1;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n }\n }\n if(aI!=0)\n loop=loop-2;\n for(y=0, x=loop; y<=largura-1 && (x==loop || x==loop-1) && loop>=0; y++){\n x=loop;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n if(loop>0){\n x=loop-1;\n if(UseMaskPatt(x,y,0)==1 && a[x][y]==3) {\n if(vector.getBitWise(itera)==1)\n a[x][y]=0;\n else\n a[x][y]=1;\n itera++;\n aI=itera;\n } else if(UseMaskPatt(x,y,0)==0 && a[x][y]==3){\n a[x][y]=vector.getBitWise(itera);\n itera++;\n aI=itera;\n }\n }\n }\n if(aI!=0)\n loop=loop-2;\n aI=0;\n if(x<=0 && y<=0) break;\n //System.err.println(\"Debugando em 6... com itera: \"+itera+\" e aI: \"+aI+\" e x: \"+x+\" e y: \"+y);\n }while(itera<(vector.getOffset()));\n\n\n System.err.println(\"[1] Matriz de inteiros como representacao do QR Code gerada com sucesso!\");\n System.out.println(\"Ultimo valor do itera: \"+itera);\n\n System.err.println(\"[1.5] Testando Penalizar Máscara!\");\n System.out.println(\"Valor de penalização: \"+PenalizeMask.TestMask(a, largura));\n\n return a;\n }", "public void compararMatrix(Estado_q es1, Estado_q es2, int filest,short tam,int tamañoEsta){\n if(es1.isFinal()==es2.isFinal()){\n //contador para vecto de alfabeto o transiciones\n int con=0;\n //si son inidistinguibles los estados, se insertan en la matriz sus estados destinos respecto a transiciones\n for(int cont=1;cont<=(int)tam;cont++){\n matrix[filest][cont].setEst1(es1.getTransiçaosE(con));\n matrix[filest][cont].setEst2(es2.getTransiçaosE(con)); \n con++;\n }\n //comparamos en la misma fila y distintas columnas, si hay alguna pareja igual a la original, para revisarla\n //pareja original es la de la columna 0, de donde se obtuvieron los estados de las columnas insertadas\n for(int k=1;k<=(int)tam;k++){\n if((matrix[filest][k].getEst1().getNombre()==es1.getNombre())&&(matrix[filest][k].getEst2().getNombre()\n ==es2.getNombre())){\n matrix[filest][k].setRevisado(true);\n }\n }\n //se setea verdadera la revision de la posicion donde estabamos\n matrix[filest][0].setRevisado(true);\n \n //terminado de insertar todos los estados es una fila(for de arriba), se lee la matrix a buscar nuevos estados sin revisar\n //para colocarlos una posicion mas abajo\n for(int fil=0;fil<=tamañoEsta;fil++){\n for(int col=0;col<=(int)tam;col++){\n \n //se busca en la matriz alguna pareja de estados que sea igual a la original para marcarla revisada\n if((matrix[fil][col]!=null)&&(matrix[fil][col].getEst1().getNombre()==es1.getNombre())&&\n (matrix[fil][col].getEst2().getNombre())==es2.getNombre()){\n matrix[fil][col].setRevisado(true);\n }\n \n //si la casilla no esta revisada\n if((matrix[fil][col].isRevisado()==false)&&(matrix[fil][col]!=null)){\n \n //vamos a buscar si no esta esta posicion ya verificada\n for(int row=0;row<=tamañoEsta;row++){\n for(int cols=0;cols<=(int)tam;cols++){\n if((matrix[fil][col].getEst1().getNombre()==matrix[row][cols].getEst1().getNombre())&&\n (matrix[fil][col].getEst2().getNombre()==matrix[row][cols].getEst2().getNombre())\n &&(matrix[row][cols].isRevisado()==true)){\n matrix[fil][col].setRevisado(true);\n }\n }\n }\n if((matrix[fil][col].isRevisado()==false)&&(matrix[fil][col]!=null)){\n \n //si la siguiente fila esta nula\n if(matrix[fil+1][0]==null){\n //se inerta la casilla con sus estados en una fila abajo\n matrix[fil+1][0].setEst1(matrix[fil][col].getEst1());\n matrix[fil+1][0].setEst2(matrix[fil][col].getEst2());\n tamañoEsta++;\n //se vuelve a llamar al metodo, para volver a verificar desde la columna e estados si son inidistinguibles\n compararMatrix(matrix[fil][col].getEst1(),matrix[fil][col].getEst2(),filest+1,tam,tamañoEsta);\n\n }\n else\n {\n matrix[col][0].setEst1(matrix[fil][col].getEst1());\n matrix[col][0].setEst2(matrix[fil][col].getEst2());\n //se vuelve a llamar al metodo, para volver a verificar desde la columna e estados si son inidistinguibles\n compararMatrix(matrix[fil][col].getEst1(),matrix[fil][col].getEst2(),filest+1,tam,tamañoEsta);\n\n }\n }\n }\n } \n }\n System.out.print(\"SI son equivalentes\");\n \n }\n else\n System.out.print(\"NO son equivalentes\");\n \n \n }", "public Matriz(int[][] matriz) {\n\t\tthis.matriz = matriz;\n\t}", "public static void main(String[] args) {\n\t\tScanner sc = new Scanner (System.in);\r\n\t\t\r\n\t\tint matriz[][]=new int[4][4];\r\n\t\tmatriz[0][0] = 1;\r\n\t\tmatriz[0][1] = 2;\r\n\t\tmatriz[0][2] = 3;\r\n\t\tmatriz[0][3] = 4;\r\n\t\tmatriz[1][0] = 5;\r\n\t\tmatriz[1][1] = 6;\r\n\t\tmatriz[1][2] = 7;\r\n\t\tmatriz[1][3] = 8;\r\n\t\tmatriz[2][0] = 9;\r\n\t\tmatriz[2][1] = 10;\r\n\t\tmatriz[2][2] = 11;\r\n\t\tmatriz[2][3] = 12;\r\n\t\tmatriz[3][0] = 13;\r\n\t\tmatriz[3][1] = 14;\r\n\t\tmatriz[3][2] = 15;\r\n\t\tmatriz[3][3] = 16;\r\n\t\t\r\n\t\t\r\n\t\tint vectorfila[]=new int[4];\r\n\t\tint vectorcolumna[]=new int[4];\r\n\t\t\r\n\t\t\r\n\t\tvectorfila[0]=matriz[0][0]+matriz[0][1]+matriz[0][2]+matriz[0][3];\r\n\t\tvectorfila[1]=matriz[1][0]+matriz[1][1]+matriz[1][2]+matriz[1][3];\r\n\t\tvectorfila[2]=matriz[2][0]+matriz[2][1]+matriz[2][2]+matriz[2][3];\r\n\t\tvectorfila[3]=matriz[3][0]+matriz[3][1]+matriz[3][2]+matriz[3][3];\r\n\t\t\r\n\t\tvectorcolumna[0]=matriz[0][0]+matriz[1][0]+matriz[2][0]+matriz[3][0];\r\n\t\tvectorcolumna[1]=matriz[0][1]+matriz[1][1]+matriz[2][1]+matriz[3][1];\r\n\t\tvectorcolumna[2]=matriz[0][2]+matriz[1][2]+matriz[2][2]+matriz[3][2];\r\n\t\tvectorcolumna[3]=matriz[0][3]+matriz[1][3]+matriz[2][3]+matriz[3][3];\r\n\t\t\r\n\t\tsc.close();\r\n\t}", "public void movR(){\r\n\t\t\r\n\t\tint aux1[][]= new int [3][1];\r\n\t\tint aux2[][]= new int [3][1];\r\n\t\tint aux3[][]= new int [3][1];\r\n\t\tint aux4[][]= new int [3][1];\r\n\t\t\r\n\t\tint aux5[][]= new int [3][1];\r\n\t\t\r\n\t\tint aux6[][]= new int [3][1];\r\n\t\t\r\n\t\tint aux7[][]= new int [3][1];\r\n\t\t\r\n\t\taux1=cloneC(5,2);\r\n\t\taux2=cloneC(1,2);\r\n\t\taux3=cloneC(4,2);\r\n\t\taux4=cloneC(3,0);\r\n\t\t\r\n\t\taux5=cloneF(2,0);\r\n\t\taux6=cloneF(2,1);\r\n\t\taux7=cloneF(2,2);\r\n\t\t\r\n\t\t\r\n\t\tthis.copiaEnColumnaUnaColumna(aux1, 1, 2);\r\n\t\tthis.copiaEnColumnaUnaColumna(aux2, 4, 2);\r\n\t\tthis.copiaEnColumnaUnaColumnaReves(aux3, 3, 0);\r\n\t\tthis.copiaEnColumnaUnaColumnaReves(aux4, 5, 2);\r\n\t\t\r\n\t\tthis.copiaEnColumnaUnaFila(aux5, 2, 2);\r\n\t\tthis.copiaEnColumnaUnaFila(aux6, 2, 1);\r\n\t\tthis.copiaEnColumnaUnaFila(aux7, 2, 0);\r\n\t\t\r\n\t}", "public static Resultado Def_FA(GrafoMatriz G, Demanda demanda,ListaEnlazada [] ksp,int capacidad){\n int inicio=0, fin=0,cont; // posicion inicial y final dentro del espectro asi como el contador de FSs contiguos disponibles\n \n int demandaColocada=0; // bandera para controlar si ya se encontro espectro disponible para la demanda.\n int [] OE= new int[capacidad]; //Ocupacion de Espectro.\n ArrayList<ListaEnlazada> kspUbicados = new ArrayList<ListaEnlazada>();\n ArrayList<Integer> inicios = new ArrayList<Integer>();\n ArrayList<Integer> fines = new ArrayList<Integer>();\n ArrayList<Integer> indiceKsp = new ArrayList<Integer>();\n\n //Probamos para cada camino, si existe espectro para ubicar la damanda\n int k=0;\n\n while(k<ksp.length && ksp[k]!=null){\n //Inicializadomos el espectro, inicialmente todos los FSs estan libres\n for(int i=0;i<capacidad;i++){\n OE[i]=1;\n }\n //Calcular la ocupacion del espectro para cada camino k\n for(int i=0;i<capacidad;i++){\n for(Nodo n=ksp[k].getInicio();n.getSiguiente().getSiguiente()!=null;n=n.getSiguiente()){\n //System.out.println(\"v1 \"+n.getDato()+\" v2 \"+n.getSiguiente().getDato()+\" cant vertices \"+G.getCantidadDeVertices()+\" i \"+i+\" FSs \"+G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS().length);\n if(G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS()[i].getEstado()==0){\n OE[i]=0;\n break;\n }\n }\n }\n \n inicio=fin=cont=0;\n for(int i=0;i<capacidad;i++){\n if(OE[i]==1){\n inicio=i;\n for(int j=inicio;j<capacidad;j++){\n if(OE[j]==1){\n cont++;\n }\n else{\n cont=0;\n break;\n }\n //si se encontro un bloque valido, salimos de todos los bloques\n if(cont==demanda.getNroFS()){\n fin=j;\n fines.add(fin);\n inicios.add(inicio);\n demandaColocada=1;\n kspUbicados.add(ksp[k]);\n indiceKsp.add(k);\n //inicio=fin=cont=0;\n break;\n }\n }\n }\n if(demandaColocada==1){\n demandaColocada=0;\n break;\n }\n }\n k++;\n }\n \n /*if(demandaColocada==0){\n return null; // Si no se encontro, en ningun camino un bloque contiguo de FSs, retorna null.\n }*/\n \n if (kspUbicados.isEmpty()){\n //System.out.println(\"Desubicado\");\n return null;\n }\n \n \n \n int caminoElegido = Utilitarios.contarCuts(kspUbicados, G, capacidad);\n \n Resultado r= new Resultado();\n /*r.setCamino(k-1);\n r.setFin(fin);\n r.setInicio(inicio);*/\n \n r.setCamino(indiceKsp.get(caminoElegido));\n r.setFin(fines.get(caminoElegido));\n r.setInicio(inicios.get(caminoElegido));\n return r;\n }", "@Override\n public Matrix idct(final MatrixView in) {\n check(in);\n double[][] out = new double[in.getRows()][in.getColumns()];\n double tmp1, tmp2, tmp3, tmp4;\n double tmpm0 = 0, tmpm1 = 0, tmpm2 = 0, tmpm3 = 0, tmpm4 = 0, tmpm5 = 0, tmpm6 = 0, tmpm7 = 0;\n double tmpm20, tmpm21, tmpm22, tmpm23, tmpm24, tmpm25, tmpm26, tmpm27 = 0;\n double[] outtmpmyi = null;\n\n for (int my = 0; my < in.getRows(); my += SIZE) {\n for (int mx = 0; mx < in.getColumns(); mx += SIZE) {\n for (int i = 0; i < 8; i++) {\n outtmpmyi = out[my + i];\n\n tmpm0 = in.getDouble(my + i, mx + 0);\n tmpm1 = in.getDouble(my + i, mx + 1);\n tmpm2 = in.getDouble(my + i, mx + 2);\n tmpm3 = in.getDouble(my + i, mx + 3);\n tmpm4 = in.getDouble(my + i, mx + 4);\n tmpm5 = in.getDouble(my + i, mx + 5);\n tmpm6 = in.getDouble(my + i, mx + 6);\n tmpm7 = in.getDouble(my + i, mx + 7);\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n outtmpmyi[mx + 0] = tmpm0 + tmpm7;\n outtmpmyi[mx + 7] = tmpm0 - tmpm7;\n outtmpmyi[mx + 1] = tmpm1 + tmpm6;\n outtmpmyi[mx + 6] = tmpm1 - tmpm6;\n outtmpmyi[mx + 2] = tmpm2 + tmpm5;\n outtmpmyi[mx + 5] = tmpm2 - tmpm5;\n outtmpmyi[mx + 3] = tmpm3 + tmpm4;\n outtmpmyi[mx + 4] = tmpm3 - tmpm4;\n\n }\n\n for (int i = 0; i < 8; i++) {\n\n tmpm0 = out[my + 0][mx + i];\n tmpm1 = out[my + 1][mx + i];\n tmpm2 = out[my + 2][mx + i];\n tmpm3 = out[my + 3][mx + i];\n tmpm4 = out[my + 4][mx + i];\n tmpm5 = out[my + 5][mx + i];\n tmpm6 = out[my + 6][mx + i];\n tmpm7 = out[my + 7][mx + i];\n\n tmp1 = (tmpm1 * Z7) - (tmpm7 * Z1);\n tmp4 = (tmpm7 * Z7) + (tmpm1 * Z1);\n tmp2 = (tmpm5 * Z3) - (tmpm3 * Z5);\n tmp3 = (tmpm3 * Z3) + (tmpm5 * Z5);\n\n tmpm20 = (tmpm0 + tmpm4) * Z4;\n tmpm21 = (tmpm0 - tmpm4) * Z4;\n tmpm22 = (tmpm2 * Z6) - (tmpm6 * Z2);\n tmpm23 = (tmpm6 * Z6) + (tmpm2 * Z2);\n tmpm4 = tmp1 + tmp2;\n tmpm25 = tmp1 - tmp2;\n tmpm26 = tmp4 - tmp3;\n tmpm7 = tmp4 + tmp3;\n\n tmpm5 = (tmpm26 - tmpm25) * Z0;\n tmpm6 = (tmpm26 + tmpm25) * Z0;\n tmpm0 = tmpm20 + tmpm23;\n tmpm1 = tmpm21 + tmpm22;\n tmpm2 = tmpm21 - tmpm22;\n tmpm3 = tmpm20 - tmpm23;\n\n out[my + 0][mx + i] = tmpm0 + tmpm7;\n out[my + 7][mx + i] = tmpm0 - tmpm7;\n out[my + 1][mx + i] = tmpm1 + tmpm6;\n out[my + 6][mx + i] = tmpm1 - tmpm6;\n out[my + 2][mx + i] = tmpm2 + tmpm5;\n out[my + 5][mx + i] = tmpm2 - tmpm5;\n out[my + 3][mx + i] = tmpm3 + tmpm4;\n out[my + 4][mx + i] = tmpm3 - tmpm4;\n }\n }\n }\n\n return new DoubleMatrix(in.getRows(), in.getColumns(), out);\n }", "public Nodo espaciosJustos(Nodo nodo){\n System.out.println(\"----------------inicio heuristica espaciosJustos--------------\");\n Operadores operadores = new Operadores();\n //variables de matriz\n int numFilas,numColumnas,numColores;\n \n numColumnas = nodo.getnColumnas();\n numFilas = nodo.getnFilas();\n numColores = nodo.getnColores();\n \n String [][] matriz = new String [numFilas][numColumnas];\n matriz = operadores.clonarMatriz(nodo.getMatriz());\n //-------------------\n \n //variables de filas y columnas\n ArrayList<ArrayListColumna> columnas = new ArrayList<ArrayListColumna>();\n columnas = (ArrayList<ArrayListColumna>)nodo.getColumnas();\n \n ArrayList<ArrayListFila> filas = new ArrayList<ArrayListFila>();\n filas = (ArrayList<ArrayListFila>)nodo.getFilas();\n //---------------------------\n \n ArrayListFila auxListFila = new ArrayListFila();\n ArrayListColumna auxListColumna = new ArrayListColumna();\n \n int cambio=1;\n int changue=0;\n while(cambio!=0){\n cambio=0;\n \n nodo.setCambio(0);\n for(int i=0;i<numFilas;i++){\n auxListFila = (ArrayListFila)filas.get(i);\n for(int j=0;j<numColores;j++){\n Color auxColor = new Color();\n auxColor = auxListFila.getColor(j);\n\n if(auxColor.getNumero() > 0){\n int contador=0;\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n contador++;\n }\n }\n }\n }\n \n if(auxColor.getNumero() == contador){\n changue=1;\n cambio=1;\n auxColor.setNumero(0);\n for(int c=0;c<numColumnas;c++){\n auxListColumna=(ArrayListColumna)columnas.get(c);\n\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n if(auxColor1.getNumero() > 0){\n if(auxColor.getColor().equals(auxColor1.getColor()) && operadores.isPosicionVaciaFila(nodo.getMatriz(), i, c)){\n \n auxColor1.setNumero(auxColor1.getNumero()-1);\n\n matriz = operadores.pintarPosicion(matriz, i, c, auxColor.getColor());\n\n nodo.setMatriz(matriz);\n }\n }\n }\n }\n System.out.println(\"-----\");\n operadores.imprimirMatriz(nodo.getMatriz());\n System.out.println(\"-----\");\n \n \n }\n }\n }\n }\n \n }\n if(changue==1) nodo.setCambio(1);\n System.out.println(\"----------------fin heuristica espaciosJustos-------------- \");\n return (Nodo)nodo;\n }", "public List<List<Integer>> generateRec(int numRows) {\n if(numRows==1) return new ArrayList(Arrays.asList(new ArrayList(Arrays.asList(1))));\n List<List<Integer>> ans = generateRec(numRows-1);\n List<Integer> prev = ans.get(ans.size()-1);\n List<Integer> cur = new ArrayList(Arrays.asList(1));\n for(int j=1;j<prev.size();j++)\n cur.add(prev.get(j-1)+prev.get(j));\n cur.add(1);\n ans.add(cur);\n return ans;\n }", "private static void longestIncPath(int[][] matrix) {\n\t\t \n\t\t int total_elem = matrix.length * (matrix[0].length);\n\t ArrayList<ArrayList<Integer>> g = new ArrayList<ArrayList<Integer>>();\n\t int[] outdegree = new int[total_elem];\n\t int[][] dp = new int[matrix.length][matrix[0].length];\n\t int m = matrix[0].length;\n\t \n\t for(int i=0;i<matrix.length;i++){\n\t for(int j=0;j<matrix[0].length;j++){\n\t \tg.add(new ArrayList<Integer>());\n\t }\n\t }\n\t \n\t for(int i=0;i<matrix.length;i++){\n\t for(int j=0;j<matrix[0].length;j++){\n\t \n\t int left=-1;\n\t int right=-1;\n\t int up=-1;\n\t int down=-1;\n\t int curr = matrix[i][j];\n\t if(j-1>=0)\n\t left = matrix[i][j-1]; \n\t if(j+1<matrix[0].length)\n\t right = matrix[i][j+1];\n\t if(i-1>=0)\n\t up=matrix[i-1][j];\n\t if(i+1<matrix.length)\n\t down=matrix[i+1][j];\n\t \n\t if(left!=-1 && curr>left)\n\t addedge(g,(m*i+(j-1)),(m*i+j),outdegree);\n\t if(right!=-1 && curr>right)\n\t addedge(g,(m*i+(j+1)),(m*i+j),outdegree);\n\t if(up!=-1 && curr>up)\n\t addedge(g,(m*(i-1)+j),(m*i+j),outdegree);\n\t if(down!=-1 && curr>down)\n\t addedge(g,(m*(i+1)+j),(m*i+j),outdegree);\n\t \n\t \n\t }\n\t }\n\t \n\t Queue<Integer> q = new LinkedList<Integer>();\n\t \n\t for(int i:outdegree){\n\t if(i==0)\n\t q.add(i);\n\t }\n\t \n\t \n\t while(!q.isEmpty()){\n\t int temp = q.poll();\n\t int r = temp/m;\n\t int c = temp - r*m;\n\t int max=0;\n\t \n\t for(int i:g.get(temp)){\n\t int row = i/m;\n\t int col = i - r*m;\n\t max=Math.max(max,dp[row][col]+1);\n\t outdegree[i]--;\n\t if(outdegree[i]==0)\n\t q.add(i);\n\t }\n\t \n\t dp[r][c]=max;\n\t }\n\t \n\t\t\n\t}", "protected void expand() {\n matrix = matrix.power(e);\n }", "public void mayorMenorEntrada(int[][] entradas) throws Exception {\n Producto mayorEntrada = null;\n Producto menorEntrada = null;\n String entradaMayor = \"\";\n String costoMayor = \"\";\n String entradaMenor = \"\";\n String costoMenor = \"\";\n \n ciclo: {\n for (int i = 0; i < entradas.length; i++) {\n if (i == 0) {\n if (entradas[i][1] > 0) {\n mayorEntrada = buscarProducto(entradas[0][0]);\n entradaMayor = mayorEntrada.getNombre();\n costoMayor = entradas[0][3] + \"\"; \n }\n } else if (entradas[i][1] == 0) {\n menorEntrada = buscarProducto(entradas[i - 1][0]);\n entradaMenor = menorEntrada.getNombre();\n costoMenor = entradas[i - 1][3] + \"\"; \n break ciclo;\n } else if (i == (entradas.length - 1)) {\n menorEntrada = buscarProducto(entradas[i][0]);\n entradaMenor = menorEntrada.getNombre();\n costoMenor = entradas[i][3] + \"\"; \n break ciclo;\n }\n }\n }\n DefaultTableModel modelo = (DefaultTableModel) jTableMayorMenorEntrada.getModel();\n Object[] filaNueva = { entradaMayor, costoMayor, entradaMenor, costoMenor };\n modelo.addRow(filaNueva); \n }", "Matrix add(Matrix M) {\n if(getSize() != M.getSize()) {\n throw new RuntimeException(\"Matrix Error: Matrices not same size\");\n }\n if (M.equals(this)) return M.scalarMult(2);\n int c = 0, e2 = 0;\n double v1 = 0, v2 = 0;\n List temp1, temp2;\n Matrix addM = new Matrix(getSize());\n for(int i = 1; i <= rows.length; i++) {\n temp1 = M.rows[i-1];\n temp2 = this.rows[i-1];\n if(temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }else if(!temp1.isEmpty() && temp2.isEmpty()) {\n temp1.moveFront();\n while(temp1.index() != -1) {\n addM.changeEntry(i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n }else if(!temp1.isEmpty() && !temp2.isEmpty()) {\n temp2.moveFront();\n temp1.moveFront();\n while(temp1.index() != -1 && temp2.index() != -1) {\n if(((Entry)temp1.get()).column == ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, (v1+v2));\n temp1.moveNext();\n if(!this.equals(M))\n temp2.moveNext();\n ///if temp1 < temp2\n //this < M\n }else if(((Entry)temp1.get()).column < ((Entry)temp2.get()).column) {\n v1 = ((Entry)temp1.get()).value;\n c = ((Entry)temp1.get()).column;\n addM.changeEntry(i, c, v1);\n temp1.moveNext();\n //if temp1>temp2\n }else if(((Entry)temp1.get()).column > ((Entry)temp2.get()).column) {\n v2 = ((Entry)temp2.get()).value;\n c = ((Entry)temp2.get()).column;\n addM.changeEntry(i, c, v2);\n temp2.moveNext();\n }\n }\n while(temp1.index() != -1) {\n addM.changeEntry( i, ((Entry)temp1.get()).column, ((Entry)temp1.get()).value);\n temp1.moveNext();\n }\n while(temp2.index() != -1) {\n addM.changeEntry(i, ((Entry)temp2.get()).column, ((Entry)temp2.get()).value);\n temp2.moveNext();\n }\n }\n }\n return addM;\n }", "public static String[][] leerPrestados() {\n int cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //matriz para guardar los registros\n String[][] reporte = new String[cont][11];\n cont = 0;\n try {\n Statement statement = connection.createStatement();\n ResultSet result = statement.executeQuery(\"SELECT * FROM prestado\");\n while (result.next()) {\n //leolos registros y los guardo cada uno en un renglon de la matriz\n System.out.println(\"ResultSet: \" + result.getString(1));\n \n reporte[cont][0] = result.getString(1);\n reporte[cont][1] = result.getString(2);\n reporte[cont][2] = result.getString(3);\n reporte[cont][3] = result.getString(4);\n reporte[cont][4] = result.getString(5);\n reporte[cont][5] = result.getString(6);\n reporte[cont][6] = result.getString(7);\n reporte[cont][7] = result.getString(8);\n reporte[cont][8] = result.getString(9);\n reporte[cont][9] = result.getString(10);\n reporte[cont][10] = result.getString(11);\n cont++;\n }\n \n } catch (SQLException ex) {\n Logger.getLogger(ManejoBasesDatos.class.getName()).log(Level.SEVERE, null, ex);\n }\n //regreso reporte completo\n return reporte;\n }", "@SuppressWarnings(\"unchecked\")\t\t\t\t\t\t\t//used because of line 17, there is no way to remove warnings, they have to be suppressed\n public String[] permutations(ArrayList<ArrayList<Character> > mat){\n\n if(mat.size()==1){\t\t\t//since the function is recursive, a base case for the first line has been made. \n String[] s = new String[mat.get(0).size()];\n int i = 0;\n for(Object obj:mat.get(0)) {\n if (i < s.length) {\n s[i++] = obj.toString();\n }\n }\n return s;\t\t//returns the characters of the first line of the input as an array of String\n }\n ArrayList<Character>[] arr = new ArrayList[mat.size()]; //this has been created to provide ease of accessibility which is a bit difficult with an ArrayList of an ArrayList\n int k = 0;\n for(ArrayList a:mat){\n if(k<mat.size()){\n arr[k] = a;\n }\n k++;\n }\n int product = 1;\n for(ArrayList a: mat){\n product*= a.size(); \t// product calculates the size of the String to be generated for the given input\n }\n int i = 0;\n String[] ret = new String[product];\n ArrayList<ArrayList<Character> > ret_arr_list = new ArrayList<>();\n for(int exception_index = 0;exception_index<arr.length-1;++exception_index){\n ret_arr_list.add(arr[exception_index]); //ret_arr_list is an ArrayList of an ArrayList except the last row of the original input\n }\n String[] s = permutations(ret_arr_list); //gets the string as mentioned at the very beginning of the function\n int ret_index = 0;\n for(int i_index = 0;i_index < s.length;++i_index){\n for(int j_index = 0;j_index<mat.get(mat.size()-1).size();++j_index){\n ret[ret_index++] = s[i_index] + arr[mat.size()-1].get(j_index).toString(); //appends every character of the last line to \n \t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t //every String element calculated in String[] s\n }\n }\n return ret;\n }", "private void imprimirMatriz(int[][] m) {\n\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t\tfor (int i = 0; i < 4; i++) {\n\t\t\tfor (int j = 0; j < 4; j++) {\n\t\t\t\tSystem.out.println(\"M[\" + i + \"][\" + j + \"] = \" + m[i][j]);\n\t\t\t}\n\t\t}\n\t\tSystem.out.println(\"-------------------------------------------\");\n\t}", "public static void generateMatrix() {\r\n Random random = new Random();\r\n for (int i = 0; i < dim; i++)\r\n {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n if (i != j)\r\n \r\n adjacencyMatrix[i][j] = I; \r\n }\r\n }\r\n for (int i = 0; i < dim * dim * fill; i++)\r\n {\r\n adjacencyMatrix[random.nextInt(dim)][random.nextInt(dim)] =\r\n random.nextInt(maxDistance + 1);\r\n }\r\n \r\n\r\n\r\n \r\n //print(adjacencyMatrix);\r\n \r\n \r\n //This makes the main matrix d[][] ready\r\n for (int i = 0; i < dim; i++) {\r\n for (int j = 0; j < dim; j++)\r\n {\r\n d[i][j] = adjacencyMatrix[i][j];\r\n if (i == j)\r\n {\r\n d[i][j] = 0;\r\n }\r\n }\r\n }\r\n }", "@Override\n\tpublic Vehiculo leerVehiculos(String matricula) {\n\t\treturn null;\n\t}", "boolean ompleMatriuRestant(int i, int j) {\r\n // System.out.println(i+\" \"+j); \r\n if (j >= N && i < N - 1) {\r\n i = i + 1;\r\n j = 0;\r\n }\r\n if (i >= N && j >= N) {\r\n return true;\r\n }\r\n\r\n if (i < SRN) {\r\n if (j < SRN) {\r\n j = SRN;\r\n }\r\n } else if (i < N - SRN) {\r\n if (j == (int) (i / SRN) * SRN) {\r\n j = j + SRN;\r\n }\r\n } else {\r\n if (j == N - SRN) {\r\n i = i + 1;\r\n j = 0;\r\n if (i >= N) {\r\n return true;\r\n }\r\n }\r\n }\r\n\r\n for (int num = 1; num <= N; num++) {\r\n if (validaNumero(i, j, num)) {\r\n mat[i][j] = num;\r\n if (ompleMatriuRestant(i, j + 1)) {\r\n return true;\r\n }\r\n\r\n mat[i][j] = 0;\r\n }\r\n }\r\n return false;\r\n }", "public void rellenarTerreno() {\n Random rnd = new Random();\r\n int restante = V;\r\n int[][] aux = terreno;\r\n do {\r\n for (int i = 0; i < Filas; i++) {\r\n for (int j = 0; j < Columnas; j++) {\r\n if (restante > max) {\r\n int peso = rnd.nextInt(max);\r\n if (aux[i][j] + peso <= max) {\r\n aux[i][j] += peso;\r\n restante -= peso;\r\n }\r\n } else {\r\n if (aux[i][j] + restante <= max) {\r\n aux[i][j] += restante;\r\n restante = 0;\r\n }\r\n }\r\n }\r\n }\r\n } while (restante != 0);\r\n }", "public int[][] iniciarAtomataCelular(int parCelulas,int parRegla,int parEvoluciones,ArrayList parValoresIniciales){\n clsAutomataCelular objAutomataCelular = new clsAutomataCelular(parCelulas,parRegla,parEvoluciones,parValoresIniciales); \n return objAutomataCelular.ObtenerMatriz();\n }", "private static void makeInitialDistanceMatrix() {\n\t\ttry {\n\t\t\tfor(int i=1;i<=totalGenes;i++) {\n\t\t\t\tTreeMap<String, Double> temp1 = new TreeMap<>();\n\t\t\t\tif(distanceMatrix.containsKey(i+\"\"))\n\t\t\t\t\ttemp1 = distanceMatrix.get(i+\"\");\n\t\t\t\tfor(int j=i+1;j<=totalGenes;j++) {\n\t\t\t\t\tdouble dist = getDist(i, j);\n\t\t\t\t\tTreeMap<String, Double> temp2 = new TreeMap<>();\n\t\t\t\t\tif(distanceMatrix.containsKey(j+\"\"))\n\t\t\t\t\t\ttemp2 = distanceMatrix.get(j+\"\");\n\t\t\t\t\ttemp2.put(i+\"\", dist);\n\t\t\t\t\tdistanceMatrix.put(j+\"\", temp2);\n\t\t\t\t\ttemp1.put(j+\"\", dist);\n\t\t\t\t\tupdateMinMatrix(i+\"\",j+\"\",dist);\n\t\t\t\t}\n\t\t\t\tdistanceMatrix.put(i+\"\", temp1);\n\t\t\t}\n\t\t} catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\r\n\r\n\t\tString[] maeletras = new String[18];\r\n\t\tint[] maenumero = new int[18];\r\n\t\tString[][] matletras = new String[18][2];\r\n\t\tint[][] matnumero = new int[18][2];\r\n\r\n//####################################################\r\n\r\n//\tArrayList\r\n//\r\n\t\tArrayList listaNums = new ArrayList();\r\n\t\tlistaNums.add(8);\r\n\t\tlistaNums.add(3);\r\n\t\tlistaNums.add(5);\r\n\t\tSystem.out.println(\"Lista de numeros: \" + listaNums);\r\n\t\tSystem.out.println(\"Numero posicion 2:\" + listaNums.get(2));\r\n\t\tSystem.out.println(\"Numero posicion 1:\" + listaNums.get(1));\r\n\t\tlistaNums.set(0, 15);\r\n\t\tSystem.out.println(\"Lista de numeros: \" + listaNums);\r\n\t\t\r\n\t\t// Declaración de un ArrayList de \"String\". Puede ser de cualquier otro Elemento u Objeto (float, Boolean, Object, ...)\r\n\t\tArrayList<String> nombreArrayList = new ArrayList<String>();\r\n\t\t// Añade el elemento al ArrayList\r\n\t\tnombreArrayList.add(\"Elemento\");\r\n\t\t// Añade el elemento al ArrayList en la posición 'n'\r\n\t\tint n = 4;\r\n\t\tnombreArrayList.add(n, \"Elemento 2\");\r\n\t\t// Devuelve el numero de elementos del ArrayList\r\n\t\tnombreArrayList.size();\r\n\t\t// Devuelve el elemento que esta en la posición '2' del ArrayList\r\n\t\tnombreArrayList.get(2);\r\n\t\t// Comprueba se existe del elemento ('Elemento') que se le pasa como parametro\r\n\t\tnombreArrayList.contains(\"Elemento\");\r\n\t\t// Devuelve la posición de la primera ocurrencia ('Elemento') en el ArrayList \r\n\t\tnombreArrayList.indexOf(\"Elemento\");\r\n\t\t// Devuelve la posición de la última ocurrencia ('Elemento') en el ArrayList \r\n\t\tnombreArrayList.lastIndexOf(\"Elemento\");\r\n\t\t// Borra el elemento de la posición '5' del ArrayList \r\n\t\tnombreArrayList.remove(5); \r\n\t\t// Borra la primera ocurrencia del 'Elemento' que se le pasa como parametro. \r\n\t\tnombreArrayList.remove(\"Elemento\");\r\n\t\t//Borra todos los elementos de ArrayList \r\n\t\tnombreArrayList.clear();\r\n\t\t// Devuelve True si el ArrayList esta vacio. Sino Devuelve False \r\n\t\tnombreArrayList.isEmpty(); \r\n\t\t// Copiar un ArrayList \r\n\t\tArrayList arrayListCopia = (ArrayList) nombreArrayList.clone(); \r\n\t\t// Pasa el ArrayList a un Array \r\n\t\tObject[] array = nombreArrayList.toArray(); \r\n\r\n\t\t// ####################################################\r\n\r\n//\t\tBurbuja\r\n\r\n\t\tint arreglo[] = { 8, 6, 7, 2, 1, 8, 6, 8, 7, 1, 9, 10, 2, 1 };\r\n\r\n\t\tfor (int i = 0; i < arreglo.length; i++) {\r\n\t\t\tfor (int j = 0; j < arreglo.length - 1; j++) {\r\n\t\t\t\tif (arreglo[j] > arreglo[j + 1]) {\r\n\t\t\t\t\tint tmp = arreglo[j + 1];\r\n\t\t\t\t\tarreglo[j + 1] = arreglo[j];\r\n\t\t\t\t\tarreglo[j] = tmp;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\tfor (int i = 0; i < arreglo.length; i++) {\r\n\t\t\tSystem.out.print(arreglo[i] + \"\\n\");\r\n\t\t}\r\n\r\n//##################################################\r\n\t\tString par2 = \"S\";\r\n\t\tint opcion = 0;\r\n\t\twhile (par2.contentEquals(\"S\")) {\r\n\t\t\topcion = 0;\r\n\t\t\ttry {\r\n\t\t\t\topcion = 2;\r\n\t\t\t} catch (InputMismatchException e) {\r\n\t\t\t\topcion = 5;\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t}\r\n\r\n\t\t\tswitch (opcion) {\r\n\t\t\tcase 1:\r\n\t\t\t\tSystem.out.println(\"Calculando digito verificador personas\");\r\n\t\t\t\tSystem.out.println(\" \");\r\n\r\n//\t\t\t\tvalidaRutPersona llamada1 = new validaRutPersona();\r\n//\t\t\t\tllamada1.validaRutPersona();\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 2:\r\n\t\t\t\tSystem.out.println(\"Opción 2: Calculando digito verificador Patentes antiguas.\");\r\n\t\t\t\tSystem.out.println(\" \");\r\n\r\n//\t\t\t\tvalidaPatenteAntigua llamada2 = new validaPatenteAntigua();\r\n//\t\t\t\tllamada2.validaPatenteAntigua();\r\n\t\t\t\tpar2 = \"N\";\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 3:\r\n\t\t\t\tSystem.out.println(\"Opción 3: Calcula digito verificador Patentes nuevas.\");\r\n\t\t\t\tSystem.out.println(\" \");\r\n\r\n//\t\t\t\tvalidaPatenteNueva llamada3 = new validaPatenteNueva();\r\n//\t\t\t\tllamada3.validaPatenteNueva();\r\n\t\t\t\tpar2 = \"N\";\r\n\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 4:\r\n\t\t\t\tSystem.out.println(\"Opción 4: Pruebas.\");\r\n\t\t\t\tSystem.out.println(\" \");\r\n\r\n//\t\t\t\tpruebas llamada4 = new pruebas();\r\n//\t\t\t\tllamada4.pruebas();\r\n\t\t\t\tpar2 = \"N\";\r\n\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tSystem.out.println(\" \");\r\n\t\t\t\tif (opcion == 9) {\r\n\t\t\t\t\tSystem.out.println(\"Fin del proceso...\");\r\n\t\t\t\t\tpar2 = \"N\";\r\n\t\t\t\t} else {\r\n\t\t\t\t\tSystem.out.println(\"No se pudo determinar opción. Elija otra...: \");\r\n//\t\t\t\t\tentrada.next();\r\n\t\t\t\t\tpar2 = \"S\";\r\n\t\t\t\t}\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t}\r\n//##################################################\r\n\r\n//\t Ingreso de textos\r\n//\r\n\t\tSystem.out.println(\"Ingrese un número...: \");\r\n\t\tint b = 0;\r\n\t\twhile (!s.hasNextInt())\r\n\t\t\ts.next();\r\n\r\n\t\tb = s.nextInt();\r\n\t\tSystem.out.println(b);\r\n\r\n\t\tSystem.out.println(\"Ingrese un texto...: \");\r\n\t\tString c = \"\";\r\n\t\twhile (!s.hasNext())\r\n\t\t\ts.next();\r\n\r\n\t\tc = s.next();\r\n\t\tSystem.out.println(c);\r\n\r\n\t\tSystem.out.println(\"Ingrese un double...: \");\r\n\t\tdouble d = 0;\r\n\t\twhile (!s.hasNextDouble())\r\n\t\t\ts.nextDouble();\r\n\r\n\t\td = s.nextDouble();\r\n\t\tSystem.out.println(d);\r\n\r\n//\t\tSystem.out.println(\"Ingrese un boolean...: \");\r\n//\t\tboolean e = true;\r\n//\t\twhile (!s.hasNextBoolean())\r\n//\t\t\ts.nextBoolean();\r\n//\t\t\t\t\r\n//\t\te = s.nextBoolean();\r\n//\t\tSystem.out.println(e);\r\n\r\n// Manejo de String\r\n\r\n//\t\tchar charAt(int index): Devuelve el carácter que está en esa posición\r\n\t\tString primero = \"primero\";\r\n\t\tString segundo = \"segundo\";\r\n\t\tint dif = primero.compareTo(segundo);\r\n\t\tif (dif == 0) {\r\n\t\t\tSystem.out.println(\"primero \" + primero + \" gual a \" + segundo);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"primero \" + primero + \" distinto a \" + segundo);\r\n\t\t}\r\n\r\n\t\tprimero = \"primero\";\r\n\t\tsegundo = \"PriMEo\";\r\n\t\tdif = primero.compareToIgnoreCase(segundo);\r\n\t\tif (dif == 0) {\r\n\t\t\tSystem.out.println(\"primero \" + primero + \" gual a \" + segundo);\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"primero \" + primero + \" distinto a \" + segundo);\r\n\t\t}\r\n\r\n\t\tprimero = \" hola como estas ...todo bien??? \";\r\n\t\tsegundo = primero.trim();\r\n\t\tSystem.out.println(\"asi es primero \" + primero);\r\n\t\tSystem.out.println(\"primero quedo como: \" + segundo);\r\n\r\n\t\tprimero = \"33\";\r\n\t\tint a = Integer.parseInt(primero); // a vale 33\r\n\t\tSystem.out.println(\"primero es numerico...: : \" + a);\r\n\r\n//\t\tClase Math\r\n\r\n//\t\tClase especial que contiene funciones y constantes matemáticas.\r\n//\t\tSe usa poniendo Math.<metodo>\r\n//\t\tAtributos: Math.E y Math.PI\r\n//\t\tstatic int abs(int a): Devuelve el valor absoluto del número pasado como parámetro. También se puede usar con cualquier otro tipo numérico (si le damos un double devolverá un double, etc.)\r\n//\t\tstatic long round(double a): Redondea el número pasado como parámetro. Si el número es double devuelve long, si es float devuelve int.\r\n//\t\tstatic double ceil(double a): Trunca el número hacia arriba (Math.ceil(3.2) devuelve 4.0), ¡ojo devuelve un double!\r\n//\t\tstatic double floor(double a): Trunca el número, ¡ojo devuelve un double!\r\n//\t\tstatic double sin(double a): Devuelve el seno del ángulo a (a debe estar en radianes). También hay cos, tan, asin, acos, atan,sinh, cosh, tanh\r\n//\t\tstatic int max (int a,int b): Devuelve el máximo de los dos números. También hay versiones para los otros tipos numéricos. También existe min (int a, int b).\r\n//\t\tstatic double log(double a): Devuelve el logaritmo neperiano de a, para el logaritmo decimal se usa log10(double a)\r\n//\t\tstatic double pow(double a, double b): Eleva a a b\r\n//\t\tstatic double exp(double a): Eleva el número e a a\r\n//\t\tstatic double sqrt(double a): Raíz cuadrada\r\n//\t\tstatic double cbrt(double a): Raíz cúbica\r\n//\t\tstatic double random(): Devuelve un número aleatorio entre 0.0 (incluido) y 1.0 (no incluido)\t\r\n\r\n\t\tdouble num1 = 5;\r\n\t\tdouble num2 = 7;\r\n\t\tdouble num3 = 0;\r\n\r\n\t\tSystem.out.println(\" \");\r\n\r\n\t\tnum3 = Math.exp(num1);\r\n\t\tSystem.out.println(\"exponencial \" + num3);\r\n\r\n\t\tnum3 = Math.sqrt(num1);\r\n\t\tSystem.out.println(\"raiz \" + num3);\r\n\r\n\t\tnum3 = Math.random();\r\n\t\tSystem.out.println(\"random \" + num3);\r\n\r\n//\t\tJOption\r\n//\t\t#################################################\r\n\t\tSystem.out.println(\"aqui voy \");\r\n\r\n\t\tJOptionPane.showMessageDialog(null, \"Pruebas JOption\");\r\n\r\n\t\tString[] optionsX = { \"Opcion A\", \"Opcion B\", \"Opcion C\", \"Opcion D\" };\r\n\t\tint seleccion = JOptionPane.showOptionDialog(null, \"Es necesario que seleccione una opcion\", \"Titulo\",\r\n\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.QUESTION_MESSAGE, null, optionsX, optionsX[0]);\r\n\r\n\t\tSystem.out.println(\"Seleccion \" + seleccion);\r\n\r\n\t\tJOptionPane.showMessageDialog(null, \"Operación realizada correctamente\");\r\n\r\n\t\tJOptionPane.showMessageDialog(null, \"Hello World\");\r\n\r\n\t\ttry {\r\n\t\t\tString firstNumber = JOptionPane.showInputDialog(\"Input <First Integer>\");\r\n\t\t\tString secondNumber = JOptionPane.showInputDialog(\"Input <Second Integer>\");\r\n\r\n\t\t\tnum1 = Integer.parseInt(firstNumber);\r\n\t\t\tnum2 = Integer.parseInt(secondNumber);\r\n\t\t\tdouble sum = num1 + num2;\r\n\t\t\tJOptionPane.showMessageDialog(null, \"Sum is \" + sum, \"Sum of two Integers\", JOptionPane.PLAIN_MESSAGE);\r\n\t\t} catch (Exception e) {\r\n\t\t\tObject[] options = { \"OK\", \"CANCEL\" };\r\n\t\t\tJOptionPane.showOptionDialog(null, \"Debe ingresar valores numericos\", \"Warning\", JOptionPane.DEFAULT_OPTION,\r\n\t\t\t\t\tJOptionPane.WARNING_MESSAGE, null, options, options[0]);\r\n\t\t}\r\n\r\n\t\tJOptionPane.showMessageDialog(null, \"Hello World\");\r\n\r\n\t\tString name = JOptionPane.showInputDialog(\"Type your name please\");\r\n\t\tJOptionPane.showMessageDialog(null, \"Hello \" + name);\r\n\r\n\t\tJOptionPane.showConfirmDialog(null, \"Desea comentar??\", \"Seleccion camino\", JOptionPane.YES_NO_OPTION);\r\n\r\n\t\tObject[] options = { \"OK\", \"CANCEL\" };\r\n\t\tJOptionPane.showOptionDialog(null, \"Debe ingresar toda la información solicitada\", \"Warning\",\r\n\t\t\t\tJOptionPane.DEFAULT_OPTION, JOptionPane.WARNING_MESSAGE, null, options, options[0]);\r\n\r\n\t\tString inputValue = JOptionPane.showInputDialog(\"Ingrese un valor\");\r\n\t\tinputValue = inputValue.toUpperCase();\r\n\t\tJOptionPane.showMessageDialog(null, inputValue);\r\n\r\n\t\tObject[] possibleValues = { \"Valida Rut\", \"Patante Antigua\", \"Patente Nueva\" };\r\n\t\tObject selectedValue = JOptionPane.showInputDialog(null, \"Seleccione\", \"Menu principal\",\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE, null, possibleValues, possibleValues[0]);\r\n\r\n//\t\tShow an error dialog that displays the message, 'alert':\r\n\t\tJOptionPane.showMessageDialog(null, \"alert\", \"alert\", JOptionPane.ERROR_MESSAGE);\r\n\r\n//\t\t\tShow an internal information dialog with the message, 'information':\r\n//\t\t\tJOptionPane.showInternalMessageDialog(frame, \"information\",\r\n//\t\t\t\"information\", JOptionPane.INFORMATION_MESSAGE);\r\n\r\n\t\tString msj = \"prueba de mensaje\";\r\n\t\tJOptionPane.showMessageDialog(null, msj, // Mensaje\r\n\t\t\t\t\"Mensaje Plano\", // Título\r\n\t\t\t\tJOptionPane.PLAIN_MESSAGE); // Tipo de mensaje\r\n\r\n\t\tJOptionPane.showMessageDialog(null, msj, // Mensaje\r\n\t\t\t\t\"Mensaje Informativo\", // Título\r\n\t\t\t\tJOptionPane.INFORMATION_MESSAGE); // Tipo de mensaje\r\n\r\n\t\tJOptionPane.showMessageDialog(null, msj, // Mensaje\r\n\t\t\t\t\"Mensaje de Pregunta\", // Título\r\n\t\t\t\tJOptionPane.QUESTION_MESSAGE); // Tipo de mensaje\r\n\r\n\t\tJOptionPane.showMessageDialog(null, msj, // Mensaje\r\n\t\t\t\t\"Mensaje de Error\", // Título\r\n\t\t\t\tJOptionPane.ERROR_MESSAGE); // Tipo de mensaje\r\n\r\n\t\tJOptionPane.showMessageDialog(null, msj, // Mensaje\r\n\t\t\t\t\"Mensaje de Advertencia\", // Título\r\n\t\t\t\tJOptionPane.WARNING_MESSAGE); // Tipo de mensaje\r\n\r\n\t\tString nl = System.getProperty(\"line.separator\");\r\n\t\t// Lanzamos el mensaje:\r\n\t\tJOptionPane.showMessageDialog(null,\r\n\t\t\t\t\"Soy un mensaje\" + nl + \"de varias líneas...\" + nl + \"Y esto es todo .....\");\r\n\r\n\t}", "public void generateMatrix() {\n\n flow = new int[MATRIX_TAM][MATRIX_TAM];\n loc = new int[MATRIX_TAM][MATRIX_TAM];\n\n for (int i = 0; i < MATRIX_TAM; i++) {\n for (int j = 0; j < MATRIX_TAM; j++) {\n\n //fill the distances matrix\n if (i != j) {\n loc[i][j] = rn.nextInt(MAX_DISTANCE - MIN_DISTANCE + 1) + MIN_DISTANCE;\n } else {\n loc[i][j] = 0;\n }\n\n //fill the flow matrix\n if (i != j) {\n flow[i][j] = rn.nextInt(MAX_FLOW - MIN_FLOW + 1) + MIN_FLOW;\n } else {\n flow[i][j] = 0;\n }\n\n }\n }\n\n }", "public Nodo dosNoSeguidos(Nodo nodo) throws IOException{\n System.out.println(\"----------------inicio heuristica dosnoseguidos--------------\");\n Operadores operadores = new Operadores();\n //variables de matriz\n int numFilas,numColumnas,numColores;\n \n numColumnas = nodo.getnColumnas();\n numFilas = nodo.getnFilas();\n numColores = nodo.getnColores();\n \n String [][] matriz = new String [numFilas][numColumnas];\n matriz = operadores.clonarMatriz(nodo.getMatriz());\n //-------------------\n \n //variables de filas y columnas\n ArrayList<ArrayListColumna> columnas = new ArrayList<ArrayListColumna>();\n columnas = (ArrayList<ArrayListColumna>)nodo.getColumnas();\n \n ArrayList<ArrayListFila> filas = new ArrayList<ArrayListFila>();\n filas = (ArrayList<ArrayListFila>)nodo.getFilas();\n //---------------------------\n \n ArrayListFila auxListFila = new ArrayListFila();\n ArrayListColumna auxListColumna = new ArrayListColumna();\n \n int cambio=1;\n \n while(cambio!=0){\n cambio=0;\n \n nodo.setCambio(0);\n for(int i = 0;i<numFilas;i++){\n if(operadores.isFilaVacia(nodo.getMatriz(), i) == true){\n //filas\n auxListFila = (ArrayListFila)filas.get(i);\n\n int contadorColores = 0;\n for(int j=0;j<numColores;j++){\n Color auxColor = new Color();\n auxColor = auxListFila.getColor(j);\n if(auxColor.getNumero() > 0){\n contadorColores++;\n }\n }//fin color\n\n\n if(contadorColores == 2){//esto quiere decir que hay dos colores disponibles para usar en la matriz\n //ahora hay que ver si uno de los dos es igual a 2 y false\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListFila.getColor(j1);\n\n if(auxColor1.getNumero() == 2 && auxColor1.isSeguido() == false){\n for(int j2=0;j2<numColores;j2++){\n Color auxColor2 = new Color();\n auxColor2 = auxListFila.getColor(j2);\n\n if(auxColor2.isSeguido() == true){\n cambio=1;\n nodo.setCambio(1);\n //pinta los extremos de la fila\n matriz = operadores.pintarPosicion(matriz,i, (numColumnas-1), auxColor1.getColor());\n \n matriz = operadores.pintarPosicion(matriz, i, 0, auxColor1.getColor());\n \n //pinta el resto de la fila\n matriz = operadores.pintarFilaCompleta(matriz, auxColor2.getColor(), i);\n //descuenta los colores en las filas\n auxColor1.setNumero(0);\n auxColor2.setNumero(0);\n \n //descontar colores en las columnas\n for(int c=0;c<numColumnas;c++){\n auxListColumna = (ArrayListColumna)columnas.get(c);\n \n if(c == 0){\n for(int c1=0;c1<numColores;c1++){\n Color auxColorc1 = new Color();\n auxColorc1 = auxListColumna.getColor(c1);\n \n if(auxColorc1.getColor().equals(auxColor1.getColor())){\n auxColorc1.setNumero(auxColorc1.getNumero()-1);\n }\n \n }\n }else if(c == (numColumnas-1)){\n for(int c1=0;c1<numColores;c1++){\n Color auxColorc1 = new Color();\n auxColorc1 = auxListColumna.getColor(c1);\n \n if(auxColorc1.getColor().equals(auxColor1.getColor())){\n auxColorc1.setNumero(auxColorc1.getNumero()-1);\n }\n }\n }else{\n for(int c1=0;c1<numColores;c1++){\n Color auxColorc1 = new Color();\n auxColorc1 = auxListColumna.getColor(c1);\n \n if(auxColorc1.getColor().equals(auxColor2.getColor())){\n auxColorc1.setNumero(auxColorc1.getNumero()-1);\n }\n }\n \n }\n \n }\n \n nodo.setMatriz(matriz.clone());\n System.out.println(\"-----\");\n operadores.imprimirMatriz(nodo.getMatriz());\n System.out.println(\"-----\");\n }\n }\n }\n }//fin color\n }\n }//fin isfilaVacia\n }//fin filas\n \n \n //---------columnas\n for(int i = 0;i<numColumnas;i++){\n if(operadores.isColumnaVacia(nodo.getMatriz(), i) == true){ \n //columnas\n auxListColumna = (ArrayListColumna)columnas.get(i);\n\n int contadorColores = 0;\n for(int j=0;j<numColores;j++){\n Color auxColor = new Color();\n auxColor = auxListColumna.getColor(j);\n if(auxColor.getNumero() > 0){\n contadorColores++;\n } \n }//fin color\n if(contadorColores == 2){//esto quiere decir que hay dos colores disponibles para usar en la matriz\n //ahora hay que ver si uno de los dos es igual a 2 y false\n for(int j1=0;j1<numColores;j1++){\n Color auxColor1 = new Color();\n auxColor1 = auxListColumna.getColor(j1);\n\n if(auxColor1.getNumero() == 2 && auxColor1.isSeguido() == false){\n for(int j2=0;j2<numColores;j2++){\n Color auxColor2 = new Color();\n auxColor2 = auxListColumna.getColor(j2);\n if(auxColor2.isSeguido() == true){\n cambio=1;\n nodo.setCambio(1);\n matriz = operadores.pintarPosicion(matriz,(numFilas-1), i, auxColor1.getColor());\n matriz = operadores.pintarPosicion(matriz, 0, i, auxColor1.getColor());\n \n matriz = operadores.pintarColumnaCompleta(matriz, auxColor2.getColor(), i);\n \n auxColor1.setNumero(0);\n auxColor2.setNumero(0);\n \n \n //descontar colores en las columnas\n for(int f=0;f<numFilas;f++){\n auxListFila = (ArrayListFila)filas.get(f);\n \n if(f == 0){\n for(int f1=0;f1<numColores;f1++){\n Color auxColorf1 = new Color();\n auxColorf1 = auxListFila.getColor(f1);\n \n if(auxColorf1.getColor().equals(auxColor1.getColor())){\n auxColorf1.setNumero(auxColorf1.getNumero()-1);\n }\n \n }\n }else if(f == (numColumnas-1)){\n for(int f1=0;f1<numColores;f1++){\n Color auxColorf1 = new Color();\n auxColorf1 = auxListFila.getColor(f1);\n \n if(auxColorf1.getColor().equals(auxColor1.getColor())){\n auxColorf1.setNumero(auxColorf1.getNumero()-1);\n }\n \n }\n }else{\n for(int f1=0;f1<numColores;f1++){\n Color auxColorf1 = new Color();\n auxColorf1 = auxListFila.getColor(f1);\n \n if(auxColorf1.getColor().equals(auxColor2.getColor())){\n auxColorf1.setNumero(auxColorf1.getNumero()-1);\n }\n }\n \n }\n \n }\n \n nodo.setMatriz(matriz.clone());\n System.out.println(\"-----\");\n operadores.imprimirMatriz(nodo.getMatriz());\n System.out.println(\"-----\");\n }\n }\n }\n }//fin color\n }\n }\n }//fin columnas\n }//fin while principal\n \n System.out.println(\"---------------final heuristica dosnoseguidos---------------\");\n return nodo;\n }", "public List<int[][]> evaluate(IBoard board){\n\n int area = board.getHeight() * board.getWidth();\n\n int[][] newArray = new int[area][2];\n\n int k = 0;\n\n while (k < newArray.length) {\n for (int i = 0; i < board.getHeight(); i++) {\n for (int j = 0; j < board.getWidth(); j++) {\n newArray[k][0] = i;\n newArray[k][1] = j;\n k++;\n }\n }\n }\n\n List<int[][]> Allmoves = new ArrayList<>();\n\n int res = newArray.length / board.getHeight();\n\n /*For rows*/\n int q = 0;\n int w = res;\n\n for (int i = 0; i < res; i++) {\n int[][] arr = new int[res][2];\n\n int e = 0;\n\n for (int j = q; j < w; j++) {\n arr[e][0] = newArray[j][0];\n arr[e][1] = newArray[j][1];\n e++;\n }\n\n w += res;\n q += res;\n\n Allmoves.add(arr);\n\n }\n\n /*For columns*/\n int r = 0;\n for (int i = 0; i < res; i++) {\n\n int[][] arr = new int[res][2];\n int e = 0;\n\n for (int j = 0; j < res; j++) {\n arr[e][0] = newArray[r][0];\n arr[e][1] = newArray[r][1];\n\n r += res;\n e++;\n }\n r = 0;\n r += i + 1;\n\n Allmoves.add(arr);\n }\n\n /*For diagonal - 1*/\n int[][] arr = new int[res][2];\n int d1 = res + 1;\n int d = 0;\n int e = 0;\n for (int i = 0; i < res; i++) {\n arr[e][0] = newArray[d][0];\n arr[e][1] = newArray[d][1];\n d += d1;\n e++;\n }\n\n Allmoves.add(arr);\n\n int[][] arr1 = new int[res][2];\n int d2 = res - 1;\n int D = res - 1;\n int p = 0;\n for (int i = 0; i < res; i++) {\n arr1[p][0] = newArray[D][0];\n arr1[p][1] = newArray[D][1];\n D += d2;\n p++;\n }\n\n Allmoves.add(arr1);\n\n return Allmoves;\n\n }", "private int getResult() {\n ArrayList<Character> operanzi = new ArrayList<Character>();\n ArrayList<Character> operatori = new ArrayList<Character>();\n for(int i = 1; i <= n; i++){\n // System.out.println(i);\n if ((expr[i] == 'T' ) || (expr[i] == 'F'))\n operanzi.add(expr[i]);\n else \n operatori.add(expr[i]);\n }\n System.out.println(operanzi.get(0));\n int n1 = operanzi.size();\n System.out.println(n1);\n long [][] T = new long[n1][n1];\n long [][] F = new long[n1][n1];\n\n for (int i = 0; i < operanzi.size(); i++) {\n \n if (operanzi.get(i) == 'T') {\n T[i][i] = 1;\n F[i][i] = 0;\n } else if (operanzi.get(i) == 'F') {\n T[i][i] = 0;\n F[i][i] = 1;\n }\n }\n long aux=0;\n for (int l=1; l<n1; ++l) \n { \n for (int i=0, j=l; j<n1; ++i, ++j) \n { \n T[i][j] = F[i][j] = 0; \n for (int g=0; g<l; g++) \n { \n int k = i + g; \n long total_i_k = evaluate(T[i][k],F[i][k],'+'); \n long total_k_j = evaluate(T[k+1][j] , F[k+1][j],'+'); \n long total = evaluate(total_i_k,total_k_j,'*');\n if (operatori.get(k) == '&') \n { \n aux = evaluate(T[i][k],T[k+1][j],'*');\n T[i][j] = evaluate(T[i][j],aux,'+'); \n \n\n F[i][j] = evaluate( F[i][j],evaluate(total,aux,'-'),'+'); \n } \n if (operatori.get(k) == '|') \n { \n aux = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate(F[i][j],aux,'+'); \n \n T[i][j] =evaluate( T[i][j],evaluate(total, aux,'-'),'+'); \n } \n if (operatori.get(k) == '^') \n { \n aux = evaluate(F[i][k],T[k+1][j],'*');\n long aux1= evaluate(T[i][k],F[k+1][j],'*');\n T[i][j] = evaluate( T[i][j],evaluate( aux , aux1,'+'),'+'); \n aux = evaluate(T[i][k],T[k+1][j],'*');\n aux1 = evaluate(F[i][k],F[k+1][j],'*');\n F[i][j] = evaluate( F[i][j],evaluate(aux,aux1,'+'),'+');\n } \n } \n } \n } \n return (int)T[0][n1-1]; \n }", "public static void rotateMatrix(int[][] a]){\n if (a == null || a.length == 0 || a.length != a[0].length){\n return;\n }\n \n // we olny need half of the layers as other layers will be processed automatically\n for (int layer = 0; layer < a.length/2; layer++){\n // rotate (array, start, end), this will take us to the end\n rotate(a, layer, a.length-1-layer)\n }\n}", "public List<List<GenPolynomial<C>>> \n normalizeMatrix(int flen, List<List<GenPolynomial<C>>> M) { \n if ( M == null ) {\n return M;\n }\n if ( M.size() == 0 ) {\n return M;\n }\n List<List<GenPolynomial<C>>> N = new ArrayList<List<GenPolynomial<C>>>();\n List<List<GenPolynomial<C>>> K = new ArrayList<List<GenPolynomial<C>>>();\n int len = M.get( M.size()-1 ).size(); // longest row\n // pad / extend rows\n for ( List<GenPolynomial<C>> row : M ) {\n List<GenPolynomial<C>> nrow = new ArrayList<GenPolynomial<C>>( row );\n for ( int i = row.size(); i < len; i++ ) {\n nrow.add( null );\n }\n N.add( nrow );\n }\n // System.out.println(\"norm N fill = \" + N);\n // make zero columns\n int k = flen;\n for ( int i = 0; i < N.size(); i++ ) { // 0\n List<GenPolynomial<C>> row = N.get( i );\n if ( debug ) {\n logger.info(\"row = \" + row);\n }\n K.add( row );\n if ( i < flen ) { // skip identity part\n continue;\n }\n List<GenPolynomial<C>> xrow;\n GenPolynomial<C> a;\n //System.out.println(\"norm i = \" + i);\n for ( int j = i+1; j < N.size(); j++ ) {\n List<GenPolynomial<C>> nrow = N.get( j );\n //System.out.println(\"nrow j = \" +j + \", \" + nrow);\n if ( k < nrow.size() ) { // always true\n a = nrow.get( k );\n //System.out.println(\"k, a = \" + k + \", \" + a);\n if ( a != null && !a.isZERO() ) {\n xrow = blas.scalarProduct( a, row);\n xrow = blas.vectorAdd(xrow,nrow);\n //System.out.println(\"xrow = \" + xrow);\n N.set( j, xrow );\n }\n }\n }\n k++;\n }\n //System.out.println(\"norm K reduc = \" + K);\n // truncate \n N.clear();\n for ( List<GenPolynomial<C>> row: K ) {\n List<GenPolynomial<C>> tr = new ArrayList<GenPolynomial<C>>();\n for ( int i = 0; i < flen; i++ ) {\n tr.add( row.get(i) );\n }\n N.add( tr );\n }\n K = N;\n //System.out.println(\"norm K trunc = \" + K);\n return K;\n }", "public Matrix rref() {\n\t\tMatrix m = ref();\n\t\tint pivotRow = m.M - 1;\n\t\tArrayList<Integer> pivotColumns = m.pivotColumns();\n\t\tCollections.reverse(pivotColumns);\n\t\tfor (int i = 0; i < pivotColumns.size(); i++) {\n\t\t\tint pivotCol = pivotColumns.get(i);\n\t\t\twhile (pivotRow >= 0 && m.ROWS[pivotRow][pivotCol].equals(new ComplexNumber(0))) {\n\t\t\t\tpivotRow--;\n\t\t\t}\n\t\t\tfor (int upperRow = pivotRow - 1; upperRow > -1; upperRow--) {\n\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\tComplexNumber factor2 = m.ROWS[upperRow][pivotCol];\n\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][pivotCol];\n\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\tm = m.rowAdd(upperRow, pivotRow, weight);\n\t\t\t}\n\t\t\tpivotRow--;\n\t\t}\n\t\treturn m;\n\t}", "public void generaBuits() {\r\n\r\n //FIX PARA EL OUT OF BOUNDS DE la columna 9 \r\n //int cellId = randomGenerator(N*N) - 1;\r\n //QUITAR \r\n //if (j != 0)\r\n //j = j - 1;\r\n int count = K;\r\n while (count != 0) {\r\n int cellId = generadorAleatoris(N * N) - 1;\r\n\r\n //System.out.println(cellId); \r\n // extract coordinates i and j \r\n int i = (cellId / N);\r\n int j = cellId % 9;\r\n\r\n // System.out.println(i+\" \"+j); \r\n if (mat[i][j] != 0) {\r\n count--;\r\n mat[i][j] = 0;\r\n }\r\n }\r\n }", "public List<List<Integer>> generate(int numRows) {\n List<List<Integer>> ans = new ArrayList();\n for(int i=0;i<numRows;i++){\n ans.add(new ArrayList());\n for(int j=0;j<=i;j++){\n if(j==0||j==i)\n ans.get(i).add(1);\n else\n ans.get(i).add(ans.get(i-1).get(j-1)+ans.get(i-1).get(j));\n }\n }\n return ans;\n }", "private int[][] initialStateMatrix() {\n return new int[][]{{2,1,-1,3,0,-1},\n {2,-1,-1,3,-1,-1},\n {2,-1,5,4,8,-1},\n {4,-1,-1,-1,-1,-1},\n {4,-1,5,-1,8,-1},\n {7,6,-1,-1,-1,-1},\n {7,-1,-1,-1,-1,-1},\n {7,-1,-1,-1,8,-1},\n {-1,-1,-1,-1,8,-1}};\n }", "private Sign[] flattenBoard(){\r\n Sign[] flatBoard = new Sign[10]; // an array to save the board as one dimensional array\r\n int count = 1; //counter to help the transition from matrix to array\r\n\r\n /* transfer the matrix to array */\r\n for (int i=0;i<3;i++)\r\n for (int j=0;j<3;j++)\r\n flatBoard[count++] = board[i][j];\r\n\r\n return flatBoard;\r\n }", "public void agregarVidaLogica(){\n int numvida = tam * tam;\n numvida*=0.05;\n System.out.println(numvida);\n for(int i=0;i<numvida;i++){\n int x= (int)(Math.random()*tam);\n int y= (int)(Math.random()*tam);\n if(matriz[y][x]!=2 && matriz[y][x]!=1){\n matriz[y][x]=4;\n }\n }\n }", "private RecordSet armaRSetFinalMarcarModificar(RecordSet r, RecordSet rAccesos) {\n UtilidadesLog.info(\"DAOGestionComisiones.armaRSetFinalMarcarModificar(RecordSet r, RecordSet rAccesos): Entrada\");\n UtilidadesLog.debug(\"***** RecordSet entrada: \" + r);\n UtilidadesLog.debug(\"***** RecordSet entrada Accesos: \" + rAccesos); \n \n //String sAccesos = null; \n for ( int i = 0; i < r.getRowCount(); i++)\n { /*sAccesos = \"\";\n for(int z = 0;z<rAccesos.getRowCount();z++)\n {\n if(rAccesos.getValueAt(z,0).equals(r.getValueAt(i,1)))\n sAccesos += ((!\"\".equals(sAccesos))?\" - \":\"\").concat((String)rAccesos.getValueAt(z,1)); \n }*/\n String sAccesos = (String) rAccesos.getValueAt(i,1); \n r.setValueAt(sAccesos,i,6);\n }\n UtilidadesLog.debug(\" Record Final: \" + r);\n UtilidadesLog.info(\"DAOGestionComisiones.armaRSetFinalMarcarModificar(RecordSet r, RecordSet rAccesos): Salida\"); \n return r;\n }", "public void resetChangeableArrays(int[] reg)\n {\n valList = new LinkedList<Integer>();\n possibilityList = new LinkedList<Point>();\n for(int j = 0; j<accumulator.length; j ++)Arrays.fill(accumulator[j],0);\n //accumulator = zeroAccumulator;\n region = reg;\n \n }", "public String[][] solve(String[][] sudoku, int[] matrizVetados, String[][] pass) \n {\n String[][] sudokuRespuesta = null;\n\n //-- Busqueda de matriz 3x3 con más números o menos espacios vacíos \n \n int[] XY = this.busqueda(sudoku, matrizVetados);\n\n if (XY[0] != 0) \n { \n sudokuRespuesta = this.poner(sudoku, this.matriz3x3(sudoku, XY[1], XY[2]), XY);\n\n if (Arrays.deepEquals(sudokuRespuesta, pass)) \n {\n matrizVetados[this.posicionM3x3(XY[1], XY[2])] = this.posicionM3x3(XY[1], XY[2]);\n } else \n {\n pass = this.poner(pass, this.matriz3x3(pass, XY[1], XY[2]), XY);\n \n //--Limpiar vector vetados\n \n matrizVetados = this.cleanVetados(matrizVetados);\n\n }\n \n \n /*\n Validar si el sudoku está resuelto, de lo contrario se llamará recursivamente. \n */\n \n if (this.isComplete(sudokuRespuesta)) \n {\n return sudokuRespuesta;\n } else \n {\n this.solve(sudokuRespuesta, matrizVetados, pass);\n }\n \n \n } else \n { \n //--Limpiar vector vetados\n \n matrizVetados = this.cleanVetados(matrizVetados);\n int[] XY2 = this.busqueda2(sudoku, matrizVetados);\n \n sudokuRespuesta = this.poner2(sudoku, this.matriz3x3(sudoku, XY2[1], XY2[2]), XY2);\n if (!Arrays.deepEquals(sudokuRespuesta, pass)) \n {\n pass = this.poner2(pass, this.matriz3x3(pass, XY2[1], XY2[2]), XY2);\n }\n \n if (this.isComplete(sudokuRespuesta)) \n {\n return sudokuRespuesta;\n } else {\n this.solve(sudokuRespuesta, matrizVetados, pass);\n }\n }\n \n return sudokuRespuesta;\n }", "public static void makeMatrix()\n {\n\n n = Graph.getN();\n m = Graph.getM();\n e = Graph.getE();\n\n connectMatrix = new int[n][n];\n\n // sets the row of value u and the column of value v to 1 (this means they are connected) and vice versa\n // vertices are not considered to be connected to themselves.\n for(int i = 0; i < m;i++)\n {\n connectMatrix[e[i].u-1][e[i].v-1] = 1;\n connectMatrix[e[i].v-1][e[i].u-1] = 1;\n }\n }", "public int[][] MatrizPesos(){\n return this.mat;\n }", "private Stack<Cell> rebuildMovements(PDMatrix mat, Point p, Movement m)\n\t{\n\t\tStack<Cell> cell = new Stack<Cell>();\n\t\tm = m.inverse();\n\t\tdo {\n\t\t\tp = m.applyTo(p);\n\t\t\tCell last = mat.get(p);\n\t\t\tcell.add(last);\n\t\t\tm = last.NextDir(m);\n\t\t}\n\t\twhile(mat.get(p) != Cell.START);\n\t\treturn cell;\n\t}", "public int[][] generateMatrix(int n) {\n\t \n\t int matrix[][] = new int[n][n];\n\t int count = n * n +1;\n int topRow = 0;\n int bottomRow = n-1;\n int leftmostColumn = 0;\n int rightmostColumn = n -1;\n int added = 0;\n\t \n\t \n\t while(leftmostColumn <= rightmostColumn && topRow<= bottomRow && added <= count){\n \n \n \tif(added != count){\n for(int i = leftmostColumn; i <= rightmostColumn;i++){\n \t matrix[topRow][i] = added +1;\n // #arrList.add(matrix[topRow][i]);\n added = added+1;\n /* if(added == count)\n \tbreak;*/\n }\n topRow = topRow +1;\n \t}\n \n \n \tif(added != count){\t\n for(int j = topRow; j <= bottomRow;j++){\n //arrList.add(matrix[j][rightmostColumn]);\n \t matrix[j][rightmostColumn] = added+1;\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n rightmostColumn = rightmostColumn -1;\n \t} \n \t\n \t\n \tif(added != count){\t\n for(int k = rightmostColumn; k >= leftmostColumn; k--){\n \t matrix[bottomRow][k] = added +1;\n //arrList.add(matrix[bottomRow][k]);\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n bottomRow = bottomRow -1;\n \t}\n \t\n \t\n \tif(added != count){\t\n for(int l = bottomRow; l >= topRow ;l--){\n // arrList.add(matrix[l][leftmostColumn]);\n \t matrix[l][leftmostColumn] = added +1;\n added = added+1;\n /*if(added == count)\n \tbreak;*/\n }\n leftmostColumn = leftmostColumn +1;\n \t}\n \n }\n\t \n\t return matrix;\n \n}", "public void invert() {\n \n float[] result = new float[16];\n System.arraycopy(IDENTITY, 0, result, 0, 16);\n \n for(int i = 0; i < 4; i++){\n int i4 = i*4;\n \n // make sure[i,i] is != 0\n \n for(int j = 0; matrix[i4+i] == 0 && j < 4; j++){\n if(j != i && matrix[j*4+i] != 0){\n transform(i, 1, j, matrix, result);\n }\n }\n \n // ensure tailing 0s\n \n for(int j = 0; j < i; j++){\n if(matrix[i4+j] != 0){\n transform(i, -matrix[i4+j]/matrix[j*4+j], j, matrix, result);\n }\n }\n\n if(matrix[i4+i] == 0){\n throw new IllegalArgumentException(\"Not invertable\");\n }\n\n // dump(\"row \"+i+\" leading zeros\", matrix, result);\n }\n \n for(int i = 3; i >= 0; i--){\n int i4 = i*4;\n if(matrix[i4+i] != 1){\n float f = matrix[i4+i];\n matrix[i4+i] = 1;\n for(int j = 0; j < 4; j++){\n result[i4+j] /= f;\n if(j > i){\n matrix[i4+j] /= f;\n }\n }\n }\n\n// dump(\"row \"+i+\" leading 1\", matrix, result);\n \n for(int j = i+1; j < 4; j++){\n if(matrix[i*4+j] != 0){\n transform(i, -matrix[i*4+j], j, matrix, result);\n }\n }\n\n// dump(\"row \"+i+\" tailing 0\", matrix, result);\n\n }\n\n matrix = result;\n }", "public ArrayList<ItemDeRota> getSugestoesDeRota(int estadoAtual, ArrayList<ArrayList<ItemDeRota>> matriz){\n\t\t\n\t\tArrayList<ItemDeRota> sugestoesDeRota = new ArrayList<ItemDeRota>();\n\t\t\n\t\tArrayList<ItemDeRota> linha = matriz.get(estadoAtual);\n\t\tfor (int i = 0; i < linha.size(); i++) {\n\t\t\tItemDeRota item = linha.get(i);\n\t\t\tif(item.getPalavra()!=null){\n\t\t\t\tsugestoesDeRota.add(item);\n\t\t\t}\n\t\t}\n\t\t\t\t\n\t\treturn sugestoesDeRota;\n\t}", "public static Resultado Def_FACA(GrafoMatriz G, Demanda demanda,ListaEnlazada [] ksp,int capacidad){\n int inicio=0, fin=0,cont; // posicion inicial y final dentro del espectro asi como el contador de FSs contiguos disponibles\n \n int demandaColocada=0; // bandera para controlar si ya se encontro espectro disponible para la demanda.\n int [] OE= new int[capacidad]; //Ocupacion de Espectro.\n ArrayList<ListaEnlazada> kspUbicados = new ArrayList<ListaEnlazada>();\n ArrayList<Integer> inicios = new ArrayList<Integer>();\n ArrayList<Integer> fines = new ArrayList<Integer>();\n ArrayList<Integer> indiceKsp = new ArrayList<Integer>();\n\n //Probamos para cada camino, si existe espectro para ubicar la damanda\n int k=0;\n\n while(k<ksp.length && ksp[k]!=null){\n //Inicializadomos el espectro, inicialmente todos los FSs estan libres\n for(int i=0;i<capacidad;i++){\n OE[i]=1;\n }\n //Calcular la ocupacion del espectro para cada camino k\n for(int i=0;i<capacidad;i++){\n for(Nodo n=ksp[k].getInicio();n.getSiguiente().getSiguiente()!=null;n=n.getSiguiente()){\n //System.out.println(\"v1 \"+n.getDato()+\" v2 \"+n.getSiguiente().getDato()+\" cant vertices \"+G.getCantidadDeVertices()+\" i \"+i+\" FSs \"+G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS().length);\n if(G.acceder(n.getDato(),n.getSiguiente().getDato()).getFS()[i].getEstado()==0){\n OE[i]=0;\n break;\n }\n }\n }\n \n inicio=fin=cont=0;\n for(int i=0;i<capacidad;i++){\n if(OE[i]==1){\n inicio=i;\n for(int j=inicio;j<capacidad;j++){\n if(OE[j]==1){\n cont++;\n }\n else{\n cont=0;\n break;\n }\n //si se encontro un bloque valido, salimos de todos los bloques\n if(cont==demanda.getNroFS()){\n fin=j;\n fines.add(fin);\n inicios.add(inicio);\n demandaColocada=1;\n kspUbicados.add(ksp[k]);\n indiceKsp.add(k);\n //inicio=fin=cont=0;\n break;\n }\n }\n }\n if(demandaColocada==1){\n demandaColocada = 0;\n break;\n }\n }\n k++;\n }\n \n /*if(demandaColocada==0){\n return null; // Si no se encontro, en ningun camino un bloque contiguo de FSs, retorna null.\n }*/\n \n if (kspUbicados.isEmpty()){\n //System.out.println(\"Desubicado\");\n return null;\n }\n \n int [] cortesSlots = new int [2];\n double corte = -1;\n double Fcmt = 9999999;\n double FcmtAux = -1;\n \n int caminoElegido = -1;\n\n //controla que exista un resultado\n boolean nulo = true;\n\n ArrayList<Integer> indiceL = new ArrayList<Integer>();\n \n //contar los cortes de cada candidato\n for (int i=0; i<kspUbicados.size(); i++){\n cortesSlots = Utilitarios.nroCuts(kspUbicados.get(i), G, capacidad);\n if (cortesSlots != null){\n corte = (double)cortesSlots[0];\n \n indiceL = Utilitarios.buscarIndices(kspUbicados.get(i), G, capacidad);\n \n \n //contar los desalineamientos\n double desalineamiento = (double)Utilitarios.contarDesalineamiento(kspUbicados.get(i), G, capacidad, cortesSlots[1]);\n \n double capacidadLibre = (double)Utilitarios.contarCapacidadLibre(kspUbicados.get(i),G,capacidad);\n \n double saltos = (double)Utilitarios.calcularSaltos(kspUbicados.get(i));\n \n \n double vecinos = (double)Utilitarios.contarVecinos(kspUbicados.get(i),G,capacidad);\n \n\n \n FcmtAux = corte + (desalineamiento/(demanda.getNroFS()*vecinos)) + (saltos *(demanda.getNroFS()/capacidadLibre)); \n \n if (FcmtAux<Fcmt){\n Fcmt = FcmtAux;\n caminoElegido = i;\n }\n \n nulo = false;\n if (caminoElegido==-1){\n System.out.println(\"Camino Elegido = -1 ..................\");\n }\n \n }\n }\n \n if (caminoElegido==-1){\n System.out.println(\"Camino Elegido = -1 ..................\");\n }\n //caminoElegido = Utilitarios.contarCuts(kspUbicados, G, capacidad);\n \n if (nulo || caminoElegido==-1){\n return null;\n }\n \n Resultado r= new Resultado();\n /*r.setCamino(k-1);\n r.setFin(fin);\n r.setInicio(inicio);*/\n \n r.setCamino(indiceKsp.get(caminoElegido));\n r.setFin(fines.get(caminoElegido));\n r.setInicio(inicios.get(caminoElegido));\n return r;\n }", "public GenerarInformePlanificacion(Curso[] cursos, Apoderado[] apoderados) {\n this.apoderados = new PlanificacionApoderado[apoderados.length];\n for (int i = 0; i < apoderados.length; i++) {\n this.apoderados[i] = new PlanificacionApoderado();\n }\n\n int cantidadCurso = 0;\n\n for (int apTotal = 0; apTotal < this.apoderados.length; apTotal++) {\n this.apoderados[apTotal].nombre = apoderados[apTotal].getNombre();\n this.apoderados[apTotal].apellido = apoderados[apTotal].getApellido();\n this.apoderados[apTotal].run = apoderados[apTotal].getRun();\n for (int cantPupilos = 0; cantPupilos < apoderados[apTotal].getPupilos().size(); cantPupilos++) {\n\n PlanificacionAlumno alumnoAgregar = new PlanificacionAlumno();\n alumnoAgregar.nombre = apoderados[apTotal].getPupilos().get(cantPupilos).getNombre();\n alumnoAgregar.apellido = apoderados[apTotal].getPupilos().get(cantPupilos).getApellido();\n alumnoAgregar.run = apoderados[apTotal].getPupilos().get(cantPupilos).getRun();\n for (int j = 0; j < 16; j++) {\n for (int alum = 0; alum < 30; alum++) {\n if (cursos[j].getAlumnos()[alum].getRun().equals(apoderados[apTotal].getPupilos().get(cantPupilos).getRun())) {\n cantidadCurso = j;\n break;\n }\n }\n }\n for (int i = 0; i < 50; i++) {\n alumnoAgregar.plan[i] = cursos[cantidadCurso].getAsignaturas()[(int) i / 10].getPlan()[i % 10];\n }\n this.apoderados[apTotal].pupilos.add(alumnoAgregar);\n\n }\n }\n\n }", "public static void main(String[] args) {\n Scanner sc = new Scanner(System.in);\n n = 5;\n m = 7;\n\n // 최단 거리 테이블을 모두 무한으로 초기화\n for (int i = 0; i < 101; i++) {\n Arrays.fill(graph[i], INF);\n }\n\n // 자기 자신에서 자기 자신으로 가는 비용은 0으로 초기화\n for (int i = 1; i <= n; i++) {\n for (int j = 0; j <= n; j++) {\n if (i == j)\n graph[i][j] = 0;\n }\n }\n\n // 각 간선에 대한 정보를 입력 받아 그 값으로 초기화 (양방향 이동 가능)\n graph[1][2] = 1;\n graph[2][1] = 1;\n graph[1][3] = 1;\n graph[3][1] = 1;\n graph[1][4] = 1;\n graph[4][1] = 1;\n graph[2][4] = 1;\n graph[4][2] = 1;\n graph[3][4] = 1;\n graph[4][3] = 1;\n graph[3][5] = 1;\n graph[5][3] = 1;\n graph[4][5] = 1;\n graph[5][4] = 1;\n\n // // 각 간선에 대한 정보를 입력 받아, 그 값으로 초기화\n // for (int i = 0; i < m; i++) {\n // // A와 B가 서로에게 가는 비용은 1이라고 설정\n // int a = sc.nextInt();\n // int b = sc.nextInt();\n // graph[a][b] = 1;\n // graph[b][a] = 1;\n // }\n\n for (int k = 1; k <= n; k++) {\n for (int a = 1; a <= n; a++) {\n for (int b = 1; b <= n; b++) {\n graph[a][b] = Math.min(graph[a][b], graph[a][k] + graph[k][b]);\n }\n }\n }\n\n // 수행된 결과를 출력\n for (int a = 1; a <= n; a++) {\n for (int b = 1; b <= n; b++) {\n if (graph[a][b] == INF)\n System.out.print(\"INFINITY \");\n else\n System.out.print(graph[a][b] + \" \");\n }\n System.out.println();\n }\n\n System.out.println(graph[1][5] + graph[5][4]);\n }", "public static void main(String[] args) {\n\r\n\t\tint [] [] matriz = new int [ 3 ] [ 3 ];\r\n\t\tint somamat = 0 , somadiago = 0 , L , C ;\r\n\t\t\r\n\t\tScanner ler = new Scanner (System.in);\r\n\t\tfor ( L = 0; L <3; L ++ ) {\r\n\t\t\tfor( C = 0; C <3; C ++ ) {\r\n\t\t\t\tSystem.out.printf (\"\\nEntre com o valor da Matriz [% d] [% d] da matriz \" , L , C );\r\n\t\t\t\tmatriz [ L ] [ C ] = ler . nextInt ();\r\n\t\t\t\tsomamat = somamat + matriz [ L ] [ C ];\r\n\t\t\t}\r\n\t\t}\r\n\t\tsomadiago = matriz [ 0 ] [ 0 ] + matriz [ 1 ] [ 1 ] + matriz [ 2 ] [ 2 ];\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println ( \" A soma dos valores da matriz é igual a: \" + somamat);\r\n\t\tSystem.out.println(\"\");\r\n\t\tSystem.out.println ( \" A soma dos valores da diagonal principal é igual a: \" + somadiago);\r\n\t}", "public Matrix calculate();", "public static ArrayList<ArrayList<Integer>> generate(int numRows) {\n ArrayList<ArrayList<Integer>> rst = new ArrayList<ArrayList<Integer>>(); \n ArrayList<Integer> curRow;\n if ( 0 == numRows) return rst;\n curRow = new ArrayList<Integer>();\n curRow.add(1);\n rst.add(curRow);\n if (1 == numRows) return rst;\n \n curRow = new ArrayList<Integer>();\n curRow.add(1);\n curRow.add(1);\n rst.add(curRow);\n if (2 == numRows) return rst;\n ArrayList<Integer> lastRow = curRow;\n curRow = new ArrayList<Integer>();\n \n for (int i=3;i<=numRows;i++) {\n curRow.add(1);\n \tfor (int j=1; j<i-1; j++) \n \t\tcurRow.add(lastRow.get(j-1) + lastRow.get(j));\n \tcurRow.add(1);\n \trst.add(curRow);\n \tlastRow = curRow;\n \tcurRow = new ArrayList<Integer>(); \n }\n return rst;\n }", "public void resolver() {\r\n\t\tfor(int i = 0; i<casillas.length; i++) {\r\n\t\t\tfor(int j = 0; j<casillas[0].length; j ++) {\r\n\t\t\t\tif(casillas[i][j].darSeleccionada() == false) {\r\n\t\t\t\t\tcasillas[i][j].destapar();\r\n\t\t\t\t\tcasillas[i][j].modificarValor(cantidadMinasAlrededor(i, j));\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private void laskeMatkojenPituus() {\n matkojenpituus = 0.0;\n\n for (Matka m : matkat) {\n matkojenpituus += m.getKuljettumatka();\n }\n\n }", "void setAdjForFirstType() {\n matrixOfSquares[0][0].setCardinalSquare(null, matrixOfSquares[1][0] , null, matrixOfSquares[0][1]);\n matrixOfSquares[0][1].setCardinalSquare(null, null , matrixOfSquares[0][0], matrixOfSquares[0][2]);\n matrixOfSquares[0][2].setCardinalSquare(null,matrixOfSquares[1][2] , matrixOfSquares[0][1], null);\n matrixOfSquares[1][0].setCardinalSquare(matrixOfSquares[0][0], null, null, matrixOfSquares[1][1] );\n matrixOfSquares[1][1].setCardinalSquare(null, matrixOfSquares[2][1], matrixOfSquares[1][0], matrixOfSquares[1][2] );\n matrixOfSquares[1][2].setCardinalSquare(matrixOfSquares[0][2] , null, matrixOfSquares[1][1], matrixOfSquares[1][3]);\n matrixOfSquares[1][3].setCardinalSquare(null, matrixOfSquares[2][3], matrixOfSquares[1][2], null);\n matrixOfSquares[2][1].setCardinalSquare( matrixOfSquares[1][1], null, null, matrixOfSquares[2][2] );\n matrixOfSquares[2][2].setCardinalSquare(null, null, matrixOfSquares[2][1], matrixOfSquares[2][3] );\n matrixOfSquares[2][3].setCardinalSquare(matrixOfSquares[1][3], null, matrixOfSquares[2][2], null);\n }", "public static void LeMatriz(int M[ ][ ], int n) {\n\t\tint i,j;\n\t\tfor (i=0;i<n;i++){\n\t\t\tSystem.out.print( \"\\n\");\n\t\t\tfor (j=0;j<n;j++){\n\t\t\t\tM[i][j] = teclado1.nextInt();\n\t\t\t}\n\t\t}\n\t}", "public static void main(String[] args) {\n double[] vArr = {5, 10, 15, 20, 25, 30, 35, 40, 45, 50, 55, 60, 65, 70, 75};\n double[] tempArr = {-40, -30, -20, -10, 0, 10, 20, 30, 40, 50};\n //1. utwórz tablice 2-wymiarowa\n //2. potrzebuje: typprzechowanej wartosci i rozmiar, czyli\n //typ: double\n //rozm w kierunku temp.: -40, -30, -20, ... 50 -> 10 elementow\n //rozm w kierunku v: 5, 10, 15, 20, 25, -> 15 elelmentow\n double[][] resultMatrix = new double[vArr.length][tempArr.length];\n\n //3. rM(1, 3) = f(10, -10) = -7,5;\n //Odczytac wartosc v i temp do obliczen i podstawic do wzoru - wynik umiescic w odp miejscu tab rM\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n resultMatrix[v][t] = 35.74 + 0.6215 * tempArr[t] + (0.4275 * tempArr[t] - 35.75) * Math.pow(vArr[v], 0.16);\n }\n }\n\n //mam juz uzupelniona cala tab wartosci - wyswietlic\n for (int v = 0; v < vArr.length; v++){\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[v], (int) tempArr[t], resultMatrix[v][t]));\n }\n }\n System.out.println(\"Tabela wartosci: \");\n for (int v = 0; v < vArr.length; v++) {\n for (int t = 0; t < tempArr.length; t++){\n System.out.println(resultMatrix[v][t] + \"\\t\");\n }\n System.out.println();\n }\n System.out.println(\"Podaj v: <5, 10, 15... 75>\");\n //5 -> vArr[0]\n //75 -> vArr[14]\n //userInput/5 - 1\n Scanner sc = new Scanner(System.in);\n int userInput = sc.nextInt();\n int vIdx = userInput / 5 - 1;\n System.out.println(\"Podaj temp: <-40, -30... 50>\");\n userInput = sc.nextByte();\n int tempIdx = (userInput + 40) / 10;\n\n System.out.println(String.format(\"f(%d, %d) = %f\", (int) vArr[vIdx], (int) tempArr[tempIdx], resultMatrix[vIdx][tempIdx]));\n }", "private void\ngetMatrix( SoNode node)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoPath xfPath; // ptr\n\n // Construct a path from the root down to this node. Use the given\n // path if it's the same\n if (node == null || node == SoFullPath.cast(path).getTail())\n xfPath = path;\n\n else {\n int index = getNodeIndex(node);\n xfPath = path.copy(0, index + 1);\n xfPath.ref();\n }\n\n // Create an action instance if necessary, then apply it to the path\n if (matrixAction == null)\n matrixAction = new SoGetMatrixAction(vpRegion);\n matrixAction.apply(xfPath);\n\n if (xfPath != path)\n xfPath.unref();\n}", "public static void main(String[] args) {\n int[] miMatriz = new int[5];\n\n //Primera forma de agregar elementos a una matriz (agregar cada elemento en el indice indicado)\n miMatriz[0] = 1;\n miMatriz[1] = 2;\n miMatriz[2] = 3;\n miMatriz[3] = 4;\n miMatriz[4] = 5;\n\n /* Segunda forma de declarar una matriz\n Esta lo que hace es declarar la matriz e introducir los elementos \n en una sola línea\n */\n int[] miMatriz2 = {1, 2, 3, 4, 5};\n\n // Recorrer las matrices con un for normal\n for (int i = 0; i < miMatriz.length; i++) {\n System.out.println(\"Posicion matriz 1: \" + i + \" con un valor de \" + miMatriz[i]);\n }\n System.out.println();\n for (int i = 0; i < miMatriz2.length; i++) {\n System.out.println(\"Posicion matriz 2: \" + i + \" con un valor de \" + miMatriz2[i]);\n }\n }", "public void makeIdentity() {\n if (rows == cols) {\n for (int i=0; i<rows; i++) {\n for (int j=0; j<cols; j++) {\n if (i == j) {\n matrix.get(i)[j] = 1;\n }\n else {\n matrix.get(i)[j] = 0;\n }\n }\n }\n }\n else {\n throw new NonSquareMatrixException();\n }\n }", "private void iniciaReferencia(int qtdLinha){\n referenciaFrequencia = new int[qtdConjunto][];\n referenciaTempo = new int[qtdConjunto][];\n for (int i = 0; i < referenciaFrequencia.length; i++) {\n \treferenciaFrequencia[i] = new int[qtdLinha];\n \treferenciaTempo[i] = new int[qtdLinha];\n for (int j = 0; j < referenciaFrequencia[i].length; j++) {\n\t\t\t\treferenciaFrequencia[i][j] = 0;\n\t\t\t\treferenciaTempo[i][j] = 0;\n\t\t\t}\n }\n }", "public static Nodo buscarSolucionPorAmplitud(Nodo inicio, int[][] solucion) {\n\t\tArrayList<Nodo> abiertos = new ArrayList<Nodo>();\n\t\tabiertos.add(inicio);\n\t\tint cont = 0;\n\t\tArrayList<Nodo> visitados = new ArrayList<Nodo>();\n\t\twhile(abiertos.size()!=0) {\n\t\t\tSystem.out.println(\"Visitados\");\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tfor(Nodo n : visitados) {\n\t\t\t\timprimirEstado(n.getEstado());\n\t\t\t\tSystem.out.println(\"Costo de este nodo: \" + n.getCosto());\n\t\t\t\tSystem.out.println(\"---------------\");\n\t\t\t}\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tNodo revisar = abiertos.remove(0);\n\t\t\trevisar.setCosto(calcularCosto(revisar.getEstado(), solucion));\n\t\t\timprimirEstado(revisar.getEstado());\n\t\t\tint[] pcero = ubicarPosicionCero(revisar.getEstado());\n\t\t\tSystem.out.println(\"Iteracion # \" + ++cont);\n\t\t\tif(Arrays.deepEquals(revisar.getEstado(), solucion)) {\n\t\t\t\tSystem.out.println(\"***** SOLUCION ENCONTRADA *****\");\n\t\t\t\treturn revisar;\n\n\t\t\t}\n\n\t\t\tArrayList<Nodo> hijos = new ArrayList<Nodo>();\n\t\t\tvisitados.add(revisar);\n\t\t\tif(pcero[0]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint arriba = hijo.getEstado()[pcero[0]-1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = arriba;\n\t\t\t\thijo.getEstado()[pcero[0]-1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[0]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint abajo = hijo.getEstado()[pcero[0]+1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = abajo;\n\t\t\t\thijo.getEstado()[pcero[0]+1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint izq = hijo.getEstado()[pcero[0]][pcero[1]-1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = izq;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]-1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint der = hijo.getEstado()[pcero[0]][pcero[1]+1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = der;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]+1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\trevisar.setHijos(hijos);\n\t\t}\n\t\treturn null;\n\n\t}", "private void aretes_aR(){\n\t\tthis.cube[13] = this.cube[52]; \n\t\tthis.cube[52] = this.cube[19];\n\t\tthis.cube[19] = this.cube[1];\n\t\tthis.cube[1] = this.cube[28];\n\t\tthis.cube[28] = this.cube[13];\n\t}", "static void productoEscalarMatriz() {\r\n\r\n System.out.println(\"PRODUCTO ESCALAR X MATRIZ \\n\");\r\n setup(false);\r\n String valor = inputDialog(\"Inserte un escalar\", \"Escalar\", JOptionPane.INFORMATION_MESSAGE);\r\n int escalar = Integer.parseInt(valor);\r\n matrizA.productoEscalarMatriz(escalar);\r\n messageDialog(\"La matriz resultante al multiplicar por el escalar \" + escalar + \", es: \\n\" + matrizA.datosMatrizNumeros(), \"Producto escalar\", 3);\r\n\r\n }", "public int[][] extraMatriz(int a, int b, int[][] mat) {\r\n\t\tint arra[] = new int[9];\r\n\t\tint cont = 0;\r\n\t\tint i2 = (a/3)*3;\r\n\t\tint j2 = (b/3)*3;\r\n\t\tfor (int i = (a/3)*3; i < i2+3; i++) {\r\n\t\t\tfor (int j = (b/3)*3; j < j2+3; j++) {\r\n\t\t\t\tarra[cont] = mat[i][j];\r\n\t\t\t\tcont++;\r\n\t\t\t}\r\n\t\t}\r\n\t\t\r\n\t\treturn this.arrayToMatriz(arra);\r\n\t}", "private void actualizaSolucion() {\n if(debug) {\n System.out.println(\"**********************actualizaSolucion\");\n printSol();\n }\n \n this.numSoluciones++; \n for(int i = 0; i < this.sol.emparejamientos.length; ++i) {\n for(int j = 0; j < this.sol.emparejamientos[i].length; ++j) {\n this.solOptima.emparejamientos[i][j] = this.sol.emparejamientos[i][j];\n }\n }\n this.solOptima.numVerticesEmparejados = this.sol.numVerticesEmparejados;\n this.solOptima.pesoEmparejamiento = this.sol.pesoEmparejamiento;\n }", "private void getProperBaseMatrix(Matrix matrix) \r\n {\r\n \tif(mViewWidth == 0)\r\n \t\treturn;\r\n \t\r\n \tfloat w = mRoBitmap.getWidth();\r\n \tfloat h = mRoBitmap.getHeight();\r\n \t\r\n matrix.reset();\r\n // We limit up-scaling to 3x otherwise the result may look bad if it's\r\n // a small icon.\r\n float widthScale = (float)((float)mViewWidth / w);//Math.min((float)((float)mViewWidth / w), 3.0f);\r\n float heightScale = (float)((float)mViewHeight / h);//Math.min((float)((float)mViewHeight / h), 3.0f);\r\n float scale = Math.max(widthScale, heightScale);\r\n \r\n matrix.postConcat(mRoBitmap.getRotateMatrix());\r\n matrix.postScale(scale, scale);\r\n\r\n matrix.postTranslate(\r\n (mViewWidth - w * scale) / 2F,\r\n (mViewHeight - h * scale) / 2F);\r\n }", "private int[] diagnalUpward(List<Integer> resList, int rowIdx, int colIdx, int[][] matrix) {\n int row = matrix.length;\n int col = matrix[0].length;\n\n while ((rowIdx >= 0 && rowIdx < row) && (colIdx >= 0 && colIdx < col)) {\n resList.add(matrix[rowIdx][colIdx]);\n rowIdx--;\n colIdx++;\n }\n rowIdx++;\n colIdx--;\n // Compute new starting point: try to go right, if reaches the end then go down.\n if (colIdx == col - 1) return new int[]{rowIdx + 1, colIdx};\n return new int[]{rowIdx, colIdx + 1};\n }", "public static void testMulRecStrassen() {\n\n try {\n\n Matrix m1 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m2 = new Matrix(new double[][]{\n {1, 2, 3, 4},\n {5, 6, 7, 8},\n {1, 2, 3, 4},\n {5, 6, 7, 8}});\n\n Matrix m3 = Matrix.strassen(m1, m2);\n\n System.out.println(m3);\n\n } catch (Exception e) {\n e.printStackTrace();\n }\n\n }", "public static void imprimirCamino(int dimension, int nodoFuente, int nodoDestino){\n if (dimension < 1){\n System.out.println(\"Se ha llamado al programa con una dimension invalida\");\n System.out.println(\"Ejecute el programa con el parametro \\\"--help\\\" para obtener mas informacion acerca de como llamar correctamente al programa. \");\n }\n else{\n if (((0 > nodoFuente) || (nodoFuente >= (Math.pow(2,dimension)))) || ((0 > nodoDestino) || (nodoDestino >= (Math.pow(2,dimension))))){\n System.out.println(\"Se ha llamado al programa con valores de nodos fuente y/o destino incorrecto\");\n System.out.println(\"Ejecute el programa con el parametro \\\"--help\\\" para obtener mas informacion acerca de como llamar correctamente al programa. \");\n }\n else{\n // Los parametros ingresados son validos\n int nodoVecinoTemporario = nodoFuente;\n int dimensionActual = dimension;\n \n int xorEntreNodos = nodoFuente ^ nodoDestino; // xorEntreNodos mantiene el resultado de la operacion a nivel de bit XOR entre nodoFuente y nodoDestino\n \n System.out.printf(\"A continuacion se muestra el camino realizado por un paquete desde el nodo fuente %d al nodo destino %d\\n\", nodoFuente, nodoDestino);\n \n System.out.printf(\"[ %d \", nodoFuente);\n \n // Para determinar por cuales nodos viaja el mensaje para ir desde el nodo fuente al nodo destino trabajamos con la representacion binaria de los nodos.\n // Al realizar la operacion a nivel de bit XOR entre el nodo fuente y el nodo destino obtenemos un numero que en su representacion binaria indica los distintos movimientos que debemos hacer.\n // Asi, sea \"nm ... n3 n2 n1\" el valor de la operacion XOR con m el valor de la dimension del hypercubo, si nm (esto es el digito en la posicion m del resultado) es uno indica que en ese nivel el mensaje debe viajar al vecino en dicha dimension.\n // Si dicho digito es cero entonces en dicha dimension el mensaje no debe viajar a ningun vecino.\n \n // Asi lo que hacemos es iterar sobre las dimensiones, comenzando en la mayor.\n // Si en dicha dimension el resultado del XOR indica que se debe mover a un nodo vecino realizamos una operacion para que el nodo actual se convierta en el nodo vecino destino temporal.\n // Asi hasta llegar al nodo destino (si se llega al destino antes de recorrer todas las dimensiones) o hasta que se recorran todas las dimensiones.\n while (dimensionActual != 0){\n // Si el nodo aux es igual al nodo destino cortamos el bucle\n if (nodoVecinoTemporario == nodoDestino){\n break;\n }\n \n // Controlamos si en la dimension actual debemos viajar al nodo vecino.\n // Si el resultado del XOR entre los nodos en la dimension actual es uno entramos en el cuerpo de la condicion. (Esto lo controlamos con la siguiente sentencia: (xorEntreNodos & (int)(Math.pow(2, dimensionActual - 1))) != 0)\n if ((xorEntreNodos & (int)(Math.pow(2, dimensionActual - 1))) != 0){ \n // Significa que en esa dimension debo cambiar de nodo al otro nodo de la dimension. \n \n // La operacion de XOR a nivel de bits invierte los bits del primer operando en la posiciones donde el segundo operando tiene un uno.\n // Asi logramos que viaje al nodo vecino invirtiendo los bits.\n nodoVecinoTemporario = nodoVecinoTemporario ^ (int)(Math.pow(2, dimensionActual - 1)); \n \n System.out.printf(\"-> %d \", nodoVecinoTemporario);\n }\n dimensionActual--;\n \n }\n System.out.printf(\"]\");\n }\n }\n }", "public Matrix ref() {\n\t\tMatrix m = copy();\n\t\tint pivotRow = 0;\n\t\tfor (int col = 0; col < m.N; col++) {\n\t\t\tif (pivotRow < m.M) {\n\t\t\t\tint switchTo = m.M - 1;\n\t\t\t\twhile (pivotRow != switchTo && \n\t\t\t\t\t\tm.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\tm = m.rowSwitch(pivotRow, switchTo);\n\t\t\t\t\tswitchTo--;\n\t\t\t\t}\n\t\t\t\tif (!m.ROWS[pivotRow][col].equals(new ComplexNumber(0))) {\n\t\t\t\t\t// We got a non-zero pivot\n\t\t\t\t\tfor (int lowerRow = pivotRow + 1; lowerRow < m.M;\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\tlowerRow++) {\n\t\t\t\t\t\tComplexNumber factor1 = new ComplexNumber(-1);\n\t\t\t\t\t\tComplexNumber factor2 = m.ROWS[lowerRow][col];\n\t\t\t\t\t\tComplexNumber factor3 = m.ROWS[pivotRow][col];\n\t\t\t\t\t\tComplexNumber factor4 = new ComplexNumber(1);\n\t\t\t\t\t\tComplexNumber factor5 = factor1.multiply(factor2);\n\t\t\t\t\t\tComplexNumber factor6 = factor4.divide(factor3);\n\t\t\t\t\t\tComplexNumber weight = factor5.multiply(factor6);\n\n\t\t\t\t\t\tm = m.rowAdd(lowerRow, pivotRow, weight);\n\t\t\t\t\t}\n\t\t\t\t\tpivotRow++;\n\t\t\t\t\t/* Keep the same pivot row if we currently have a\n\t\t\t\t\t * zero-pivot. Move on to see if there's a pivot in the\n\t\t\t\t\t * next column.\n\t\t\t\t\t */\n\t\t\t\t}\t\n\t\t\t}\n\t\t}\n\t\treturn m;\n\t}", "public CromosomaS(int dimension, int generaciones) {\r\n int c[][]=new int[9][9]; //Matriz del Cromosoma\r\n k=45;//Calculamos la constante ´Mágica \r\n c=CrearSudoku(c);\r\n \r\n while(generaciones>0 && mejorfitness<9){ //Calculo de todas las generaciones de cromosomas\r\n //Nueva Generación\r\n if(inicio){//La primera generación la guardamos como la mejor\r\n for (int j = 0; j <dimension ; j++) { //LLenando el primer cromosoma con numeros\r\n for (int l = 0; l <dimension ; l++) {\r\n \r\n if(c[j][l]==0){\r\n do {\r\n numrandom=(int) (Math.random() *9) + 1;\r\n } while (Existe(c,dimension,numrandom,j));\r\n c[j][l]=numrandom;\r\n }\r\n \r\n }\r\n }\r\n mejorfitness=Fitness(c,dimension);\r\n mejorcromosoma=c; //Le asignamos la primera generacion como la mejor\r\n inicio=false;\r\n }\r\n else{//Sino evaluamos que el fitness Generado sea mayor al que esta como menor\r\n switch ((int) (Math.random() * (3)) + 1) {\r\n case 1://Modificamos 1/3 de la matriz\r\n c=mejorcromosoma;\r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j < 9; j++) {\r\n c[i][j]=0;\r\n }\r\n }\r\n c=CrearSudoku(c);\r\n \r\n for (int i = 0; i < 3; i++) {\r\n for (int j = 0; j < 9; j++) {\r\n if(c[i][j]==0){\r\n do {\r\n numrandom=(int) (Math.random() *9) + 1;\r\n } while (Existe(c,dimension,numrandom,i));\r\n c[i][j]=numrandom;\r\n }\r\n \r\n }\r\n }\r\n fitness=Fitness(c,dimension);\r\n if(fitness>mejorfitness){\r\n mejorcromosoma=c;\r\n mejorfitness=fitness;\r\n } \r\n break;\r\n case 2://Modificamos cuadro 0,1\r\n c=mejorcromosoma;\r\n for (int i = 3; i < 6; i++) {\r\n for (int j = 0; j <dimension; j++) {\r\n c[i][j]=0;\r\n }\r\n }\r\n c=CrearSudoku(c);\r\n \r\n for (int i = 3; i < 6; i++) {\r\n for (int j = 0; j < 9; j++) {\r\n if(c[i][j]==0){\r\n do {\r\n numrandom=(int) (Math.random() * 9) + 1;\r\n } while (Existe(c,dimension,numrandom,i));\r\n c[i][j]=numrandom;\r\n }\r\n \r\n }\r\n }\r\n \r\n fitness=Fitness(c,dimension);\r\n if(fitness>mejorfitness){\r\n mejorcromosoma=c;\r\n mejorfitness=fitness;\r\n } \r\n break;\r\n case 3://Modificamos cuadro 0,1\r\n c=mejorcromosoma;\r\n for (int i = 6; i < 9; i++) {\r\n for (int j = 0; j <dimension; j++) {\r\n c[i][j]=0;\r\n }\r\n }\r\n c=CrearSudoku(c);\r\n \r\n for (int i = 6; i < 9; i++) {\r\n for (int j = 0; j < 9; j++) {\r\n if(c[i][j]==0){\r\n do {\r\n numrandom=(int) (Math.random() * 9) + 1;\r\n } while (Existe(c,dimension,numrandom,i));\r\n c[i][j]=numrandom;\r\n }\r\n \r\n }\r\n }\r\n \r\n fitness=Fitness(c,dimension);\r\n if(fitness>mejorfitness){\r\n mejorcromosoma=c;\r\n mejorfitness=fitness;\r\n } \r\n break;\r\n default:\r\n throw new AssertionError();\r\n }\r\n \r\n }\r\n generaciones--;\r\n }\r\n \r\n }", "private void init() {\n visitado = new boolean[N+2][N+2];\n for (int x = 0; x < N+2; x++) visitado[x][0] = visitado[x][N+1] = true;\n for (int y = 0; y < N+2; y++) visitado[0][y] = visitado[N+1][y] = true;\n\n\n // todas las paredes levantadas\n norte = new boolean[N+2][N+2];\n este = new boolean[N+2][N+2];\n sur = new boolean[N+2][N+2];\n oeste = new boolean[N+2][N+2];\n for (int x = 0; x < N+2; x++)\n for (int y = 0; y < N+2; y++)\n norte[x][y] = este[x][y] = sur[x][y] = oeste[x][y] = true;\n }", "public Matriz(Complejo[][] numeros){\n\t\tthis.numeros = numeros;\n\t}", "Matrix transpose(){\n int newMatrixSize = this.getSize();\n Matrix newM = new Matrix(newMatrixSize);\n for(int i = 1; i <= newMatrixSize; i++){\n List itRow = rows[i - 1];\n // if(!itRow[i].isEmpty()){\n itRow.moveFront();\n // itRow[i].moveFront();\n while(itRow.index() != -1){\n Entry c = (Entry)itRow.get();\n newM.changeEntry(c.column, i, c.value);\n itRow.moveNext();\n }\n }\n return newM;\n }", "private void resetMatrixB() {\n\t\t// find the magnitude of the largest diagonal element\n\t\tdouble maxDiag = 0;\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tdouble d = Math.abs(B.get(i,i));\n\t\t\tif( d > maxDiag )\n\t\t\t\tmaxDiag = d;\n\t\t}\n\n\t\tB.zero();\n\t\tfor( int i = 0; i < N; i++ ) {\n\t\t\tB.set(i,i,maxDiag);\n\t\t}\n\t}", "private void laskeMatkojenKesto() {\n matkojenkesto = 0.0;\n\n for (Matka m : matkat) {\n matkojenkesto += m.getKesto();\n }\n }" ]
[ "0.6170865", "0.6161889", "0.60808665", "0.60282224", "0.5961549", "0.59351456", "0.5855152", "0.5748566", "0.5738845", "0.5718815", "0.56249654", "0.56031597", "0.5586354", "0.55595696", "0.5514714", "0.55106103", "0.5433015", "0.53781825", "0.5350531", "0.53467333", "0.5343425", "0.5315011", "0.53123885", "0.53077114", "0.5288497", "0.5260189", "0.5248911", "0.5225433", "0.521664", "0.5185109", "0.51701003", "0.5162072", "0.51308095", "0.5122356", "0.51183397", "0.507981", "0.5078851", "0.50754774", "0.50676346", "0.50641865", "0.5040487", "0.5037697", "0.50342244", "0.50270486", "0.5014063", "0.5011051", "0.5006315", "0.50016797", "0.49933022", "0.4986556", "0.4986315", "0.49824086", "0.4974398", "0.4971724", "0.49675626", "0.49544397", "0.4946907", "0.49414527", "0.49339935", "0.4933356", "0.49171472", "0.49106207", "0.48869076", "0.48863095", "0.48843622", "0.48766297", "0.48612604", "0.48597962", "0.4856988", "0.48507494", "0.48482093", "0.4845324", "0.4837458", "0.4825663", "0.48166993", "0.4814946", "0.481469", "0.48121908", "0.48117927", "0.48092526", "0.48005107", "0.4793105", "0.47883502", "0.47876543", "0.4786619", "0.47849497", "0.47815454", "0.47810483", "0.47786596", "0.47780412", "0.4775368", "0.47722402", "0.47624", "0.4758526", "0.4755081", "0.47507384", "0.47502136", "0.47501105", "0.4747613", "0.47446528" ]
0.6943814
0
Funcion que actualiza los valores del vector de tipo de recursos disponibles
private int[] actualizarDisp(int asignacion[][], int disponibles[]){ //Vector auxiliar a ser actualizado int update[] = disponibles; //Proceso de actualizacion de vector for(int j = 0; j < update.length; j++){ for(int i = 0; i < asignacion.length; i++){ //Restar el valor almacenado en cada proceso para cada tipo de recurso respectivo update[j] = recursos[j] - asignacion[i][j]; } } return update; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void agregarAlFinal(T v){\n\t\tNodo<T> nuevo = new Nodo<T>();\r\n\t\tnuevo.setInfo(v);\r\n\t\tnuevo.setRef(null);\r\n\t\t\r\n\t\t//si la lista aun no tiene elementos\r\n\t\tif(p == null){\r\n\t\t\t//el nuevo nodo sera el primero\r\n\t\t\tp=nuevo;\r\n\t\t\treturn;\r\n\t\t}\r\n\t\t\r\n\t\t//retorno la lista hasta que aux apunte al ultimo nodo\r\n\t\tNodo<T> aux;\r\n\t\tfor(aux=p; aux.getRef() != null; aux=aux.getRef()){\r\n\t\t\t//enlazo el nuevo nodo como el siguiente del ultimo\r\n\t\t\taux.setRef(nuevo);\r\n\t\t}\r\n\t\t\r\n\t}", "private void modify(seg_node root, int l, int r, int a, int b, int v) {\n push_down(root);\n if (l == a && r == b) {\n root._sum += v * root.tot ;\n root._product = root._product * power_mod(root._product_of_di, v) % mod;\n root._lazy_sum += v;\n return;\n }\n int m = (l + r) / 2;\n if (b <= m) {\n modify(root.left, l, m, a, b, v);\n } else if (a >= m + 1) {\n modify(root.right, m + 1, r, a, b, v);\n } else {\n modify(root.left, l, m, a, m, v);\n modify(root.right, m + 1, r, m + 1, b, v);\n }\n push_up(root);\n }", "public void recalculateVector()\r\n {\r\n recalculateVector(destX, destY);\r\n }", "protected void updateValues(){\n double total = 0;\n for(int i = 0; i < values.length; i++){\n values[i] = \n operation(minimum + i * (double)(maximum - minimum) / (double)numSteps);\n \n total += values[i];\n }\n for(int i = 0; i < values.length; i++){\n values[i] /= total;\n }\n }", "public WB_Vector nextVector();", "private void update(int v, int from, int to, int value) {\n\t\tNode node = heap[v];\n\n\t\t/**\n\t\t * If the updating-range contains the portion of the current Node We lazily update it. This means We\n\t\t * do NOT update each position of the vector, but update only some temporal values into the Node;\n\t\t * such values into the Node will be propagated down to its children only when they need to.\n\t\t */\n\t\tif (contains(from, to, node.from, node.to)) {\n\t\t\tchange(node, value);\n\t\t}\n\n\t\tif (node.size() == 1)\n\t\t\treturn;\n\n\t\tif (intersects(from, to, node.from, node.to)) {\n\t\t\t/**\n\t\t\t * Before keeping going down to the tree We need to propagate the the values that have been\n\t\t\t * temporally/lazily saved into this Node to its children So that when We visit them the values are\n\t\t\t * properly updated\n\t\t\t */\n\t\t\tpropagate(v);\n\n\t\t\tupdate(2 * v, from, to, value);\n\t\t\tupdate(2 * v + 1, from, to, value);\n\n\t\t\tnode.sum = heap[2 * v].sum + heap[2 * v + 1].sum;\n\t\t\tnode.min = Math.min(heap[2 * v].min, heap[2 * v + 1].min);\n\t\t}\n\t}", "Vector<Vector<Object>> getDataVector();", "private VectorArit CasteoVectores(VectorArit v, TipoPrimitivo t) {\r\n switch (t) {\r\n case STRING:\r\n return VectorToString(v);\r\n case NUMERIC:\r\n return VectorToDouble(v);\r\n case INTEGER:\r\n return VectorToInt(v);\r\n default:\r\n return v;\r\n }\r\n }", "public void addValues(Vector potentials, ProbabilityTree pTree){\n FiniteStates transVar;\n ProbabilityTree pNewTree,finalTree;\n FiniteStates mainVar=(FiniteStates)getVariables().elementAt(0); \n Vector vars;\n Configuration conf;\n Potential pot;\n int i,j;\n \n // First at all, add a new transparent variable to the object. The number\n // of values for this transparent variable will be the same as the size\n // of potentials vector. Every potential will be used for a value of the\n // transparent variable\n transVar=appendTransparentVariable(potentials.size());\n\n // This variable must be assignet to the probabilityTree\n pTree.assignVar(transVar);\n\n // Consider one by one the branches for this new variable\n for(i=0; i < potentials.size(); i++){\n\n // Get the tree related to this value of the transparent variable\n pNewTree=pTree.getChild(i);\n\n // In this branch we must begin adding the variable owning the relation\n // which values are under consideration\n pNewTree.assignVar(mainVar);\n\n // Get the potential for this value of the transparent var\n pot=(Potential)potentials.elementAt(i);\n\n // Make a configuration to get the values of the potential\n vars=new Vector();\n vars.addElement(mainVar);\n conf=new Configuration(vars);\n\n // Assign the extreme points\n for(j=0; j < mainVar.getNumStates(); j++){\n // Get the tree where the value must be assigned\n finalTree=pNewTree.getChild(j);\n finalTree.assignProb(pot.getValue(conf));\n conf.nextConfiguration();\n }\n }\n }", "void collectV();", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "protected void visitCurrentNode() {\n\t\ttraverseVector.add(tree.getCurrentNode());\n\t}", "@Test\r\n\tpublic void newVectorTest() {\r\n\t\tfor (int x = -10; x<10; x++) {\r\n\t\t\tfor (int y = -10; y<10; y++) {\r\n\t\t\t\tVector v = new Vector(x,y);\r\n\t\t\t\tVector v2 = new Vector(v);\r\n\t\t\t\tv2.add(v);\r\n\t\t\t\tv2 = v2.add(v);\r\n\t\t\t\tv2 = v2.add(v2);\r\n\t\t\t\tassertTrue(v.equals(new Vector(x,y)));\r\n\t\t\t\tassertTrue(v2.equals(v.add(v).add(v).add(v)));\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void nextSet(){\n this.fillVector();\n }", "public void calculate(double[] theta) {\r\n dvModel.vectorToParams(theta);\r\n\r\n double localValue = 0.0;\r\n double[] localDerivative = new double[theta.length];\r\n\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryW_dfsG,binaryW_dfsB;\r\n binaryW_dfsG = TwoDimensionalMap.treeMap();\r\n binaryW_dfsB = TwoDimensionalMap.treeMap();\r\n TwoDimensionalMap<String, String, SimpleMatrix> binaryScoreDerivativesG,binaryScoreDerivativesB ;\r\n binaryScoreDerivativesG = TwoDimensionalMap.treeMap();\r\n binaryScoreDerivativesB = TwoDimensionalMap.treeMap();\r\n Map<String, SimpleMatrix> unaryW_dfsG,unaryW_dfsB ;\r\n unaryW_dfsG = new TreeMap<String, SimpleMatrix>();\r\n unaryW_dfsB = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> unaryScoreDerivativesG,unaryScoreDerivativesB ;\r\n unaryScoreDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n unaryScoreDerivativesB= new TreeMap<String, SimpleMatrix>();\r\n\r\n Map<String, SimpleMatrix> wordVectorDerivativesG = new TreeMap<String, SimpleMatrix>();\r\n Map<String, SimpleMatrix> wordVectorDerivativesB = new TreeMap<String, SimpleMatrix>();\r\n\r\n for (TwoDimensionalMap.Entry<String, String, SimpleMatrix> entry : dvModel.binaryTransform) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n binaryW_dfsG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryW_dfsB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(numRows, numCols));\r\n binaryScoreDerivativesG.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n binaryScoreDerivativesB.put(entry.getFirstKey(), entry.getSecondKey(), new SimpleMatrix(1, numRows));\r\n }\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.unaryTransform.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n unaryW_dfsG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryW_dfsB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n unaryScoreDerivativesG.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n unaryScoreDerivativesB.put(entry.getKey(), new SimpleMatrix(1, numRows));\r\n }\r\n if (op.trainOptions.trainWordVectors) {\r\n for (Map.Entry<String, SimpleMatrix> entry : dvModel.wordVectors.entrySet()) {\r\n int numRows = entry.getValue().numRows();\r\n int numCols = entry.getValue().numCols();\r\n wordVectorDerivativesG.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n wordVectorDerivativesB.put(entry.getKey(), new SimpleMatrix(numRows, numCols));\r\n }\r\n }\r\n\r\n // Some optimization methods prints out a line without an end, so our\r\n // debugging statements are misaligned\r\n Timing scoreTiming = new Timing();\r\n scoreTiming.doing(\"Scoring trees\");\r\n int treeNum = 0;\r\n MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>> wrapper = new MulticoreWrapper<Tree, Pair<DeepTree, DeepTree>>(op.trainOptions.trainingThreads, new ScoringProcessor());\r\n for (Tree tree : trainingBatch) {\r\n wrapper.put(tree);\r\n }\r\n wrapper.join();\r\n scoreTiming.done();\r\n while (wrapper.peek()) {\r\n Pair<DeepTree, DeepTree> result = wrapper.poll();\r\n DeepTree goldTree = result.first;\r\n DeepTree bestTree = result.second;\r\n\r\n StringBuilder treeDebugLine = new StringBuilder();\r\n Formatter formatter = new Formatter(treeDebugLine);\r\n boolean isDone = (Math.abs(bestTree.getScore() - goldTree.getScore()) <= 0.00001 || goldTree.getScore() > bestTree.getScore());\r\n String done = isDone ? \"done\" : \"\";\r\n formatter.format(\"Tree %6d Highest tree: %12.4f Correct tree: %12.4f %s\", treeNum, bestTree.getScore(), goldTree.getScore(), done);\r\n System.err.println(treeDebugLine.toString());\r\n if (!isDone){\r\n // if the gold tree is better than the best hypothesis tree by\r\n // a large enough margin, then the score difference will be 0\r\n // and we ignore the tree\r\n\r\n double valueDelta = bestTree.getScore() - goldTree.getScore();\r\n //double valueDelta = Math.max(0.0, - scoreGold + bestScore);\r\n localValue += valueDelta;\r\n\r\n // get the context words for this tree - should be the same\r\n // for either goldTree or bestTree\r\n List<String> words = getContextWords(goldTree.getTree());\r\n\r\n // The derivatives affected by this tree are only based on the\r\n // nodes present in this tree, eg not all matrix derivatives\r\n // will be affected by this tree\r\n backpropDerivative(goldTree.getTree(), words, goldTree.getVectors(),\r\n binaryW_dfsG, unaryW_dfsG,\r\n binaryScoreDerivativesG, unaryScoreDerivativesG,\r\n wordVectorDerivativesG);\r\n\r\n backpropDerivative(bestTree.getTree(), words, bestTree.getVectors(),\r\n binaryW_dfsB, unaryW_dfsB,\r\n binaryScoreDerivativesB, unaryScoreDerivativesB,\r\n wordVectorDerivativesB);\r\n\r\n }\r\n ++treeNum;\r\n }\r\n\r\n double[] localDerivativeGood;\r\n double[] localDerivativeB;\r\n if (op.trainOptions.trainWordVectors) {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator(),\r\n wordVectorDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator(),\r\n wordVectorDerivativesB.values().iterator());\r\n } else {\r\n localDerivativeGood = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsG.valueIterator(), unaryW_dfsG.values().iterator(),\r\n binaryScoreDerivativesG.valueIterator(),\r\n unaryScoreDerivativesG.values().iterator());\r\n\r\n localDerivativeB = NeuralUtils.paramsToVector(theta.length,\r\n binaryW_dfsB.valueIterator(), unaryW_dfsB.values().iterator(),\r\n binaryScoreDerivativesB.valueIterator(),\r\n unaryScoreDerivativesB.values().iterator());\r\n }\r\n\r\n // correct - highest\r\n for (int i =0 ;i<localDerivativeGood.length;i++){\r\n localDerivative[i] = localDerivativeB[i] - localDerivativeGood[i];\r\n }\r\n\r\n // TODO: this is where we would combine multiple costs if we had parallelized the calculation\r\n value = localValue;\r\n derivative = localDerivative;\r\n\r\n // normalizing by training batch size\r\n value = (1.0/trainingBatch.size()) * value;\r\n ArrayMath.multiplyInPlace(derivative, (1.0/trainingBatch.size()));\r\n\r\n // add regularization to cost:\r\n double[] currentParams = dvModel.paramsToVector();\r\n double regCost = 0;\r\n for (int i = 0 ; i<currentParams.length;i++){\r\n regCost += currentParams[i] * currentParams[i];\r\n }\r\n regCost = op.trainOptions.regCost * 0.5 * regCost;\r\n value += regCost;\r\n // add regularization to gradient\r\n ArrayMath.multiplyInPlace(currentParams, op.trainOptions.regCost);\r\n ArrayMath.pairwiseAddInPlace(derivative, currentParams);\r\n\r\n }", "private void rv2Elements(VectorN r, VectorN v)\n\t{\n\t\tr.checkVectorDimensions(3);\n\t\tv.checkVectorDimensions(3);\n\t\t//Constants c = new Constants();\n\t\tVectorN evec = new VectorN(3); // e vector\n\t\tVectorN k = new VectorN(3); // unit vector in z direction\n\n\t\tthis.rv = new VectorN(r, v);\n\n\t\tdouble rmag = r.mag();\n\t\tdouble vmag = v.mag();\n\t\tdouble energy = vmag * vmag / 2.0 - this.mu / rmag;\n\n\t\tk.x[0] = 0.0;\n\t\tk.x[1] = 0.0;\n\t\tk.x[2] = 1.0;\n\n\t\tVectorN h = r.crossProduct(v);\n\t\tVectorN n = k.crossProduct(h);\n\n\t\tdouble rdotv = r.dotProduct(v);\n\n\t\tdouble q1 = (vmag * vmag - this.mu / rmag) / this.mu;\n\t\tdouble q2 = rdotv / this.mu;\n\n\t\tevec.x[0] = q1 * r.x[0] - q2 * v.x[0];\n\t\tevec.x[1] = q1 * r.x[1] - q2 * v.x[1];\n\t\tevec.x[2] = q1 * r.x[2] - q2 * v.x[2];\n\n\t\tthis.e = evec.mag();\n\n\t\tif (e != 1.0)\n\t\t{\n\t\t\tthis.a = -this.mu / (2.0 * energy);\n\t\t} else\n\t\t{\n\t\t\tthis.a = 1.0E30;\n\t\t\tSystem.out.println(\"parabolic orbit\");\n\t\t}\n\n\t\tthis.i = Math.acos(h.x[2] / h.mag()); // inclination\n\n\t\tthis.raan = Math.acos(n.x[0] / n.mag()); // raan\n\t\tif (n.x[1] < 0.0)\n\t\t{\n\t\t\tthis.raan = 2.0 * Constants.pi - raan;\n\t\t}\n\n\t\tthis.w = Math.acos(n.dotProduct(evec) / (n.mag() * e));\n\t\tif (evec.x[2] < 0.0)\n\t\t{\n\t\t\tthis.w = 2.0 * Constants.pi - this.w;\n\t\t}\n\n\t\tif (i == 0.0) // equatorial orbit, things blow up\n\t\t{\n\t\t\t//\t\t System.out.println(\"KeplerElements: equatorial orbit, RAAN no good\");\n\t\t\tthis.raan = 0.0;\n\t\t\tthis.w = Math.acos(evec.x[0] / e);\n\t\t\tif (evec.x[1] < 0.0)\n\t\t\t{\n\t\t\t\tthis.w = 2.0 * Constants.pi - this.w;\n\t\t\t}\n\t\t}\n\n\t\tif (i == Constants.pi) // equatorial orbit, things blow up\n\t\t{\n\t\t\t//\t\t System.out.println(\"KeplerElements: equatorial orbit, RAAN no good\");\n\t\t\tthis.raan = 0.0;\n\t\t\tthis.w = Math.acos(evec.x[0] / e);\n\t\t\tif (evec.x[1] > 0.0)\n\t\t\t{\n\t\t\t\tthis.w = 2.0 * Constants.pi - this.w;\n\t\t\t}\n\t\t}\n\n\t\tthis.ta = Math.acos(evec.dotProduct(r) / (e * rmag));\n\t\tif (rdotv < 0.0)\n\t\t{\n\t\t\tthis.ta = 2.0 * Constants.pi - this.ta;\n\t\t}\n\t}", "public void postOrden(nodoArbolAVL r){\n if(r != null){\n postOrden(r.hijoIzquierdo);\n postOrden(r.hijoDerecho);\n //System.out.print(r.dato + \" , \");\n for (int i = 1; i<=7;i++) {\n if(r.nivel==i)\n {\n //vector[i]=r.dato;\n System.out.println(r.dato + \" NIVEL: \"+i);\n }\n }\n \n } \n \n }", "public void Sumatoria()\n {\n for (int i = 0; i < vector1.length; i++) {\n sumatoria[i]=vector1[i]+vector2[i];\n }\n }", "public void recalculateNodesVectors(int width) {\n List<double[]> inputVectors = new ArrayList<double[]>();\n // use squar of distance\n for (ReferenceNode node : nodeList) {\n Point location = node.getLocation();\n List<ReferenceNode> neighborNodes = getNodesWithin(location, width);\n inputVectors.clear();\n for (ReferenceNode neighborNode : neighborNodes) {\n List<double[]> data = neighborNode.getInputVectors();\n if (data != null)\n inputVectors.addAll(data);\n }\n // If nothing in the inputVectors, keep the original value\n if (inputVectors.size() > 0) {\n double[] newVector = average(inputVectors);\n node.setReferenceVector(newVector);\n }\n }\n // Have to empty input nodes\n for (ReferenceNode node : nodeList) {\n node.resetInputVectors();\n node.resetLabels();\n }\n }", "public void resolver() {\r\n\t\tfor(int i = 0; i<casillas.length; i++) {\r\n\t\t\tfor(int j = 0; j<casillas[0].length; j ++) {\r\n\t\t\t\tif(casillas[i][j].darSeleccionada() == false) {\r\n\t\t\t\t\tcasillas[i][j].destapar();\r\n\t\t\t\t\tcasillas[i][j].modificarValor(cantidadMinasAlrededor(i, j));\r\n\t\t\t\t}\t\t\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@org.junit.Test\n public void inverser_vector() throws Exception {\n //voici un commentaire\n Vector<Integer> inppuut = new Vector<Integer>();\n inppuut.add(1);\n inppuut.add(2);\n inppuut.add(3);\n inppuut.add(4);\n\n Vector<Integer> expec = new Vector<Integer>();\n expec.add(4);\n expec.add(3);\n expec.add(2);\n expec.add(1);\n\n VectorHelper.inverser_vector(inppuut);\n assertEquals(expec, inppuut);\n\n }", "public static void buildElements(Object p,Object v,List<DataElement> dataVect) {\n if(!(p instanceof Iterable<?>)) p=null;\r\n if(!(v instanceof Iterable<?>)) v=null;\r\n if(p==null && v==null) return;\r\n Iterator<?> pi=(p==null)?null:((Iterable<?>)p).iterator();\r\n Iterator<?> vi=(v==null)?null:((Iterable<?>)v).iterator();\r\n while((pi!=null && pi.hasNext()) || (vi!=null && vi.hasNext())) {\r\n Object po=(pi==null)?null:pi.next();\r\n Object vo=(vi==null)?null:vi.next();\r\n int[] params=null;\r\n float[] vals=null;\r\n // if(po instanceof NativeArray) po=new IterableNativeArray((NativeArray)po);\r\n if(po instanceof int[]) params=(int[])po;\r\n else if(po instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)po;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n params=new int[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n params[cnt]=ScriptUtil.objectToInt(o);\r\n cnt++;\r\n }\r\n } else if(po!=null) {\r\n params=new int[1];\r\n params[0]=ScriptUtil.objectToInt(po);\r\n }\r\n // if(vo instanceof NativeArray) vo=new IterableNativeArray((NativeArray)vo);\r\n if(vo instanceof float[]) vals=(float[])vo;\r\n else if(vo instanceof Iterable<?>) {\r\n Iterable<?> i=(Iterable<?>)vo;\r\n int cnt=0;\r\n for(Iterator<?> iter=i.iterator(); iter.hasNext(); iter.next()) {\r\n cnt++;\r\n }\r\n vals=new float[cnt];\r\n cnt=0;\r\n for(Object o:i) {\r\n vals[cnt]=ScriptUtil.objectToFloat(o);\r\n cnt++;\r\n }\r\n } else if(vo!=null) {\r\n vals=new float[1];\r\n vals[0]=ScriptUtil.objectToFloat(vo);\r\n }\r\n if(params==null) params=new int[0];\r\n if(vals==null) vals=new float[0];\r\n dataVect.add(new DataElement(params,vals));\r\n }\r\n }", "public void fillVector(){\n int n = min.length;\n for (int i = 0; i < n; i++) {\n this.x[i] = min.x[i] + (max.x[i] - min.x[i])*rn.uniformDeviate();\n }\n }", "public void clearVectors();", "void recalc() {\n\t\tthis.currentValue = baseValue;\n\t\tthis.modifiers.stream().forEach(a -> this.currentValue += a.getValue());\n\t}", "public void suma(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n }\n }\n }", "public void SetVector(int[] v){ this.vector=v;}", "public void removerFinal() {\n switch (totalElementos()) {\n case 0:\n System.out.println(\"lista esta vazia\");\n break;\n case 1:\n this.primeiro = this.ultimo = null;\n this.total--;\n break;\n default:\n ElementoLista elementoTemporarioAnteriorAtual = this.primeiro;\n ElementoLista elementoTemporarioAtual = this.primeiro.irParaProximo();\n for (int i = 1; i < totalElementos(); i++) {\n elementoTemporarioAnteriorAtual = elementoTemporarioAtual;\n elementoTemporarioAtual = elementoTemporarioAtual.irParaProximo();\n }\n\n this.ultimo = elementoTemporarioAnteriorAtual;\n this.ultimo.definirProximo(null);\n this.total--;\n }\n //this.ultimo = this.ultimo.irParaAnterior();\n //this.ultimo.definirProximo(null);\n }", "public void actualizarValor() {\n\t\tif (valor!=null && valor < getCantElementos()-1){\n\t\t\tvalor++;\n\t\t}\n\t\telse {\n\t\t\tvalor = 0;\n\t\t}\t\t\n\t}", "public ArcReversalSV() {\n\n results = new Vector();\n resultsForPolicies = new Vector();\n crono = new Crono();\n statistics = new PropagationStatisticsID();\n }", "private List<Node> compute() {\n\t\t\tgetGraphFromResolvedTree(root);\n\t\t\tdepthFirst(root);\n\t\t\treturn result;\n\t\t}", "public abstract ParameterVector searchVector();", "static public ArrayList<Integer> SommerVecteur(ArrayList<Integer> vect1,ArrayList<Integer> vect2)throws TailleException\n {\n \n ArrayList<Integer> vect3 =new ArrayList<Integer>();//déclaration de la liste qui cintient le résultat de la somme\n int ind=0;//indice des éléments dans la nouvelle liste\n if(vect1.size()!= vect2.size())//test qui la taille des deux listes est différente\n {\n System.out.println(\"les deux vecteurs ont des tailles différentes ! vous pouvez pas faire la somme\");//afficher qu'on peut pas faire la somme des deux vecteurs\n throw new TailleException();//générer une excdeption si la taille est différente\n }\n else{//sinon on peut faire la somme\n int indice;//un indice pour parcourir les deux vecteurs\n \n for(indice=0;indice<vect1.size();indice++)//boucle pour parcourir les deux vecteurs\n { \n ind = vect1.get(indice)+vect2.get(indice);//effectuer la somme entre les deux éléments des deux vecteurs\n vect3.add(ind);//ajouter la somme obtenue a la nouvelle liste\n \n }\n return(vect3); //retourner la liste qui contient la somme \n }\n \n \n \n }", "public void recarga(){\n \tthis.fuerza *= 1.1;\n \tthis.vitalidad *= 1.1; \n }", "@Override\n\tpublic void frenar() {\n\t\tvelocidadActual = 0;\n\t}", "private void actualizaSolucion() {\n if(debug) {\n System.out.println(\"**********************actualizaSolucion\");\n printSol();\n }\n \n this.numSoluciones++; \n for(int i = 0; i < this.sol.emparejamientos.length; ++i) {\n for(int j = 0; j < this.sol.emparejamientos[i].length; ++j) {\n this.solOptima.emparejamientos[i][j] = this.sol.emparejamientos[i][j];\n }\n }\n this.solOptima.numVerticesEmparejados = this.sol.numVerticesEmparejados;\n this.solOptima.pesoEmparejamiento = this.sol.pesoEmparejamiento;\n }", "@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }", "void evoluer()\n {\n int taille = grille.length;\n int nbVivantes = 0;\n for(int i=-1; i<2; i++)\n {\n int xx = ((x+i)+taille)%taille; // si x+i=-1, xx=taille-1. si x+i=taille, xx=0\n for(int j=-1; j<2; j++)\n {\n if (i==0 && j==0) continue;\n int yy = ((y+j)+taille)%taille;\n if (grille[xx][yy].vivante) nbVivantes++;\n }\n }\n if (nbVivantes<=1 || nbVivantes>=4) {vientDeChanger = (vivante==true); vivante = false;}\n if (nbVivantes==3) {vientDeChanger = (vivante==false); vivante = true;}\n }", "private void llenarVacios(int inicial){\n\t\tint[] vecinos = obtenerVecinos(inicial);\n\t\t\n\t\t//Saber cuales vecinos no tienen bombas\n\t\tvacios.clear();\n\t\tvacios.add(inicial);\n\t\tfor(int b = 0; b<Constantes.FILAS*Constantes.COLUMNAS; b++){\n\t\t\tvecinos = obtenerVecinos(vacios.get(b));\n\t\t\tfor(int i =0; i<vecinos.length;i++){\n\t\t\t\tif(vecinos[i] != -1 && LayerBotones.botones[vecinos[i]].getCantBombas() == 0){\n\t\t\t\t\tvacios.add(vecinos[i]);\n\t\t\t\t\tLayerBotones.botones[vecinos[i]].setDescubierto(true);\n\t\t\t\t}else if (vecinos[i] != -1){\n\t\t\t\t\taDespejar.add(vecinos[i]);\n\t\t\t\t\tLayerBotones.botones[vecinos[i]].setDescubierto(true);\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\n\t\tfor(int i =0; i<vacios.size();i++){\n\t\t\tLayerBotones.botones[vacios.get(i)].setIcon(numeros[0]);\n\t\t\t//LayerBotones.botones[8].ponerIcono();\n\t\t\t\n\t\t}\n\t\tfor(int i =0; i<aDespejar.size();i++){\n\t\t\tLayerBotones.botones[aDespejar.get(i)].ponerIcono();\n\t\t\t//LayerBotones.botones[8].ponerIcono();\n\t\t\t\n\t\t}\n\t\t\n\t}", "public DatosIteracion mejorIteracionOptimizada(\r\n\t\t\tArrayList<DatosIteracion> datos) {\r\n\t\tDatosIteracion d = new DatosIteracion(\"auxiliar\");\r\n\t\tLectura l = new Lectura(999999, 0, 0);\r\n\t\td.getValoresLecturas().add(l);\r\n\r\n\t\tfor (int i = 0; i < datos.size(); i++) {\r\n\r\n\t\t\tif ((d.getValoresLecturas(d.getValoresLecturas().size() - 1)\r\n\t\t\t\t\t.getCapturados() / (d.getValoresLecturas(\r\n\t\t\t\t\td.getValoresLecturas().size() - 1).getTiempo() + 1)) < (datos\r\n\t\t\t\t\t.get(i)\r\n\t\t\t\t\t.getValoresLecturas(\r\n\t\t\t\t\t\t\tdatos.get(i).getValoresLecturas().size() - 1)\r\n\t\t\t\t\t.getCapturados() / (datos\r\n\t\t\t\t\t.get(i)\r\n\t\t\t\t\t.getValoresLecturas(\r\n\t\t\t\t\t\t\tdatos.get(i).getValoresLecturas().size() - 1)\r\n\t\t\t\t\t.getTiempo() + 1))) {\r\n\r\n\t\t\t\td = datos.get(i);\r\n\t\t\t}\r\n\r\n\t\t\tif ((d.getValoresLecturas(d.getValoresLecturas().size() - 1)\r\n\t\t\t\t\t.getCapturados() / (d.getValoresLecturas(\r\n\t\t\t\t\td.getValoresLecturas().size() - 1).getTiempo() + 1)) == (datos\r\n\t\t\t\t\t.get(i)\r\n\t\t\t\t\t.getValoresLecturas(\r\n\t\t\t\t\t\t\tdatos.get(i).getValoresLecturas().size() - 1)\r\n\t\t\t\t\t.getCapturados() / (datos\r\n\t\t\t\t\t.get(i)\r\n\t\t\t\t\t.getValoresLecturas(\r\n\t\t\t\t\t\t\tdatos.get(i).getValoresLecturas().size() - 1)\r\n\t\t\t\t\t.getTiempo() + 1))) {\r\n\r\n\t\t\t\tif (d.getValoresLecturas(d.getValoresLecturas().size() - 1)\r\n\t\t\t\t\t\t.getTiempo() > datos\r\n\t\t\t\t\t\t.get(i)\r\n\t\t\t\t\t\t.getValoresLecturas(\r\n\t\t\t\t\t\t\t\tdatos.get(i).getValoresLecturas().size() - 1)\r\n\t\t\t\t\t\t.getTiempo()) {\r\n\r\n\t\t\t\t\td = datos.get(i);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn d;\r\n\t}", "void recorridoCero(){\n \n for(int i=0;i<8;i++)\n\t\t\tfor(int j=0;j<8;j++)\n\t\t\t\t{\n\t\t\t\t\t//marcar con cero todas las posiciones\n\t\t\t\t\trecorrido[i][j]=0;\n\t\t\t\t}\n }", "private void updateValues() {\n \n //Find the spaces that can be solved.\n List<Number>updatableNumbers = numbers.stream()\n .filter(n -> n.getUsedValues() != null)\n .filter(n -> n.getUsedValues().size() == 8)\n .filter(n -> n.getValue() == 0)\n .collect(Collectors.toList());\n\n updatableNumbers.forEach(u -> {\n //Create a list of numbers 1-9\n List<Integer> intThrough9 = IntStream.rangeClosed(1, 9)\n .boxed()\n .collect(Collectors.toList());\n\n //Remove the used numbers from the list of 9 \n //to get expected value.\n intThrough9.removeAll(u.getUsedValues());\n u.setValue(intThrough9.get(0));\n }\n );\n }", "public static Nodo buscarSolucionPorAmplitud(Nodo inicio, int[][] solucion) {\n\t\tArrayList<Nodo> abiertos = new ArrayList<Nodo>();\n\t\tabiertos.add(inicio);\n\t\tint cont = 0;\n\t\tArrayList<Nodo> visitados = new ArrayList<Nodo>();\n\t\twhile(abiertos.size()!=0) {\n\t\t\tSystem.out.println(\"Visitados\");\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tfor(Nodo n : visitados) {\n\t\t\t\timprimirEstado(n.getEstado());\n\t\t\t\tSystem.out.println(\"Costo de este nodo: \" + n.getCosto());\n\t\t\t\tSystem.out.println(\"---------------\");\n\t\t\t}\n\t\t\tSystem.out.println(\"#################################\");\n\t\t\tNodo revisar = abiertos.remove(0);\n\t\t\trevisar.setCosto(calcularCosto(revisar.getEstado(), solucion));\n\t\t\timprimirEstado(revisar.getEstado());\n\t\t\tint[] pcero = ubicarPosicionCero(revisar.getEstado());\n\t\t\tSystem.out.println(\"Iteracion # \" + ++cont);\n\t\t\tif(Arrays.deepEquals(revisar.getEstado(), solucion)) {\n\t\t\t\tSystem.out.println(\"***** SOLUCION ENCONTRADA *****\");\n\t\t\t\treturn revisar;\n\n\t\t\t}\n\n\t\t\tArrayList<Nodo> hijos = new ArrayList<Nodo>();\n\t\t\tvisitados.add(revisar);\n\t\t\tif(pcero[0]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint arriba = hijo.getEstado()[pcero[0]-1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = arriba;\n\t\t\t\thijo.getEstado()[pcero[0]-1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[0]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint abajo = hijo.getEstado()[pcero[0]+1][pcero[1]];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = abajo;\n\t\t\t\thijo.getEstado()[pcero[0]+1][pcero[1]] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=0) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint izq = hijo.getEstado()[pcero[0]][pcero[1]-1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = izq;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]-1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\tif(pcero[1]!=2) {\n\t\t\t\tNodo hijo = new Nodo(clonar(revisar.getEstado()));\n\t\t\t\thijo.setCosto(calcularCosto(hijo.getEstado(), solucion));\n\t\t\t\tint der = hijo.getEstado()[pcero[0]][pcero[1]+1];\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]] = der;\n\t\t\t\thijo.getEstado()[pcero[0]][pcero[1]+1] = 0;\n\t\t\t\tif(!estaEnVisitados(visitados, hijo))\n\t\t\t\t\tabiertos.add(hijo); //Esta linea es para hacer recorrido em amplitud\n\t\t\t\thijos.add(hijo);\n\t\t\t}\n\t\t\trevisar.setHijos(hijos);\n\t\t}\n\t\treturn null;\n\n\t}", "static void recorreT(){\r\n\tStruct aux=lt;\r\n\twhile(aux!=null){\r\n\t\taux.view();\r\n\t\taux=aux.sig;\r\n\t}\r\n }", "@Override\n\tpublic void visit(NextValExpression arg0) {\n\t\t\n\t}", "public abstract ImmutableVector getImmutableVector();", "@Test\n void testNormalize() {\n\n Vector vCopy = new Vector(v.getHead());\n Vector vCopyNormalize = vCopy.normalize();\n assertEquals(vCopy, vCopyNormalize, \"ERROR: normalize() function creates a new vector\");\n\n\n }", "@Override\n protected Vector.VectorBuilder doEvaluate(ArithmeticOperationEnum arithmeticOp, Vector left, Vector right) {\n List<? extends BigDecimal> leftVals = left == null ? null : left.getValues();\n List<? extends BigDecimal> rightVals = right == null ? null : right.getValues();\n\n List<BigDecimal> res = doEval(arithmeticOp, leftVals, rightVals);\n Vector.VectorBuilder ret = Vector.builder();\n ret.setValues(res);\n return ret;\n }", "public void actualizarAristas(Arista movimiento){\n \n //Actualizamos la ubicacion de la hormiga\n for (int i = 0; i < matriz.length; i++) {\n if (movimiento.getFin().equals(matriz[0][i].getFin())) {\n ubicacion = i; \n }\n }\n \n //Actualizamos la lista de aristas a la cual se puede viajar desde la ubicacion actual\n aristas.clear();\n \n for (int i = 0; i < matriz.length; i++) { \n if (i != ubicacion) {\n aristas.add(matriz[ubicacion][i]);\n } \n }\n \n //Actualizamos las ciudades que ha visitado la hormiga\n visitados.add(aristas.get(0).getInicio());\n \n //A la lista de aristas, le borramos las aristas que conducen a ciudades que ya ha visitado la hormiga\n for (int k = 0; k < visitados.size(); k++) {\n for (int i = 0; i < aristas.size(); i++) {\n for (int j = 0; j < visitados.size(); j++) {\n if (aristas.get(i).getFin().equals(visitados.get(j))) { \n aristas.remove(i);\n i = 20;\n j = 20;\n }\n }\n }\n }\n \n //Continuamos actualizando la historia del recorrido de la hormiga\n recorrido = recorrido + \" \" + String.valueOf(movimiento.getDistancia()) + \" unidades hasta \" + movimiento.getFin() + \",\";\n \n }", "private static void initDFS(int V) {\n dfs_num = new Vector<Integer>();\n dfs_num.addAll(Collections.nCopies(V, DFS_WHITE));\n numComp = 0;\n }", "public static void addVectorCircle(MapLocation center, float size, float baseDesire, float distanceDesire) {\n switch (vectorCircleCount) {\n case 0:\n Z1vc_baseDesire = baseDesire + (distanceDesire * size);\n Z1vc_distanceDesire = -distanceDesire;\n Z1vc_center = center;\n Z1vc_size = size;\n vectorCircleCount++;\n break;\n case 1:\n Z2vc_baseDesire = baseDesire + (distanceDesire * size);\n Z2vc_distanceDesire = -distanceDesire;\n Z2vc_center = center;\n Z2vc_size = size;\n vectorCircleCount++;\n break;\n case 2:\n Z3vc_baseDesire = baseDesire + (distanceDesire * size);\n Z3vc_distanceDesire = -distanceDesire;\n Z3vc_center = center;\n Z3vc_size = size;\n vectorCircleCount++;\n break;\n case 3:\n Z4vc_baseDesire = baseDesire + (distanceDesire * size);\n Z4vc_distanceDesire = -distanceDesire;\n Z4vc_center = center;\n Z4vc_size = size;\n vectorCircleCount++;\n break;\n case 4:\n Z5vc_baseDesire = baseDesire + (distanceDesire * size);\n Z5vc_distanceDesire = -distanceDesire;\n Z5vc_center = center;\n Z5vc_size = size;\n vectorCircleCount++;\n break;\n case 5:\n Z6vc_baseDesire = baseDesire + (distanceDesire * size);\n Z6vc_distanceDesire = -distanceDesire;\n Z6vc_center = center;\n Z6vc_size = size;\n vectorCircleCount++;\n break;\n case 6:\n Z7vc_baseDesire = baseDesire + (distanceDesire * size);\n Z7vc_distanceDesire = -distanceDesire;\n Z7vc_center = center;\n Z7vc_size = size;\n vectorCircleCount++;\n break;\n case 7:\n Z8vc_baseDesire = baseDesire + (distanceDesire * size);\n Z8vc_distanceDesire = -distanceDesire;\n Z8vc_center = center;\n Z8vc_size = size;\n vectorCircleCount++;\n break;\n case 8:\n Z9vc_baseDesire = baseDesire + (distanceDesire * size);\n Z9vc_distanceDesire = -distanceDesire;\n Z9vc_center = center;\n Z9vc_size = size;\n vectorCircleCount++;\n break;\n case 9:\n Z10vc_baseDesire = baseDesire + (distanceDesire * size);\n Z10vc_distanceDesire = -distanceDesire;\n Z10vc_center = center;\n Z10vc_size = size;\n vectorCircleCount++;\n break;\n case 10:\n Z11vc_baseDesire = baseDesire + (distanceDesire * size);\n Z11vc_distanceDesire = -distanceDesire;\n Z11vc_center = center;\n Z11vc_size = size;\n vectorCircleCount++;\n break;\n case 11:\n Z12vc_baseDesire = baseDesire + (distanceDesire * size);\n Z12vc_distanceDesire = -distanceDesire;\n Z12vc_center = center;\n Z12vc_size = size;\n vectorCircleCount++;\n break;\n case 12:\n Z13vc_baseDesire = baseDesire + (distanceDesire * size);\n Z13vc_distanceDesire = -distanceDesire;\n Z13vc_center = center;\n Z13vc_size = size;\n vectorCircleCount++;\n break;\n case 13:\n Z14vc_baseDesire = baseDesire + (distanceDesire * size);\n Z14vc_distanceDesire = -distanceDesire;\n Z14vc_center = center;\n Z14vc_size = size;\n vectorCircleCount++;\n break;\n case 14:\n Z15vc_baseDesire = baseDesire + (distanceDesire * size);\n Z15vc_distanceDesire = -distanceDesire;\n Z15vc_center = center;\n Z15vc_size = size;\n vectorCircleCount++;\n break;\n case 15:\n Z16vc_baseDesire = baseDesire + (distanceDesire * size);\n Z16vc_distanceDesire = -distanceDesire;\n Z16vc_center = center;\n Z16vc_size = size;\n vectorCircleCount++;\n break;\n case 16:\n Z17vc_baseDesire = baseDesire + (distanceDesire * size);\n Z17vc_distanceDesire = -distanceDesire;\n Z17vc_center = center;\n Z17vc_size = size;\n vectorCircleCount++;\n break;\n case 17:\n Z18vc_baseDesire = baseDesire + (distanceDesire * size);\n Z18vc_distanceDesire = -distanceDesire;\n Z18vc_center = center;\n Z18vc_size = size;\n vectorCircleCount++;\n break;\n case 18:\n Z19vc_baseDesire = baseDesire + (distanceDesire * size);\n Z19vc_distanceDesire = -distanceDesire;\n Z19vc_center = center;\n Z19vc_size = size;\n vectorCircleCount++;\n break;\n case 19:\n Z20vc_baseDesire = baseDesire + (distanceDesire * size);\n Z20vc_distanceDesire = -distanceDesire;\n Z20vc_center = center;\n Z20vc_size = size;\n vectorCircleCount++;\n break;\n }\n }", "private void eliminarAux(NodoAVL<T> actual){\n NodoAVL<T> papa= actual.getPapa();\n if(actual.getHijoIzq()==null && actual.getHijoDer()==null)\n eliminaSinHijos(actual,papa); \n else{//CASO2: Nodo con un solo hijo (izq)\n NodoAVL<T> sustituto;\n if(actual.getHijoIzq()!=null && actual.getHijoDer()==null){\n sustituto= actual.getHijoIzq();\n eliminaSoloConHijoIzq(actual,papa,sustituto); \n }\n else//CASO3: Nodo con un solo hijo (der)\n if(actual.getHijoIzq()==null && actual.getHijoDer()!=null){\n sustituto= actual.getHijoDer();\n eliminaSoloConHijoDer(actual,papa, sustituto);\n }\n else //CASO4: Nodo con dos hijos\n if(actual.getHijoIzq()!=null && actual.getHijoDer()!=null)\n eliminaConDosHijos(actual);\n }\n \n }", "@Test\n void normalize() {\n\n Vector v = new Vector(1, 2, 3);\n Vector vCopy = new Vector(v.getHead());\n Vector vCopyNormalize = vCopy.normalize();\n if (vCopy != vCopyNormalize)\n fail(\"ERROR: normalize() function creates a new vector\");\n if (!isZero(vCopyNormalize.length() - 1))\n fail(\"ERROR: normalize() result is not a unit vector\");\n Vector u = v.normalized();\n if (u == v)\n fail(\"ERROR: normalized() function does not create a new vector\");\n }", "private void estadoInicial(){\n double referencias[] = new double[sigmas.length];\n for(int i=0;i<sigmas.length;i++){\n referencias[i] = (ppl.limiteSuperiorR(i+1)+ppl.limiteInferiorR(i+1))/2;\n System.out.printf(\"limS:%g, limI:%g, Referencias[%d] = %g\\n\",ppl.limiteSuperiorR(i+1),ppl.limiteInferiorR(i+1),i,referencias[i]);\n }\n\n double Zc = ppl.Z(referencias[0],referencias[1]);\n TActual = Zc*0.2;\n System.out.printf(\"TActual:T%g \\n\",TActual);\n\n estadoMejor = new Estado(\n iteracionActual, \n TActual, \n referencias,\n Zc);\n\n calcularSoluciones(estadoMejor);\n calcularProbabilidadAceptacion(estadoMejor);\n\n historialEstados.add(estadoMejor);\n }", "public void setVector(int[] paramArrayOfInt)\n/* */ {\n/* 370 */ enterEvi(this.downNode, paramArrayOfInt);\n/* */ }", "public void revolver() {\n this.lista = Lista.escojerAleatorio(this, this.size()).lista;\n }", "public List<Vertex> newPath() {\r\n\t\tList<Vertex> Pathchange = new ArrayList<Vertex>();\r\n\t\tList<Vertex> tempPath = new ArrayList<Vertex>();\r\n\t\tint BestEval = Integer.MAX_VALUE;\r\n\t\tVertex changeVertexV1 = new Vertex();\r\n\t\tVertex changeVertexV2 = new Vertex();\r\n\r\n\t\tfor (int position = 0; position < this.LastPath.size() - 1; position++) {\r\n\t\t\tfor (int changement = position+1; changement < this.LastPath.size(); changement++) {\r\n\r\n\t\t\t\ttempPath.clear();\r\n\t\t\t\ttempPath = new ArrayList<Vertex>(this.LastPath);\r\n\t\t\t\tif (!(this.TabuListV1.contains(tempPath.get(position)) || this.TabuListV1.contains(tempPath.get(changement)) || this.TabuListV2.contains(tempPath.get(position)) || this.TabuListV2.contains(tempPath.get(changement)))) {\r\n\t\t\t\t\t\r\n\t\t\t\t\tCollections.swap(tempPath, position, changement);\r\n\t\t\t\t\tif (this.fit(tempPath) < BestEval) {\r\n\t\t\t\t\t\tPathchange.clear();\r\n\t\t\t\t\t\tPathchange = new ArrayList<Vertex>(tempPath);\r\n\t\t\t\t\t\tchangeVertexV1 = tempPath.get(position);\r\n\t\t\t\t\t\tchangeVertexV2 = tempPath.get(changement);\r\n\t\t\t\t\t}\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tif(this.tabuElementType == 0) {\r\n\t\t\tthis.TabuListV1.add(0, changeVertexV1);\r\n\t\t}else if(this.tabuElementType == 1) {\r\n\t\t\tthis.TabuListV2.add(0, changeVertexV2);\r\n\t\t}else {\r\n\t\t\tthis.TabuListV1.add(0, changeVertexV1);\r\n\t\t\tthis.TabuListV2.add(0, changeVertexV2);\r\n\t\t}\r\n\t\t\r\n\t\tif (this.TabuListV1.size() > this.TabuListSize) {\r\n\t\t\tthis.TabuListV1.remove(this.TabuListV1.size() - 1);\r\n\t\t}\r\n\t\tif (this.TabuListV2.size() > this.TabuListSize) {\r\n\t\t\tthis.TabuListV2.remove(this.TabuListV2.size() - 1);\r\n\t\t}\r\n\r\n\t\treturn Pathchange;\r\n\t}", "public VariableUnit solve() {\n LinkedList<VariableUnit> processor = new LinkedList<VariableUnit>();\n\n VariableUnit vu1 = new VariableUnit(250.0, 'x');\n VariableUnit vu2 = new VariableUnit('+');\n VariableUnit vu3 = new VariableUnit(250.0, 'x');\n VariableUnit vu4 = new VariableUnit(501.0, 'x');\n VariableUnit vu5 = new VariableUnit('y');\n VariableUnit vu6 = new VariableUnit('-');\n alpha_arr.get(('x' - 'a')).addLast(vu1);\n alpha_arr.get(('x' - 'a')).addLast(vu2);\n alpha_arr.get(('x' - 'a')).addLast(vu3);\n op_order.add(vu1); op_order.add(vu2); op_order.add(vu3); op_order.add(vu6);\n op_order.add(vu4); op_order.add(vu6); op_order.add(vu5);\n assignValue(2.0, 'x');\n \n System.out.print(vu1); System.out.print(vu2); System.out.print(vu3);\n System.out.print(vu6); System.out.print(vu4); System.out.print(vu6);\n System.out.print(vu5);\n System.out.println();\n System.out.println(\"------------------------------\");\n \n VariableUnit temp, temp1;\n for (int i = 0; i < op_order.size(); i++) {\n \ttemp = op_order.pollFirst();\n \t\n \t\tswitch (temp.getVariable()) {\n \tcase '+':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().add(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tcase '-':\n \t\t//if processor.isEmpty(): throw an exception\n \t\ttemp1 = processor.pop().subtract(op_order.pollFirst());\n \t\tprocessor.push(temp1);\n \t\tbreak;\n \tdefault:\n \t\tprocessor.push(temp);\n \t\t}\n }\n\n /*\n * System.out.println(\"This equation is currently unsolvable.\");\n \tSystem.out.println(\"Try assigning values to some of the variables.\");\n */\n while (!processor.isEmpty()) {\n \top_order.addFirst(processor.pop());\n }\n \n ListIterator<VariableUnit> iter = op_order.listIterator();\n \n while ( iter.hasNext() ) {\n \tVariableUnit iter_temp = iter.next();\n \t//System.out.print(iter_temp.hasValue());\n \tif (iter_temp.hasValue()) {\n \t\tSystem.out.print( Double.toString(iter_temp.subValue()) );\n \t}\n \telse {\n \t\tSystem.out.print(iter_temp);\n \t}\n };\n System.out.println();\n \n return new VariableUnit(Double.NaN, ' ');\n }", "Object visitArrayOfValues(ArrayOfValuesNode node, Object state);", "public void updateGraph(){\n int cont=contador;\n eliminar(0);\n construir(cont);\n }", "@Override\n\tpublic void vInv() {\n\t\t\n\t}", "public void getVentasdeUNVendedor(int v) {\r\n double vVendedor[] = new double[nm];\r\n int j;\r\n for (j = 0; j < nm; j++) {\r\n vVendedor[j] = ventas[v][j];\r\n }\r\n getMostrarVec(vVendedor);\r\n }", "private void cazaFantasma(Vertice<T> v){\n\tif(v.padre == null){\n\t if(v == this.raiz){\n\t\tthis.raiz = null;\n\t\treturn;\n\t }\n\t return;\n\t}else{\n\t Vertice<T> padre = v.padre;\n\t if(v == padre.izquierdo){\n\t\tif(v.hayIzquierdo()){\n\t\t padre.izquierdo = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.izquierdo = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.izquierdo = null;\n\t\t}\t\t\n\t }else{\n\t\tif(v.hayIzquierdo()){\n\t\t padre.derecho = v.izquierdo;\n\t\t v.izquierdo.padre = padre;\n\t\t}else if(v.hayDerecho()){\n\t\t padre.derecho = v.derecho;\n\t\t v.derecho.padre = padre;\n\t\t}else{\n\t\t padre.derecho = null;\n\t\t}\n\t }\n\t}\n }", "private void restarTotalVenta(DetalleVenta dv) {\r\n\t\tint cantidad = dv.getCantidad();\r\n\t\tdouble precioProducto = dv.getProducto().getValorProducto();\r\n\t\ttotalVenta -= cantidad * precioProducto;\r\n\t}", "public void valor(V v) {\n value = v;\n }", "private void resolverBFS() {\n\t\tQueue<Integer> cola = new LinkedList<Integer>();\n\t\tint[] vecDistancia = new int[nodos.size()];\n\t\tfor (int i = 0; i < vecDistancia.length; i++) {\n\t\t\tvecDistancia[i] = -1;\n\t\t\trecorrido[i] = 0;\n\t\t}\n\t\tint nodoActual = 0;\n\t\tcola.add(nodoActual);\n\t\tvecDistancia[nodoActual] = 0;\n\t\trecorrido[nodoActual] = -1;\n\t\twhile (!cola.isEmpty()) {\n\t\t\tif (tieneAdyacencia(nodoActual, vecDistancia)) {\n\t\t\t\tfor (int i = 1; i < matrizAdyacencia.length; i++) {\n\t\t\t\t\tif (matrizAdyacencia[nodoActual][i] != 99 && vecDistancia[i] == -1) {\n\t\t\t\t\t\tcola.add(i);\n\t\t\t\t\t\tvecDistancia[i] = vecDistancia[nodoActual] + 1;\n\t\t\t\t\t\trecorrido[i] = nodoActual;\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tcola.poll();\n\t\t\t\tif (!cola.isEmpty()) {\n\t\t\t\t\tnodoActual = cola.peek();\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t}", "private void initValues() {\n this.closeConnection();\n this.agregarRol = false;\n rutRoles = null; rutRoles = new Vector(); rutRoles.clear();\n deudasContribuyente = null; deudasContribuyente = new Vector(); deudasContribuyente.clear();\n rutRolesConsultados = null; rutRolesConsultados = new HashMap(); rutRolesConsultados.clear();\n param = null; param = new HashMap(); param.clear();\n\n demandasContribuyente = null; demandasContribuyente = new Vector(); demandasContribuyente.clear();\n demandaSeleccionada=null; demandaSeleccionada= new Long(-1);\n\n\n this.conveniosMasivo = null;\n\n porcentajeCuotaContado = null; porcentajeCuotaContado = new Long(0);\n porcentajeCondonacion = null; porcentajeCondonacion = new Long(0);\n pagoContado = null; pagoContado = new Long(0);\n numeroCuotas = null; numeroCuotas = new Long(0);\n totalPagar = null; totalPagar = new Long(0);\n totalPagarConCondonacion = null; totalPagarConCondonacion = new Long(0);\n arregloDeudas=\"\";\n tipoPago=1;\n estadoCobranza=\"T\";\n codigoPropuesta = new Long(0);\n codigoFuncionario = new Long(0);\n idTesoreria = new Long(0);\n liquidada = false;\n }", "void resDiagonale(){ \r\n for (int i = 0; i<N; i=i+nCarre) \r\n \tresCarre(i, i); \r\n }", "protected void InitValuables() {\n\t\tsuper.InitValuables();\n\t\t\n\t\tCursurIndex = 1;\n\t\t\n\t}", "static void flatten(Value value, Collection<Value> result) {\r\n if (value instanceof ContainerValue) {\r\n ContainerValue cont = (ContainerValue) value;\r\n for (int i = 0, size = cont.getElementSize(); i < size; i++) {\r\n flatten(cont.getElement(i), result);\r\n } \r\n } else {\r\n result.add(value);\r\n }\r\n }", "public void resta(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n }\n }", "float[][] getCameraVectors(int resX, int resY){\n float vectors[][]=new float[resX*resY][3];//first vector index, second the components of the vector\n float[] vect2=rotateYVector(dir);\n vect2[1]=0;\n vect2=normalize(vect2);\n float[] vect3=normalize(vectorProduct(dir, vect2));//dir, vect2, vect3 base vectors\n float[] x={0,0,0};\n float[] y={0,0,0};\n float[] temp={0,0,0};\n for(int i=0;i<3;i++){\n x[i]=(vect2[i])/(resX/2);\n y[i]=(vect3[i])/(resY/2);\n temp[i]=vect2[i];\n }\n \n for(int j=0;j<resY;j++){\n for(int i=0;i<resX;i++){\n vectors[j*resX+i][0]=dir[0]+vect2[0]+vect3[0];\n vectors[j*resX+i][1]=dir[1]+vect2[1]+vect3[1];\n vectors[j*resX+i][2]=dir[2]+vect2[2]+vect3[2];\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n if((vectorLength(vect2)>(-0.0001)&&vectorLength(vect2)<0.0001)&&(resX%2)==0){\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n }\n }\n //printVector(temp);\n vect2[0]=temp[0];\n vect2[1]=temp[1];\n vect2[2]=temp[2];\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n if((vectorLength(vect3)>(-0.0001)&&vectorLength(vect3)<0.0001)&&(resY%2)==0){\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n }\n }\n \n return vectors;\n }", "public void vaciar(){\r\n\t\t//Monto un iterador de vertices del grafo\r\n\t\tIterator iteradorVertices = vertices.iterator();\r\n\t\tArista aristaAux;\r\n\t\tVertice verticeAux;\r\n\t\t//obtengo todos los vertices del grafo\r\n\t\twhile (iteradorVertices.hasNext()){\r\n\t\t\tverticeAux = (Vertice) iteradorVertices.next();\r\n\t\t\t//por cada vertice obtengo sus aristas salientes\r\n\t\t\tIterator iteradorAristas = verticeAux.getAristasSalientes().iterator();\r\n\t\t\t//mientras tenga aristas salientes\r\n\t\t\twhile(iteradorAristas.hasNext()){\r\n\t\t\t\t//Elimino cada arista\r\n\t\t\t\taristaAux = (Arista)iteradorAristas.next(); \r\n\t\t\t\tverticeAux.elimiarAristaSaliente(aristaAux);\r\n\t\t\t}\r\n\t\t\t//Elimino el vertice\r\n\t\t\tthis.eliminarVertice(verticeAux);\r\n\t\t}\r\n\t}", "void calculating(int depth);", "public fv a(fv paramfv)\r\n/* 384: */ {\r\n/* 385: */ fn localfn;\r\n/* 386:403 */ for (int i = 0; i < this.a.length; i++) {\r\n/* 387:404 */ if (this.a[i] != null)\r\n/* 388: */ {\r\n/* 389:405 */ localfn = new fn();\r\n/* 390:406 */ localfn.a(\"Slot\", (byte)i);\r\n/* 391:407 */ this.a[i].b(localfn);\r\n/* 392:408 */ paramfv.a(localfn);\r\n/* 393: */ }\r\n/* 394: */ }\r\n/* 395:411 */ for (i = 0; i < this.b.length; i++) {\r\n/* 396:412 */ if (this.b[i] != null)\r\n/* 397: */ {\r\n/* 398:413 */ localfn = new fn();\r\n/* 399:414 */ localfn.a(\"Slot\", (byte)(i + 100));\r\n/* 400:415 */ this.b[i].b(localfn);\r\n/* 401:416 */ paramfv.a(localfn);\r\n/* 402: */ }\r\n/* 403: */ }\r\n/* 404:419 */ return paramfv;\r\n/* 405: */ }", "public StructExprRecog restruct() throws InterruptedException {\n if (Thread.currentThread().isInterrupted()) {\n throw new InterruptedException();\n }\n if (mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE) {\n return this; // basic element return this to save computing time and space\n } else if (mlistChildren.size() == 0) {\n StructExprRecog ser = new StructExprRecog(mbarrayBiValues);\n ser.setSERPlace(this);\n ser.setSimilarity(0); // type unknown, similarity is 0.\n return ser;\n } else if (mlistChildren.size() == 1 && mnExprRecogType != EXPRRECOGTYPE_VCUTMATRIX) {\n // if a matrix, we cannot convert [x] -> x (e.g. 2 * [2 + 3] -> 2 * 2 + 3 is wrong).\n StructExprRecog ser = mlistChildren.getFirst().restruct();\n return ser;\n } else if (mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT || mnExprRecogType == EXPRRECOGTYPE_HCUTCAP\n || mnExprRecogType == EXPRRECOGTYPE_HCUTCAPUNDER || mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER\n || mnExprRecogType == EXPRRECOGTYPE_HLINECUT || mnExprRecogType == EXPRRECOGTYPE_MULTIEXPRS\n || mnExprRecogType == EXPRRECOGTYPE_GETROOT || mnExprRecogType == EXPRRECOGTYPE_VCUTMATRIX) {\n // assume horizontal cut is always clear before call restruct, i.e. hblank, hcap, hunder, hcapunder are not confused.\n // there is a special case for HBlankCut, Under and cap cut (handwriting divide may miss recognized).\n StructExprRecog[] serarrayNoLnDe = new StructExprRecog[3];\n boolean bIsDivide = isActuallyHLnDivSER(this, serarrayNoLnDe); //need to do it here as well as in vertical restruct \n\n StructExprRecog serReturn = new StructExprRecog(mbarrayBiValues);\n LinkedList<StructExprRecog> listCuts = new LinkedList<StructExprRecog>();\n if (bIsDivide) {\n listCuts.add(serarrayNoLnDe[0].restruct());\n listCuts.add(serarrayNoLnDe[1].restruct());\n listCuts.add(serarrayNoLnDe[2].restruct());\n } else {\n for (StructExprRecog ser : mlistChildren) {\n listCuts.add(ser.restruct());\n }\n }\n if (listCuts.getFirst().getExprRecogType() == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n && listCuts.getFirst().isPossibleVLnChar()\n && listCuts.getLast().getExprRecogType() == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n && listCuts.getLast().isPossibleVLnChar()\n && (bIsDivide || mnExprRecogType == EXPRRECOGTYPE_HLINECUT) // is actually H-line cut.\n && mnWidth >= ConstantsMgr.msdPlusHeightWidthRatio * mnHeight\n && mnWidth <= mnHeight / ConstantsMgr.msdPlusHeightWidthRatio\n && listCuts.getFirst().mnHeight >= ConstantsMgr.msdPlusTopVLnBtmVLnRatio * listCuts.getLast().mnHeight\n && listCuts.getFirst().mnHeight <= listCuts.getLast().mnHeight / ConstantsMgr.msdPlusTopVLnBtmVLnRatio\n && listCuts.getFirst().mnLeft < listCuts.getLast().getRight()\n && listCuts.getFirst().getRight() > listCuts.getLast().mnLeft\n && listCuts.getFirst().getBottomPlus1() >= listCuts.get(1).mnTop\n && listCuts.getLast().mnTop <= listCuts.get(1).getBottomPlus1()) { // the shape of this ser should match +\n // seems like a + instead of 1/1\n double dSimilarity = (listCuts.getFirst().getArea() * listCuts.getFirst().mdSimilarity\n + listCuts.get(1).getArea() * listCuts.get(1).mdSimilarity\n + listCuts.getLast().getArea() * listCuts.getLast().mdSimilarity)\n / (listCuts.getFirst().getArea() + listCuts.get(1).getArea() + listCuts.getLast().getArea()); // total area should not be zero here.\n // now we merge the three parts into +\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopTop = listCuts.getFirst().getImageChop(false);\n listParts.add(imgChopTop);\n ImageChop imgChopHLn = listCuts.get(1).getImageChop(false);\n listParts.add(imgChopHLn);\n ImageChop imgChopBottom = listCuts.getLast().getImageChop(false);\n listParts.add(imgChopBottom);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serReturn.setStructExprRecog(UnitProtoType.Type.TYPE_ADD, UNKNOWN_FONT_TYPE, mnLeft, mnTop, mnWidth, mnHeight, imgChop4SER, dSimilarity);\n } else if (bIsDivide) {\n // is actually an h line cut, i.e. div.\n serReturn.setStructExprRecog(listCuts, EXPRRECOGTYPE_HLINECUT);\n } else {\n serReturn.setStructExprRecog(listCuts, mnExprRecogType);\n serReturn = serReturn.identifyHSeperatedChar(); // special treatment for like =, i, ... \n if (serReturn.mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) {\n serReturn = serReturn.identifyStrokeBrokenChar(); // convert like 7 underline to 2.\n }\n }\n \n return serReturn;\n } else { // listcut, vblankcut, vcutlefttop, vcutlower, vcutupper, vcutlowerupper\n // the children are vertically cut. if cut mode is LISTCUT, also treated as vertically cut.\n // make the following assumptions for horizontally cut children\n // 1. the h-cut modes have been clear (i.e. normal horizontally cut, cap, undercore etc)\n // 2. the getroot, vcutmatrix and multiexprs have been clear.\n // 3. the v-cut modes are not clear\n \n // step 1. merge all the vertically cut children into main mlistChildren, and for all h-blank cut children, merge all of its h-blank cut\n // into itself.\n LinkedList<StructExprRecog> listMergeVCutChildren1 = new LinkedList<StructExprRecog>();\n listMergeVCutChildren1.addAll(mlistChildren);\n LinkedList<StructExprRecog> listMergeVCutChildren = new LinkedList<StructExprRecog>();\n boolean bHasVCutChild = true;\n while(bHasVCutChild) {\n bHasVCutChild = false;\n for (int idx = 0; idx < listMergeVCutChildren1.size(); idx ++) {\n if (/*listMergeVCutChildren1.get(idx).mnExprRecogType == EXPRRECOGTYPE_LISTCUT // treat list cut like vblankcut only when we print its value to string\n || */listMergeVCutChildren1.get(idx).isVCutNonMatrixType()) {\n for (int idx1 = 0; idx1 < listMergeVCutChildren1.get(idx).mlistChildren.size(); idx1 ++) {\n if (/*listMergeVCutChildren1.get(idx).mlistChildren.get(idx1).mnExprRecogType == EXPRRECOGTYPE_LISTCUT // treat list cut like vblankcut only when we print its value to string\n || */listMergeVCutChildren1.get(idx).mlistChildren.get(idx1).isVCutNonMatrixType()) {\n bHasVCutChild = true;\n }\n int idx2 = listMergeVCutChildren.size() - 1;\n StructExprRecog serToAdd = listMergeVCutChildren1.get(idx).mlistChildren.get(idx1);\n for (; idx2 >= 0; idx2 --) {\n double dListChildCentral = listMergeVCutChildren.get(idx2).mnLeft + listMergeVCutChildren.get(idx2).mnWidth / 2.0;\n double dToAddCentral = serToAdd.mnLeft + serToAdd.mnWidth / 2.0;\n if (dListChildCentral < dToAddCentral) {\n break;\n }\n }\n listMergeVCutChildren.add(idx2 + 1, serToAdd);\n }\n // do not consider hblankcut list size == 1 case because it is impossible.\n } else {\n int idx2 = listMergeVCutChildren.size() - 1;\n StructExprRecog serToAdd = listMergeVCutChildren1.get(idx);\n for (; idx2 >= 0; idx2 --) {\n double dListChildCentral = listMergeVCutChildren.get(idx2).mnLeft + listMergeVCutChildren.get(idx2).mnWidth / 2.0;\n double dToAddCentral = serToAdd.mnLeft + serToAdd.mnWidth / 2.0;\n if (dListChildCentral < dToAddCentral) {\n break;\n }\n }\n listMergeVCutChildren.add(idx2 + 1, serToAdd);\n }\n }\n if (bHasVCutChild) {\n listMergeVCutChildren1.clear();\n listMergeVCutChildren1 = listMergeVCutChildren;\n listMergeVCutChildren = new LinkedList<StructExprRecog>();\n }\n }\n \n for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) {\n StructExprRecog serChild = listMergeVCutChildren.get(idx);\n if (serChild.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n LinkedList<StructExprRecog> listHBlankCutChildren1 = new LinkedList<StructExprRecog>();\n listHBlankCutChildren1.addAll(serChild.mlistChildren);\n LinkedList<StructExprRecog> listHBlankCutChildren = new LinkedList<StructExprRecog>();\n boolean bHasHBlankCutChild = true;\n while(bHasHBlankCutChild) {\n bHasHBlankCutChild = false;\n for (int idx0 = 0; idx0 < listHBlankCutChildren1.size(); idx0 ++) {\n if (listHBlankCutChildren1.get(idx0).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n for (int idx1 = 0; idx1 < listHBlankCutChildren1.get(idx0).mlistChildren.size(); idx1 ++) {\n if (listHBlankCutChildren1.get(idx0).mlistChildren.get(idx1).mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n bHasHBlankCutChild = true;\n }\n listHBlankCutChildren.add(listHBlankCutChildren1.get(idx0).mlistChildren.get(idx1));\n }\n } else {\n listHBlankCutChildren.add(listHBlankCutChildren1.get(idx0));\n }\n }\n if (bHasHBlankCutChild) {\n listHBlankCutChildren1.clear();\n listHBlankCutChildren1 = listHBlankCutChildren;\n listHBlankCutChildren = new LinkedList<StructExprRecog>();\n }\n }\n StructExprRecog serNewChild = new StructExprRecog(serChild.mbarrayBiValues);\n serNewChild.setStructExprRecog(listHBlankCutChildren, EXPRRECOGTYPE_HBLANKCUT);\n listMergeVCutChildren.set(idx, serNewChild);\n }\n }\n\n // step 2: identify upper notes or lower notes, This is raw upper lower identification procedure. h-cut\n // children are not analyzed.\n LinkedList<Integer> listCharLevel = new LinkedList<Integer>();\n LinkedList<Integer> list1SideAnchorBaseIdx = new LinkedList<Integer>();\n // first of all, find out the highest child which must be base\n int nBiggestChildHeight = 0;\n int nBiggestChildIdx = 0;\n int nHighestNonHDivChildHeight = -1;\n int nHighestNonHDivChildIdx = -1;\n for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) {\n if (listMergeVCutChildren.get(idx).mnHeight > nBiggestChildHeight) {\n nBiggestChildIdx = idx;\n nBiggestChildHeight = listMergeVCutChildren.get(idx).mnHeight;\n }\n if (isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx)) == false\n && listMergeVCutChildren.get(idx).mnHeight > nHighestNonHDivChildHeight) {\n // non-hdiv child could be cap or under.\n nHighestNonHDivChildIdx = idx;\n nHighestNonHDivChildHeight = listMergeVCutChildren.get(idx).mnHeight;\n }\n }\n boolean bHasNonHDivBaseChild = false;\n // ok, if we have a non h-div child, biggest child is the biggest non h-div child. Otherwise, use biggest child.\n if (nHighestNonHDivChildIdx >= 0) {\n nBiggestChildHeight = nHighestNonHDivChildHeight;\n nBiggestChildIdx = nHighestNonHDivChildIdx;\n bHasNonHDivBaseChild = true;\n }\n \n listCharLevel.add(0);\n list1SideAnchorBaseIdx.add(nBiggestChildIdx);\n \n // from highest child to right\n StructExprRecog serBiggestChild = listMergeVCutChildren.get(nBiggestChildIdx);\n BLUCharIdentifier bluCIBiggest = new BLUCharIdentifier(serBiggestChild);\n BLUCharIdentifier bluCI = bluCIBiggest.clone();\n int nLastBaseHeight = listMergeVCutChildren.get(nBiggestChildIdx).mnHeight;\n for (int idx = nBiggestChildIdx + 1; idx < listMergeVCutChildren.size(); idx ++) {\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n if (idx > nBiggestChildIdx + 1 // if idx == nBiggestChildIdx + 1, we have already used the bluCIBiggest.\n && ((bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getLast() == 0\n && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1)))\n || (!bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getLast() == 0))) {\n StructExprRecog serBase = listMergeVCutChildren.get(idx - 1);\n bluCI.setBLUCharIdentifier(serBase);\n nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight;\n list1SideAnchorBaseIdx.add(idx - 1);\n } else {\n list1SideAnchorBaseIdx.add(list1SideAnchorBaseIdx.getLast());\n }\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n\n // only from left to right we do the following work.\n if (thisCharLevel == 0 && listCharLevel.size() > 0\n && ((listCharLevel.getLast() != 0\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight)\n || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base / listMergeVCutChildren.get(idx - 1).mlistChildren.size() >= ser.mnHeight))\n ) {\n // to see if it could be upper lower note or lower upper note.\n if (listCharLevel.getLast() == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) {\n thisCharLevel = 1;\n } else if (listCharLevel.getLast() == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) {\n thisCharLevel = -1;\n } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type.\n // first of all, find out which h-blank-div child is closest to it.\n int nMinDistance = Integer.MAX_VALUE;\n int nMinDistanceIdx = 0;\n double dAvgChildHeight = 0;\n for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) {\n int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1()\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1());\n if (nDistance <= nMinDistance) { // allow a little bit overhead\n nMinDistance = nDistance;\n nMinDistanceIdx = idx2;\n }\n dAvgChildHeight += listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnHeight;\n }\n dAvgChildHeight /= listMergeVCutChildren.get(idx - 1).mlistChildren.size();\n if (dAvgChildHeight * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) {\n StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx);\n int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild);\n if (thisHCutChildCharLevel == 0) {\n // this char level is calculated from its closest last ser if it is base.\n BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild);\n thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser);\n } else {\n thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base.\n }\n }\n }\n }\n listCharLevel.add(thisCharLevel);\n }\n \n // from highest char to left\n bluCI = bluCIBiggest.clone();\n for (int idx = nBiggestChildIdx - 1; idx >= 0; idx --) {\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n if ((bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getFirst() == 0\n && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx + 1)))\n || (!bHasNonHDivBaseChild && listCharLevel.size() > 0 && listCharLevel.getFirst() == 0)) {\n StructExprRecog serBase = listMergeVCutChildren.get(idx + 1);\n bluCI.setBLUCharIdentifier(serBase);\n list1SideAnchorBaseIdx.addFirst(idx + 1);\n } else {\n list1SideAnchorBaseIdx.addFirst(list1SideAnchorBaseIdx.getFirst());\n }\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n listCharLevel.addFirst(thisCharLevel);\n }\n \n // from left to highest char\n bluCI = bluCIBiggest.clone();\n nLastBaseHeight = 0;// to avoid the first char misrecognized to note instead of base,\n // do not use listMergeVCutChildren.get(nBiggestChildIdx).mnHeight;\n // however, from right to left identification can still misrecognize it to note\n // so we need further check later on.\n for (int idx = 1; idx < nBiggestChildIdx; idx ++) {\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n if ((bHasNonHDivBaseChild && listCharLevel.get(idx - 1) == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1)))\n || (!bHasNonHDivBaseChild && listCharLevel.get(idx - 1) == 0)) { // base char\n StructExprRecog serBase = listMergeVCutChildren.get(idx - 1);\n bluCI.setBLUCharIdentifier(serBase);\n nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight;\n }\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n \n // only from left to right we do the following work.\n if (thisCharLevel == 0 && idx > 0\n && (listCharLevel.get(idx - 1) != 0\n || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1))\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) {\n // to see if it could be upper lower note or lower upper note.\n if (listCharLevel.get(idx - 1) == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) {\n thisCharLevel = 1;\n } else if (listCharLevel.get(idx - 1) == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) {\n thisCharLevel = -1;\n } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type.\n // first of all, find out which h-blank-div child is closest to it.\n int nMinDistance = Integer.MAX_VALUE;\n int nMinDistanceIdx = 0;\n for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) {\n int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1()\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1());\n if (nDistance <= nMinDistance) { // allow a little bit overhead\n nMinDistance = nDistance;\n nMinDistanceIdx = idx2;\n }\n }\n StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx);\n int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild);\n if (thisHCutChildCharLevel == 0) {\n // this char level is calculated from its closest last ser if it is base.\n BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild);\n thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser);\n } else {\n thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base.\n }\n }\n }\n int nLastSideAnchorBaseType = listMergeVCutChildren.get(list1SideAnchorBaseIdx.get(idx)).mnExprRecogType;\n int nThisSideAnchorBaseType = bluCI.mserBase.mnExprRecogType;\n if (listCharLevel.get(idx) != thisCharLevel) {\n if ((nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAP\n || nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTUNDER\n || nLastSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAPUNDER)\n && (nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAP\n && nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTUNDER\n && nThisSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAPUNDER)) {\n // h-cut is always not accurate\n listCharLevel.set(idx, thisCharLevel);\n } else if ((nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAP\n || nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTUNDER\n || nThisSideAnchorBaseType == EXPRRECOGTYPE_HCUTCAPUNDER)\n && (nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAP\n && nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTUNDER\n && nLastSideAnchorBaseType != EXPRRECOGTYPE_HCUTCAPUNDER)) {\n // do not change.\n } else if (listCharLevel.get(idx) == 0) { // if from one side this char is not base char, then it is not base char\n listCharLevel.set(idx, thisCharLevel);\n } else if (thisCharLevel != 0) { // if one side is 1 while the other side is - 1, then use left side value\n listCharLevel.set(idx, thisCharLevel);\n } else if (listCharLevel.get(idx) != 0 && list1SideAnchorBaseIdx.get(idx) > idx + 1) {\n // if see from right this ser is a note and right anchor is not next to this ser, we use left side value.\n listCharLevel.set(idx, thisCharLevel);\n }\n }\n }\n \n // from right to highest char seems not necessary.\n \n boolean bNeedReidentifyFirst = false;\n // now the first child may be misrecognized to be -1 or 1, correct it and reidentify char level from 0 to the original first base\n if (listCharLevel.getFirst() == -1\n && (listMergeVCutChildren.size() < 2 // only have one child, so it has to be base\n || listMergeVCutChildren.getFirst().mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE // could be base of base**something\n || ((listMergeVCutChildren.getFirst().isLetterChar() || listMergeVCutChildren.getFirst().isNumberChar())\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTUNDER))) { // could be base of base ** something\n listCharLevel.set(0, 0);\n bNeedReidentifyFirst = true;\n } else if (listCharLevel.getFirst() == 1) {\n boolean bIsRoot = true, bIsTemperature = true;\n int idx = 1;\n for (; idx < listCharLevel.size(); idx ++) {\n if (listCharLevel.get(idx) != 1) {\n break;\n }\n }\n if (idx == listCharLevel.size() || listCharLevel.get(idx) != 0\n || listMergeVCutChildren.get(idx).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_GETROOT) {\n bIsRoot = false;\n }\n if (listMergeVCutChildren.size() < 2\n || listMergeVCutChildren.getFirst().mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n || (listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_SMALL_O\n && listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_BIG_O\n && listMergeVCutChildren.getFirst().mType != UnitProtoType.Type.TYPE_ZERO)\n || listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n || (listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_SMALL_C\n && listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_BIG_C\n && listMergeVCutChildren.get(1).mType != UnitProtoType.Type.TYPE_BIG_F)) {\n bIsTemperature = false;\n }\n if (!bIsRoot && !bIsTemperature // if root or temperature, then it should be upper note\n && (listMergeVCutChildren.size() < 2 // only have one child, so it has to be base\n || (listMergeVCutChildren.getFirst().mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_ENUMTYPE\n && listMergeVCutChildren.getFirst().isLetterChar()\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAP\n && listMergeVCutChildren.get(1).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HCUTCAPUNDER) // could be base_something\n )) {\n listCharLevel.set(0, 0);\n bNeedReidentifyFirst = true;\n }\n }\n if (bNeedReidentifyFirst) {\n \n int idx = 1;\n while (idx < listMergeVCutChildren.size()) {\n if ((listCharLevel.get(idx - 1) == 0 && !isHDivCannotBeBaseAnchorSER(listMergeVCutChildren.get(idx - 1)))\n || ((idx - 1) == 0)) { // base char can be anchor or first ser\n StructExprRecog serBase = listMergeVCutChildren.get(idx - 1);\n bluCI.setBLUCharIdentifier(serBase);\n nLastBaseHeight = listMergeVCutChildren.get(idx - 1).mnHeight;\n }\n\n StructExprRecog ser = listMergeVCutChildren.get(idx);\n int thisCharLevel = bluCI.calcCharLevel(ser); // 0 means base char, 1 means upper note, -1 means lower note\n\n // only from left to right we do the following work.\n if (thisCharLevel == 0 && idx > 0\n && (listCharLevel.get(idx - 1) != 0\n || (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1))\n && nLastBaseHeight * ConstantsMgr.msdLUNoteHeightRatio2Base * ConstantsMgr.msdLUNoteHeightRatio2Base >= ser.mnHeight) {\n // to see if it could be upper lower note or lower upper note.\n if (listCharLevel.get(idx - 1) == 1 && ser.getBottom() <= bluCI.mdUpperNoteLBoundThresh) {\n thisCharLevel = 1;\n } else if (listCharLevel.get(idx - 1) == -1 && ser.mnTop >= bluCI.mdLowerNoteUBoundThresh) {\n thisCharLevel = -1;\n } else if (listMergeVCutChildren.get(idx - 1).mnExprRecogType == StructExprRecog.EXPRRECOGTYPE_HBLANKCUT\n && listMergeVCutChildren.get(idx - 1).mlistChildren.size() > 1) { // hblankcut type.\n // first of all, find out which h-blank-div child is closest to it.\n int nMinDistance = Integer.MAX_VALUE;\n int nMinDistanceIdx = 0;\n for (int idx2 = 0; idx2 < listMergeVCutChildren.get(idx - 1).mlistChildren.size(); idx2 ++) {\n int nDistance = Math.abs(ser.mnTop + ser.getBottomPlus1()\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).mnTop\n - listMergeVCutChildren.get(idx - 1).mlistChildren.get(idx2).getBottomPlus1());\n if (nDistance <= nMinDistance) { // allow a little bit overhead\n nMinDistance = nDistance;\n nMinDistanceIdx = idx2;\n }\n }\n StructExprRecog serHCutChild = listMergeVCutChildren.get(idx - 1).mlistChildren.get(nMinDistanceIdx);\n int thisHCutChildCharLevel = bluCI.calcCharLevel(serHCutChild);\n if (thisHCutChildCharLevel == 0) {\n // this char level is calculated from its closest last ser if it is base.\n BLUCharIdentifier bluCIThisHCutChild = new BLUCharIdentifier(serHCutChild);\n thisCharLevel = bluCIThisHCutChild.calcCharLevel(ser);\n } else {\n thisCharLevel = thisHCutChildCharLevel; // this char level is same as its closest last ser if it is not base.\n }\n }\n }\n if (listCharLevel.get(idx) != thisCharLevel) {\n // do not consider the impact seen from the other side, even the other side is root or Fahranheit or celcius\n // this is because if the other side is root or Fahrenheit or celcius, if this level is -1, then it is -1\n // anyway, if it is 0, because the left most should not be 1 seen from the other side, so doesn't matter\n // if it is 1, then Fahranheit and celcius and root can handle.\n listCharLevel.set(idx, thisCharLevel);\n } else if (thisCharLevel == 0) {\n break; // this char level is base and is the same as before adjusting, so no need to go futher.\n }\n idx ++;\n }\n // need not to go through from right to left again.\n }\n \n // step 3. idenitify the mode: matrix mode, multi-expr mode or normal mode\n LinkedList<StructExprRecog> listMergeMatrixMExprs = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listMergeMMLevel = new LinkedList<Integer>();\n for (int idx = 0; idx < listMergeVCutChildren.size(); idx ++) {\n if (listCharLevel.get(idx) == 0) {\n //restruct hdivs first, change like hcap(cap, hblank) to hblank(hcap, ...).\n // otherwise, multi expressions can not be correctly identified.\n StructExprRecog serPreRestructedHCut = preRestructHDivSer4MatrixMExprs(listMergeVCutChildren.get(idx));\n if (serPreRestructedHCut != listMergeVCutChildren.get(idx)) {\n listMergeVCutChildren.set(idx, serPreRestructedHCut);\n }\n }\n }\n lookForMatrixMExprs(listMergeVCutChildren, listCharLevel, listMergeMatrixMExprs, listMergeMMLevel);\n \n // step 4: identify upper notes or lower notes.\n LinkedList<StructExprRecog> listBaseULIdentified = new LinkedList<StructExprRecog>();\n listCharLevel.clear();\n int idx0 = 0;\n // step 1: find the first real base ser, real base means a base ser which would be better if it is not hblankcut\n for (; idx0 < listMergeMatrixMExprs.size(); idx0 ++) {\n if (listMergeMMLevel.get(idx0) == 0 && listMergeMatrixMExprs.get(idx0).mnExprRecogType != StructExprRecog.EXPRRECOGTYPE_HBLANKCUT) {\n break;\n }\n }\n if (idx0 == listMergeMatrixMExprs.size()) {\n // no non-hblankcut base, so find hblankcut base instead.\n for (idx0 = 0; idx0 < listMergeMatrixMExprs.size(); idx0 ++) {\n if (listMergeMMLevel.get(idx0) == 0) {\n break;\n }\n }\n }\n // there should be a base, so we need not to worry about idx0 == listMergeMatrixMExprs.size()\n int nIdxFirstBaseChar = idx0;\n for (idx0 = 0; idx0 <= nIdxFirstBaseChar; idx0 ++) {\n listBaseULIdentified.add(listMergeMatrixMExprs.get(idx0));\n listCharLevel.add(listMergeMMLevel.get(idx0));\n }\n \n for (; idx0 < listMergeMatrixMExprs.size(); idx0 ++) {\n StructExprRecog ser = listMergeMatrixMExprs.get(idx0);\n if (idx0 > 0 && listCharLevel.getLast() == 0) {\n StructExprRecog serBase = listBaseULIdentified.getLast();\n bluCI.setBLUCharIdentifier(serBase);\n }\n if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n ser = ser.identifyHSeperatedChar(); // find out if they are special char or not. have to do it here before child restruct coz if it is =, its position may change later.\n }\n if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) {\n StructExprRecog[] serarrayNoLnDe = new StructExprRecog[3];\n boolean bIsDivide = isActuallyHLnDivSER(ser, serarrayNoLnDe); //need to do it here as well as in h-cut restruct because h-cut restruct may for independent h-cut ser so never come here.\n if (bIsDivide) {\n LinkedList<StructExprRecog> listCuts = new LinkedList<StructExprRecog>();\n listCuts.add(serarrayNoLnDe[0].restruct());\n listCuts.add(serarrayNoLnDe[1].restruct());\n listCuts.add(serarrayNoLnDe[2].restruct());\n ser.setStructExprRecog(listCuts, EXPRRECOGTYPE_HLINECUT);\n }\n }\n if (ser.mnExprRecogType == EXPRRECOGTYPE_HBLANKCUT) { // special treatment for hblankcut\n LinkedList<StructExprRecog> listSerTopParts = new LinkedList<StructExprRecog>();\n LinkedList<StructExprRecog> listSerBaseParts = new LinkedList<StructExprRecog>();\n LinkedList<StructExprRecog> listSerBottomParts = new LinkedList<StructExprRecog>();\n for (int idx1 = 0; idx1 < ser.mlistChildren.size(); idx1 ++) {\n StructExprRecog serChild = ser.mlistChildren.get(idx1);\n if (bluCI.isUpperNote(serChild)) {\n listSerTopParts.add(serChild);\n } else if (bluCI.isLowerNote(serChild)) {\n listSerBottomParts.add(serChild);\n } else {\n listSerBaseParts.add(serChild);\n }\n }\n // add the parts into base-upper-lower list following the order bottom->top->base.\n if (listSerBottomParts.size() > 0) {\n StructExprRecog serChildBottomPart = new StructExprRecog(ser.getBiArray());\n if (listSerBottomParts.size() == 1) {\n serChildBottomPart = listSerBottomParts.getFirst();\n } else {\n serChildBottomPart.setStructExprRecog(listSerBottomParts, EXPRRECOGTYPE_HBLANKCUT);\n }\n listBaseULIdentified.add(serChildBottomPart);\n listCharLevel.add(-1);\n }\n if (listSerTopParts.size() > 0) {\n StructExprRecog serChildTopPart = new StructExprRecog(ser.getBiArray());\n if (listSerTopParts.size() == 1) {\n serChildTopPart = listSerTopParts.getFirst();\n } else {\n serChildTopPart.setStructExprRecog(listSerTopParts, EXPRRECOGTYPE_HBLANKCUT);\n }\n listBaseULIdentified.add(serChildTopPart);\n listCharLevel.add(1);\n }\n if (listSerBaseParts.size() > 0) {\n StructExprRecog serChildBasePart = new StructExprRecog(ser.getBiArray());\n if (listSerBaseParts.size() == 1) {\n serChildBasePart = listSerBaseParts.getFirst();\n } else {\n serChildBasePart.setStructExprRecog(listSerBaseParts, EXPRRECOGTYPE_HBLANKCUT);\n }\n listBaseULIdentified.add(serChildBasePart);\n listCharLevel.add(0);\n }\n } else {\n listBaseULIdentified.add(ser);\n listCharLevel.add(listMergeMMLevel.get(idx0));\n }\n }\n \n // step 4.1 special treatment for upper or lower note divided characters like j, i is different coz very unlikely i's dot will be looked like a independent upper note.\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n if (listCharLevel.get(idx) != 0 || listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE) {\n continue; // need to find base and the base has to be a single char.\n }\n StructExprRecog serBase = listBaseULIdentified.get(idx);\n if (idx < listBaseULIdentified.size() - 2 && listCharLevel.get(idx + 1) == -1 && listCharLevel.get(idx + 2) == 0\n && serBase.isPossibleNumberChar() && listBaseULIdentified.get(idx + 2).isPossibleNumberChar()) {\n // left and right are both number char, middle is a lower note\n StructExprRecog serPossibleDot = listBaseULIdentified.get(idx + 1);\n StructExprRecog serNextBase = listBaseULIdentified.get(idx + 2);\n double dWOverHThresh = ConstantsMgr.msdExtendableCharWOverHThresh / ConstantsMgr.msdCharWOverHMaxSkewRatio;\n if (serPossibleDot.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotHeight * serPossibleDot.mnHeight\n && serNextBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotHeight * serPossibleDot.mnHeight\n && serBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotWidth * serPossibleDot.mnWidth\n && serNextBase.mnHeight > ConstantsMgr.msdNeighborHeight2PossDotWidth * serPossibleDot.mnWidth\n && serPossibleDot.mnWidth < dWOverHThresh * serPossibleDot.mnHeight\n && serPossibleDot.mnHeight < dWOverHThresh * serPossibleDot.mnWidth) {\n // serPossibleDot is a dot \n serPossibleDot.mType = UnitProtoType.Type.TYPE_DOT;\n }\n }\n if (serBase.mType == UnitProtoType.Type.TYPE_CLOSE_ROUND_BRACKET\n || serBase.mType == UnitProtoType.Type.TYPE_CLOSE_SQUARE_BRACKET\n || serBase.mType == UnitProtoType.Type.TYPE_BIG_J\n || serBase.mType == UnitProtoType.Type.TYPE_CLOSE_BRACE\n || serBase.mType == UnitProtoType.Type.TYPE_INTEGRATE\n || serBase.mType == UnitProtoType.Type.TYPE_SMALL_J_WITHOUT_DOT) {\n int idx1 = idx + 1;\n for (; idx1 < listBaseULIdentified.size(); idx1 ++) {\n if (listCharLevel.get(idx1) == 1) {\n break; // find the first upper note\n }\n }\n if (idx1 < listBaseULIdentified.size()\n && listBaseULIdentified.get(idx1).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (listBaseULIdentified.get(idx1).mType == UnitProtoType.Type.TYPE_DOT // at this moment there is no dot multiply.\n || listBaseULIdentified.get(idx1).mType == UnitProtoType.Type.TYPE_STAR)\n && (listBaseULIdentified.get(idx1).mnLeft - serBase.getRightPlus1())\n < serBase.mnWidth * ConstantsMgr.msdSmallJDotVPlaceThresh // the left-right gap between dot and j main body has to be very small\n && (serBase.mnTop - listBaseULIdentified.get(idx1).getBottomPlus1())\n < serBase.mnHeight * ConstantsMgr.msdSmallJDotHPlaceThresh // the top-bottom gap between dot and j main body has to be very small\n && serBase.mnTop > listBaseULIdentified.get(idx1).getBottomPlus1()) { // main body must be low the dot\n StructExprRecog serSmallj = new StructExprRecog(serBase.mbarrayBiValues);\n int nLeft = Math.min(serBase.mnLeft, listBaseULIdentified.get(idx1).mnLeft);\n int nTop = Math.min(serBase.mnTop, listBaseULIdentified.get(idx1).mnTop);\n int nRightPlus1 = Math.max(serBase.getRightPlus1(), listBaseULIdentified.get(idx1).getRightPlus1());\n int nBottomPlus1 = Math.max(serBase.getBottomPlus1(), listBaseULIdentified.get(idx1).getBottomPlus1());\n int nTotalArea = serBase.getArea() + listBaseULIdentified.get(idx1).getArea();\n double dSimilarity = (serBase.getArea() * serBase.mdSimilarity\n + listBaseULIdentified.get(idx1).getArea() * listBaseULIdentified.get(idx1).mdSimilarity)/nTotalArea; // total area should not be zero here.\n // now we merge the two into small j and replace the seperated two sers with small j\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopTop = listBaseULIdentified.get(idx1).getImageChop(false);\n listParts.add(imgChopTop);\n ImageChop imgChopBase = serBase.getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serSmallj.setStructExprRecog(UnitProtoType.Type.TYPE_SMALL_J, UNKNOWN_FONT_TYPE, nLeft, nTop, nRightPlus1 - nLeft, nBottomPlus1 - nTop, imgChop4SER, dSimilarity);\n listBaseULIdentified.remove(idx1); // remove idx1 first because idx1 is after idx. Otherwise, will remove a wrong child.\n listBaseULIdentified.remove(idx);\n listCharLevel.remove(idx1); // remove idx1 first because idx1 is after idx. Otherwise, will remove a wrong child.\n listCharLevel.remove(idx);\n listBaseULIdentified.add(idx, serSmallj);\n listCharLevel.add(idx, 0);\n }\n }\n }\n \n // step 4.2, identify cap under\n // now we need to handle the cap and/or under notes for \\Sigma, \\Pi and \\Integrate\n // this is for the case that \\topunder{infinite, \\Sigma, n = 1} is misrecognized to\n // \\topunder{infinite, \\Sigma, n^=}_1, or \\topunder{1+2+3+4, \\integrate, 5+6+7+8+9}\n // is misrecognized to 1 + 5 ++26 \\topunder(+3, \\integrate, +} + 7+8++4+9.\n LinkedList<StructExprRecog> listCUIdentifiedBLU = new LinkedList<StructExprRecog>();\n LinkedList<Integer> listCUIdentifiedCharLvl = new LinkedList<Integer>();\n int nLastCUBaseAreaIdx = -1;\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n StructExprRecog serBase = listBaseULIdentified.get(idx).getPrincipleSER(1);\n if ((listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAPUNDER\n || listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP\n || listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)\n && listCharLevel.get(idx) == 0 && serBase.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serBase.mType == UnitProtoType.Type.TYPE_INTEGRATE\n || serBase.mType == UnitProtoType.Type.TYPE_BIG_SIGMA\n || serBase.mType == UnitProtoType.Type.TYPE_BIG_PI)\n && idx < listBaseULIdentified.size() - 1) {\n StructExprRecog serCap = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)?\n null:listBaseULIdentified.get(idx).mlistChildren.getFirst();\n int nWholeCapTop = (serCap==null)?0:serCap.mnTop;\n int nWholeCapBottomP1 = (serCap==null)?0:serCap.getBottomPlus1();\n StructExprRecog serUnder = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP)?\n null:listBaseULIdentified.get(idx).mlistChildren.getLast();\n int nWholeUnderTop = (serUnder==null)?0:serUnder.mnTop;\n int nWholeUnderBottomP1 = (serUnder==null)?0:serUnder.getBottomPlus1();\n LinkedList<StructExprRecog> listIdentifiedCap = new LinkedList<StructExprRecog>();\n if (serCap != null) {\n listIdentifiedCap.add(serCap);\n }\n LinkedList<StructExprRecog> listIdentifiedUnder = new LinkedList<StructExprRecog>();\n if (serUnder != null) {\n listIdentifiedUnder.add(serUnder);\n }\n int idx1 = idx - 1;\n // now go through its left side\n for (; idx1 > nLastCUBaseAreaIdx; idx1 --) {\n StructExprRecog serThis = listBaseULIdentified.get(idx1);\n if (listCharLevel.get(idx1) == 1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER // this character is a top level char and we have cap note\n && (serCap.mnLeft - serThis.getRightPlus1())\n <= Math.max(serCap.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.mnTop >= serThis.getBottomPlus1() // Base is below this which means this is a cap.\n && (Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1) - Math.min(serThis.mnTop, nWholeCapTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serCap.mnTop && serThis.mnTop > serCap.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n listIdentifiedCap.addFirst(serThis);\n serCap = serThis;\n nWholeCapTop = Math.min(serThis.mnTop, nWholeCapTop);\n nWholeCapBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1);\n } else if (listCharLevel.get(idx1) == -1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTCAP // this character is a bottom level char and we have under\n && (serUnder.mnLeft - serThis.getRightPlus1())\n <= Math.max(serUnder.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.getBottomPlus1() <= serThis.mnTop // Base is above this which means this is a under\n && (Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1) - Math.min(serThis.mnTop, nWholeUnderTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serUnder.mnTop && serThis.mnTop > serUnder.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n listIdentifiedUnder.addFirst(serThis);\n serUnder = serThis;\n nWholeUnderTop = Math.min(serThis.mnTop, nWholeUnderTop);\n nWholeUnderBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1);\n } else {\n break; // ok, we arrive at the left edge of this CUBase Area, exit.\n }\n }\n \n for (int idx2 = nLastCUBaseAreaIdx + 1; idx2 <= idx1; idx2 ++) {\n // so, now add the chars which are not belong to this cap under area.\n listCUIdentifiedBLU.add(listBaseULIdentified.get(idx2));\n listCUIdentifiedCharLvl.add(listCharLevel.get(idx2));\n }\n \n nLastCUBaseAreaIdx = idx;\n // now go through its right side\n serCap = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTUNDER)?\n null:listBaseULIdentified.get(idx).mlistChildren.getFirst();\n serUnder = (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_HCUTCAP)?\n null:listBaseULIdentified.get(idx).mlistChildren.getLast();\n idx1 = idx + 1;\n for (; idx1 < listBaseULIdentified.size(); idx1 ++) {\n StructExprRecog serThis = listBaseULIdentified.get(idx1);\n if (listCharLevel.get(idx1) == 1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTUNDER // this character is a top level char and we have cap note\n && (serThis.mnLeft - serCap.getRightPlus1())\n <= Math.max(serCap.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.mnTop >= serThis.getBottomPlus1() // Base is below this which means this is a cap.\n && (Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1) - Math.min(serThis.mnTop, nWholeCapTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serCap.mnTop && serThis.mnTop > serCap.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n nLastCUBaseAreaIdx = idx1;\n listIdentifiedCap.add(serThis);\n serCap = serThis;\n nWholeCapTop = Math.min(serThis.mnTop, nWholeCapTop);\n nWholeCapBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeCapBottomP1);\n } else if (listCharLevel.get(idx1) == -1\n && listBaseULIdentified.get(idx).mnExprRecogType != EXPRRECOGTYPE_HCUTCAP // this character is a bottom level char and we have under note\n && (serThis.mnLeft - serUnder.getRightPlus1())\n <= Math.max(serUnder.mnHeight, serThis.mnHeight) * ConstantsMgr.msdMaxCharGapWidthOverHeight //gap is less enough\n && serBase.getBottomPlus1() <= serThis.mnTop // Base is above this which means this is a under\n && (Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1) - Math.min(serThis.mnTop, nWholeUnderTop))\n <= serBase.mnHeight * ConstantsMgr.msdCapUnderHeightRatio2Base // cap under height as a whole should not be too large\n /*&& serThis.getBottomPlus1() < serUnder.mnTop && serThis.mnTop > serUnder.getBottomPlus1()*/) { //there is not necessarily some vertical overlap, consider 2**3 - 4, 3 and - may not have overlap.\n nLastCUBaseAreaIdx = idx1;\n listIdentifiedUnder.add(serThis);\n serUnder = serThis;\n nWholeUnderTop = Math.min(serThis.mnTop, nWholeUnderTop);\n nWholeUnderBottomP1 = Math.max(serThis.getBottomPlus1(), nWholeUnderBottomP1);\n } else {\n break; // ok, we arrive at the left edge of this CUBase Area, exit.\n }\n }\n // ok, now we have get all the cap parts and all the under parts,\n // it is time for us to reconstruct this SER and add it to the new BLU list.\n StructExprRecog serNewCap = null, serNewUnder = null, serNew;\n if (listIdentifiedCap.size() == 1) {\n serNewCap = listIdentifiedCap.getFirst();\n } else if (listIdentifiedCap.size() > 1) { // size > 1\n serNewCap = new StructExprRecog(serBase.mbarrayBiValues);\n serNewCap.setStructExprRecog(listIdentifiedCap, EXPRRECOGTYPE_VBLANKCUT);\n }\n if (listIdentifiedUnder.size() == 1) {\n serNewUnder = listIdentifiedUnder.getFirst();\n } else if (listIdentifiedUnder.size() > 1) { // size > 1\n serNewUnder = new StructExprRecog(serBase.mbarrayBiValues);\n serNewUnder.setStructExprRecog(listIdentifiedUnder, EXPRRECOGTYPE_VBLANKCUT);\n }\n LinkedList<StructExprRecog> listThisAllChildren = new LinkedList<StructExprRecog>();\n int nExprRecogType = EXPRRECOGTYPE_HCUTCAPUNDER;\n if (serNewCap != null) {\n listThisAllChildren.add(serNewCap);\n } else {\n nExprRecogType = EXPRRECOGTYPE_HCUTUNDER;\n }\n listThisAllChildren.add(serBase);\n if (serNewUnder != null) {\n listThisAllChildren.add(serNewUnder);\n } else {\n nExprRecogType = EXPRRECOGTYPE_HCUTCAP;\n }\n serNew = new StructExprRecog(serBase.mbarrayBiValues);\n serNew.setStructExprRecog(listThisAllChildren, nExprRecogType);\n listCUIdentifiedBLU.add(serNew);\n listCUIdentifiedCharLvl.add(0);\n // done! Now go to the next SER in listBaseULIdentified.\n idx = nLastCUBaseAreaIdx;\n }\n }\n // now we have arrive at the end of listBaseULIdentified. We need to go through from nLastCUBaseAreaIdx + 1 to here\n // and add the remaining parts into listCUIdentifiedBLU.\n for (int idx = nLastCUBaseAreaIdx + 1; idx < listBaseULIdentified.size(); idx ++) {\n // so, now add the chars which are not belong to this cap under area.\n listCUIdentifiedBLU.add(listBaseULIdentified.get(idx));\n listCUIdentifiedCharLvl.add(listCharLevel.get(idx));\n }\n // reset listBaseULIdentified and listCharLevel because they will be used latter on.\n listBaseULIdentified = listCUIdentifiedBLU;\n listCharLevel = listCUIdentifiedCharLvl;\n \n // step 4.3 : at last, trying to rectify some miss-identified char levels\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_EQUAL\n || listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_EQUAL_ALWAYS)\n && (idx > 0 && idx < listBaseULIdentified.size() - 1)\n && listCharLevel.get(idx) != 0\n && ((listCharLevel.get(idx - 1) == 0 && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx - 1).mnTop\n && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx - 1).getBottomPlus1())\n || (listCharLevel.get(idx + 1) == 0 && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx + 1).mnTop\n && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx + 1).getBottomPlus1())\n )\n ) {\n // if the character is = or always=, and its left or right char is a base char but it is not base char and this char is\n // in right position then change its char level to base char.\n listCharLevel.set(idx, 0);\n }\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_SUBTRACT) {\n // need not to convert low and small subtract to dot because we have done before.\n if (listCharLevel.get(idx) != 0 && (idx < listBaseULIdentified.size() - 1) && (listCharLevel.get(idx + 1) == 0)\n && listBaseULIdentified.get(idx).mnTop >= listBaseULIdentified.get(idx + 1).mnTop\n + listBaseULIdentified.get(idx + 1).mnHeight * ConstantsMgr.msdSubtractVRangeAgainstNeighbourH\n && listBaseULIdentified.get(idx).getBottomPlus1() <= listBaseULIdentified.get(idx + 1).getBottomPlus1()\n - listBaseULIdentified.get(idx + 1).mnHeight * ConstantsMgr.msdSubtractVRangeAgainstNeighbourH\n && (listBaseULIdentified.get(idx + 1).mnExprRecogType != EXPRRECOGTYPE_ENUMTYPE\n || listBaseULIdentified.get(idx).mnWidth >= listBaseULIdentified.get(idx + 1).mnWidth * ConstantsMgr.msdSubtractWidthAgainstNeighbourW)) {\n // if the character is -, and its right char is a base char but it is an upper or lower note char and it's in right position\n // and its width is long enough, then change its char level to base char. do not use calculate char level because we have got\n // wrong information from calculate char level.\n listCharLevel.set(idx, 0);\n }\n }\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_DOT) {\n if (((idx < listBaseULIdentified.size() - 1)?(listCharLevel.get(idx + 1) == 0):true)\n && ((idx > 0)?(listCharLevel.get(idx - 1) == 0):true)) {\n if (listCharLevel.get(idx) == -1) {\n // if the character is \\dot, and its left and right char is a base char but it is an lower note char\n // then change its char level to base char.\n listCharLevel.set(idx, 0);\n } else if (listCharLevel.get(idx) == 0 && idx != 0 && idx != listBaseULIdentified.size() - 1) {\n // if the character is \\dot, and its left and right char is a base char and itself is also a base char\n // then it actually means multiply.\n listBaseULIdentified.get(idx).mType = UnitProtoType.Type.TYPE_DOT_MULTIPLY;\n }\n } else if (listCharLevel.get(idx) == 0 && idx > 0 && idx < listBaseULIdentified.size() - 1\n && listCharLevel.get(idx + 1) == 1 && listCharLevel.get(idx - 1) == 1) {\n // if the character is \\dot, and its left and right char is a upper note char and itself is a base char\n // then change its char level to upper note.\n listCharLevel.set(idx, 1);\n }\n }\n if (listBaseULIdentified.get(idx).mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && listBaseULIdentified.get(idx).mType == UnitProtoType.Type.TYPE_DOT\n && listCharLevel.get(idx) == -1\n && ((idx < listBaseULIdentified.size() - 1)?(listCharLevel.get(idx + 1) == 0):true)\n && ((idx > 0)?(listCharLevel.get(idx - 1) == 0):true)) {\n // if the character is \\dot, and its left and right char is a base char but it is an lower note char\n // then change its char level to base char.\n listCharLevel.set(idx, 0);\n }\n // need not to consider a case like \\topunder{infinite, \\Sigma, n = 1} is misrecognized to\n // \\topunder{infinite, \\Sigma, n^=}_1. This kind of situation has been processed.\n }\n \n // step 5, since different levels have been well-sorted, we merge them.\n LinkedList<StructExprRecog> listBaseTrunk = new LinkedList<StructExprRecog>();\n LinkedList<LinkedList<StructExprRecog>> listLeftTopNote = new LinkedList<LinkedList<StructExprRecog>>();\n LinkedList<LinkedList<StructExprRecog>> listLeftBottomNote = new LinkedList<LinkedList<StructExprRecog>>();\n LinkedList<LinkedList<StructExprRecog>> listUpperNote = new LinkedList<LinkedList<StructExprRecog>>();\n LinkedList<LinkedList<StructExprRecog>> listLowerNote = new LinkedList<LinkedList<StructExprRecog>>();\n int nLastBaseIdx = -1;\n for (int idx = 0; idx < listBaseULIdentified.size(); idx ++) {\n if (listCharLevel.get(idx) == 0) {\n listBaseTrunk.add(listBaseULIdentified.get(idx));\n listLeftTopNote.add(new LinkedList<StructExprRecog>());\n listLeftBottomNote.add(new LinkedList<StructExprRecog>());\n listUpperNote.add(new LinkedList<StructExprRecog>()); \n listLowerNote.add(new LinkedList<StructExprRecog>());\n int nLastBaseIdxInBaseTrunk = listBaseTrunk.size() - 2;\n if (nLastBaseIdx < idx - 1) {\n // nLastBaseIdx == idx - 1 means no notes between nLastBaseIdx and this base.\n // Note that even if nLastBaseIdx is -1, nLastBaseIdx == idx - 1 is still a valid adjustment.\n int[] narrayNoteGroup = groupNotesForPrevNextBases(listBaseULIdentified, listCharLevel, nLastBaseIdx, idx);\n for (int idx1 = nLastBaseIdx + 1; idx1 < idx; idx1 ++) {\n int nGroupIdx = idx1 - nLastBaseIdx - 1;\n if (listCharLevel.get(idx1) == -1) {\n // lower note\n if (narrayNoteGroup[nGroupIdx] == 0) {\n listLowerNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n } else if (narrayNoteGroup[nGroupIdx] == 1) {\n listLeftBottomNote.getLast().add(listBaseULIdentified.get(idx1));\n } // ignore if narrayNoteGroup[nGroupIdx] == other values\n } else if (listCharLevel.get(idx1) == 1) {\n // upper note\n if (narrayNoteGroup[nGroupIdx] == 0) {\n listUpperNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n } else if (narrayNoteGroup[nGroupIdx] == 1) {\n listLeftTopNote.getLast().add(listBaseULIdentified.get(idx1));\n } // ignore if narrayNoteGroup[nGroupIdx] == other values\n } // ignore if listCharLevel.get(idx1) is not -1 or 1.\n }\n }\n if (nLastBaseIdxInBaseTrunk > 0) {\n convertNotes2HCut(nLastBaseIdxInBaseTrunk, listBaseTrunk, listLeftTopNote, listLeftBottomNote, listUpperNote, listLowerNote);\n }\n nLastBaseIdx = idx;\n }\n }\n if (nLastBaseIdx >= 0) {\n int nLastBaseIdxInBaseTrunk = listBaseTrunk.size() - 1;\n for (int idx1 = nLastBaseIdx + 1; idx1 < listBaseULIdentified.size(); idx1 ++) {\n if (listCharLevel.get(idx1) == -1) {\n listLowerNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n } else { // idx1 is not nLastBaseIdx, so that it must be either 1 or -1.\n listUpperNote.get(nLastBaseIdxInBaseTrunk).add(listBaseULIdentified.get(idx1));\n }\n }\n convertNotes2HCut(nLastBaseIdxInBaseTrunk, listBaseTrunk, listLeftTopNote, listLeftBottomNote, listUpperNote, listLowerNote);\n }\n \n // step 6, create a list of merged and reconstructed children.\n LinkedList<StructExprRecog> listProcessed = new LinkedList<StructExprRecog>();\n for (int idx = 0; idx < listBaseTrunk.size(); idx ++) {\n StructExprRecog serThis = listBaseTrunk.get(idx);\n serThis = serThis.restruct();\n if (listLeftTopNote.get(idx).size() > 0) {\n StructExprRecog serLeftTopNote = new StructExprRecog(mbarrayBiValues);\n if (listLeftTopNote.get(idx).size() > 1) {\n serLeftTopNote.setStructExprRecog(listLeftTopNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serLeftTopNote = listLeftTopNote.get(idx).getFirst();\n }\n serLeftTopNote = serLeftTopNote.restruct();\n LinkedList<StructExprRecog> listWithLeftTopNote = new LinkedList<StructExprRecog>();\n listWithLeftTopNote.add(serLeftTopNote);\n listWithLeftTopNote.add(serThis);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithLeftTopNote, EXPRRECOGTYPE_VCUTLEFTTOPNOTE);\n \n if (serThis.mlistChildren.getLast().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && serThis.mlistChildren.getFirst().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_ZERO\n || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_SMALL_O\n || serThis.mlistChildren.getFirst().mType == UnitProtoType.Type.TYPE_BIG_O)\n ) {\n if (serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_SMALL_C\n || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_BIG_C) {\n // need not to reset left top width and height because they have been set.\n // similarly, need not to reset similarity.\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false);\n listParts.add(imgChopLeftTop);\n ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serThis.setStructExprRecog(UnitProtoType.Type.TYPE_CELCIUS, UNKNOWN_FONT_TYPE, imgChop4SER);\n } else if (serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_BIG_F) {\n // need not to reset left top width and height because they have been set.\n // similarly, need not to reset similarity.\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false);\n listParts.add(imgChopLeftTop);\n ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serThis.setStructExprRecog(UnitProtoType.Type.TYPE_FAHRENHEIT, UNKNOWN_FONT_TYPE, imgChop4SER);\n } else if ((serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_ONE\n || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_FORWARD_SLASH\n || serThis.mlistChildren.getLast().mType == UnitProtoType.Type.TYPE_SMALL_L) \n && listLowerNote.get(idx).size() >= 1\n && listLowerNote.get(idx).getFirst().mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_ZERO\n || listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_SMALL_O\n || listLowerNote.get(idx).getFirst().mType == UnitProtoType.Type.TYPE_BIG_O)\n ) {\n LinkedList<ImageChop> listParts = new LinkedList<ImageChop>(); \n ImageChop imgChopLeftTop = serThis.mlistChildren.getFirst().getImageChop(false);\n listParts.add(imgChopLeftTop);\n ImageChop imgChopBase = serThis.mlistChildren.getLast().getImageChop(false);\n listParts.add(imgChopBase);\n ImageChop imgChopLowerNote = listLowerNote.get(idx).getFirst().getImageChop(false);\n listParts.add(imgChopLowerNote);\n ImageChop imgChop4SER = ExprSeperator.mergeImgChopsWithSameOriginal(listParts); // need not to shrink imgChop4SER because it has been min container.\n serThis.setStructExprRecog(UnitProtoType.Type.TYPE_PERCENT, UNKNOWN_FONT_TYPE, imgChop4SER);\n listLowerNote.get(idx).removeFirst(); // first element of lower note list should be removed here because it has been merged into serThis.\n }\n } else if (serThis.mlistChildren.getLast().mnExprRecogType == EXPRRECOGTYPE_GETROOT) {\n StructExprRecog serRootLevel = serThis.mlistChildren.getLast().mlistChildren.getFirst();\n StructExprRecog serRooted = serThis.mlistChildren.getLast().mlistChildren.getLast();\n if (serRootLevel.mnExprRecogType == EXPRRECOGTYPE_ENUMTYPE\n && (serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_LEFT\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_SHORT\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_MEDIUM\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_LONG\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_TALL\n || serRootLevel.mType == UnitProtoType.Type.TYPE_SQRT_VERY_TALL)) {\n LinkedList<StructExprRecog> listRoot = new LinkedList<StructExprRecog>();\n listRoot.add(serLeftTopNote);\n listRoot.add(serRootLevel);\n listRoot.add(serRooted);\n serThis.setStructExprRecog(listRoot, EXPRRECOGTYPE_GETROOT);\n } else {\n LinkedList<StructExprRecog> listNewRootLevel = new LinkedList<StructExprRecog>();\n listNewRootLevel.add(serLeftTopNote);\n listNewRootLevel.add(serRootLevel);\n StructExprRecog serNewRootLevel = new StructExprRecog(mbarrayBiValues);\n serNewRootLevel.setStructExprRecog(listNewRootLevel, EXPRRECOGTYPE_VBLANKCUT);\n serNewRootLevel = serNewRootLevel.restruct();\n LinkedList<StructExprRecog> listRoot = new LinkedList<StructExprRecog>();\n listRoot.add(serNewRootLevel);\n listRoot.add(serThis.mlistChildren.getLast().mlistChildren.get(1));\n listRoot.add(serRooted);\n serThis.setStructExprRecog(listRoot, EXPRRECOGTYPE_GETROOT);\n }\n } else {\n // ignore left top note\n serThis = serThis.mlistChildren.getLast();\n }\n }\n if (listLowerNote.get(idx).size() > 0 && listUpperNote.get(idx).size() > 0) {\n StructExprRecog serLowerNote = new StructExprRecog(mbarrayBiValues);\n if (listLowerNote.get(idx).size() > 1) {\n serLowerNote.setStructExprRecog(listLowerNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serLowerNote = listLowerNote.get(idx).getFirst();\n }\n serLowerNote = serLowerNote.restruct(); // restruct lower note\n StructExprRecog serUpperNote = new StructExprRecog(mbarrayBiValues);\n if (listUpperNote.get(idx).size() > 1) {\n serUpperNote.setStructExprRecog(listUpperNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serUpperNote = listUpperNote.get(idx).getFirst();\n }\n serUpperNote = serUpperNote.restruct(); // restruct upper note\n LinkedList<StructExprRecog> listWithLUNote = new LinkedList<StructExprRecog>();\n listWithLUNote.add(serThis);\n listWithLUNote.add(serLowerNote);\n listWithLUNote.add(serUpperNote);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithLUNote, EXPRRECOGTYPE_VCUTLUNOTES);\n } else if(listLowerNote.get(idx).size() > 0) {\n StructExprRecog serLowerNote = new StructExprRecog(mbarrayBiValues);\n if (listLowerNote.get(idx).size() > 1) {\n serLowerNote.setStructExprRecog(listLowerNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serLowerNote = listLowerNote.get(idx).getFirst();\n }\n serLowerNote = serLowerNote.restruct(); // restruct lower note\n LinkedList<StructExprRecog> listWithLowerNote = new LinkedList<StructExprRecog>();\n listWithLowerNote.add(serThis);\n listWithLowerNote.add(serLowerNote);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithLowerNote, EXPRRECOGTYPE_VCUTLOWERNOTE);\n } else if (listUpperNote.get(idx).size() > 0) {\n StructExprRecog serUpperNote = new StructExprRecog(mbarrayBiValues);\n if (listUpperNote.get(idx).size() > 1) {\n serUpperNote.setStructExprRecog(listUpperNote.get(idx), EXPRRECOGTYPE_VBLANKCUT);\n } else {\n serUpperNote = listUpperNote.get(idx).getFirst();\n }\n serUpperNote = serUpperNote.restruct(); // restruct upper note\n LinkedList<StructExprRecog> listWithUpperNote = new LinkedList<StructExprRecog>();\n listWithUpperNote.add(serThis);\n listWithUpperNote.add(serUpperNote);\n serThis = new StructExprRecog(mbarrayBiValues);\n serThis.setStructExprRecog(listWithUpperNote, EXPRRECOGTYPE_VCUTUPPERNOTE);\n serThis = serThis.identifyHSeperatedChar(); // a VCUTUPPERNOTE could be misrecognized i.\n }\n // base is always not v cut.\n listProcessed.add(serThis);\n }\n \n StructExprRecog serReturn = new StructExprRecog(mbarrayBiValues);\n if (listProcessed.size() == 1) {\n serReturn = listProcessed.getFirst();\n } else if (listProcessed.size() > 1) {\n serReturn.setStructExprRecog(listProcessed, EXPRRECOGTYPE_VBLANKCUT);\n }\n return serReturn;\n }\n }", "public void actualizacionMemoriaFlotante(float value, int direccion){\n memoriaFlotante[direccion-inicioMem-tamMem] = value;\n }", "public int vectorSum()\n\t{\n\t\tint sum =0;\n\t\tfor(int i=0;i<vector.size();i++)\n\t\t{\n\t\t\tsum += vector.get(i);\n\t\t}\n\t\treturn sum;\n\t}", "public void vincula(){\n for (Nodo n : exps)\n n.vincula();\n }", "static void PrintRecorrido(int ini, int fin) {\n\n //System.out.println(\"Recorrido de nodos para llegar de nodo \" + ini + \" a \" + fin);\n List<Integer> path = new ArrayList<Integer>();\n int total=0;\n for (;;) { //infinite loop\n\n path.add(fin);\n if (prev[fin] == -1) {//si se llegó al inicio\n break;\n }\n total+=pesos[fin];//va sumando los pesos \n fin = prev[fin]; //\n }\n\n for (int i = path.size() - 1, k = 0; i >= 0; --i) {//se recorre de atrás para adelante printing los valores\n if (k != 0) {\n System.out.print(\" \");\n }\n System.out.print(path.get(i));//muestra el valor en posicion i (ultimo)\n k = 1;\n }\n System.out.print(\" Total:\"+total);\n System.out.println();\n }", "private void init(myVector[] _initSt, SnowGlobeWin.SolverType _solv) {\n\t\tcurIDX = 0;\t\t\t\t\t\t\t\t\t//cycling ptr to idx in arrays of current sim values\n\t\t\n\t\taPosition = new myVector[szAcc];\n\t\taLinMomentum = new myVector[szAcc];\n\t\taAngMomentum = new myVector[szAcc];\n\t\taForceAcc = new myVector[szAcc];\n\t\taTorqueAcc = new myVector[szAcc];\n\t\taOldPos = new myVector[szAcc];\n\t\taOldLinMmnt = new myVector[szAcc];\n\t\taOldAngMmnt = new myVector[szAcc];\n\t\taOldForceAcc = new myVector[szAcc];\n\t\taOldTorqueAcc = new myVector[szAcc];\n\t\t\n\t\tfor(int i=0;i<szAcc;++i){\n\t\t\taPosition[i] = new myVector();\n\t\t\taLinMomentum[i] = new myVector();\n\t\t\taAngMomentum[i] = new myVector();\n\t\t\taForceAcc[i] = new myVector();\n\t\t\taTorqueAcc[i] = new myVector();\n\t\t\taOldPos[i] = new myVector();\n\t\t\taOldLinMmnt[i] = new myVector();\n\t\t\taOldAngMmnt[i] = new myVector();\n\t\t\taOldForceAcc[i] = new myVector();\n\t\t\taOldTorqueAcc[i] = new myVector();\n\t\t}\n//\t\taPosition[0].set(_pos);\n//\t\taLinMomentum[0].set(_velocity);\n//\t\taAngMomentum[0].set(_velocity);\n//\t\taForceAcc[0].set(_forceAcc);\n//\t\taTorqueAcc.set(_forceAcc);\n//\t\taOldPos[0].set(_pos);\n//\t\taOldLinMmnt[0].set(_velocity);\n//\t\taOldAngMmnt[0].set(_velocity);\n//\t\taOldForceAcc[0].set(_forceAcc);\n//\t\taOldTorqueAcc[0].set(_forceAcc);\n\t\t\n\t\tsetOrigMass(mass);\n//\t\tinitPos = new myVector(_pos);\n//\t\tinitVel = new myVector(_velocity);\n\t\tsolveType = _solv;\n\t\tsolver = new mySolver( _solv);\n\t}", "private void collectValues\n (int[] i, int i0, int i1, long[] V) {\n for (int o=i0; o<i1; o++) // 1\n V[o] = read(i[o]); // 1\n }", "public Vector<Node> GetAdditionalSubNodes();", "private int[][] llenarAsignacion(int asignacion[][], int maximos[][], int disponibles[])\r\n {\r\n \r\n //Variables para llenar la matriz asignacion\r\n int max, disp, random;\r\n int asignados[][] = asignacion;\r\n int maxarr[][] = maximos;\r\n int disparr[] = disponibles;\r\n \r\n for(int j = 0; j < asignacion[0].length; j++){\r\n //Extraer la cantidad de tipo de recurso disponible\r\n disp = disparr[j];\r\n for(int i = 0; i < asignacion.length; i++){\r\n \r\n if(disp > 0){ //Si la cantidad de tipo recurso disponibles es 0, asignar 0\r\n \r\n //Extraer valor maximo de tipo de recurso que requiere el proceso\r\n max = maxarr[i][j];\r\n \r\n //Si el proceso requiere mas recursos de los disponibles, limitar los recursos asignables a los disponibles\r\n if(max > disp)\r\n {\r\n max = disp;\r\n }\r\n \r\n //Asignar una cantidad aleatoria del tipo de recurso, entre 0 y la cantidad maxima posible\r\n random = ThreadLocalRandom.current().nextInt(0, max + 1);\r\n asignados[i][j] = random;\r\n \r\n //System.out.println(\"as \"+asignados[i][j]);\r\n \r\n //Actualizar la cantidad de tipo de recurso disponible\r\n disp = disp - random;\r\n } \r\n else \r\n {\r\n asignados[i][j] = disp;\r\n }\r\n }\r\n }\r\n return asignados;\r\n }", "public void updateVarView() { \t\t\n if (this.executionHandler == null || this.executionHandler.getProgramExecution() == null) {\n \treturn;\n }\n HashMap<Identifier, Value> vars = this.executionHandler.getProgramExecution().getVariables();\n \n //insert Tree items \n this.varView.getVarTree().removeAll(); \n \t\tIterator<Map.Entry<Identifier, Value>> it = vars.entrySet().iterator();\t\t\n \t\twhile (it.hasNext()) {\n \t\t\tMap.Entry<Identifier, Value> entry = it.next();\n \t\t\tString type = entry.getValue().getType().toString();\n \t\t\tString id = entry.getKey().toString();\n \t\t\tValue tmp = entry.getValue();\n \t\t\tthis.checkValue(this.varView.getVarTree(), type, id, tmp);\n \t\t} \n \t}", "private HistogramCategorical getReferenceVector(Node[] startNodes,\r\n\t\t\t\t\t\t AttributeCategorical destAttrib,\r\n\t\t\t\t\t\t List<EdgeType> path,\r\n\t\t\t\t\t\t boolean normalized)\r\n {\r\n\tfinal double[] results = new double[destAttrib.size()];\r\n\tArrays.fill(results, 0);\r\n\t\r\n\tfor (final Node node : startNodes)\r\n\t{\r\n\t final int index = node.getAttributeIndex(destAttrib.getName());\r\n\t for (final Edge edge : node.getNeighbors(path))\r\n\t {\r\n\t\tfinal int resultIndex = (int) edge.getDest().getValue(index);\r\n\t\tresults[resultIndex] += edge.getWeight();\r\n\t }\r\n\t}\r\n\r\n\tif (normalized)\r\n\t{\r\n\t double sum = 0;\r\n\t for (final double d : results)\r\n\t\tsum += d;\r\n\t for (int i=0; i<results.length; i++)\r\n\t\tresults[i] /= sum;\r\n\t}\r\n\t\r\n\treturn new HistogramCategorical(results, destAttrib);\r\n }", "private static void caso4(ArrayList<Float> listaValores) {\n \n }", "@Override\n\tpublic void resoudre() throws CloneNotSupportedException {\n\t\tArrayList<Solution> solutions = new ArrayList<Solution>();\n\t\tfor( int i = 0 ; i < vc.getTaille() ; i++ ){\n\t\t\tSolution s =(Solution) solution.clone();\n\t\t\ts.setSolution(this.demarrer(i));\n\t\t\tsolutions.add(s);\n\t\t}\n\t\tthis.solution = Collections.min(solutions);\n\t}", "public void AgregarVertice(int v) {\n\t\tNodoGrafo aux = new NodoGrafo();\n\t\taux.nodo = v;\n\t\taux.arista = null;\n\t\taux.sigNodo = origen;\n\t\torigen = aux;\n\t}", "Vector getZeroVector();", "public void replaced_by(FindPossibleValues fpv)\r\n\t{\r\n\t\tthis.set_size(fpv.get_size());\r\n\t\tthis.set_position(fpv.get_postion());\r\n\t\tthis.set_values(fpv.get_poss_values());\r\n\t}", "public IDoubleArray getSolutionVector();", "public void agregarAlFinal(String valor){\r\n // Define un nuevo nodo.\r\n Nodo nuevo = new Nodo();\r\n // Agrega al valor al nodo.\r\n nuevo.setValor(valor);\r\n // Consulta si la lista esta vacia.\r\n if (esVacia()) {\r\n // Inicializa la lista agregando como inicio al nuevo nodo.\r\n inicio = nuevo;\r\n // Caso contrario recorre la lista hasta llegar al ultimo nodo\r\n //y agrega el nuevo.\r\n } else{\r\n // Crea ua copia de la lista.\r\n Nodo aux = inicio;\r\n // Recorre la lista hasta llegar al ultimo nodo.\r\n while(aux.getSiguiente() != null){\r\n aux = aux.getSiguiente();\r\n }\r\n // Agrega el nuevo nodo al final de la lista.\r\n aux.setSiguiente(nuevo);\r\n }\r\n // Incrementa el contador de tamaño de la lista\r\n tamanio++;\r\n }", "public Vector produitVectorielle(Vector vec){\n return new Vector(y * vec.z - z * vec.y, z * vec.x - x * vec.z, x * vec.y - y * vec.x);\t\t\n }", "private void build(int v, int from, int size) {\n\t\tNode node = new Node();\n\t\theap[v] = node;\n\t\tnode.from = from;\n\t\tnode.to = from + size - 1;\n\t\tif (size == 1) {\n\t\t\tnode.sum = array[from];\n\t\t\tnode.min = array[from];\n\t\t} else {\n\t\t\tint len = size / 2;\n\t\t\tbuild(2 * v, from, len);\n\t\t\tbuild(2 * v + 1, from + len, size - len);\n\t\t\tnode.sum = heap[2 * v].sum + heap[2 * v + 1].sum;\n\t\t\tnode.min = Math.min(heap[2 * v].min, heap[2 * v + 1].min);\n\t\t}\n\t}", "@SafeVarargs\r\n\tpublic TreeImpl(T valor, Tree<T>... arboles) {\r\n\t\traiz = new NodeImpl<T>(valor, null);// Crea nueva raiz(Null dice que es\r\n\t\t\t\t\t\t\t\t\t\t\t// raiz)\r\n\t\tfor (int i = 0; i < arboles.length; i++) {// Por el vector de\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// arboles\r\n\t\t\traiz.addChild(arboles[i].getRoot());// Aņade la raiz de esos arboles\r\n\t\t\t\t\t\t\t\t\t\t\t\t// como hijos de la nueva raiz\r\n\t\t\t(arboles[i].getRoot()).setParent(raiz);// Les asigna la nueva raiz\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t// como padre\r\n\t\t}\r\n\t}", "void doVector() {\n Vector<String> v = new Vector<>();//creating vector\n v.add( \"umesh\" );//method of Collection\n v.addElement( \"irfan\" );//method of Vector\n v.addElement( \"kumar\" );\n //traversing elements using Enumeration\n Enumeration e = v.elements(); // creates enumeration objects\n while (e.hasMoreElements()) { //\n System.out.println( e.nextElement() );\n }\n }", "public void movR(){\r\n\t\t\r\n\t\tint aux1[][]= new int [3][1];\r\n\t\tint aux2[][]= new int [3][1];\r\n\t\tint aux3[][]= new int [3][1];\r\n\t\tint aux4[][]= new int [3][1];\r\n\t\t\r\n\t\tint aux5[][]= new int [3][1];\r\n\t\t\r\n\t\tint aux6[][]= new int [3][1];\r\n\t\t\r\n\t\tint aux7[][]= new int [3][1];\r\n\t\t\r\n\t\taux1=cloneC(5,2);\r\n\t\taux2=cloneC(1,2);\r\n\t\taux3=cloneC(4,2);\r\n\t\taux4=cloneC(3,0);\r\n\t\t\r\n\t\taux5=cloneF(2,0);\r\n\t\taux6=cloneF(2,1);\r\n\t\taux7=cloneF(2,2);\r\n\t\t\r\n\t\t\r\n\t\tthis.copiaEnColumnaUnaColumna(aux1, 1, 2);\r\n\t\tthis.copiaEnColumnaUnaColumna(aux2, 4, 2);\r\n\t\tthis.copiaEnColumnaUnaColumnaReves(aux3, 3, 0);\r\n\t\tthis.copiaEnColumnaUnaColumnaReves(aux4, 5, 2);\r\n\t\t\r\n\t\tthis.copiaEnColumnaUnaFila(aux5, 2, 2);\r\n\t\tthis.copiaEnColumnaUnaFila(aux6, 2, 1);\r\n\t\tthis.copiaEnColumnaUnaFila(aux7, 2, 0);\r\n\t\t\r\n\t}", "public void learnVector(final Calendar when, final List<Double> vals);", "float[][] getCameraVectorsNormal(int resX, int resY){\n float vectors[][]=new float[resX*resY][3];//first vector index, second the components of the vector\n float[] vect2=rotateYVector(dir);\n vect2[1]=0;\n vect2=normalize(vect2);\n float[] vect3=normalize(vectorProduct(dir, vect2));//dir, vect2, vect3 base vectors\n float[] x={0,0,0};\n float[] y={0,0,0};\n float[] temp={0,0,0};\n for(int i=0;i<3;i++){\n x[i]=(vect2[i])/(resX/2);\n y[i]=(vect3[i])/(resY/2);\n temp[i]=vect2[i];\n }\n \n for(int j=0;j<resY;j++){\n for(int i=0;i<resX;i++){\n vectors[j*resX+i][0]=dir[0]+vect2[0]+vect3[0];\n vectors[j*resX+i][1]=dir[1]+vect2[1]+vect3[1];\n vectors[j*resX+i][2]=dir[2]+vect2[2]+vect3[2];\n vectors[j*resX+i]=normalize(vectors[j*resX+i]);\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n if((vectorLength(vect2)>(-0.0001)&&vectorLength(vect2)<0.0001)&&(resX%2)==0){\n vect2[0]-=x[0];\n vect2[1]-=x[1];\n vect2[2]-=x[2];\n }\n }\n //printVector(temp);\n vect2[0]=temp[0];\n vect2[1]=temp[1];\n vect2[2]=temp[2];\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n if((vectorLength(vect3)>(-0.0001)&&vectorLength(vect3)<0.0001)&&(resY%2)==0){\n vect3[0]-=y[0];\n vect3[1]-=y[1];\n vect3[2]-=y[2];\n }\n }\n \n return vectors;\n }" ]
[ "0.58256394", "0.55791754", "0.55759597", "0.5445121", "0.5350894", "0.5345218", "0.5315819", "0.5291615", "0.5239685", "0.52381235", "0.5229478", "0.5190156", "0.5186456", "0.51732415", "0.51513505", "0.5133458", "0.5116636", "0.5113924", "0.51029754", "0.5057001", "0.50522804", "0.50406337", "0.5033336", "0.5001267", "0.4998011", "0.49868372", "0.49858445", "0.49733487", "0.49664778", "0.49645376", "0.49519497", "0.4951124", "0.49480072", "0.49461398", "0.49399528", "0.49385512", "0.4938239", "0.49362737", "0.49329913", "0.4927175", "0.49247438", "0.49232477", "0.49150312", "0.49007136", "0.48957506", "0.4895709", "0.4894683", "0.4892309", "0.48692673", "0.4860379", "0.48591375", "0.48576948", "0.48506552", "0.48432502", "0.48275298", "0.48179573", "0.48165268", "0.4816189", "0.48104376", "0.48077536", "0.48059446", "0.48039404", "0.4798897", "0.47943935", "0.47901735", "0.4789312", "0.47860596", "0.47851488", "0.47795653", "0.47709036", "0.47692344", "0.47685033", "0.47651187", "0.47630984", "0.4753888", "0.47505397", "0.47486153", "0.47483706", "0.47466618", "0.47437426", "0.47386843", "0.4732425", "0.4723734", "0.47207156", "0.47202343", "0.47191453", "0.4716051", "0.47140506", "0.47137153", "0.47097525", "0.47089797", "0.4708506", "0.4708194", "0.47054866", "0.47054645", "0.47011074", "0.4697783", "0.4689071", "0.46857798", "0.4683986" ]
0.60448253
0
Calculo de recursos necesarios para ejecutar una orden
private int[][] calcularNecesarios(int asig[][], int maxi[][]){ int needed[][] = new int[maxi.length][maxi[0].length]; for(int i = 0; i < asig.length; i++){ for(int j = 0; j < asig[0].length; j++){ needed[i][j] = maxi[i][j] - asig[i][j]; } } return needed; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public Nodo ejecutar() {\n listaNodos.add(nodoRaiz);\n //nodo almacenado temporalmente\n Nodo nodoActual;\n //cola de hijos producto de aplicar ops\n ArrayList <Nodo> cola;\n \n NODO:while(!(listaNodos.isEmpty()))\n {\n nodoActual=listaNodos.get(0);\n listaNodos.remove(0);\n //Detecto el nodo como un ciclo y salto si sí es luego verifico meta\n if(nodoCiclo(nodoActual))\n {\n \n// System.out.println(\"Es Ciclo: \"+nodoActual.getOperador());\n continue NODO;\n }\n else if(esMeta(nodoActual)){\n solucion(nodoActual);\n JOptionPane.showMessageDialog(null, \"nodos expandidos\"+nodoexpandidos+\"profundidad\"+profundidad);\n return nodoActual;\n }\n //Expando Nodo\n cola=expandirNodo(nodoActual);\n nodoexpandidos++;\n for(int i=0;i<cola.size();i++)\n {\n Nodo temporal=cola.get(i);\n cola.set(i, temporal);\n \n }\n //Armo cola general\n cola.addAll(listaNodos);\n listaNodos=(ArrayList <Nodo>)cola.clone();\n }\n return null;\n }", "public void ejecucion() throws Exception {\n\t\t//Activamos las trazas\n\t\tsetTrazaFichero();\n\t\n\t\ttry{\n\t\t\t//Sacamos la acción a realizar y ejecutamos la acción correspondiente\n\t\t\tString accion = conectorParametro(PARAMETRO_GENERICO_ACCION);\n\t\t\tString origen = conectorParametro(PARAMETRO_GENERICO_ORIGEN);\n\t\t\t\n\t\t\t//Caragamos los elemetnos en la pagina\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ACCION,accion);\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ORIGEN,origen);\n\t\n\t\t\t//Ejecutamos la acción indicada\n\t\t\tif(accion.equals(ACCION_CREATE)) cmdCreate();\n\t\t\tif(accion.equals(ACCION_UPDATE)) cmdUpdate();\n\t\t\tif(accion.equals(ACCION_REMOVE)) cmdRemove();\n\t\t}catch(Exception e){\n\t\t\thandleException(e);\n\t\t}\n }", "public void ejecucion() throws Exception {\n\t\t//Activamos las trazas\n\t\tsetTrazaFichero();\n\t\n\t\ttry{\n\t\t\t//Sacamos la acción a realizar y ejecutamos la acción correspondiente\n\t\t\tString accion = conectorParametro(PARAMETRO_GENERICO_ACCION);\n\t\t\tString origen = conectorParametro(PARAMETRO_GENERICO_ORIGEN);\n\t\t\t\n\t\t\t//Caragamos los elemetnos en la pagina\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ACCION,accion);\n\t\t\tasignar(\"VAR\",PARAMETRO_GENERICO_ORIGEN,origen);\n\t\n\t\t\t//Ejecutamos la acción indicada\n\t\t\tif(accion.equals(ACCION_CREATE)) cmdCreate();\n\t\t\tif(accion.equals(ACCION_UPDATE)) cmdUpdate();\n\t\t\tif(accion.equals(ACCION_REMOVE)) cmdRemove();\n\t\t}catch(Exception e){\n\t\t\thandleException(e);\n\t\t}\n }", "public void executarLogica() {\n\t\tchecarTarefaValida();\n\t\texecutar();\n\t\texecutandoTarefa();\n\t\tfinalizarTarefa();\n\t}", "public void execute(Engine controlador) throws StackException, DivisionByZero, ArrayException {\n\t\tcontrolador.ejecutaRUN();\n\t}", "@Override\n\tpublic int doExecution(final HshContext context) throws Exception {\n\t\tif(getChildCount()>1)\n\t\t\tthrow new RuntimeException(\"pipes not implementd\");\n\n\t\tint result=0;\n\t\tfor(final L1Node child : this)\n\t\t\tresult=NodeTraversal.executeSubtree(child, context);\n\t\t// if banged swap result true/false\n\t\tif(isBanged())\n\t\t\treturn result==0?1:0;\n\t\treturn result;\n\t}", "abstract void exec();", "public void execute() {\n execute0();\n }", "public static void Execute ()\n\t{\n\t\tReceiveCollection (SpawnCrawler (target));\n\t\t\n\t\tList<String> initialCollection = overCollection;\n\t\t\n\t\tif ( ! initialCollection.isEmpty ())\n\t\t{\n\t\t\n\t\t\tfor (String collected : initialCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tReceiveCollection (SpawnCrawler (collected));\n\t\t\t\telse\n\t\t\t\t\tReceiveCollection (SpawnCrawler (target + collected));\n\t\t\t\t\n\t\t\t}\n\t\t\n\t\t}\n\t\t\n\t\t/*\n\t\t * Several loops should commence here where the system reiteratively goes over all the newly acquired URLs\n\t\t * so it may extend itself beyond the first and second depth.\n\t\t * However this process should be halted once it reaches a certain configurable depth.\n\t\t */\n\t\tint depth = 0;\n\t\tint newFoundings = 0;\n\t\t\n\t\tdepthLoop: while (depth <= MAX_DEPTH)\n\t\t{\n\t\t\t\n\t\t\tfor (String collected : overCollection)\n\t\t\t{\n\t\t\t\t\n\t\t\t\tif (collected.contains (\"http\"))\n\t\t\t\t\tSpawnCrawler (collected);\n\t\t\t\telse\n\t\t\t\t\tSpawnCrawler (target + collected);\n\t\t\t\t\n\t\t\t}\n\t\t\t\n\t\t\tif (newFoundings <= 0)\n\t\t\t\tbreak depthLoop;\n\t\t\t\n\t\t\tdepth++;\n\t\t\t\t\t\t\n\t\t}\n\t\t\n\t}", "public void dispatchCall() throws InterruptedException {\r\n try {\r\n System.out.println(\"asignar llamada...\");\r\n while (!llamada.isAtendida()) {\r\n for (Empleado empleado : registro.getOperadores()) {\r\n if (!empleado.isAtendiendoLlamda() && !llamada.isAtendida()) {\r\n asignarllamda(empleado, llamada);\r\n registro.agregarLlamada(llamada);\r\n teimpoLlamada = new Timer();\r\n teimpoLlamada.schedule(\r\n finalizarLlamada(empleado),\r\n llamada.getDuracion()\r\n );\r\n break;\r\n }\r\n }\r\n if (!llamada.isAtendida()) {\r\n for (Empleado empleado : registro.getSupervisores()) {\r\n if (!empleado.isAtendiendoLlamda() && !llamada.isAtendida()) {\r\n asignarllamda(empleado, llamada);\r\n registro.agregarLlamada(llamada);\r\n teimpoLlamada = new Timer();\r\n teimpoLlamada.schedule(\r\n finalizarLlamada(empleado),\r\n llamada.getDuracion()\r\n );\r\n break;\r\n }\r\n }\r\n } else if (!llamada.isAtendida()) {\r\n for (Empleado empleado : registro.getDirectores()) {\r\n if (!empleado.isAtendiendoLlamda() && !llamada.isAtendida()) {\r\n asignarllamda(empleado, llamada);\r\n registro.agregarLlamada(llamada);\r\n teimpoLlamada = new Timer();\r\n teimpoLlamada.schedule(\r\n finalizarLlamada(empleado),\r\n llamada.getDuracion()\r\n );\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n } catch (Exception e) {\r\n System.out.println(\"Error :\" + e.getCause().getCause().getMessage());\r\n }\r\n }", "public void executeStep() {\n\t\tvar parent = queue.poll();\n\t\tfinal var children = parent.getValidChildren(graph, probabilities, minSteps,\n\t\t\t\tinitialEdgeImportance.keySet().toArray(new ConcreteEdge[initialEdgeImportance.size()]));\n\n\t\tfor (final var child : children) {\n\t\t\tfor (var x : parent.getInitialEdgeIncrements().entrySet()) {\n\t\t\t\tinitialEdgeImportance.compute(x.getKey(), (k, v) -> v == null ? x.getValue() : (v + x.getValue()));\n\t\t\t}\n\n\t\t\tgetSuccessMatrixResult(child.getInitialAction()).max(child.getPosition(), child.getSuccessRating());\n\t\t\tgetCutOffMatrixResult(child.getInitialAction()).max(child.getPosition(), child.getCutOffRating());\n\n\t\t\tqueue.add(child);\n\t\t\tcalculatedPathsCount++;\n\t\t}\n\t}", "public final void execute() {\n\t\tlog.debug(\"Execute was called\");\n\t\tfor (String mdl : executors.keySet()) {\n\t\t\tSubstructureExecutorI exe = executors.get(mdl);\n\t\t\texe.startStep(getStep(),\n\t\t\t\t\tMtxUtils.list2DoubleArray(displacementsMap.get(mdl)));\n\t\t}\n\t}", "@Override\n\tpublic void ejecutarActividadesConProposito() {\n\t\t\n\t}", "abstract protected void execute(String dir);", "public static void cargarRecursos(String carpetaArchivosConf, AdministradorRecursosNvjItf recursosProyecto) \n \t\tthrows CargadorRecursosException, MapeoException, IOException{\n System.out.println(\"Comenzando la carga de NavajaFW\");\n //Listo los archivos de configuracion\n String[] listaDeArchivos = new File(carpetaArchivosConf).list();\n \n if (listaDeArchivos == null) {\n throw new CargadorRecursosCarpetaConfVaciaException(carpetaArchivosConf);\n }\n\n //Se listan los archivos de la carpeta indicada\n ArrayList<String> archivosConf = new ArrayList<String>(Arrays.asList(listaDeArchivos));\n\n //Se los itera\n for (String archivoNombre : archivosConf){\n //Si algun archivo termina con _or.xml es un mapeo\n if (archivoNombre.endsWith(NavajaConstantes.GUION_BAJO_OR_PUNTO_XML)) {\n //Muestro que el archivo se esta leyendo\n System.out.println(\"Mapeando \" + archivoNombre + \"...\");\n //Comienzo el mapeo\n Mapeador.mapearXml(carpetaArchivosConf + archivoNombre);\n System.out.println(\"Mapeado correctamente \"); \n }\n }\n \n if (Mapeador.getRaizMapeo() == null || Mapeador.getRaizMapeo().getTablas().isEmpty()) {\n throw new CargadorRecursosNoExistenArchivosMapeoException(); \t\n }\n \n //Se setea la instancia NavajaConector de la app el mapeo recien generado\n NavajaConector.getInstance().setMapeoRaiz(Mapeador.getRaizMapeo());\n \n //Se inicializa los recursos segun lo implementado en el metodo sobrescrito\n recursosProyecto.iniciarRecursos();\n \n //Se setea la instancia NavajaConector de la app el DataSource para conectarse\n DataSource dataSource = recursosProyecto.proveerDataSource();\n \n if(dataSource == null) {\n throw new org.calevin.navaja.excepciones.core.CargadorRecursosDataSourceNuloException();\n }\n\n Connection conexion = null;\n\t\ttry {\n\t\t\tconexion = dataSource.getConnection();\n\t\t\t\n\t\t\tif (conexion == null){\n\t\t\t\tthrow new CargadorRecursosConexionFallidaException(\n\t\t\t\t\t\tNavajaStringUtil.conmutarCaseChar(NavajaConstantes.CONEXION_NULA, 0)\n\t\t\t\t\t\t+ NavajaConstantes.PUNTO);\n\t\t\t} else if (!conexion.isValid(0)) {\n\t\t\t\tthrow new CargadorRecursosConexionFallidaException(\n\t\t\t\t\t\tNavajaStringUtil.conmutarCaseChar(NavajaConstantes.CONEXION_INVALIDA, 0)\n\t\t\t\t\t\t+ NavajaConstantes.COMA_ESPACIO\n\t\t\t\t\t\t+ NavajaConstantes.CONEXION\n\t\t\t\t\t\t+ NavajaConstantes.ESPACIO_COMILLA\n\t\t\t\t\t\t+ conexion\n\t\t\t\t\t\t+ NavajaConstantes.COMILLA\n\t\t\t\t\t\t+ NavajaConstantes.PUNTO);\t\t\t\t\n\t\t\t} else {\n\t\t NavajaConector.getInstance().setDataSource(dataSource);\t\t\t\t\n\t\t\t}\t\t\t\n\t\t} catch (SQLException e) {\n\t\t\tthrow new CargadorRecursosConexionFallidaException(e);\n\t\t} finally {\n\t\t\tif (conexion != null) {\n\t\t\t\ttry {\n\t\t\t\t\tconexion.close(); \n\t\t\t\t} catch (Exception e) {\n\t\t\t\t\tthrow new CargadorRecursosConexionFallidaException(e);\n\t\t\t\t} \n\t\t\t}\n\t\t}\n }", "protected void execute() {\n \tswitch (auto) {\n \tcase RightRightRight:\n \t\tRightRightRight();\n \t\tbreak;\n \tcase RightRightLeft:\n \t\tRightRightLeft();\n \t\tbreak;\n \tcase RightLeftRight:\n \t\tRightLeftRight();\n \t\tbreak;\n \tcase RightLeftLeft:\n \t\tRightLeftLeft();\n \t\tbreak;\n \tcase LeftRightRight:\n \t\tLeftRightRight();\n \t\tbreak;\n \tcase LeftRightLeft:\n \t\tLeftRightLeft();\n \t\tbreak;\n \tcase LeftLeftRight:\n \t\tLeftLeftRight();\n \t\tbreak;\n\t\tcase LeftLeftLeft:\n\t\t\tLeftLeftLeft();\n\t\t\tbreak;\n\t\t}\n \t\n\t\t//Robot.drivebase.DriveTank(1, 1);\n\t\t//new drivecar(1, 1, 5);\n \t\n }", "private static void executeTask02() {\n }", "private List<Path> expandExecution(Path input) {\n\t\tList<Path> childInputs = new ArrayList<>(); //store the paths generated from given path\n\t\t\n\t\t//search from the top node which have not been searched before\n\t\tfor(int j = input.bound; j < input.path.size() - 1; j++){\n\t\t\tdouble[] probabilityArray = cfg.getTransition_matrix().getRow(input.path.get(j));\n\t\t\tfor(int i = 0; i < probabilityArray.length; i++){\n\t\t\t\t//the node been visited before only have two situation:1.has been searched,2.the path contains it in the workList \n\t\t\t\tif(probabilityArray[i] > 0 && i != input.path.get(j + 1) && unvisited.contains(i)){\n\t\t\t\t\tList<Integer> tempPath = new ArrayList<>();\n\t\t\t\t\tfor(int index = 0; index < j + 1; index++)\n\t\t\t\t\t\ttempPath.add(input.path.get(index));\n\t\t\t\t\ttempPath.add(i);\n\t\t\t\t\t\n\t\t\t\t\tPath newInput = new Path(tempPath, j + 1);\n\t\t\t\t\tchildInputs.add(newInput);\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}\n\t\t}\n\t\treturn childInputs;\n\t}", "public void exec();", "protected void prepareToExecuteChildren()\n \t{\n \t\tcollectExecutableElements();\n \t}", "public void work(RootNode root) throws Exception;", "public static void main(String[] args) {\n Node root = composeTree();\n root.execute(USER);\n\n }", "public void execute() {\n if (commandArgument.length != 1) {\n System.out.println(\"tree: requires no user input\");\n }\n else {\n this.treeTraversal(userFileSystem.getRootDir(), 0);\n }\n }", "public void suma(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.SUMA));\n }\n }\n }\n }", "public void run_v0(String clase){\n\t\t//aviso(\"Ejecutando \"+clase+\" Tipo V0\");\n\t\t\n\t\tObject\toc=null;\n\t\t\n\t\t\t\n\t\t\n\t\ttry {\n\t\t\tClass c=Class.forName(clase);\n\t\t\toc=c.newInstance();\n\t\t} catch (ClassNotFoundException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (InstantiationException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t} catch (IllegalAccessException e1) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te1.printStackTrace();\n\t\t}\n\t\tif (oc!=null){\n\t\t\tvisual.Task_Model T=(visual.Task_Model) oc;\n\t\t\tint i=0;\n\t\t\tbeta.tools.connector.GTransfer GX=null;\n\t\t\t\n\t\t\twhile (i<this.getConstructor().getParametros().size() & GX==null){\n\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\tString id=(String)p[0];\n\t\t\t\tObject o=p[1];\n\t\t\t\tif (id.compareTo(\"GX\")==0){\n\t\t\t\t\tGX=(beta.tools.connector.GTransfer)o;\n\t\t\t\t}\n\t\t\t\ti++;\n\t\t\t}\n\t\t\tif (GX==null){\n\t\t\t\tGX=new beta.tools.connector.GTransfer();\n\t\t\t\tGeneric _default=this.getConstructor().getConnectionHandler().getDefaultConnector();\n\t\t\t\tGX.setHost(_default.getHost());\n\t\t\t\tGX.setPort(_default.getPort());\n\t\t\t\tGX.setDatabase(_default.getDatabase());\n\t\t\t\tGX.setUser(_default.getUser());\n\t\t\t\tGX.setPassword(_default.getPassword());\n\t\t\t\tGX.setSucursal(_default.getId());\n\t\t\t\tGX.ConnectSQL(_default.getId());\n\t\t\t}\n\t\t\tboolean b=true;//esta_autorizado(iduser,clase);\n\t\t\tif (b){\n\t\t\t\tString NEW_LINE = System.getProperty(\"line.separator\");\n\t\t\t\t/*String msg=\"Esta es una aplicacion vieja.\"+NEW_LINE;\n\t\t\t\tmsg+=\"Hasta que no se reprograme. Esta aplicacion quedara inhabilitada por problemas de incompatibilida\";\n\t\t\t\terror(msg);*/\n\t\t\t\t\n\t\t\t\tT.setParameter(\"GX\", GX);\n\t\t\t\tT.setParameter(\"iduser\", this.getConstructor().getIduser());\n\t\t\t\tfor (i=0;i<this.getConstructor().getParametros().size();i++){\n\t\t\t\t\ttry {\n\t\t\t\t\tObject[] p=(Object[]) this.getConstructor().getParametros().get(i);\n\t\t\t\t\tString id=(String)p[0];\n\t\t\t\t\tObject o=p[1];\n\t\t\t\t\tT.setParameter(id, o);\n\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\tSystem.out.println(\"No se pudo Cargar el parametro \"+i+\" >\"+clase+\" \"+e.getMessage());\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\t\n\t\t\t\t\n\t\t\t\t\n\t\t\t\tif (javax.swing.SwingUtilities.isEventDispatchThread()){\n\t\t\t\t\tT.run();\n\t\t\t\t}else{\n\t\t\t\t\tfinal visual.Task_Model _T=T;\n\t\t\t\t\tRunnable _execute=new Runnable(){\n\t\t\t\t\t\tpublic void run(){\n\t\t\t\t\t\t\t_T.run();\n\t\t\t\t\t\t}\n\t\t\t\t\t};\n\t\t\t\t\tjavax.swing.SwingUtilities.invokeLater(_execute);\t\n\t\t\t\t}\n\t\t\t\t\n\t\t\t}else {\n\t\t\t\terror(\"(\"+this.getConstructor().getIduser()+\") No esta Autorizado\");\n\t\t\t\tT=null;\n\t\t\t}\t\n\t\t}\n\t}", "@Override\n\tpublic void run() {\n\t\tMap<Integer, Location> possibleStartLocations = possibleStartLocations();\n\n\t\tfor(Entry<Integer, Location> startLocation : possibleStartLocations.entrySet()) {\n\t\t\t// Add startLocation to visited locations\n\t\t\tMap<Integer, Location> visitedLocations = new HashMap<Integer, Location>();\n\t\t\tvisitedLocations.put(startLocation.getKey(), startLocation.getValue());\n\t\t\t\n\t\t\t// Add startLocation to visited order\n\t\t\tList<Location> visitedOrder = new LinkedList<Location>();\n\t\t\tvisitedOrder.add(startLocation.getValue());\n\t\t\t\n\t\t\t// Start the recursion for the following start node\n\t\t\tfindSolution(startLocation, startLocation, visitedLocations, visitedOrder, 0);\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\t\n\t\tProces p1= new Proces(20, 0, 10);\n\t\tProces p2= new Proces(10, 1, 10);\n\t\tProces p3= new Proces(30, 6, 10);\n\t\tProces p4= new Proces(9, 7, 10);\n\t\tArrayList<Proces> procesy1= new ArrayList<Proces>();\n\t\tprocesy1.add(p1);\n\t\tprocesy1.add(p2);\n\t\tprocesy1.add(p3);\n\t\tprocesy1.add(p4);\n\t\tProcesor proc1= new Procesor(1, procesy1);\n\t\n\t\t\n\t\t\n\t\tArrayList<Proces> procesy2= new ArrayList<Proces>();\n\t\tprocesy2.add(new Proces(40, 2, 14));\n\t\tprocesy2.add(new Proces(20, 8, 9));\n\t\tprocesy2.add(new Proces(30, 2, 3));\n\t\tprocesy2.add(new Proces(10, 4, 5));\n\t\tprocesy2.add(new Proces(4, 7, 14));\n\t\tProcesor proc2= new Procesor(2, procesy2);\n\t\n\t\t\n\t\t\n\t\tArrayList<Procesor> procesory= new ArrayList<Procesor>();\n\t\tprocesory.add(proc1);\n\t\tprocesory.add(proc2);\n\t\t\n\t\tint ileProcesorow=2;\n\t\tint progR=20;\n\t\tint progP=20;\n\t\tint iloscZapytanZ=10;\n\t\tint okresPomiaruObciazen=1;\n\t\t\n\t\tAlgorithms al= new Algorithms(procesory, progP, iloscZapytanZ, progR);\n\t\tal.wyswietlProcesory();\n\t\tal.symulacjaPierwsza(okresPomiaruObciazen);\n\t\tal.symulacjaDruga(okresPomiaruObciazen);\n\t\tal.symulacjaTrzecia(okresPomiaruObciazen);\n\t\t\n\t\t\n\t\t\n\t}", "@Override\n protected void compute() {\n\n if(this.workLoad > 16){\n System.out.println(\"Splitting Workload :: \"+this.workLoad);\n List<MyRecursiveAction> subTasks = new ArrayList<>();\n subTasks.addAll(createSubTasks());\n\n subTasks.forEach(tasks -> {\n tasks.fork();\n });\n }else{\n System.out.println(\"Doing Workload myself :: \"+this.workLoad);\n }\n }", "public void or (int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)){ // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)){ // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes,auxOperacion(dirOp1,dirOp2,valor1,valor2,Codigos.OR));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)){ // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes,auxOperacion(dirOp1,dirOp2,valor1,valor2,Codigos.OR));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 =this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)){ // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)){ // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)){ // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)){ // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)){ // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)){ // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.OR));\n }\n }\n }\n }", "public void EjecutarXML(String path)\n {\n for(ArrayList<NodoXML> l : listaxml)\n {\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n }\n \n /*Ahora las importaciones*/\n// for(ArrayList<NodoXML> l : singlenton.listaAST)\n for(int cont = 0; cont<singlenton.listaAST.size(); cont++)\n {\n ArrayList<NodoXML> l = singlenton.listaAST.get(cont);\n for(NodoXML n : l)\n {\n n.ejecutar(this);\n }\n } \n \n mostrarTraduccion(path);\n }", "private List<MyRecursiveAction> createSubTasks(){\n List<MyRecursiveAction> subTasks = new ArrayList<>();\n\n MyRecursiveAction subTask1 = new MyRecursiveAction(this.workLoad / 2);\n MyRecursiveAction subTask2 = new MyRecursiveAction(this.workLoad / 2);\n subTasks.add(subTask1);\n subTasks.add(subTask2);\n\n return subTasks;\n }", "public static void main(String[] args) {\n\t\tExecutorService execute = Executors.newSingleThreadExecutor();\n\n\t\t// Nous créons maintenant nos objets\n\t\tPath chemin = Paths.get(\"C:\\\\wamp\");\n\t\tPath chemin2 = Paths.get(\"C:\\\\glassfish4\");\n\t\tPath chemin3 = Paths.get(\"C:\\\\tomcat8\");\n\n\t\t// La méthode submit permet de récupérer un objet Future qui contiendra\n\t\t// le résultat obtenu\n\n\t\tFuture<Long> ft1 = execute.submit(new FolderScanner(chemin));\n\t\tFuture<Long> ft2 = execute.submit(new FolderScanner(chemin2));\n\t\tFuture<Long> ft3 = execute.submit(new FolderScanner(chemin3));\n\n\t\tLong total;\n\n\t\ttry {\n\t\t\t// Nous ajoutons tous les résultats\n\t\t\ttotal = ft1.get() + ft2.get() + ft3.get();\n\t\t\tSystem.out.println(\"nombre total de fichiers trouvés : \" + total);\n\t\t} catch (InterruptedException | ExecutionException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\n\t\t// Dès que nos tâches sont terminées,nous fermons le pool\n\t\t// Sans cette ligne,ce programme restera en cours d'exécution\n\t\texecute.shutdown();\n\n\t}", "public void resta(int dirOp1, int dirOp2, int dirRes) {\n //traduce casos de direccionamiento indirecto\n dirOp1 = traduceDirIndirecto(dirOp1);\n dirOp2 = traduceDirIndirecto(dirOp2);\n if (ManejadorMemoria.isConstante(dirOp1)) { // OPERANDO 1 CTE\n String valor1 = this.directorioProcedimientos.getConstantes().get(dirOp1).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { //RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n } else if (ManejadorMemoria.isGlobal(dirOp1)) { // OPERANDO 1 GLOBAL\n String valor1 = this.registroGlobal.getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { // OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n } else { // OPERANDO 1 LOCAL\n String valor1 = this.pilaRegistros.peek().getValor(dirOp1);\n if (ManejadorMemoria.isGlobal(dirOp2)) { // OPERANDO 2 GLOBAL\n String valor2 = this.registroGlobal.getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES 2 LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else if (ManejadorMemoria.isConstante(dirOp2)) { // OPERANDO 2 CTE\n String valor2 = this.directorioProcedimientos.getConstantes().get(dirOp2).getValorConstante();\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n } else { //OPERANDO 2 LOCAL\n String valor2 = this.pilaRegistros.peek().getValor(dirOp2);\n if (ManejadorMemoria.isGlobal(dirRes)) { // RES GLOBAL\n this.registroGlobal.guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n } else { // RES LOCAL\n this.pilaRegistros.peek().guardaValor(dirRes, auxOperacion(dirOp1, dirOp2, valor1, valor2, Codigos.RESTA));\n }\n }\n }\n }", "String ejecutarAccion();", "@Override\r\n\tpublic void execute() \r\n\t\t{\n\t\tsourceArcs = parent.getSourceArcsFromID(child.getServerName());\r\n\t\ttargetArcs = parent.getTargetArcsFromID(child.getServerName());\r\n\t\tredo();\r\n\t\t}", "@Override\n\tpublic void run() {\n\t\tif (!mainDir.isDirectory()) {\n\t\t\treturn;\n\t\t}\n\t\t\n\t\t// inserisco il nome della cartella principale.\n\t\tproduceDirPath(mainDir.getName());\n\t\t\n\t\t// navigo ricorsivamente.\n\t\twalkDir(mainDir);\n\t}", "public void execute() throws XMLBuildException {\r\n\t\tlog.debug(\"ROOT EXECUTE g is a \" + root.getClass().getName());\r\n\t\tif (root != null) {\r\n\t\t\tlog.debug(\"root not null \");\r\n\t\t\t//root.execute();\r\n\t\t\tlog.debug(\"done execute\");\r\n\t\t} else {\r\n log.error(\"root null\", new Exception());\r\n\t\t}\r\n\r\n\t}", "public void run() {\r\n // Execute the program\r\n int index = 0;\r\n\r\n while (index < operations.size()) {\r\n Operation o = operations.get(index);\r\n index = o.execute(index, stack, symbolTable);\r\n }\r\n }", "@Override\n\tpublic void ejecutar(IDominio dominio) {\n\t\tif(this.poblacion == null) {\n\t\t\tSystem.out.println(\"Error. Es necesario crear la poblacion inicial antes\");\n\t\t\treturn;\n\t\t}\n\t\t\n\t\tfor(int i = 0; i < this.numGeneraciones; i++) {\n\t\t\t/*Calculamos el fitness de todos los terminos de la lista*/\n\t\t\tfor(IIndividuo ind: this.poblacion) {\n\t\t\t\tdominio.calcularFitnessAvanzado(ind);\n\t\t\t}\n\t\t\t\n\t\t\t/* Implementamos un comparator que nos permita ordenar los Individuos\n\t\t\t * segun su fitness, de mayor a menor. */\n\t\t\tComparator<IIndividuo> comparaFitness = new Comparator<IIndividuo>() {\n\t\t\t\t@Override\n\t\t\t\tpublic int compare(IIndividuo arg0, IIndividuo arg1) {\n\t\t\t\t\treturn (int) -(arg1.getFitness() - arg0.getFitness());\n\t\t\t\t}\n\t\t\t\t\n\t\t\t};\n\t\t\t\n\t\t\tCollections.sort(this.poblacion, comparaFitness);\n\t\t\tSystem.out.printf(\"En la generacion %d el mejor fitness es %.2f de la expresion: %s\\n\",\n\t\t\t\t\ti, this.poblacion.get(0).getFitness(), this.poblacion.get(0).getExpresion().toString());\n\t\t\t\n\t\t\tif(poblacion.get(0).getFitness() == 0.0) {\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\tcrearNuevaPoblacion();\n\t\t}\n\t\t\n\t}", "protected void execute() {\n \tRobot.DRIVE_SUBSYSTEM.tankDrive(expoDrive(RobotMap.DRIVE_EXPO_MIN,\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_DEADZONE,\n \t\t\t\t\t\t\t\t\t\t\t Robot.oi.getDriveLeftY(),\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_EXPO),\n \t\t\t\t\t\t\t\t\texpoDrive(RobotMap.DRIVE_EXPO_MIN,\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_DEADZONE,\n \t\t\t\t\t\t\t\t\t\t\t Robot.oi.getDriveRightY(),\n \t\t\t\t\t\t\t\t\t\t\t RobotMap.DRIVE_EXPO_EXPO));\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(run(recursive, 45));\n\t\t\n\t}", "@Override\n public EnvironmentState execute(AgentState ast, EnvironmentState est) {\n EstadoAmbiente environmentState = (EstadoAmbiente) est;\n EstadoDrone agState = ((EstadoDrone) ast);\n\n if(agState.getposicion()[0]==2){\n \tagState.irNivelMedio();\n \tenvironmentState.irNivelMedio();\n \tArrayList<Esquina> listaEsquinas;\n \tArrayList<Subcuadrante> listaSubcuadrantes;\n \tint[][] antena=agState.getintensidadSenial();\n \tint idCuadrante=agState.getposicion()[1];\n \tint idSubcuadrante=agState.getposicion()[2];\n \t\tfor(int i=0;i<4;i++){\n \t\t\tif(i!=(idCuadrante-1)){\n\t\t\t\t\tlistaSubcuadrantes=agState.getlistaCuadrantesEnDrone().get(i).getlistaSubcuadrantes();\n \t\t\t\tfor(int j=0;j<4;j++){\t\n\t\t\t\t\t\tlistaEsquinas= listaSubcuadrantes.get(j).getlistaEsquinas();\n\t \t\t\t\tfor(Esquina esq : listaEsquinas){\n\t \t\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=1;\n\t \t\t\t\t}\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\n \t\tint subcuadranteMayorSenial=3;\n \t\tagState.setSubcuadranteMayor(subcuadranteMayorSenial);\n \t//Busco cuál es el subcuadrante que mayor señal tiene\n \t\t\n \t\t\n\t\t\t//Seteo como visitadas las esquinas de todos los subcuadrantes que no sean el que mayor señal tiene\n \t\tfor(int i=0;i<4;i++){\n \t\t\tif(i!=subcuadranteMayorSenial-1){\n \t\t\t\tlistaEsquinas= agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(i).getlistaEsquinas();\n \t\t\t\tfor(Esquina esq : listaEsquinas){\n \t\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=1;\n \t\t\t\t}\n \t\t\t}\n \t\t}\n \t\t//Seteo como NO visitadas las esquinas del subcuadrante que mayor señal tiene\n \t\tlistaEsquinas= agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(subcuadranteMayorSenial-1).getlistaEsquinas();\n\t\t\tfor(Esquina esq : listaEsquinas){\n\t\t\t\tagState.getlistaEsquinasIdentificadas()[esq.getidEsquina()]=0;\n\t\t\t}\n \treturn environmentState;\n }\n if(agState.getposicion()[0]==0){\n \tint idCuadrante=agState.getposicion()[1];\n \tint idSubcuadrante=agState.getposicion()[2];\n \tint[] esqIdentificadas = agState.getlistaEsquinasIdentificadas(); \n \t\n \t\tArrayList<Esquina> esquinas = agState.getlistaCuadrantesEnDrone().get(idCuadrante-1).getlistaSubcuadrantes().get(idSubcuadrante-1).getlistaEsquinas();\n \t\tfor(Esquina esquina : esquinas){\n \t\t\tif(esqIdentificadas[esquina.getidEsquina()]==0) return null;\n \t\t}\n \tagState.irNivelMedio();\n \tenvironmentState.irNivelMedio();\n \treturn environmentState;\n }\n return null;\n }", "@Test\n public void verifyPathsInSequence() {\n LOG.debug(\"### Executing \"+ Thread.currentThread().getStackTrace()[1].getMethodName() +\" ####\");\n testGetCompanyHome();\n testGetCabinetFolder();\n testGetCaseFolder();\n testGetDocumentLibraryFolder();\n testEvidenceBankFolder();\n\n }", "private static void automate() {\n \tLOG.info(\"Begin automation task.\");\n \t\n \tcurrentOpticsXi = clArgs.clusteringOpticsXi;\n \tdouble opticsXiMax = (clArgs.clusteringOpticsXiMaxValue > ELKIClusterer.MAX_OPTICS_XI ? ELKIClusterer.MAX_OPTICS_XI : clArgs.clusteringOpticsXiMaxValue);\n \tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \tint opticsMinPointsMax = clArgs.clusteringOpticsMinPtsMaxValue;\n \t\n \tLOG.info(\"optics-xi-start: {}, optics-xi-min-points-start: {}, optics-xi-step-size: {}, optics-min-points-step-size: {}\",\n \t\t\tnew Object[] { \n \t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints), \n \t\t\t\tdf.format(clArgs.clusteringOpticsXiStepSize), df.format(clArgs.clusteringOpticsMinPtsStepSize)\n \t\t\t});\n \t\n \twhile (currentOpticsXi <= opticsXiMax) {\n \t\twhile (currentOpticsMinPoints <= opticsMinPointsMax) {\n \t\t\t// Run automation for each combination of opticsXi and opticsMinPoints\n \t\t\tLOG.info(\"Run automation with optics-xi: {}, optics-xi-min-points: {}\", \n \t\t\t\t\tdf.format(currentOpticsXi), df.format(currentOpticsMinPoints));\n \t\t\t\n \t\t\ttry {\n\t \t\t\t// Step 1: Clustering\n\t \t\t\tclustering(clArgs.clusteringInFile, clArgs.clusteringOutDir, currentOpticsXi, currentOpticsMinPoints);\n\t \t\t\t\n\t \t\t\t// Step 2: Build shared framework\n\t \t\t\tbuildFramework();\n\t \t\t\t\n\t \t\t\t// Step 3: Build user hierarchical graphs\n\t \t\t\tbuildHierarchicalGraphs();\n\t \t\t\t\n\t \t\t\t// Step 4: Calculate similarity between all users and create evaluation results afterwards\n\t \t\t\tcalculateSimilarity();\n \t\t\t} catch (Exception e) {\n\t\t\t\t\tLOG.error(\"An error occurred during the automation task. Jumping to the next pass.\", e);\n\t\t\t\t} finally {\n\t \t\t\t// Step 5: Clean up for the next run\n\t \t\t\tcleanAutomationResults();\n\t \t\t\t\n\t \t\t\t// Increase the currentOpticsMinPoints for the next run if desired\n\t \t\t\tif (clArgs.clusteringOpticsMinPtsStepSize > 0)\n\t \t\t\t\tcurrentOpticsMinPoints += clArgs.clusteringOpticsMinPtsStepSize;\n\t \t\t\telse\n\t \t\t\t\tbreak;\n\t\t\t\t}\n \t\t}\n \t\t// Reset current values\n \t\tcurrentOpticsMinPoints = clArgs.clusteringOpticsMinPts;\n \t\t\n \t\t// Increase currentOpticsXi for the next run if desired\n \t\tif (clArgs.clusteringOpticsXiStepSize > 0)\n\t\t\t\tcurrentOpticsXi += clArgs.clusteringOpticsXiStepSize;\n\t\t\telse\n\t\t\t\tbreak;\n \t}\n \t\n \tLOG.info(\"End automation task.\");\n }", "@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }", "public void execute(){\n\t\t\n\t}", "public static void main(String[] args) {\n TreeNode n7 = new TreeNode(7);\n TreeNode n6 = new TreeNode(6);\n TreeNode n5 = new TreeNode(5);\n TreeNode n4 = new TreeNode(4);\n TreeNode n3 = new TreeNode(3);\n TreeNode n2 = new TreeNode(2);\n TreeNode n1 = new TreeNode(1);\n\n n4.left = n2;\n n4.right = n6;\n\n n2.left = n1;\n n2.right = n3;\n\n n6.left = n5;\n n6.right = n7;\n\n System.out.println(\"Cay n4\");\n List<Integer> resultPreOrder = preOrderTravel(n4);\n for (Integer integer : resultPreOrder) {\n System.out.println(integer);\n }\n\n System.out.println(\"Cay n2\");\n resultPreOrder = preOrderTravel(n2);\n for (Integer integer : resultPreOrder) {\n System.out.println(integer);\n }\n }", "@Test\n public void testRecursion() throws Exception {\n//TODO: Test goes here... \n/* \ntry { \n Method method = Solution.getClass().getMethod(\"recursion\", ArrayList<Integer>.class, TreeNode.class); \n method.setAccessible(true); \n method.invoke(<Object>, <Parameters>); \n} catch(NoSuchMethodException e) { \n} catch(IllegalAccessException e) { \n} catch(InvocationTargetException e) { \n} \n*/\n }", "public static void main(String[] args) throws Exception {\n datosPronostico=null; \r\n _reloj= new Reloj(); \r\n setRouteCalculatorPronostico(new RouteCalculatorPronostico());\r\n getRouteCalculatorPronostico().inicializaValores();\r\n ManejaDatos m= new ManejaDatos(); \r\n _reloj.detenerReloj();\r\n DiaPronostico.setNumTurnos(3);\r\n _reloj.setReloj(0, 0, 17, 5, 2012);\r\n int diaInicio=369;\r\n //_reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, diaInicio);\r\n getRouteCalculatorPronostico().setReloj(_reloj);\r\n insertaPronostico();\r\n getRouteCalculatorPronostico().setIdPronostico(idPronostico);\r\n try{\r\n \r\n datosPronostico= m.sacaDatosPronostico(\"dat\", datosPronostico,_reloj,servletContext);\r\n procesaDatos();\r\n \r\n GeneraArchivosPronostico generador= new GeneraArchivosPronostico();\r\n /*ArrayList<OrdenEntrega> ordenes; \r\n _reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, 372);\r\n for(int i=1;i<28;i++){\r\n _reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, 1);\r\n ordenes=generador.nuevoGeneraArchivo(372,_reloj, new Mapa(150,100));\r\n }*/\r\n \r\n /*\r\n System.out.println(ordenes.size());*/\r\n /*\r\n Mapa mapa = new Mapa(150, 100);\r\n generador.nuevoGeneraArchivo(diaInicio, _reloj, mapa);*/\r\n GestorVehiculos gestorV= new GestorVehiculos(_reloj); \r\n \r\n getRouteCalculatorPronostico().setGestorVehiculos(gestorV);\r\n _reloj.getFechaActual().add(Calendar.DAY_OF_YEAR, diaInicio);\r\n getRouteCalculatorPronostico().calculaPronostico(diaInicio);\r\n \r\n getRouteCalculatorPronostico().correrDibujaPronostico();\r\n \r\n setRouteCalculatorPronostico(null);\r\n }catch(Exception e){\r\n \r\n throw e;\r\n \r\n }\r\n \r\n }", "public void execute(){\n\t\tfor(Instruction currentInstn:this.instns){\n\t\t\tcurrentInstn.execute();\n\t\t}\n\t}", "public void ejecutarConsola() {\n\n try {\n this._agente = new SearchAgent(this._problema, this._busqueda);\n this._problema.getInitialState().toString();\n this.imprimir(this._agente.getActions());\n this.imprimirPropiedades(this._agente.getInstrumentation());\n if (_esSolucion) {\n Logger.getLogger(Juego.class.getName()).log(Level.INFO, \"SOLUCIONADO\");\n } else {\n Logger.getLogger(Juego.class.getName()).log(Level.INFO, \"No lo he podido solucionar...\");\n }\n } catch (Exception ex) {\n System.out.println(ex);\n }\n }", "@Override\n public void execute() {\n\n if(!isValid){\n System.out.println(invalidReasonString);\n return;\n }\n\n\n Path filteredFilesRoot = Path.of(pathToDir,filteredFilesRootDirectory);\n\n try {\n\n if (Files.exists(filteredFilesRoot) && Files.isDirectory(filteredFilesRoot)){\n emptyDirectory(filteredFilesRoot.toFile());\n Files.delete(filteredFilesRoot);\n } else if (Files.isRegularFile(filteredFilesRoot)){\n Files.delete(filteredFilesRoot);\n }\n\n Files.createDirectory(filteredFilesRoot);\n\n List<Path> filteredFiles = PostProcessor.filterRootDirectory(pathToDir,maxFileSize,keywords);\n\n copyFiles(filteredFilesRoot,filteredFiles);\n\n } catch (IOException e) {\n e.printStackTrace();\n System.out.println(e.getMessage());\n }\n\n }", "public void execute() {\n ExecutionList executionList = this;\n // MONITORENTER : executionList\n if (this.executed) {\n // MONITOREXIT : executionList\n return;\n }\n this.executed = true;\n RunnableExecutorPair list = this.runnables;\n this.runnables = null;\n // MONITOREXIT : executionList\n RunnableExecutorPair reversedList = null;\n do {\n if (list == null) {\n while (reversedList != null) {\n ExecutionList.executeListener((Runnable)reversedList.runnable, (Executor)reversedList.executor);\n reversedList = reversedList.next;\n }\n return;\n }\n RunnableExecutorPair tmp = list;\n list = list.next;\n tmp.next = reversedList;\n reversedList = tmp;\n } while (true);\n }", "static void executa() {\n\t\tlistaProdutos = LoaderUtils.loadProdutos();\n\n\t\t// imprime lista de produtos cadastrados\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tloadEstoque();\n\t\t\n\t\t// imprime estoque\n\t\tSystem.out.println(\"----------------------------------------------\");\n\t\tprintEstoque(listaEstoque);\n\t}", "public void execute(){\n \n double default_weight = 0; //This is the weight we change each time we process a new Node\n GraphNode default_node = Source; //we begin with source\n MinDistance.set(findNode(Source), 0.0); //sets the weight of the source node to 0\n MinDistanceStatus.set(findNode(Source), true); //sets the weight as final\n References.set(findNode(Source), new ArcGraph(0.0, Source, Source)); //sets the source of the as himself so no null pointer exception occurs\n \n for (int i = 0; i < Nodes.size(); i++){ //We execute the cicle the number of nodes we have\n \n setWeights(default_node, default_weight); //updates the weight of the weight list\n int min_weight_pos = getMinDistanceArray(); //returns the pos of the min weight\n double min_weight = MinDistance.get(min_weight_pos); //returns the min weight\n GraphNode min_node = Nodes.get(min_weight_pos); //Returns the node with the min weight\n int pos_node = findNode(min_node); //returns the pos of the destiny node \n MinDistanceStatus.set(min_weight_pos, true); //sets the weight as final REVISAR\n \n default_weight = min_weight; //Change of values to continue the cicle\n default_node = min_node; //Change of values to continue the \n \n }\n \n }", "public void execute()\n\t {\n\t // espera a que se conecte cada cliente\n\t for ( int i = 0; i < jugadores.length; i++ ) //<-- dos por defecto o de 0 a 1\n\t {\n\t try // espera la conexión, crea el objeto Jugador, inicia objeto Runnable\n\t {\n\t \t//el metodo accept() es bloqueante hasta recibir una conexion\n\t jugadores[i] = new Jugador( servidor.accept(), i );\n\t //el constructor de jugador recibe un objeto socket crea los flujos E/S\n\t ejecutarJuego.execute(jugadores[i]); // ejecuta el objeto Runnable subproceso\n\t } // fin de try\n\t catch ( IOException excepcionES ) \n\t {\n\t excepcionES.printStackTrace();\n\t System.exit(1);\n\t } // fin de catch\n\t } // fin de for\n\n\t bloqueoJuego.lock(); // bloquea el juego para avisar al subproceso del jugador Uno\n\n\t try\n\t {\n\t jugadores[JUGADOR_1].establecerSuspendido(false); // continúa el jugador Uno\n\t otroJugadorConectado.signal(); // despierta el subproceso del jugador Uno\n\t } // fin de try\n\t finally\n\t {\n\t bloqueoJuego.unlock(); // desbloquea el juego después de avisar al jugador Uno\n\t } // fin de finally\n\t }", "void execute()\n\t{\n\t\tVM.top++;\n\t\tVM.opStack[VM.top] = arg();\n\t\tVM.pc++;\n\t}", "public static void main(String[] args) {\n rellenarDatos();\n \n //ejercicio01();\n //ejercicio02();\n ejercicio03();\n }", "@Override\n\tpublic IContexto[] ejecutar(IContextoEjecucion arg0, IDatosEntradaTx datosEntrada) {\n\t\tlogger.info(\"Inicio ejecucion del SN 029012: Polling Handler\");\n\t\t\n\t\tIContexto[] salida = null;\n\t\t\n\t\tfinal BigDecimal decUser = datosEntrada.getDecimal(CTE_POSICION_USER);\n\t\tInteger user = null;\n\t\tif(decUser != null){\n\t\t\tuser = new Integer(decUser.intValue());\n\t\t}\t\t\n\t\t\n\t\tfinal BigDecimal decPid = datosEntrada.getDecimal(CTE_POSICION_PID);\n\t\tInteger pid = null;\n\t\tif(decPid != null){\n\t\t\tpid = new Integer(decPid.intValue());\n\t\t}\t\t\n\t\t\n\t\tif (pid==99991){return new IContexto[0];\n\t\t}\n\t\n\t\tString host = null;\n\t\t\n\t\ttry {\n\t\t\tInetAddress addr = InetAddress.getLocalHost();\n\t\t\t// Get hostname\n\t\t\thost = addr.getHostName();\n\t\t} catch (UnknownHostException e) {\n\t\t}\n\t\t\n\t\t// Tiempo actual para marcar o actualizar el del proceso\n\t\tlong timestamp = System.currentTimeMillis();\n\t\t\n\t\tfinal ProcesoManager manager = ManagerFactory.getInstance().getProcesoManager();\n\t\tfinal UsuariosManager usuariosManager = ManagerFactory.getInstance().getUsuariosManager();\n\t\tUsuarioC usuario = usuariosManager.findById(user);\n\t\t\n\t\tProcesoC proceso = new ProcesoC(); \n\t\tproceso = manager.checkExecutionInfo(user, pid, host);\n\t\t\n\t\tif(proceso!=null){\n\t\t\tCharacter killedByARPIA = proceso.getChKilledByARPIA();\n\t\t\tif(killedByARPIA!=null){\n\t\t\t\tif(killedByARPIA.equals('1')){\n\t\t\t\t\t// Si es ARPIA quien para la ejecución del avatar, se marca el proceso como \"arpia\"\n\t\t\t\t\t// para que desde el listener del polling se complete el cierre del avatar\n\t\t\t\t\tsalida = ContextoMensaje.rellenarContexto(\"arpia\");\n\t\t\t\t\treturn salida;\n\t\t\t\t}\n\t\t\t\telse{\n\t\t\t\t\t// Si la base de datos contiene ya una entrada para ese mismo user y pid\n\t\t\t\t\tproceso.setNuTimestamp(timestamp);\n\t\t\t\t\tmanager.updateExecutionInfo(proceso);\n\t\t\t\t}\n\t\t\t}\t\t\n\t\t}else{\n\t\t\tproceso = new ProcesoC();\n\t\t\t// Obtengo el tipo de cuenta del usuario\n\t\t\tInteger userAccountType = usuario.getCuentaId();\n\t\t\tif(userAccountType.equals(Constantes.CTE_ACCOUNT_FREE) || userAccountType.equals(Constantes.CTE_ACCOUNT_BASIC)){\n\t\t\t\t// Si el usuario es 'free' o 'basic' tendrá un tiempo máximo de ejecución del avatar\n\t\t\t\tString timeAlive = Constantes.getTimeAlive();\t\t\t\t\n\t\t\t\tproceso.setNuTimealive(Integer.parseInt(timeAlive));\n\t\t\t\t\n\t\t\t\tif(userAccountType.equals(Constantes.CTE_ACCOUNT_FREE)){\n\t\t\t\t\tString frozenTime = Constantes.getFrozenTime();\n\t\t\t\t\tproceso.setNuTimeAllowedExecution(timestamp+Integer.parseInt(timeAlive)*1000+Integer.parseInt(frozenTime)*1000);\n\t\t\t\t}else{\n\t\t\t\t\tproceso.setNuTimeAllowedExecution(0); \n\t\t\t\t}\n\t\t\t}else{\n\t\t\t\t// Si el usuario es 'pro' o 'corporate' no tendrá tiempo máximo de ejecución.\n\t\t\t\t// Se marca como 0 para que ARPIA sepa que no tiene que matar a estos procesos\n\t\t\t\tproceso.setNuTimealive(0);\n\t\t\t}\t\t\t\t\n\t\t\t\tproceso.setCnUser(user);\n\t\t\t\tproceso.setNuPid(pid);\n\t\t\t\tproceso.setNuTimestamp(timestamp);\n\t\t\t\tproceso.setDcHost(host);\n\t\t\t\tproceso.setNuTimestart(timestamp);\t\t\t\t\n\t\t\t\tproceso.setChKilledByARPIA('0');\n\t\t\t\t\n\t\t\t\tmanager.addExecutionInfo(proceso);\t\t\t\n\t\t}\n\t\t\t\t\n\t\tlogger.info(\"Fin ejecucion del SN 029012: Polling Handler\");\n\t\tsalida = ContextoMensaje.rellenarContexto(\"poll\");\n\t\treturn salida;\n\t\t\n\t}", "public void execute() {\n\t\t\n\t}", "public boolean ejecutarDescartar();", "protected void execute() {\n\t\t\n\t}", "@Override\r\n\t\tpublic Void doInBackground() {\r\n\t\t\tSet<MethodNode> entryNodes = model.getSubtrees(entryNodeId);\r\n\t\t\ttreePanel.generateTree(entryNodes);\r\n\t\t\treturn null;\r\n\t\t}", "private static void operacionesJugar() {\r\n\t\tjuego.actualizarJugadores(respuesta);\r\n\t\tJugadorM[] ganadores;\r\n\t\ttry {\r\n\t\t\tint before = juego.getNJugadoresActivos();\r\n\t\t\tganadores = juego.finalizarRonda();\r\n\t\t\tif (ganadores.length == 0) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == before) {\r\n\t\t\t\tescribirRonda(false);\r\n\t\t\t\tmostrarEmpateRonda();\r\n\t\t\t} else if (ganadores.length == 1) {\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tFINhayGanador(ganadores[0]);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t} else {\r\n\t\t\t\tmostrarGanadoresRonda(ganadores);\r\n\t\t\t\tescribirRonda(true);\r\n\t\t\t\tjuego.nextRonda();\r\n\t\t\t}\r\n\t\t} catch (AllRondasCompleteException e) {\r\n\t\t\tFINtotalRondasAlcanzadas(e);\r\n\t\t}\r\n\t}", "@Override\n public ArrayList<String> run(LogicGraph logicGraph, Entity runConfig) {\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" Execution Started\");\n ArrayList<String> status=new ArrayList<>();\n boolean anchor;\n ArrayList<GraphNode> flow=logicGraph.getNodes();\n int phaseStart=0, phaseEnd=0;\n for (int i=0;i<flow.size();i++){\n flow.get(i).getComponent().init();\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" \" +flow.get(i).getComponent().getClass().getName()+\" is initialized.\");\n }\n do {\n while(phaseEnd!=flow.size() && !flow.get(phaseEnd).getCategory().equals(\"Phase\")){\n phaseEnd++;\n }\n int count=0;\n do {\n count++;\n anchor=false;\n int i=phaseStart;\n Entity io=null;\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" phase \"+ phaseEnd+ \" in execution.\");\n try{\n io = flow.get(phaseStart).getComponent().process(io);\n for (i +=1; i < phaseEnd; i++) {\n if(io!=null){\n anchor=true;\n }\n io = flow.get(i).getComponent().process(io);\n }\n }catch (Exception e){\n status.add(\"Problem faced during execution of \"+flow.get(phaseEnd).getName());\n status.add(\"Problem at: \"+flow.get(i).getName());\n status.add(\"Cause: \"+e.getMessage());\n e.printStackTrace();\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" Error in Execution\" + status);\n return status;\n }\n } while (anchor);\n phaseStart=phaseEnd+1;\n phaseEnd++;\n System.out.println(\"phase over count:\"+count+\"\\nphasestart:\"+phaseStart+\"\\nphaseend:\"+phaseEnd);\n }while (phaseEnd<flow.size());\n status.add(\"success\");\n this.template.convertAndSend(\"/chat\", new SimpleDateFormat(\"HH:mm:ss\").format(new Date()) + \" Execution Completed \"+ status);\n\n return status;\n }", "public void ejecutaMetodo() {\n\t\r\n}", "public static void main(String[] args) throws IOException {\n\t\t\n\t\tString inputPath = args[0];\n\t\tinitialize(inputPath);\n\t\tSystem.out.println(\"Finished Initialization\");\n\t\t\n\t\t//following is input from CMD, so using scanner\n\t\tScanner sc = new Scanner(System.in);\n\t\twhile(sc.hasNextLine()){\n\t\t\tString tmpString = sc.nextLine();\n\t\t\tString[] operation = new String[3];\n\t\t\toperation = tmpString.split(\" \");\n\t\t\t//System.out.println(operation.length);\n\t\t\tint arg0 = 0;\n\t\t\tint arg1 = 0;\n\t\t\tif(operation.length == 1) return;\n\t\t\tif(operation.length == 2)\n\t\t\t\targ0 = Integer.parseInt(operation[1]);\n\t\t\telse{\n\t\t\t\targ0 = Integer.parseInt(operation[1]);\n\t\t\t\targ1 = Integer.parseInt(operation[2]);\n\t\t\t}\n\t\t\tswitch(operation[0]){\n\t\t\t\tcase \"increase\":\n\t\t\t\t\tEventTree.increase(arg0, arg1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"reduce\":\n\t\t\t\t\tEventTree.reduce(arg0, arg1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"count\":\n\t\t\t\t\tEventTree.count(arg0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"inrange\":\n\t\t\t\t\tEventTree.inrange(arg0, arg1);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"next\":\n\t\t\t\t\tEventTree.next(arg0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"previous\":\n\t\t\t\t\tEventTree.previous(arg0);\n\t\t\t\t\tbreak;\n\t\t\t\tcase \"getParent\":\n\t\t\t\t\tTreeNode start = null;\n\t\t\t\t\tTreeNode end = null;\n\t\t\t\t\tif(RBTree.search(arg0) == null) {\n\t\t\t\t\t\tstart = RBTree.getSuccessorById(RBTree.getRoot(),arg0);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tstart = RBTree.search(arg0);\n\t\t\t\t\t}\n\t\t\t\t\tif(RBTree.search(arg1) == null){\n\t\t\t\t\t\tend = RBTree.getPrecursorById(RBTree.getRoot(),arg1);\n\t\t\t\t\t}\n\t\t\t\t\telse{\n\t\t\t\t\t\tend = RBTree.search(arg1);\n\t\t\t\t\t}\n\t\t\t\t\tif(start == null || end == null) break;\n\t\t\t\t\tSystem.out.println(RBTree.getCommonParent(start, end).ID);\n\t\t\t\t\tbreak;\n\t\t\t\tdefault: \n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\t\n\t\t//AutoTester.treetc_01(); //insert & delete\n\t\t//AutoTester.treetc_02(); //successor & precursor\n\t\t//AutoTester.eventtc_01(); //increase & reduce\n\t\t//AutoTester.eventtc_02(); //common parent & inrange\n\t\t//AutoTester.eventtc_03(); //next & previous\n\t}", "public void execute(final ExecutionContext executionContext)\n throws Exception\n {\n //\n // process action handler arguments\n //\n \n if (foreach == null)\n {\n throw new WorkflowException(\"forEach has not been provided\");\n }\n\n// Collection<?> forEachColl = buildForEachCollection(executionContext);\n \n if (var == null || var.length() == 0)\n {\n throw new WorkflowException(\"forEach variable name has not been provided\");\n }\n \n //\n // create forked paths\n //\n \n Node node = executionContext.getNode();\n List<ForkedTransition> forkTransitions = new ArrayList<ForkedTransition>();\n\n Collection<?> forEachColl = buildForEachCollection(executionContext);\n \n // Create a new token and execution context for each node transition and item in list\n List<Transition> nodeTransitions = node.getLeavingTransitions();\n for (Transition noderansition : nodeTransitions)\n {\n int iVar = 0;\n for (Object item: forEachColl)\n {\n // create child token to represent new path\n Token loopToken = buildChildToken(executionContext, noderansition, iVar);\n iVar++;\n \n // assign variable within path\n final ExecutionContext newExecutionContext = new ExecutionContext(loopToken);\n newExecutionContext.getContextInstance().createVariable(var, item, loopToken);\n \n // record path & transition\n ForkedTransition forkTransition = new ForkedTransition();\n forkTransition.executionContext = newExecutionContext;\n forkTransition.transition = noderansition;\n forkTransitions.add(forkTransition);\n }\n }\n\n //\n // let each new token leave the node.\n //\n for (ForkedTransition forkTransition : forkTransitions)\n {\n node.leave(forkTransition.executionContext, forkTransition.transition);\n }\n }", "public void operation() {\n try {\n if (path==null) {\n scanner = new Scanner(System.in);\n System.out.println(\"Enter The Directory (path):\");\n path= scanner.next();\n }\n workFlow();\n\n } catch(Exception e){\n e.printStackTrace();\n }\n\n }", "@Override\n public void run(Map<String, LogicalInput> inputs,\n Map<String, LogicalOutput> outputs) throws Exception {\n try {\n Class<?> clazz = Class.forName(\"org.apache.tez.common.ProgressHelper\");\n Constructor<?> ctor = clazz.getConstructor(Map.class, ProcessorContext.class, String.class);\n progressHelper = ctor.newInstance(inputs, getContext(), this.getClass().getSimpleName());\n Method scheduleProgressTaskService = clazz.getMethod(\"scheduleProgressTaskService\", long.class, long.class);\n scheduleProgressTaskService.invoke(progressHelper, 100,\n Math.max(1000, conf.getInt(TezConfiguration.TEZ_TASK_AM_HEARTBEAT_INTERVAL_MS,\n TezConfiguration.TEZ_TASK_AM_HEARTBEAT_INTERVAL_MS_DEFAULT) - 50));\n }\n catch (IllegalAccessException | IllegalArgumentException | InstantiationException | InvocationTargetException\n | ClassNotFoundException | NoSuchMethodException | SecurityException e) {\n // ignore\n }\n\n try {\n initializeInputs(inputs);\n\n initializeOutputs(outputs);\n\n\n List<PhysicalOperator> leaves = null;\n\n if (!execPlan.isEmpty()) {\n leaves = execPlan.getLeaves();\n // TODO: Pull from all leaves when there are multiple leaves/outputs\n leaf = leaves.get(0);\n }\n\n LOG.info(\"Aliases being processed per job phase (AliasName[line,offset]): \" + conf.get(\"pig.alias.location\"));\n\n runPipeline(leaf);\n\n if (Boolean.valueOf(conf.get(JobControlCompiler.END_OF_INP_IN_MAP, \"false\"))\n && !execPlan.endOfAllInput) {\n // If there is a stream in the pipeline or if this map job belongs to merge-join we could\n // potentially have more to process - so lets\n // set the flag stating that all map input has been sent\n // already and then lets run the pipeline one more time\n // This will result in nothing happening in the case\n // where there is no stream or it is not a merge-join in the pipeline\n execPlan.endOfAllInput = true;\n runPipeline(leaf);\n }\n\n // Calling EvalFunc.finish()\n UDFFinishVisitor finisher = new UDFFinishVisitor(execPlan,\n new DependencyOrderWalker<PhysicalOperator, PhysicalPlan>(\n execPlan));\n try {\n finisher.visit();\n } catch (VisitorException e) {\n int errCode = 2121;\n String msg = \"Error while calling finish method on UDFs.\";\n throw new VisitorException(msg, errCode, PigException.BUG, e);\n }\n\n if (!fileOutputs.isEmpty()) {\n while (!getContext().canCommit() && !isAborted) {\n Thread.sleep(100);\n }\n if (isAborted) {\n return;\n }\n for (MROutput fileOutput : fileOutputs){\n fileOutput.flush();\n if (fileOutput.isCommitRequired()) {\n fileOutput.commit();\n }\n }\n }\n\n // send event containing parallelism to sorting job of order by / skewed join\n if (conf.getBoolean(ESTIMATE_PARALLELISM, false)) {\n int parallelism = 1;\n if (sampleMap!=null && sampleMap.containsKey(ESTIMATED_NUM_PARALLELISM)) {\n parallelism = (Integer)sampleMap.get(ESTIMATED_NUM_PARALLELISM);\n }\n String sortingVertex = conf.get(SORT_VERTEX);\n // Should contain only 1 output for sampleAggregation job\n LOG.info(\"Sending numParallelism \" + parallelism + \" to \" + sortingVertex);\n VertexManagerEvent vmEvent = VertexManagerEvent.create(\n sortingVertex, ByteBuffer.wrap(Ints.toByteArray(parallelism)));\n List<Event> events = Lists.newArrayListWithCapacity(1);\n events.add(vmEvent);\n getContext().sendEvents(events);\n }\n } catch (Exception e) {\n LOG.error(\"Encountered exception while processing: \", e);\n abortOutput();\n throw e;\n }\n }", "public Integer call() throws IOException {\n \t\t\tint ret=90;\n \t\t\ttestCases = new ArrayList<String>();\n \t\t\trealIds = new ArrayList<String>();\n \t \tString path = \"./workspace/\"+jobname;\n\t\t\t\tlistener.getLogger().println(\"IL PATH DEL TESTRUN E' \"+path);\n \t\t\t/* folders = listFilesForFolder(new File(path),listener);\n \t\t\t// cerco il TestRun nell'svn di Polarion\n \tcheck:\tfor(String folder : folders){\n \t \tlistener.getLogger().println(\"confronto: \"+testrunid+\" - \"+folder);\n \t\t\t\tif(testrunid.equals(folder)){ \t\t\t\t\t\n \t\t\t\t\t// prelevo i TestCase relativi al TestRun\n \t\t\t\t\t */\n \t\t\t\t\ttestCases = getTestCases(path,listener);\n \t\t\t\t\tString nometestrun = \"Executed - \"+testrunid+\".xml\";\n \t\t\t\t\tif(!testCases.isEmpty()){\n \t\t\t\t\t\t// prelevo l'ID vero dei Test Case\n\t\t\t\t\t\t\trealIds = getRealTestCaseIdFromPolarion(listener,testCases);\n\t\t\t\t\t\t\tif(type.equals(\"TestMTP\")){ // ESECUZIONE SU MTP\n\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguo MTP\");\n\t\t\t\t\t\t\t\tfor(String realId : realIds){\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t/* Per l'esecuzione con lo stub (va messa fuori il for per funzionare)\n\t\t \t\t\t\t\tCreaXMLStub stub = new CreaXMLStub(testCases);\n\t\t\t\t\t\t\t\tstub.doTest(\"C:/JenkinsSlave/workspace/\"+jobname+\"/Temp/\"+nometestrun,listener);*/\n\t\t\t\t\t\t\t}else if(type.equals(\"TestMX\")){ // ESECUZIONE SU MICROMAX\n\t\t\t\t\t\t\t\tif(!scenario){\n\t\t\t\t\t\t\t\t\tArrayList<Integer> returnCodes = new ArrayList<Integer>();\n\t\t\t\t\t\t\t\t\tfor(String realId : realIds){\n\t\t\t\t\t\t\t\t\t\t// stampo il realId del test case\n\t\t\t\t\t\t\t \tlistener.getLogger().println(\"TC: \"+realId);\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguo MX\");\n\t\t\t\t\t\t\t\t\t\tString[] parameters = realId.split(\",\");\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tProcessBuilder builder = new ProcessBuilder(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"MxVGUI\", \"/n\", \"/r\", mxpath+File.separator+parameters[0]+File.separator+parameters[1]+\".mxp\", mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+parameters[2]); \n\t\t\t\t\t\t\t\t\t\t\tbuilder.redirectErrorStream(true); \n\t\t\t\t\t\t\t\t\t\t\tProcess p = builder.start();\n\t\t\t\t\t\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\t\t\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\t\t\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"tasklist: \" + line);\n\t\t\t\t\t\t\t\t\t\t\tret=p.waitFor();\n\t\t\t\t\t\t\t\t\t\t\treturnCodes.add(ret);\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguito MX \"+ret);\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\t// TODO Auto-generated catch block\n\t\t\t\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(e.getMessage());\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t//Scrive i risultati in base al valore di ritorno di MxVDEV\n\t\t\t\t\t\t\t\t\twriteTestResults(\"C:/JenkinsSlave/Results/\"+nometestrun, testCases, returnCodes);\t\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t//Converto tutti i risultati nel formato desiderato leggendo i log\n\t\t\t\t\t\t\t\t//convertTestCaseResults(realIds, \"C:/JenkinsSlave/workspace/\"+jobname+\"/Temp/\"+nometestrun, testCases);\n\t\t\t\t\t\t\t\telse{\n\t\t\t\t\t\t\t\t\t//convertScenarioResults(testCases, new ArrayList<String>(), mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid ,testrunid);\n\t\t\t\t\t\t\t\t\tString[] parameters = realIds.get(0).split(\",\");\n\t\t\t\t\t\t\t\t\tScenario scenario = new Scenario(testrunid,realIds,mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\");\n\t\t\t\t\t\t\t\t\tif(scenario.createScenario()){\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"Scenario creato\");\n\t\t\t\t\t\t\t\t\t\ttry {\n\t\t\t\t\t\t\t\t\t\t\tProcessBuilder builder = new ProcessBuilder(\n\t\t\t\t\t\t\t\t\t\t\t\t\t\"MxVGUI\", \"/n\", \"/r\", mxpath+File.separator+parameters[0]+File.separator+parameters[1]+\".mxp\", mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid+\".mxs\"); \n\t\t\t\t\t\t\t\t\t\t\tbuilder.redirectErrorStream(true); \n\t\t\t\t\t\t\t\t\t\t\tProcess p = builder.start();\n\t\t\t\t\t\t\t\t\t\t\tBufferedReader reader = new BufferedReader(new InputStreamReader(p.getInputStream()));\n\t\t\t\t\t\t\t\t\t\t\tString line;\n\t\t\t\t\t\t\t\t\t\t\twhile ((line = reader.readLine()) != null)\n\t\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"tasklist: \" + line);\n\t\t\t\t\t\t\t\t\t\t\tret=p.waitFor();\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"eseguito MX \"+ret);\n\t\t\t\t\t\t\t\t\t\t\tconvertScenarioResults(testCases, new ArrayList<String>(), mxpath+File.separator+parameters[0]+\"/ScenariosAndTestCases/\"+testrunid ,testrunid);\n\t\t\t\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\t\t} catch (Exception e) {\n\t\t\t\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(e.getMessage());\n\t\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\t}else{\n\t\t\t\t\t\t\t\t\t\tlistener.getLogger().println(\"creazione dello scenario non riuscita\");\n\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\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}else{ // CONDIZIONE EVENTUALI ERRORI\n\t\t\t\t\t\t\t\tContactPolarion(listener);\n\t\t\t\t\t\t\t\tlistener.getLogger().println(\"condizione inaspettata\");\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tpublishTest(\"C:/JenkinsSlave/Results/\",sharedpasswd,shareduser,nometestrun, listener, projectname);\n\t\t\t\t\t \t}else{\n\t\t\t\t\t \t\tContactPolarion(listener);\n\t\t\t\t\t \t\tlistener.getLogger().println(\"Nessun tc impostato. Setto tr a open\");\n\t\t\t\t\t \t//}\n\t\t\t\t\t \t//break check;\n \t\t\t\t//}\n \t\t\t}\n \t\t\treturn ret; \t\n \t\t}", "public void execute() {\r\n\t\r\n\t}", "private void run(){\r\n\t\tArrayList<Integer> parcours = new ArrayList<Integer>();\r\n\t\tArrayList<Integer> sommets = new ArrayList<Integer>();\r\n\t\t\r\n\t\t//initialisation de la liste des sommets\r\n\t\tfor (int i=1; i<super.g.getDim();i++) {\r\n\t\t\tsommets.add(i);\r\n\t\t}\r\n\r\n\t\t//g�n�ration d'un parcours initial\r\n\t\tAlgo2opt algo = new Algo2opt(super.g);\r\n\t\tsuper.parcoursMin = algo.parcoursMin;\r\n\t\tsuper.dist = algo.dist;\r\n\r\n\t\tcheminMin(parcours,sommets,super.g.getDim(), 0);\r\n\t}", "@Override\n public void execute() throws EngineException {\n Object target = JavaReflectionUtil.getObject(this.target, \n callStatement.getEntries().subList(1,\n callStatement.getEntries().size() - 1));\n this.getParent().setResult(executeMethod(target, callStatement));\n pop();\n }", "@Override\n\tpublic void ejecutar() {\n\t\tcontrolador.resetPartida();\n\n\t}", "protected void execute() {\n \tdrivemotors.tankDrive(leftMotor,rightMotor);\n }", "private int resolver(int x, int y, int pasos) {\n \n \tif(visitado[x][y]){ // si ya he estado ahi vuelvo (como si fuera una pared el sitio en el que ya he estado)\n \t\treturn 0;\n \t}\n \tvisitado[x][y]=true; // marcamos el sitio como visitado y lo pintamos de azul\n \tStdDraw.setPenColor(StdDraw.BLUE);\n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \tif(x==Math.round(N/2.0)&& y== Math.round(N/2.0)){// Si estoy en la posicion central cambio encontrado y lo pongo true.\n \t\ttotal=pasos;\n \t\tencontrado=true;\n \t\treturn total;\n \t}\n \tif(encontrado)return total;\n \t\n \tdouble random = Math.random()*11;//creo un numero aleatorio\n \t\n \tif(random<3){\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);// voy pal norte y vuelvo a empezar el metodo con un paso mas\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \t}\n \tif (random >=3 && random<6){\n \t\tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \t}\n \tif(random>=6 && random<9){\n \t\tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \t}\n \tif(random >=9){\n \t\tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \t}\n \t\n \tif(encontrado){\n \t\treturn total;\n \t}\n \tStdDraw.setPenColor(StdDraw.GRAY);// si no puedo ir a ningún lado lo pinto de gris \n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \treturn 0;// vuelvo al punto anterior \n \n }", "public void ejecutarCargue() {\n String respuesta = null;\n try {\n loggerApp.info(\"Cargues masivos timbres - ejecutar cargue\");\n if (!validarExtension(Constantes.EXTENSIONES_ARCHIVO_EXCEL, file)) {\n abrirModal(\"SARA\", \"Error: El archivo \" + (null == file ? \" \" : file.getName()) + \" no cumple con el formato de extensión válido \" + Constantes.EXTENSIONES_ARCHIVO_EXCEL, null);\n return;\n }\n generarListaData();\n cargarTimbresMasivosObjectContext.setAtributo(\"listaTimbres\", listaData);\n this.servletHelper = new CargarTimbresMasivosServletHelper(sessionLocal, cargarTimbresMasivosObjectContext, objectContext, sessionAjustes, cuadreCifrasSessionLocal, cajeroSession);\n if (this.servletHelper != null) {\n respuesta = servletHelper.obtenerDatos();\n }\n if (respuesta != null && !respuesta.trim().isEmpty()) {\n abrirModal(\"SARA\", respuesta, null);\n }\n } catch (FileStructureException ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", ex.getMessage(), null);\n } catch (Exception ex) {\n ex.printStackTrace();\n loggerApp.log(Level.SEVERE, ex.getMessage(), ex);\n abrirModal(\"SARA\", Constantes.MSJ_ERROR_INTERNO, null);\n }\n\n }", "public void ejecutarMaquinaTuring() {\n\n\t\tString cadenaEntrada;\n\t\tArrayList<String> cadenaCinta = new ArrayList<>();\n\t\tsetEstadoActual(getEstadoInicial());\n\t\tSystem.out.println(\"Inserte la cadena a probar:\");\n\t\tScanner imputUsuario = new Scanner(System.in);\n\t\tcadenaEntrada = imputUsuario.nextLine();\n\t\tfor (int i = 0; i < cadenaEntrada.length(); i++) {\n\t\t\tcadenaCinta.add(String.valueOf(cadenaEntrada.charAt(i)));\n\t\t}\n\n\t\tcinta = new Cinta(cadenaCinta, new CabezaLE());// inicializamos la cinta\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// con la cadena del\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t// usuario\n\t\t/*\n\t\t * Evaluamos\n\t\t */\n\t\tboolean noTransiciones = false;\n\n\t\twhile (noTransiciones == false) {// para cuando no hayan transiciones\n\n\t\t\tnoTransiciones = true;// suponemos, a priori, que no hay\n\t\t\t\t\t\t\t\t\t// transiciones\n\n\t\t\tfor (int j = 0; j < conjuntoTransiciones.size(); j++) {\n\n\t\t\t\tString estadoSiguiente = cinta.getCabezaLE().transitar(estadoActual, cinta.getCadenaCinta(),\n\t\t\t\t\t\tconjuntoTransiciones.get(j));\n\n\t\t\t\tif (estadoSiguiente != null) {// si encontro un estado al que\n\t\t\t\t\t\t\t\t\t\t\t\t// transitar...\n\n\t\t\t\t\testadoActual = estadoSiguiente; // transita\n\t\t\t\t\tnoTransiciones = false;\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t} // END FOR\n\t\t} // END WHILE (NO QUEDAN TRANSICIONES)\n\t\tgetCinta().mostrarCinta();\n\t\tcadenaEsAceptada();\n\t}", "private void executeRicercaAccertamentoPerOrdinativo() {\n \tif (model.getGestioneOrdinativoStep1Model().getAnnoAccertamento() == null || model.getGestioneOrdinativoStep1Model().getNumeroAccertamento() == null) {\n\n \t\tif(!sonoInAggiornamento()){\n \t\t\t\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamento(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setListaAccertamentoOriginale(new ArrayList<Accertamento>());\n \t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(0);\n\n \t\t\tRicercaAccertamentiSubAccertamenti request= new RicercaAccertamentiSubAccertamenti();\n \t\t\trequest.setEnte(sessionHandler.getEnte());\n \t\t\trequest.setRichiedente(sessionHandler.getRichiedente());\n\n\n \t\t\tParametroRicercaAccSubAcc param= new ParametroRicercaAccSubAcc();\n \t\t\tparam.setAnnoEsercizio(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setAnnoAccertamento(Integer.parseInt(sessionHandler.getAnnoEsercizio()));\n \t\t\tparam.setDisponibilitaAdIncassare(true);\n\n \t\t\t// Capitolo\n \t\t\tif (model.getGestioneOrdinativoStep1Model().getCapitolo() != null) {\n \t\t\t\tparam.setNumeroCapitolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getNumCapitolo());\n \t\t\t\tparam.setNumeroArticolo(model.getGestioneOrdinativoStep1Model().getCapitolo().getArticolo());\n \t\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb()){\n \t\t\t\t\tparam.setNumeroUEB(model.getGestioneOrdinativoStep1Model().getCapitolo().getUeb().intValue());\n \t\t\t\t}\n \t\t\t}\n\n\n \t\t\tparam.setCodiceDebitore(model.getGestioneOrdinativoStep1Model().getSoggetto().getCodCreditore());\n \t\t\tparam.setIsRicercaDaAccertamento(false);\n \t\t\trequest.setParametroRicercaAccSubAcc(param);\n\n\n \t\t\taddNumAndPageSize(request, \"listaAccertamentoOrdinativoId\");\n\n \t\t\tRicercaAccertamentiSubAccertamentiResponse response= movimentoGestionService.ricercaAccertamentiSubAccertamentiPerOrdinativoIncasso(request);\n\n \t\t\tif(response.isFallimento() || !response.getErrori().isEmpty()){\n\n \t\t\t\t//setto gli errori cosi che siano segnalati lato app!\n \t\t\t\taddErrori(response.getErrori());\n\n \t\t\t}else{\n\n \t\t\t\tif (response.getListaAccertamenti() != null && response.getListaAccertamenti().size() > 0) {\n \t\t\t\t\tfor (Accertamento currentAccetamento : response.getListaAccertamenti()) {\n \t\t\t\t\t\taddAccertamentiESubAccertamentiInUnicaLista(currentAccetamento);\n \t\t\t\t\t}\n\n \t\t\t\t\tmodel.getGestioneOrdinativoStep2Model().setResultSize(response.getNumRisultati());\n \t\t\t\t\t\n \t\t\t\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()==null || model.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==0){\n \t\t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t\t}\n \t\t\t\t} else {\n \t\t\t\t\taddPersistentActionWarning(ErroreFin.CRU_WAR_1003.getErrore().getCodice()+\" : \"+ErroreFin.CRU_WAR_1003.getErrore(\" accertamenti o subaccertamenti\").getDescrizione());\n \t\t\t\t}\n \t\t\t}\n\n \t\t}\n \t}\n }", "public void runSRJF() {\n //init\n ArrayList<Processus> localProcess = new ArrayList<>(); //Creation of a local list of process\n //localProcess = (ArrayList<Processus>) listOfProcess.clone();\n for (Processus cpy : listOfProcess) { //Copy the list of process in the local list with new instances of process\n Processus tmp = new Processus(cpy.getName(), cpy.getTime(), (HashMap<Integer, Integer>) cpy.getListOfInOut().clone(), (HashMap<Integer, Integer>) cpy.getlistOfResource().clone());\n localProcess.add(tmp);\n }\n int size = listOfProcess.size(); //variable used to save the initial size of the list of process\n\n Processus executedProc = null; //ExecutedProc is the current process that is being execute\n Processus tmpProc = localProcess.get(0); //The tmpProc is the previous process executed\n\n //Variable we need to calcul\n double occupancyRate = 0;\n double averageWaitingTime = 0;\n double averageReturnTime = 0;\n int currentTime = 0;\n int occupancyTime = 0;\n\n //beginning of the algo\n while (!localProcess.isEmpty()) {\n tmpProc = null;\n if (executedProc != null && executedProc.getTime() <= currentTime) {//test if the current executed process is the smallest and is not in in/out operation\n for (Processus proc : localProcess) {//chose the process to execute (the shortest)\n if (proc.getTime() <= currentTime) {\n if (proc.getRessource(proc.getCurrentStep()) < executedProc.getRessource(executedProc.getCurrentStep())) {//shortest process selected\n executedProc = proc;\n }\n }\n }\n } else {//same tests but if there is no current process on the UC\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime) {\n if (localProcess.size() == 1 || tmpProc == null) {//if there is only only one process left in the list\n executedProc = proc;\n tmpProc = proc;\n } else if (proc.getRessource(proc.getCurrentStep()) <= tmpProc.getRessource(tmpProc.getCurrentStep())) {//shortest process selected\n executedProc = proc;\n tmpProc = proc;\n }\n }\n }\n }\n if (executedProc != null) {//if there is a process\n //execution of the process over 1 unity of time and then verifying again it's steel the smallest\n for (Processus proc : localProcess) {\n if (proc.getTime() <= currentTime && !proc.equals(executedProc)) {\n proc.setWaitingTime(1);//set th waiting time of the others process that could be executed\n }\n }\n occupancyTime++;\n currentTime++;\n executedProc.setTime(executedProc.getTime() + 1);\n executedProc.setRessource(executedProc.getCurrentStep(), executedProc.getRessource(executedProc.getCurrentStep()) - 1);\n if (executedProc.getRessource(executedProc.getCurrentStep()) <= 0) {\n if (executedProc.getCurrentStep() < executedProc.getListOfInOut().size()) {\n executedProc.setTime(currentTime + executedProc.getInOut(executedProc.getCurrentStep()));\n executedProc.setCurrentStep(executedProc.getCurrentStep() + 1);\n if (executedProc.getCurrentStep() > executedProc.getlistOfResource().size()) {\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n averageWaitingTime += executedProc.getWaitingTime();\n localProcess.remove(executedProc);\n }\n } else {\n averageReturnTime += executedProc.getExecutedTime(); //update the average return time by adding the time that the process took\n averageWaitingTime += executedProc.getWaitingTime();\n localProcess.remove(executedProc);\n }\n executedProc = null;\n }\n } else {\n currentTime++;\n }\n }\n //Calculation of the variables\n occupancyRate = ((double) occupancyTime / (double) currentTime) * 100;\n\n averageWaitingTime = averageWaitingTime / size;\n averageReturnTime = averageReturnTime / size;\n\n //Updating the global variables\n currentAverageReturnTime = averageReturnTime;\n logger.trace(\"Current average return time : \" + currentAverageReturnTime);\n currentAverageWaitingTime = averageWaitingTime;\n logger.trace(\"Current average waiting time : \" + currentAverageWaitingTime);\n currentOccupancyRate = occupancyRate;\n logger.trace(\"Current occupancy rate : \" + currentOccupancyRate);\n currentOccupancyTime = occupancyTime;\n logger.trace(\"Current occupancy time : \" + currentOccupancyTime);\n\n restList(); //reset the list to the origin values so the user can test another algo\n\n }", "public void execute() {\n\n\t}", "public static void main(String[] args) {\n Calculo soma = ( a, b ) -> a + b;\n\n // Chama para ser executado -> paradigma funcional\n System.out.println(executarOperacao(soma,1,3));\n System.out.println(executarOperacao( ( a, b ) -> a + b,1,3));\n\n // paradigma imperativo\n System.out.println(somar(1, 3));\n // 4\n\n System.out.println(\"Demais operações matemáticas...\");\n Calculo subtracao = ( a, b ) -> a - b;\n Calculo multiplicacao = ( a, b ) -> a * b;\n Calculo divisao = ( a, b ) -> a / b;\n System.out.println(executarOperacao(subtracao,10,3));\n System.out.println(executarOperacao(multiplicacao,10,3));\n System.out.println(executarOperacao(divisao,12,3));\n\n System.out.println(\"Demais operações matemáticas chamando direto...\");\n System.out.println(executarOperacao( ( a, b ) -> a - b,10,3));\n System.out.println(executarOperacao( ( a, b ) -> a * b,10,3));\n System.out.println(executarOperacao( ( a, b ) -> a / b,12,3));\n\n }", "public void ejecutar(Solucion solucionInicial) {\n solucionActual = solucionInicial;\n mejorSolucion = solucionActual;\n\n for (int i = 0; i < iteracionesDiferenteTemperatura; i++) {\n for (int j = 0; j < iteracionesMismaTemperatura; j++) {\n solucionVecina = vecindad.getVecino(solucionActual);\n delta = solucionVecina.getCosto() - solucionActual.getCosto();\n if (tipoProblema == MAXIMIZACION) {\n maximizar();\n } else {\n minimizar();\n }\n }\n dispararEvento(solucionActual, i);\n reducir(i);\n }\n }", "public static void main(String[] args) {\n\t\tScanner s = new Scanner(System.in);\n\t\tint n = s.nextInt();\n\t\tQueue<Proceso> procesos = new LinkedList<Proceso>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tprocesos.add(new Proceso(s.next(), s.nextInt()));\n\t\tQueue<Integer> ideal = new LinkedList<Integer>();\n\t\tfor (int i = 0; i < n; i++)\n\t\t\tideal.add(s.nextInt());\n\t\tint esperado;\n\t\tProceso proceso;\n\t\twhile (!procesos.isEmpty()) {\n\t\t\tproceso = procesos.poll();\n\t\t\tesperado = ideal.poll();\n\t\t\twhile (proceso.getId() != esperado) {\n\t\t\t\tprocesos.add(proceso);\n\t\t\t\tproceso = procesos.poll();\n\t\t\t}\n\t\t\tproceso.ejecutar();\n\t\t}\n\t}", "public static void main(String[] args) {\n\n\t\tArquivo arq = new Arquivo();\n\t\tint opcao = -1;\n\t\tScanner entrada = new Scanner(System.in);\n\t\tString caminhoArquivo, caminhoDiretorio, diretorio, diretorioNovo;\n\t\t\n\t\tdo {\n\t\t\tSystem.out.println(\"\\nPrograma de manipulação de arquivos e diretórios.\"\n\t\t\t\t\t\t\t\t+\"Digite uma das seguintes opções:\");\n\t\t\tSystem.out.println(\"1 para criar um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n2 para excluir um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n3 para renomear um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n4 para mover um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n5 para criar um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n6 para excluir um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n7 para renomear um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n8 para mover um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n9 para criar um arquivo e escrever um texto nesse mesmo arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n10 para ler um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n11 para exibir informações sobre um arquivo\"+\n\t\t\t\t\t\t\t\t\"\\n12 para exibir informações sobre um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n13 para exibir todos os arquivos e subdiretórios de um diretório\"+\n\t\t\t\t\t\t\t\t\"\\n0 para encerrar\");\n\t\t\ttry {\n\t\t\t\topcao = entrada.nextInt();\n\t\t\t}\n\t\t\tcatch(InputMismatchException e) {\n\t\t\t\tSystem.out.println();\n\t\t\t}\n\t\t\t\t\t\t\n\t\t\tentrada.nextLine();\n\t\t\t\n\t\t\tswitch (opcao) {\n\t\t\tcase 0:\n\t\t\t\tSystem.out.println(\"Programa encerrado!\");\n\t\t\t\tentrada.close();\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 1:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tarq.criarArquivo(caminhoArquivo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 2:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tarq.excluirArquivo(caminhoArquivo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 3:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o novo nome do arquivo: \");\n\t\t\t\tString novoNome = entrada.nextLine();\n\t\t\t\tarq.renomearArquivo(caminhoArquivo, novoNome);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 4:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o novo destino do arquivo: \");\n\t\t\t\tString novoCaminho = entrada.nextLine();\n\t\t\t\tarq.moverArquivo(caminhoArquivo, novoCaminho);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 5:\n\t\t\t\tSystem.out.println(\"Digite o caminho do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tarq.criarDiretorio(diretorio);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 6:\n\t\t\t\tSystem.out.println(\"Digite o caminho do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tarq.excluirDiretorio(diretorio);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 7:\n\t\t\t\tSystem.out.println(\"Digite o caminho atual do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o caminho novo do diretório: \");\n\t\t\t\tdiretorioNovo = entrada.nextLine();\n\t\t\t\tarq.renomearDiretorio(diretorio, diretorioNovo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 8:\n\t\t\t\tSystem.out.println(\"Digite o caminho atual do diretório: \");\n\t\t\t\tdiretorio = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite o caminho novo do diretório: \");\n\t\t\t\tdiretorioNovo = entrada.nextLine();\n\t\t\t\tarq.moverDiretorio(diretorio, diretorioNovo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 9:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Escreva o texto a ser incluído no arquivo: \");\n\t\t\t\tString texto = entrada.nextLine();\n\t\t\t\tarq.criaEEscreveNoArquivo(caminhoArquivo, texto);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 10:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tSystem.out.println(\"Digite 't' para ler todas as linhas do arquivo e\"\n\t\t\t\t\t\t\t\t\t+\" 'p' para selecionar as linhas do arquivo a serem lidas: \");\n\t\t\t\tchar lerLinhas = entrada.next().charAt(0);\n\t\t\t\tif(lerLinhas == 't')\n\t\t\t\t\tarq.lerArquivo(caminhoArquivo);\n\t\t\t\telse if(lerLinhas == 'p') {\n\t\t\t\t\ttry {\n\t\t\t\t\t\tSystem.out.println(\"Digite a linha inicial a ser lida: \");\n\t\t\t\t\t\tint linhaIni = entrada.nextInt();\n\t\t\t\t\t\tSystem.out.println(\"Digite a linha final a ser lida: \");\n\t\t\t\t\t\tint linhaFinal = entrada.nextInt();\n\t\t\t\t\t\tarq.lerArquivo(caminhoArquivo, linhaIni, linhaFinal);\n\t\t\t\t\t}\n\t\t\t\t\tcatch(InputMismatchException e) {\n\t\t\t\t\t\tSystem.out.println(\"Entrada inválida!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\telse\n\t\t\t\t\tSystem.out.println(\"Opção inválida!\");\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 11:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do arquivo: \");\n\t\t\t\tcaminhoArquivo = entrada.nextLine();\n\t\t\t\tarq.infosDoArquivo(caminhoArquivo);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 12:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do diretório: \");\n\t\t\t\tcaminhoDiretorio = entrada.nextLine();\n\t\t\t\tarq.infosDoDiretorio(caminhoDiretorio);\n\t\t\t\tbreak;\n\t\t\t\t\n\t\t\tcase 13:\n\t\t\t\tSystem.out.println(\"Digite o nome e o caminho do diretório: \");\n\t\t\t\tcaminhoDiretorio = entrada.nextLine();\n\t\t\t\tarq.infosArqESubdirDoDiretorio(caminhoDiretorio);\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Operação inválida!\\n\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\t\n\t\t\t\n\t\t}while(opcao != 0);\n\t}", "public void principal() {\r\n int opciones = 0;\r\n do {\r\n opciones = op.capInt(\"CLINICA LA EVALUACIÓN\\n\\n\"\r\n + \"1. Gestionar Pacientes.\\n\"\r\n + \"2. Gestionar Médicos.\\n\"\r\n + \"3. Gestionar Historial Clínico.\\n\"\r\n + \"4. Salir\");\r\n switch (opciones) {\r\n case 1:\r\n gesPaciente();\r\n break;\r\n case 2:\r\n gesMedico();\r\n break;\r\n case 3:\r\n gesHistoria();\r\n break;\r\n case 4:\r\n op.mensaje(\"Hasta la proxima\");\r\n break;\r\n default:\r\n op.mensajeError(\"La opcione Ingresada no es valida\");\r\n break;\r\n }\r\n } while (opciones != 4);\r\n }", "public abstract String initExecute() throws Exception;", "void executeStraight(Runnable task);", "private String executarRegras(EntidadeDominio entidade, String operacao) {\n String nmClasse = entidade.getClass().getName();\r\n //para construção de String de mensagens\r\n StringBuilder msg = new StringBuilder();\r\n //mapeando classes com lista de estrategies\r\n Map<String, List<IStrategy>> regrasOperacao = rns.get(nmClasse);\r\n //caso tenha regras de negocio associada à classe\r\n if (!regrasOperacao.isEmpty()) {\r\n List<IStrategy> regras = regrasOperacao.get(operacao);\r\n //caso tenha regras de negocio associada à operação da classe\r\n if (!regras.isEmpty()) {\r\n for (IStrategy s : regras) {\r\n //checando mensagens de regras de negocio\r\n String m = s.processar(entidade);\r\n if (!m.isEmpty()) {\r\n //adicionando mensagens na StringBuilder\r\n msg.append(m);\r\n }\r\n }\r\n }\r\n }\r\n if (msg.length() > 0) {\r\n return msg.toString();\r\n } else {\r\n return \"\";\r\n }\r\n }", "public void logicCycles()throws Exception\r\n\t{\r\n\t\t\r\n\t\twhile(isSolved() == false)\r\n\t\t{\r\n\t\t\tint changesMade = 0;\r\n\t\t\tdo\r\n\t\t\t{\r\n\t\t\t\tchangesMade = 0;\r\n\t\t\t\tchangesMade += logic1();\r\n\t\t\t\tchangesMade += logic2();\r\n\t\t\t\tchangesMade += logic3();\r\n\t\t\t\tchangesMade += logic4();\r\n\t\t\t\tif(errorFound())\r\n\t\t\t\t\tbreak;\r\n\t\t\t}while(changesMade != 0);\r\n\t\r\n\t\t}\t\t\t\r\n\t\t\r\n\t}", "Operations operations();", "public void act() \r\n {\r\n mueve();\r\n //tocaJugador();\r\n //bala();\r\n disparaExamen();\r\n }", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "public void execute() {\n\t\t\r\n\t}", "protected void execute() {\n\n\t}", "@Test\n\t\tpublic void applyRecursivelyGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; s ⊆ ℤ |- r∈s ↔ s\",\n\t\t\t\t\trm(\"\", ri(\"\", rm(\"2.1\", empty))));\n\t\t}", "public static void main(String[] args) {\n\t\tScanner sc=new Scanner(System.in);\n\t\tint n=sc.nextInt();\n\t\tint root[]=new int[n+1];\n\t\tfor(int i=2;i<=n;i++)\n\t\t\troot[i]=sc.nextInt();\n\t\tnode tree[]=new node[n+1];\n\t\tfor(int i=0;i<=n;i++)\n\t\t\ttree[i]=new node();\n\t\tfor(int i=2;i<=n;i++)\n\t\t\ttree[root[i]].child.add(i);\n\t\tint q=sc.nextInt();\n\t\twhile(q-->0)\n\t\t{\n\t\t\tint u=sc.nextInt();\n\t\t\tint v=sc.nextInt();\n\t\t\tLinkedList<Integer> list=turnOn(tree, v);\n\t\t\tlong sum=0;\n\t\t\tfor(int i=0,s=list.size();i<s;i++)\n\t\t\t{\n\t\t\t\tint d=distance(root, u, list.get(i));\n\t\t\t\tsum=sum+d*d;\n\t\t\t}\n\t\t\tSystem.out.println(sum);\n\t\t}\n\t\t\n\t}", "public void innerExecute() {\n execute(new ArrayList<>(this.commandList));\n this.commandList.clear();\n }", "@Override\n\t@BreadCrumb(\"%{model.titolo}\")\n\tpublic String execute() throws Exception {\n \t\n \t//eseguo la ricerca:\n \texecuteRicercaAccertamentoPerOrdinativo();\n\n\t\t//carica le labels:\n\t\tcaricaLabelsInserisci(2, model.getGestioneOrdinativoStep1Model().getOrdinativo().getUid() == 0);\n\t\t\n\t\t//controllo filo arianna:\n\t\tif(model.getGestioneOrdinativoStep1Model().getCapitolo()!=null){\n\t\t\tif(model.getGestioneOrdinativoStep1Model().getCapitolo().getAnno()==null){\n\t\t\t\t// significa che sono andato in inserimento -> consulta -> click su filo di arianna quote\n\t\t\t\treturn \"erroreFiloArianna\";\n\t\t\t}\n\t\t}\n\t\t\n\t\t//setto il tipo di oggeto trattato:\n\t\tteSupport.setOggettoAbilitaTE(OggettoDaPopolareEnum.ORDINATIVO_INCASSO.toString());\n\t\t\n\t\t//abilita o meno il bottone salva:\n\t\tattivaBottoneSalva();\n\t\t\n\t\t// effettua la somma delle righe delle quote\n\t\tif(model.isSonoInAggiornamentoIncasso()){\n\t\t\tsommatoriaQuoteSubOrdIncassoPerAggiorna();\n\t\t}else{\n\t\t\tsommatoriaQuoteSubOrdIncasso();\n\t\t}\n\t\t\n\t\tif (caricaListeBil(WebAppConstants.CAP_EG)) {\n\t\t\treturn INPUT;\n\t\t}\n\t\n\t\t//Constanti.ORDINATIVO_TIPO_PAGAMENTO\n\t\t// Jira - 1357 in caso di errore di caricamento dei dati\n\t\t// dei classificatori non viene segnalato alcun errore\n\t\t// ma carica la pagina, al massimo non verranno visualizzate le combo relative\n\t\t\n\t\tcaricaListeFin(TIPO_ACCERTAMENTO_A );\n\t\t\n\t\t//ricontrolliamo il siope che sia coerente:\n\t\tcodiceSiopeChangedInternal(teSupport.getSiopeSpesaCod());\n\t\t//\n\t\t\t\n\t\t// imposto la descrizione della quota ocn quella dell'accertamento \n\t\tString descrizioneQuota = \"\";\n\t\tif(model.getGestioneOrdinativoStep2Model().getListaAccertamento()!=null && !model.getGestioneOrdinativoStep2Model().getListaAccertamento().isEmpty() &&\n\t\t\t\tmodel.getGestioneOrdinativoStep2Model().getListaAccertamento().size()==1){\n\t\t\tdescrizioneQuota = model.getGestioneOrdinativoStep2Model().getListaAccertamento().get(0).getDescrizione();\n\t\t\tmodel.getGestioneOrdinativoStep2Model().setDescrizioneQuota(descrizioneQuota);\n\t\t\t\n\t\t}\n\t\t\n\t\treturn SUCCESS;\n\t}" ]
[ "0.65179855", "0.5805447", "0.5805447", "0.552017", "0.5515753", "0.5512205", "0.55112606", "0.5446684", "0.543655", "0.5430878", "0.5384708", "0.5361603", "0.5353934", "0.53471166", "0.5342424", "0.533232", "0.52939034", "0.5255522", "0.5252799", "0.5249568", "0.5244489", "0.5244095", "0.5244049", "0.52326983", "0.52119184", "0.52082664", "0.5203376", "0.52006567", "0.5198251", "0.5195939", "0.51808155", "0.5178951", "0.51787317", "0.5169643", "0.51682276", "0.51539546", "0.5151387", "0.5122447", "0.5121575", "0.51186764", "0.5107728", "0.5103755", "0.5097901", "0.5090026", "0.50887984", "0.5084502", "0.50825", "0.5081557", "0.50812924", "0.5069702", "0.5064489", "0.505793", "0.5051327", "0.5037929", "0.5037149", "0.50254697", "0.5014109", "0.50115025", "0.5003821", "0.50022966", "0.4996862", "0.49920306", "0.49889302", "0.49811238", "0.49810272", "0.49738663", "0.49726114", "0.4971876", "0.49601558", "0.49586037", "0.4957371", "0.4951114", "0.49503276", "0.49468854", "0.49427557", "0.49381015", "0.49364412", "0.493572", "0.4926205", "0.49144453", "0.4912065", "0.4909872", "0.48980922", "0.4888709", "0.48866585", "0.48839098", "0.48715556", "0.4868986", "0.4867448", "0.48594737", "0.48572028", "0.48547348", "0.4853659", "0.48534662", "0.48534662", "0.48534662", "0.48523366", "0.48522615", "0.48469177", "0.48468623", "0.48439193" ]
0.0
-1
Revisar si a algun proceso se le pueden asignar sus recursos
private boolean Revisar(int need[][], int disp[]){ int count = 0; for(int i = 0; i < need.length; i++){ for(int j = 0; j < disp.length; j++){ if(disp[j] < need[i][j]){ count++; } } } if(count >= ((need.length/2)+1)){ return false; } else { return true; } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isRecursive();", "boolean hasRecursive();", "public boolean testTraversal() {\n if (parent == null){\n return false;\n }\n return testTraversalComponent(parent);\n }", "private boolean check_only_call_relatives(Element element){\n\t\tArrayList<Element> relatives = new ArrayList<Element>();\n\t\tfor(Element elem_called : element.getRefFromThis()){\n\t\t\t//if they are brothers\n\t\t\tif(element.getParentName() != null && elem_called.getParentName() != null && element.getParentName().equals(elem_called.getParentName())){\n\t\t\t\trelatives.add(elem_called);\n\t\t\t}\n\t\t\t//if they are son - father\n\t\t\tif(element.getParentName() != null && element.getParentName().equals(elem_called.getIdentifier())){\n\t\t\t\trelatives.add(elem_called);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif (relatives.size() == element.getRefFromThis().size()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "@Override \n public boolean shouldTraverse(Traversal traversal, Exp e, Exp parent) {\n return true; \n }", "private static boolean inOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the current node, then finally the right child\n else {\n inOrderTraversal(current.getLeftChild());\n inorder.add(current);\n inOrderTraversal(current.getRightChild());\n }\n return true;\n }", "private boolean revisar(GrafoAristaPonderada G) {\n\n // check peso\n double pesoTotal = 0.0;\n for (Arista a : aristas()) {\n pesoTotal += a.peso();\n }\n if (Math.abs(pesoTotal - peso()) > EPSILON_PUNTO_FLOTANTE) {\n System.err.printf(\n \"Peso de la aristas no es igual a peso(): %f vs. %f\\n\",\n pesoTotal, peso());\n return false;\n }\n\n // check that it is acyclic\n UF uf = new UF(G.V());\n for (Arista e : aristas()) {\n int v = e.unVertice(), w = e.otroVertice(v);\n if (uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque\");\n return false;\n }\n uf.union(v, w);\n }\n\n // check that it is a spanning forest\n for (Arista a : G.aristas()) {\n int v = a.unVertice(), w = a.otroVertice(v);\n if (!uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque de expansion\");\n return false;\n }\n }\n\n // check that it is a minimal spanning forest (cut optimality conditions)\n for (Arista a : aristas()) {\n\n // all aristas in MST except a\n uf = new UF(G.V());\n for (Arista o : aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (o != a) uf.union(x, y);\n }\n\n // check that e is min peso edge in crossing cut\n for (Arista o : G.aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (!uf.estanConectados(x, y)) {\n if (o.peso() < a.peso()) {\n System.err.println(\"Arista \" + o + \n \" viola las condiciones de optimalidad\"\n + \"del corte\");\n return false;\n }\n }\n }\n\n }\n\n return true;\n }", "private boolean helperDFS(Node current){\n\n if(expandedNode.size() == 999){\n //limit has been reached. jump out of recursion.\n expandedNode.add(current);\n System.out.println(\"No solution found.\");\n printExpanded(expandedNode);\n System.exit(0);\n return false;\n }\n\n boolean b = cycleCheck(current,expandedNode);\n\n if(!b){\n expandedNode.add(current);\n }else{\n return false;\n }\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal reached.\n //expandedNode.add(current);\n solutionPath(current);\n printExpanded(expandedNode);\n System.exit(0);\n }\n\n //Now make the children.\n\n if(!forbidden.contains(current.getDigit().getDigitString())){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 1){\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n }\n return false;\n }", "private boolean revisar(DigrafoAristaPonderada G) {\n\n // edge-weighted digraph is cyclic\n if (tieneCiclo()) {\n // verify ciclo\n AristaDirigida primero = null, ultimo = null;\n for (AristaDirigida a : ciclo()) {\n if (primero == null) primero = a;\n if (ultimo != null) {\n if (ultimo.hacia() != a.desde()) {\n System.err.printf(\n \"aristas de ciclo %s and %s no incidentes\\n\",\n ultimo, a);\n return false;\n }\n }\n ultimo = a;\n }\n\n if (ultimo.hacia() != primero.desde()) {\n System.err.printf(\n \"aristas de ciclo %s and %s no incidentes\\n\", \n ultimo, primero);\n return false;\n }\n }\n\n\n return true;\n }", "private static boolean preOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the current node, then the left child, then finally the right child\n else {\n preorder.add(current);\n preOrderTraversal(current.getLeftChild());\n preOrderTraversal(current.getRightChild());\n }\n return true;\n }", "public boolean GO ()\r\n\t{\r\n\t\t\r\n\t\t for (GenericTreeNode<String> node : ActualNode.getChildren()) {\r\n\t\t\t if (node.getData().equalsIgnoreCase(Navigation_WHERE)){\r\n\t\t\t\t Path.add(new GenericTreeNode<String>(ActualNode));\r\n\t\t\t\t ActualNode=new GenericTreeNode<String>(node);\r\n\t\t\t return true;\r\n\t\t\t }\r\n\t }\r\n\t\t return false;\r\n\t}", "public void inOrderTraverseRecursive();", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public boolean continueTraversal() \r\n\t{\r\n\treturn true;\r\n\t}", "@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }", "private static <V> boolean profPrimeroCiclos(Graph<V> pGraph, V pInicio, V vertAnterior, Set<V> pConjunto) {\n pConjunto.put(pInicio);\n List<V> adyacencias = pGraph.getAdjacentNodes(pInicio);\n for (int x = 1; x <= adyacencias.size(); x++) {\n V adyacencia = adyacencias.get(x);\n if (!adyacencia.equals(vertAnterior)) {\n if (!pConjunto.isMember(adyacencia)) {\n return profPrimeroCiclos(pGraph, adyacencia, pInicio, pConjunto);\n } else {\n return false;\n }\n }\n }\n return true;\n }", "boolean hasNarratorChain();", "public boolean alterar(GrauParentesco grauParentesco) throws Exception;", "@Override\n public boolean shouldTraverse(Traversal t, Exp e, Exp parent) {\n return true;\n }", "private static void noDirigido(TraductorGrafo grafo){\r\n\r\n\t\t// Inicializa variable booleana que almacena si el grafo es no dirigido\r\n\t\tboolean esNoDirigido = true;\r\n\r\n\t\t// Itera sobre la matriz de adyacencias del grafo verificando que paratodo i,j se cumple que\r\n\t\t// grafo[i][j] == grafo[j][i]\r\n\t\tfor(int i=0;i<grafo.grafo.length;i++){\r\n\t\t\tfor(int j=0;j<grafo.grafo.length;j++){\r\n\t\t\t\tif(grafo.grafo[i][j] != grafo.grafo[j][i]){\r\n\t\t\t\t\t// En caso de encontrar un caso para el cual no se cumple, se asigna a la variable booleana false\r\n\t\t\t\t\tesNoDirigido = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Verifica el estado de la variable booleana, y dependiendo de este imprime el mensaje correspondiente\r\n\t\tif(esNoDirigido){\r\n\t\t\tSystem.out.println(\"El grafo es no dirigido\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"El grafo es dirigido\");\r\n\t\t}\r\n\r\n\t}", "private boolean poseeSaldoAnterior() {\n boolean retorno = false;\n if(saldoAnterior !=null){\n retorno = true;\n }\n return retorno;\n }", "public boolean esConexo() {\n\t\tboolean result = true;\n\t\tint indice = 0;\n\t\tBusquedaEnProfundidad busqueda = new BusquedaEnProfundidad(this, 0);\n\n\t\twhile (result && indice < cantNodos) {\n\t\t\tif (!busqueda.estaVisitado(indice))\n\t\t\t\tresult = false;\n\t\t\tindice++;\n\t\t}\n\n\t\treturn result;\n\t}", "@Override\n public boolean continueExecuting()\n {\n return !this.entity.getNavigator().noPath();\n }", "private boolean resolver(int[][] sudoku, Posicion p) {\n if (sudoku[p.getF()][p.getC()] == 0) {\r\n for (int n = 1; n <= 9; n++) {\r\n if (esValido(n, p.getF(), p.getC(), sudoku)) {\r\n sudoku[p.getF()][p.getC()] = n;\r\n if (resolver(sudoku, pSiguiente(p))) {\r\n return true;\r\n } else {\r\n sudoku[p.getF()][p.getC()] = 0;\r\n //continuamos el 'for' probando valores\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n //Si estamos ante una celda ocupada y...\r\n //si hemos llegado al final\r\n if (p.getF() == 8 && p.getC() == 8) {\r\n System.out.println(\"solucion:\");\r\n System.out.println(Arrays.deepToString(sudoku));\r\n return true;\r\n }\r\n //si no hemos llegado al final continuamos en la siguiente posicion\r\n return resolver(sudoku, pSiguiente(p));\r\n }", "private boolean shouldReplanPath(State.StateView state, History.HistoryView history, Stack<MapLocation> currentPath)\n {\n \t\t/* TODO: Write this method\n \t\t * Check if the path is blocked every step or check if the next spot is blocked?\n \t\t * Does enemy attack if you get too close?\n \t\t */\n \t\n \t\n \t\t//checking if the next step is blocked\n \t\t//setting up local fields\n \t\tUnitView enemy = state.getUnit(enemyFootmanID);\n \t\tMapLocation next;\n \t\tif (!path.isEmpty()) {\n \t\t\tnext = path.peek();\n \t\t\n \t\t\tif(next.x == enemy.getXPosition() && next.y == enemy.getYPosition()) \n \t\t\t\treturn true;\n \t\t\t\n \t\t}\n \t\t\n return false;\n }", "public boolean isHierarchical() {\n/* 2889 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "boolean getRecursiveNull();", "@Test\n\t\tpublic void applyRecursivelyGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; s ⊆ ℤ |- r∈s ↔ s\",\n\t\t\t\t\trm(\"\", ri(\"\", rm(\"2.1\", empty))));\n\t\t}", "public boolean getForkOnTraversal();", "private int resolver(int x, int y, int pasos) {\n \n \tif(visitado[x][y]){ // si ya he estado ahi vuelvo (como si fuera una pared el sitio en el que ya he estado)\n \t\treturn 0;\n \t}\n \tvisitado[x][y]=true; // marcamos el sitio como visitado y lo pintamos de azul\n \tStdDraw.setPenColor(StdDraw.BLUE);\n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \tif(x==Math.round(N/2.0)&& y== Math.round(N/2.0)){// Si estoy en la posicion central cambio encontrado y lo pongo true.\n \t\ttotal=pasos;\n \t\tencontrado=true;\n \t\treturn total;\n \t}\n \tif(encontrado)return total;\n \t\n \tdouble random = Math.random()*11;//creo un numero aleatorio\n \t\n \tif(random<3){\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);// voy pal norte y vuelvo a empezar el metodo con un paso mas\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \t}\n \tif (random >=3 && random<6){\n \t\tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \t}\n \tif(random>=6 && random<9){\n \t\tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \t}\n \tif(random >=9){\n \t\tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \t}\n \t\n \tif(encontrado){\n \t\treturn total;\n \t}\n \tStdDraw.setPenColor(StdDraw.GRAY);// si no puedo ir a ningún lado lo pinto de gris \n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \treturn 0;// vuelvo al punto anterior \n \n }", "public boolean reducible() {\n if (dfsTree.back.isEmpty()) {\n return true;\n }\n int size = controlFlow.transitions.length;\n boolean[] loopEnters = dfsTree.loopEnters;\n TIntHashSet[] cycleIncomings = new TIntHashSet[size];\n // really this may be array, since dfs already ensures no duplicates\n TIntArrayList[] nonCycleIncomings = new TIntArrayList[size];\n int[] collapsedTo = new int[size];\n int[] queue = new int[size];\n int top;\n for (int i = 0; i < size; i++) {\n if (loopEnters[i]) {\n cycleIncomings[i] = new TIntHashSet();\n }\n nonCycleIncomings[i] = new TIntArrayList();\n collapsedTo[i] = i;\n }\n\n // from whom back connections\n for (Edge edge : dfsTree.back) {\n cycleIncomings[edge.to].add(edge.from);\n }\n // from whom ordinary connections\n for (Edge edge : dfsTree.nonBack) {\n nonCycleIncomings[edge.to].add(edge.from);\n }\n\n for (int w = size - 1; w >= 0 ; w--) {\n top = 0;\n // NB - it is modified later!\n TIntHashSet p = cycleIncomings[w];\n if (p == null) {\n continue;\n }\n TIntIterator iter = p.iterator();\n while (iter.hasNext()) {\n queue[top++] = iter.next();\n }\n\n while (top > 0) {\n int x = queue[--top];\n TIntArrayList incoming = nonCycleIncomings[x];\n for (int i = 0; i < incoming.size(); i++) {\n int y1 = collapsedTo[incoming.getQuick(i)];\n if (!dfsTree.isDescendant(y1, w)) {\n return false;\n }\n if (y1 != w && p.add(y1)) {\n queue[top++] = y1;\n }\n }\n }\n\n iter = p.iterator();\n while (iter.hasNext()) {\n collapsedTo[iter.next()] = w;\n }\n }\n\n return true;\n }", "protected boolean hasParentSteps(CoreOperation operation) {\n for (Expression exp : operation.getArguments()) {\n if (exp instanceof LocationPath) {\n return hasParentSteps((LocationPath) exp);\n } else if (exp instanceof CoreOperation) {\n return hasParentSteps((CoreOperation) exp);\n } else {\n logDebug(\"{} is not a location Path or a core operation to check for parent steps\", operation);\n }\n }\n return false;\n }", "private boolean sugerencia(Palabra c){\n MaxHeap<Palabra> l = dic.opcionesSuguerencias(c);\n int d =0;\n if (!l.esVacio()) {\n Palabra n = l.elimina();\n d = JOptionPane.showConfirmDialog(null, \"---Tal vez quizo decir: \\n -\"+n.toString(), \"¿?\", JOptionPane.YES_NO_OPTION);\n if (d ==0 ) {\n c.setCadena(n);\n return false;\n }else if (d == 1) {\n return true;\n }\n }\n return false;\n }", "private void checkLegal() {\n\tif (undoStack.size() == 2) {\n ArrayList<Integer> canGo = \n getMoves(undoStack.get(0), curBoard);\n boolean isLegal = false;\n int moveTo = undoStack.get(1);\n for (int i = 0; i < canGo.size(); i++) {\n if(canGo.get(i) == moveTo) {\n isLegal = true;\n break;\n }\n }\n\n if(isLegal) {\n curBoard = moveUnit(undoStack.get(0), \n moveTo, curBoard);\n clearStack();\n\n moveCount++;\n\t setChanged();\n\t notifyObservers();\n }\n\t}\n }", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "private void solveViolation(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> uncle = x.getUncle();\n\t\tif (uncle != null && uncle.color == true) {\n\n\t\t\t// Step 1.1 Change color of parent and uncle as BLACK.\n\t\t\tx.parent.color = false;\n\t\t\tuncle.color = false;\n\n\t\t\t// Step 1.2 color of grand parent as RED.\n\t\t\tx.getGrandParent().color = true;\n\n\t\t\t// Step 1.3 Change x = x's grandparent, repeat steps 2 and 3 for new x.\n\t\t\tbalanceRBTree(x.getGrandParent());\n\n\t\t\t// Case 2: If x's uncle is BLACK, then there can be four configurations for x,\n\t\t\t// x's parent (p) and x's grandparent (g)\n\t\t} else {\n\n\t\t\t// i) Left Left Case (p is left child of g and x is left child of p)\n\t\t\tif (x.parent.isLeftChild() && x.isLeftChild()) {\n\t\t\t\tleftLeftCase(x);\n\t\t\t}\n\n\t\t\t// ii) Left Right Case (p is left child of g and x is right child of p)\n\t\t\telse if (x.parent.isLeftChild() && x.isRightChild()) {\n\t\t\t\tif (x.parent == root) {\n\t\t\t\t\troot = rotateLeft(x.parent);\n\t\t\t\t} else {\n\t\t\t\t\trotateLeft(x.parent);\n\t\t\t\t}\n\t\t\t\tleftLeftCase(x.left);\n\t\t\t}\n\n\t\t\t// iii) Right Right Case (Mirror of case i)\n\t\t\telse if (x.parent.isRightChild() && x.isRightChild()) {\n\t\t\t\trightRightCase(x);\n\t\t\t}\n\n\t\t\t// iv) Right Left Case (Mirror of case ii)\n\t\t\telse if (x.parent.isRightChild() && x.isLeftChild()) {\n\t\t\t\tif (x.parent == root) {\n\t\t\t\t\troot = rotateRight(x.parent);\n\t\t\t\t} else {\n\t\t\t\t\trotateRight(x.parent);\n\t\t\t\t}\n\t\t\t\trightRightCase(x.right);\n\t\t\t}\n\t\t}\n\t}", "@Override\n public boolean step() {\n boolean ejecutandose = true;\n switch (Step) {\n case 0:\n paso0();\n break;\n case 1:\n paso1();\n break;\n case 2:\n paso2();\n break;\n case 3:\n paso3();\n break;\n default: {\n ejecutandose = false;\n graph.NodoObjetivo = miObjetivo;\n graph.paintGrafo();\n }\n }\n return ejecutandose;\n }", "private void inorder() {\n inorder(root);\n }", "private boolean procesoComer(int a, int b)\n {\n ArrayList<Integer> muertes;\n muertes = animales.get(a).get(b).come();\n if (muertes.get(0) > krill) {\n krill = 0;\n return false;\n } else {\n krill -= muertes.get(0);\n }\n for (int i = 1; i < muertes.size(); i++) {\n for (int j = 0; j < muertes.get(i); j++) {\n if (animales.get(i).size() > 0) {\n animales.get(i).get(0).destruir(); //Reduce en 1 la cantidad\n animales.get(i).remove(0);\n } else {\n return false;\n }\n }\n }\n return true;\n }", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "boolean insertar(Nodo_B nuevo){\n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n size ++;\n return true;\n }else{\n if(this.primero == this.ultimo){ // -------------------------solo hay un nodo \n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }\n }else{ // ---------------------------------------------------hay mas de un nodo\n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n Nodo_B pivote = this.primero;\n while(pivote != null){\n if(nuevo.valor < pivote.valor){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n //--------------------------- cambia los punteros a las paginas\n pivote.izq = nuevo.der;\n pivote.anterior.der = nuevo.izq;\n //-----------------------------------------------------------\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n size++;\n return true;\n }else if(nuevo.valor == pivote.valor){\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n }\n return false;\n }", "public boolean canFinishRecursive(Map<Integer, Set<Integer>> courses, Set<Integer> prerequisite, int start, Set<Integer> visited){\n for(Integer p: prerequisite){\n if(visited.contains(p)){\n continue;\n }\n visited.add(p);\n //if you detect a circular dependency then return false since course can never be completed\n if(p.intValue() == start){\n return false;\n }\n if(courses.get(p).size() == 0){\n continue;\n }\n if(!canFinishRecursive(courses,courses.get(p), start, visited)){\n return false;\n }\n }\n return true;\n }", "private void inorder() {\r\n\t\t\tinorder(root);\r\n\t\t}", "public abstract boolean levelUp();", "private boolean isCyclicUtil(String v, Set<String> visited, String parent) {\n\t\tvisited.add(v);\n\t\tSet<String> neighbors = this.neighbors.get(v);\n\t\tfor (String n: neighbors) {\n\t\t\tif (!visited.contains(n)) {\n\t\t\t\tif (isCyclicUtil(n, visited, v)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!n.equals(parent)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "@Override\npublic boolean fjern(T verdi) {\n Node<T> curr = hode;\n while (curr != null) {\n if (curr.verdi.equals(verdi)) {\n if (antall == 1) {\n hode = hale = null;\n } else if (curr == hode) {\n hode = hode.neste;\n hode.forrige = null;\n } else if (curr == hale) {\n hale = hale.forrige;\n hale.neste = null;\n } else {\n curr.forrige.neste = curr.neste;\n curr.neste.forrige = curr.forrige;\n }\n antall--;\n endringer++;\n return true;\n }\n curr = curr.neste;\n }\n return false;\n}", "protected boolean acceptForTraversal(Atom atom)\r\n {\r\n return true;\r\n }", "boolean hasParentalStatus();", "void fixViolation(Node node){\n\t\tNode parentPtr = nil;\n\t\tNode grParentPtr = nil;\n\t\t\n\t\twhile( node != root && node.colour != \"Black\" && node.parent.colour == \"Red\" && node.parent.parent != nil){\n\t\t\t\n\t\t\tparentPtr = node.parent;\n\t\t\tgrParentPtr = node.parent.parent;\n\t\t\t//case A\n\t\t\t//parent of node is the left child of grandparent\n\t\t\tif(parentPtr == grParentPtr.left){\n\t\t\t\tNode unclePtr = grParentPtr.right;\n\t\t\t\t\n\t\t\t\t//case 1 \n\t\t\t\t//Uncle is red in color\n\t\t\t\tif(unclePtr != nil && unclePtr.colour == \"Red\"){\n\t\t\t\t\tgrParentPtr.colour = \"Red\";\n\t\t\t\t\tparentPtr.colour = \"Black\";\n\t\t\t\t\tunclePtr.colour = \"Black\";\n\t\t\t\t\tnode = grParentPtr;\n\t\t\t\t}else{\n\t\t\t\t\t//case 2\n\t\t\t\t\t//of node is the right child of its parent\n\t\t\t\t\tif(node == parentPtr.right){\n\t\t\t\t\t\trotateLeft(parentPtr);\n\t\t\t\t\t\tnode = parentPtr;\n\t\t\t\t\t\tparentPtr = node.parent;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//case 3\n\t\t\t\t\t//node is the left child of its parent left rotation is required\n\t\t\t\t\trotateRight(grParentPtr);\n\t\t\t\t\tString temp = parentPtr.colour;\n\t\t\t\t\tparentPtr.colour = grParentPtr.colour;\n\t\t\t\t\tgrParentPtr.colour = temp;\n\t\t\t\t\tnode = parentPtr;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//case B\n\t\t\t//parent of the node is the right child of grand parent\n\t\t\tif(parentPtr == grParentPtr.right){\n\t\t\t\tNode unclePtr = grParentPtr.left;\n\t\t\t\t//case 1\n\t\t\t\t//uncle pointer is red\n\t\t\t\tif(unclePtr != nil && unclePtr.colour == \"Red\"){\n\t\t\t\t\tgrParentPtr.colour = \"Red\";\n\t\t\t\t\tparentPtr.colour = \"Black\";\n\t\t\t\t\tunclePtr.colour = \"Black\";\n\t\t\t\t\tnode = grParentPtr;\n\t\t\t\t}else{\n\t\t\t\t\t//case 2\n\t\t\t\t\t//node is the left child of its parent right rotation is required\n\t\t\t\t\tif(node == parentPtr.left){\n\t\t\t\t\t\trotateRight(parentPtr);\n\t\t\t\t\t\tnode = parentPtr;\n\t\t\t\t\t\tparentPtr = node.parent;\n\t\t\t\t\t}\n\t\t\t\t\t//case 3\n\t\t\t\t\t//node is the right child of its parent left rotation is required\n\t\t\t\t\trotateLeft(grParentPtr);\n\t\t\t\t\tString temp = parentPtr.colour;\n\t\t\t\t\tparentPtr.colour = grParentPtr.colour;\n\t\t\t\t\tgrParentPtr.colour = temp;\n\t\t\t\t\tnode = parentPtr;\n\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\troot.colour = \"Black\";\n\t}", "@Override\n\tpublic boolean tryAdvance(Consumer<? super Node> action) {\n\t\tif(root!=null) {\n\t\t\taction.accept(root);\n\t\t\tif (list.size()!=0)\n\t\t\t\tthis.root = this.list.remove(0);\n\t\t\telse this.root = null;\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "private void checkBalance(Node n) {\n if (n == mRoot) { // case 1: new node is root.\n n.mIsRed = false; // Paint it black.\n }\n // Case 2: Parent is black...\n else if (!n.mParent.mIsRed) {} // nothing will happen.\n // Case 3: Parent and Uncle are red.\n else if (getUncle(n).mIsRed) {\n n.mParent.mIsRed = false;\n getUncle(n).mIsRed = false; // Repaint P, U and G\n getGrandparent(n).mIsRed = true; \n checkBalance(getGrandparent(n)); // Recurse on G\n }\n // Case 4: n is LR or RL grandchild\n else if (n == getGrandparent(n).mLeft.mRight) { // n is LR\n singleRotateLeft(n.mParent); // Rotate on P\n singleRotateRight(n.mParent); // Then on G... which is now n's parent\n n.mIsRed = false; n.mRight.mIsRed = true; // Repaint G and P\n // These two lines were case 5, modified so as to not screw up.\n }\n else if (n == getGrandparent(n).mRight.mLeft) {// n is RL\n singleRotateRight(n.mParent);\n singleRotateLeft(n.mParent); // As above, reversed.\n n.mIsRed = false; n.mLeft.mIsRed = true;\n }\n // Case 5: n is LL or RR grandchild\n else if (n == getGrandparent(n).mLeft.mLeft) {// n is LL\n singleRotateRight(getGrandparent(n));\n n.mParent.mIsRed = false; // Rotate at G, repainting as above\n n.mParent.mRight.mIsRed = true;\n }\n else if (n == getGrandparent(n).mRight.mRight) { // n is RR\n singleRotateLeft(getGrandparent(n));\n n.mParent.mIsRed = false; // Same here.\n n.mParent.mLeft.mIsRed = true;\n }\n }", "public void fixViolationDelete(Node node){ \n\t\t\n\t while(node!=root && node.colour==\"Black\"){\n\t if(node==node.parent.left){\n\t \t//if the node is the left child and sibling is in the right\n\t Node sibling=node.parent.right;\n\t //check if the color of sibling is red then exchange the color with parent and rotate left \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateLeft(node.parent);\n\t sibling=node.parent.right;\n\t }\n\t if(sibling.left.colour==\"Black\" && sibling.right.colour ==\"Black\"){\n\t \t//if both the children of sibling are black, change the color of the sibling and transfer the problem up the parent\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }\n\t else{ \n\t if(sibling.right.colour==\"Black\"){\n\t \t//if the left child of the sibling in red exchange the color of the sibling's child with sibling and color the child black\n\t \t// and rotate right\n\t \tsibling.left.colour = \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateRight(sibling);\n\t sibling=node.parent.right;\n\t }\n\t //followed my the left rotation\n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.right.colour = \"Black\";\n\t rotateLeft(node.parent);\n\t node=root;\n\t }\n\t }\n\t else{\n\t \t//node is the right child of the parent and sibling is the left child\n\t Node sibling=node.parent.left;\n\t \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateRight(node.parent);\n\t sibling=node.parent.left;\n\t }\n\t \n\t if(sibling.right.colour==\"Black\" && sibling.left.colour==\"Black\"){\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }else{\n\t if(sibling.left.colour==\"Black\"){\n\t \tsibling.right.colour= \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateLeft(sibling);\n\t sibling=node.parent.left;\n\t }\n\t \n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.left.colour = \"Black\";\n\t rotateRight(node.parent);\n\t node=root;\n\t }\n\t }\n\t }\n\t //we color the node black\n\t node.colour = \"Black\";\n\t}", "@Override\n public boolean canContinueWalking() {\n return true;\n }", "private static void extendPath(Grafo g, List<Integer> caminho) {\n Integer next = null;\n for (Integer v : caminho) {\n if (g.estaConectado(v, caminho.get(caminho.size() - 1))) { //Vi\n int index = caminho.indexOf(v); //Vi+1\n int unvisited, maxEta = 0;\n for (Integer w : g.vizinhos(caminho.get(index + 1))) { //Checando se Vi+1 tem vizinhos não visitados\n if (caminho.contains(w)) {\n continue;\n }\n unvisited = 0;\n for (Integer m : g.vizinhos(w)) { //eta de w\n if (!caminho.contains(m)) {\n unvisited++;\n }\n }\n if (unvisited > maxEta) {\n next = w;\n maxEta = unvisited;\n }\n }\n if (next != null) {\n //Reorganizar o caminho\n Collections.reverse(caminho.subList(index + 1, caminho.size()));\n caminho.add(next);\n findAPath(g, caminho, null);\n extendPath(g, caminho);\n break;\n }\n }\n }\n }", "public void inOrderTraversal() {\n beginAnimation();\n treeInOrderTraversal(root);\n stopAnimation();\n\n }", "@Override\n public boolean shouldContinueSwitchedRootFound() {\n return false;\n }", "public abstract boolean impliesWithoutTreePathCheck(Permission permission);", "boolean treeFinished(treeNode root){\n\t\treturn (root.parent == null && root.lc == null && root.rc == null);\n\t}", "private static void resolveChildren(Map<String, Boolean> accumulator, Map<String, Boolean> children, boolean invert) {\n for (Map.Entry<String, Boolean> e : children.entrySet()) {\n if (accumulator.containsKey(e.getKey())) {\n continue; // Prevent infinite loops\n }\n\n // xor the value using the parent (bukkit logic, not mine)\n boolean value = e.getValue() ^ invert;\n accumulator.put(e.getKey().toLowerCase(), value);\n\n // lookup any deeper children & resolve if present\n Permission perm = Bukkit.getServer().getPluginManager().getPermission(e.getKey());\n if (perm != null) {\n resolveChildren(accumulator, perm.getChildren(), !value);\n }\n }\n }", "public boolean esHoja(Nodo hoja){\r\n\t\tif ((hoja.getLeft()==null)&&(hoja.getRight()==null))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "public boolean solve()\n\t{\n Position[] pos=path.getLastStep().neighbors();\n if (grid.isOnBoundary(path.getLastStep())&&grid.isOpen(path.getLastStep()))\n\t\treturn true;\n if (path.getLastStep()==start)\n return false;\n for (int i=0;i<4;i++)\n {\n if (pos[i]!=path.getLastStep() && grid.isOpen(pos[i]))\n path.extend(pos[i]);\n }\n if (grid.isBlocked(path.getLastStep())||grid.isRejected(path.getLastStep()))\n {\n path.backUp();\n solve();\n }\n return false;\n \n\t}", "private boolean checkAction() {\n if (nodes == null || nodes.length > 1) {\r\n return false;\r\n }\r\n // No parent\r\n if (nodes == null || nodes.length != 1) {\r\n JOptionPane.showMessageDialog(JZVNode.this, bundle\r\n .getString(\"dlg.error.updateWithoutParent\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "public void inOrder() {\r\n \r\n // call the private inOrder method with the root\r\n inOrder(root);\r\n }", "@Override\r\n\t/**\r\n\t * advanceToYes() advances the current node to its right child in the event the right child is not null.\r\n\t * If the right child is null, current is set to be null.\r\n\t * advanceToYes() has a precondition that the current node is not null.\r\n\r\n\t */\r\n\tpublic void advanceToYes() {\n\t\tif(!current.hasRightChild())\r\n\t\t\tcurrent = null;\r\n\t\telse {\r\n\t\t\tcurrent = current.getRightChild();\r\n\t\t}\r\n\t}", "private SchedulePaths calculateAllPaths(final SchedulePaths schedulePaths, final Set<Edge> path,\n final Operation operation) {\n\n final Set<Edge> parentEdges;\n if (operation instanceof EndVertex) {\n parentEdges = ((EndVertex) operation).getEndParentEdges();\n } else {\n parentEdges = operation.getParentEdges();\n }\n\n LOG.trace(\"Checking operation J: {}, M: {}\", operation.getJob(), operation.getMachine());\n LOG.trace(\"Number of parent edges: {}\", parentEdges.size());\n\n //Runs while not root operation\n if (!parentEdges.isEmpty()) {\n\n //Gets maximum edge size\n Integer maxEdge = 0;\n for (final Edge edge : parentEdges) {\n\n if (path.contains(edge)) {\n LOG.trace(\"Detected loop\");\n LOG.trace(\"Loop parent: {}\\n From path: {}\", edge.toString(), path.toString());\n schedulePaths.setIsFeasible(false);\n schedulePaths.setNodeCausingCycle(edge);\n\n return schedulePaths;\n }\n\n LOG.trace(\"Parent of operation: J:{} M:{}\", edge.getOperationFrom().getJob(), edge.getOperationFrom()\n .getMachine());\n if (edge.getMaxDistanceToMe() > maxEdge) {\n maxEdge = edge.getMaxDistanceToMe();\n }\n }\n\n LOG.trace(\"Maximum edge is {}\", maxEdge);\n\n Set<Edge> pathCopy = null;\n boolean firstEdge = true;\n for (final Edge edge : parentEdges) {\n\n if (Objects.equals(edge.getMaxDistanceToMe(), maxEdge)) {\n\n LOG.trace(\"Edge: {} maxd: {}\", edge, edge.getMaxDistanceToMe());\n\n if (firstEdge) {\n\n pathCopy = new LinkedHashSet<>(path);\n\n path.add(edge);\n LOG.trace(\"Adding edge: {}\", edge);\n firstEdge = false;\n calculateAllPaths(schedulePaths, path, edge.getOperationFrom());\n } else {\n\n final Set<Edge> newPath = new LinkedHashSet<>(pathCopy);\n LOG.trace(\"Creating new path, copying: {}\", pathCopy);\n\n newPath.add(edge);\n LOG.trace(\"New Path copy, adding edge: {}\", edge);\n calculateAllPaths(schedulePaths, newPath, edge.getOperationFrom());\n }\n }\n }\n } else {\n\n LOG.trace(\"Added new path to path set.\");\n schedulePaths.addPath(path);\n }\n\n return schedulePaths;\n }", "private void incRecursion(int amount) {\n if (amount < 0) {\n Assert.assertTrue(recursion - amount >= 0,\n amount + \" cannot be subtracted from recursion \" + recursion);\n }\n recursion += amount;\n }", "public void inOrder(){\n inOrder(root);\n }", "private Boolean isValid(MyFolder obj) {\n\t\tif (obj.getParentFolder().getAbsPath().equals(root.getAbsPath())) {\n\t\t\treturn true;\n\t\t}\n\t\tfor (MyFolder tmp : folders) {\n\t\t\tif (obj.getParentFolder().getAbsPath().equals(tmp.getAbsPath())) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public boolean isCustomersLinked(Customer fromAccount, Customer toAccount) {\n\n // Get the LinkedLoyalty for the fromAccount\n LinkedLoyalty fromLinkedLoyalty = accountBundlingUtils.getCustomerLinkedLoyalty(fromAccount.getCusMerchantNo(),fromAccount.getCusLoyaltyId());\n\n // Get the LinkedLoyalty for the toAccount\n LinkedLoyalty toLinkedLoyalty = accountBundlingUtils.getCustomerLinkedLoyalty(toAccount.getCusMerchantNo(),toAccount.getCusLoyaltyId());\n\n\n\n // If both linked loyaltys are null, none of them are child\n if ( fromLinkedLoyalty == null && toLinkedLoyalty == null ){\n\n return false;\n\n }\n\n\n // If both of thme are not null , then check if they have a common parent\n if ( fromLinkedLoyalty != null && toLinkedLoyalty != null ) {\n\n // Check if the parents for the linked loyalties are different\n if ( fromLinkedLoyalty.getLilParentCustomerNo().longValue() == toLinkedLoyalty.getLilParentCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> From and two accounts are linked and having same parent\");\n\n // return true\n return true;\n\n }\n\n }\n\n\n\n // If the fromLinkedLoyalty is not null, then kk if toACcount is parent\n if ( fromLinkedLoyalty != null ) {\n\n // Check if the from account's parent is toAccount\n if ( fromLinkedLoyalty.getLilParentCustomerNo().longValue() == toAccount.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> To account is parent of from account\");\n\n // return true\n return true;\n\n\n }\n\n }\n\n\n\n // If toLinkedLoyalty is not null, then check if the fromAccount is parent\n if ( toLinkedLoyalty != null ) {\n\n // Check if the fromAccount is parent for toAccount\n if ( toLinkedLoyalty.getLilParentCustomerNo().longValue() == fromAccount.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> From account is parent of to account\");\n\n // return true\n return true;\n\n }\n\n }\n\n\n\n // Finally return false indicating that they are not linked\n return false;\n\n }", "@SuppressWarnings(\"unused\")\n private boolean checkIds(CFANode node) {\n\n if (!visited.add(node)) {\n // already handled, do nothing\n return true;\n }\n\n for (CFANode successor : CFAUtils.successorsOf(node)) {\n checkIds(successor);\n }\n\n //node.setReversePostorderId(reversePostorderId2++);\n assert node.getReversePostorderId() == reversePostorderId2++ : \"Node \" + node + \" got \" + node.getReversePostorderId() + \", but should get \" + (reversePostorderId2-1);\n return true;\n }", "private void BajarPiezaRapido() {\n if (!Mover(piezaActual, posicionX, posicionY - 1)) {\r\n BajarPieza1posicion();\r\n }\r\n }", "private void followPath(){\r\n\t\tif(noBeepersPresent()){\r\n\t\t\twhile(frontIsClear() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tmakeMove();\r\n\t\t\t}\r\n\t\t\tif(frontIsBlocked() && leftIsBlocked() && rightIsBlocked() && noBeepersPresent()){\r\n\t\t\t\tturnAround();\r\n\t\t\t\tpaintCorner(RED);\r\n\t\t\t\tfollowPath();\r\n\t\t\t}else{\r\n\t\t\t\tcheckPaths();\r\n\t\t\t}\r\n\t\t}\r\n\t}", "private boolean checkAction() {\n if (nodes == null || nodes.length > 1) {\r\n return false;\r\n }\r\n // Emptry node name\r\n if (jtfChildName.getText().isEmpty()) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutName\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n // No parent\r\n if (nodes == null || nodes.length != 1) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutParent\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "public void inorder()\n {\n inorderRec(root);\n }", "public void inorder()\r\n {\r\n inorder(root);\r\n }", "public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}", "public boolean estaLlena() {\n return (capacidad == top+1); // regresa verdadero si la capacidad es igual al tope (la cima +1)\r\n }", "private List<Node<T>> completaCamino(Node<T> ret, List<Node<T>> camino) {\r\n\t\tboolean comp = true;// Comprobacion\r\n\t\tcamino.add(ret);// Aņadimos el nodo al camino\r\n\t\twhile (comp) {\r\n\t\t\tif (ret.getParent() != null) {// Mientras no sea la raiz\r\n\t\t\t\tcamino.add(ret.getParent(), 1);// Aņade al inicio de la lista\r\n\t\t\t\tret = ret.getParent();// Hace que el padre sea el nuevo nodo\r\n\t\t\t} else if (ret.getParent() == null) {// Si es la raiz\r\n\t\t\t\tcomp = false;// Cancela\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn camino;\r\n\t}", "public boolean estaVacia() {\n return (top == -1); // regresa verdadero si la cima es igual a -1 \r\n }", "protected void recursiveInitialize(List<JoinPath> joinPaths, Object rootObj) throws OgnlException\n {\n\n Map<String, Object> joinPathMap = new HashMap<String, Object>();\n Map<String, Object> flatIndex = new HashMap<String, Object>();\n HashMap parentMap = new HashMap();\n parentMap.put(\"alias\",\"this\");\n parentMap.put(\"joinType\", JoinType.LEFT_JOIN);\n joinPathMap.put(\"this\", parentMap);\n flatIndex.put(\"this\", parentMap);\n\n for (JoinPath joinPath : joinPaths)\n {\n if(StringUtils.isBlank(joinPath.alias))\n {\n //kalo kosong lewati\n/*\n String[] pathArray = joinPath.path.split(\"[.]\");\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = pathArray[pathArray.length - 1];\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n*/\n }\n else\n {\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = joinPath.alias;\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n }\n }\n for (JoinPath joinPath : joinPaths)\n {\n String[] pathArray = joinPath.path.split(\"[.]\");\n if(pathArray.length>1)\n {\n //gabung alias ke pathnya\n //cari parent\n Map mapParent = (Map) flatIndex.get(pathArray[0]);\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[1]);\n }\n mapParent.put(pathArray[1], mapChild);\n }\n else\n {\n //gabung alias ke pathnya\n //cari parent -- this\n Map mapParent = (Map) flatIndex.get(\"this\");\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[0]);\n }\n mapParent.put(pathArray[0], mapChild);\n }\n }\n if(cleanUp((Map<String, Object>) joinPathMap.get(\"this\")))\n {\n if (Collection.class.isAssignableFrom(rootObj.getClass()))\n {\n for (Object rootObjIter : ((Collection) rootObj))\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObjIter, true);\n }\n }\n else\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObj, false);\n }\n }\n }", "private Boolean pulouPeca(String posicao, int eixo, Casa casa, Casa destino, Tabuleiro tabuleiro) {\n \n int x = destino.x;\n int y = destino.y;\n \n if(posicao == \"reta\") {\n switch(eixo) {\n case 1:\n if(y > casa.y){ \n for(int i = casa.y + 1; i < y; i++){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) { \n return true; }\n } \n } \n if(y < casa.y){ \n for(int i = casa.y - 1; i > y; i--){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) {\n return true; }\n }\n }\n return false;\n case 2:\n if(x > casa.x){\n for(int i = casa.x + 1; i < x; i++){\n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n if(x < casa.x){\n for(int i = casa.x - 1; i > x; i--){\n \n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n return false;\n } \n \n }\n \n if(posicao == \"diagonal\") {\n \n switch(eixo) {\n case 1:\n if(x > casa.x){\n //verifica se pulou peca\n for(int j = 1; j < x - casa.x; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.x > x){\n //verifica se pulou peca\n for(int j = 1; j < casa.x - x; j++){\n if(tabuleiro.getCasa(x + j, y + j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false; \n case 2:\n if(y > casa.y){\n //verifica se pulou peca\n for(int j = 1; j < y - casa.y; j++){\n if(tabuleiro.getCasa(casa.x - j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.y > y){\n //verifica se pulou peca\n for(int j = 1; j < casa.y - y; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y - j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false;\n }\n }\n \n return false;\n }", "static boolean dfs(TreeNode root) {\n Stack<TreeNode> stack = new Stack<TreeNode>();\n stack.push(root);\n while (!stack.isEmpty()) {\n TreeNode node = (TreeNode) stack.pop();\n if (node == null)\n continue;\n\n System.out.println(\"Checking node \" + node.data);\n if (isGoal(node)) {\n System.out.println(\"\\nFound goal node \" + node.data);\n return true;\n }\n stack.addAll(node.getChildren());\n // dump(stack);\n }\n return false;\n }", "boolean hasRecursionDepth();", "public abstract boolean isNextVisited();", "@Override\n\tpublic void addRecurso(Recurso recurso) {\n\t\t\n\t}", "private void fixTree(Node node){\n while(node.parent.color == RED){\n Node uncle = nil;\n if (node.parent == node.parent.parent.left){ // parent is to the left of grandparent\n uncle = node.parent.parent.right;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****LEFT RIGHT CASE (rotate P left)**** // GB GB\n if (node == node.parent.right){ // PR ==> NR\n node = node.parent; // NR PR\n rotateLeft(node); //\n }\n \n // ****LEFT LEFT CASE (rotate G right)****\n // uncle is nil and color = BLACK, or is // GB P\n // not nil and color still is BLACK // PR ==> N G\n node.parent.color = BLACK; // NR\n node.parent.parent.color = RED;\n rotateRight(node.parent.parent);\n \n } else { //parent is to the right of grand parent\n uncle = node.parent.parent.left;\n \n if (uncle != nil && uncle.color == RED){\n // Toggle colours of parent, uncle, and grandparent.\n // Switch node with grandparent\n node.parent.color = BLACK;\n uncle.color = BLACK;\n node.parent.parent.color = RED;\n node = node.parent.parent;\n continue;\n } \n \n // ****RIGHT LEFT CASE (rotate P right)**** // GB GB\n if (node == node.parent.left){ // PR ==> NR\n node = node.parent; // NR PR\n rotateRight(node); //\n }\n \n // **** RIGHT RIGHT CASE (rotate G left) // GR PB\n node.parent.color = BLACK; // PB ==> GR NR\n node.parent.parent.color = RED; // NR\n rotateLeft(node.parent.parent);\n }\n }\n \n root.color = BLACK;\n }", "private boolean validarMezcla() {\n\t\tint grado = nodos.get(0).getGrado();\n\t\tboolean retorno = true;\n\t\tfor (Nodo n : nodos) {\n\t\t\tif (n.getGrado() != grado) {\n\t\t\t\tif (n.getGrado() < grado) {\n\t\t\t\t\tSystem.err.println(\"Error en la mezcla del grafo\");\n\t\t\t\t\tSystem.exit(4321);\n\t\t\t\t} else\n\t\t\t\t\tgrado = n.getGrado();\n\t\t\t}\n\t\t}\n\t\treturn retorno;\n\t}", "boolean isCyclic() {\n\n // if we are processing the course currently that is a cyclic graph and we can't\n // do all the courses\n if (processed) {\n return false;\n }\n\n // if we already visited the course and no cycle was found then we can return\n if (visited) {\n return true;\n }\n //else we set the course and visited\n visited = true;\n\n //we then loop through all the prerequisites performing the same check\n for (Course preCourse : pre) {\n if (preCourse.isCyclic()) {\n return true;\n }\n }\n\n //if we arrive here then we have gone through all the combinations and there is no cyclic graph\n visited = false;\n processed = true;\n return false;\n }", "protected void checkState()\n {\n if (getParentNode() != null)\n {\n throw new IllegalStateException(\n \"Node cannot be modified when added to a parent!\");\n }\n }", "public boolean checkAccessTemp(String user, String role, String obj,String op){\n\t\t\n\t\t/*Integer object = values.get(5).get(obj);\n\t\tInteger operation = values.get(3).get(op);\n\t\tInteger session = values.get(4).get(s);*/\n\t\t\n\t\tHashMap<Integer,Integer> elements = new HashMap<Integer,Integer>();\n\t\telements.put(1,values.get(1).get(user));\n\t\telements.put(2,values.get(2).get(role));\n\t\telements.put(3,values.get(3).get(op));\n\t\telements.put(5, values.get(5).get(obj));\n\n\t\t\n\t\t//elements.put(4, values.get(4).get(s));\n\t\t\n\t\tif (authGraph.dfsWalkEdges(authGraph.getRoot(), elements)) return true;\n\t\telse return false;\n\t\t\n\t\t//CHECK ACCESS MUST HANDLE THE INHERITANCE PROPERLY.........\n\t\t//MEANING IF THERE IS A SPECIAL EDGE BETWEEN TWO ROLES THEN PASS IT WITHOUT CONSUMING THE PATH VALUES....\n\t}", "public void verificar_que_se_halla_creado() {\n\t\t\n\t}", "public void inOrder() {\n inOrder(root);\n }", "private boolean recurseTree(TreeNode currentNode, TreeNode p, TreeNode q) {\n if (currentNode == null) {\n return false;\n }\n\n // Left Recursion. If left recursion returns true, set left = 1 else 0\n int left = this.recurseTree(currentNode.left, p, q) ? 1 : 0;\n\n // Right Recursion\n int right = this.recurseTree(currentNode.right, p, q) ? 1 : 0;\n\n // If the current node is one of p or q\n int mid = (currentNode == p || currentNode == q) ? 1 : 0;\n\n\n // If any two of the flags left, right or mid become True\n if (mid + left + right >= 2) {\n this.ans = currentNode;\n }\n\n // Return true if any one of the three bool values is True.\n return (mid + left + right > 0);\n }", "public boolean isSetRecursive() {\n return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID);\n }", "public boolean isSetRecursive() {\n return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID);\n }", "public boolean isSetRecursive() {\n return EncodingUtils.testBit(__isset_bitfield, __RECURSIVE_ISSET_ID);\n }", "private static boolean postOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the right child, then finally the current node\n else{\n postOrderTraversal(current.getLeftChild());\n postOrderTraversal(current.getRightChild());\n postorder.add(current);\n }\n return true;\n }", "public boolean forwardChecking(Grid board, Cell cell) { \n recursiveCalls++;\n if (endOfGrid(board)) { // if all the numbers of the board != 0\n return true;\n }\n\n DeleteQueue delQueue = new DeleteQueue(); // create delete queue\n delQueue.fcAddToDelete(cell); // fill the queue with posible variables (row, col & matrix) that must update their domain\n ArrayList<Integer> valuesCell = map.get(cell); // save the domain of the variable on which im operating\n int value = 0;\n\n for (int i = 0; i < valuesCell.size(); i++) { // for each value of the domain, I will delete the corresponding value from the domain of the variables with restrictions towards V\n value = valuesCell.get(i);\n delQueue.executeDeletion(value, map); // delete from the domains\n if (delQueue.checkForEmptyDomains(map)) { // check for empty domains\n delQueue.restoreDomains(value, map); // If any domain is empty, restore all domains\n } else {\n ArrayList<Integer> newDomain = new ArrayList<>();\n newDomain.add(value);\n map.put(cell, newDomain); // update the domain of the varible on which im operating\n board.setCell(value, cell.row, cell.col); // set the new value on the board\n if (forwardChecking(board, cell.nextCell(board))) { // recursive call\n return true;\n } else {\n delQueue.restoreDomains(value, map); // restore all domains\n map.put(cell, valuesCell); // restore the domain of the cell on which I operated\n }\n }\n }\n board.setCell(0, cell.row, cell.col); // restore original value on the board\n\n return false;\n }", "public void inorder()\n {\n inorder(root);\n }", "public void inorder()\n {\n inorder(root);\n }", "public boolean walkReturns(){\n int count = 1;\n move();\n \n while((x!=0)||(y!=0)){\n move();\n count++;\n if(count>=safeguard){\n return false;\n }\n }\n return true;\n }" ]
[ "0.60629225", "0.590342", "0.5725838", "0.5614581", "0.55730206", "0.5556717", "0.55394894", "0.5520632", "0.54822576", "0.5474694", "0.54739463", "0.5439349", "0.54322404", "0.53980714", "0.53795886", "0.5377315", "0.53687185", "0.53469735", "0.5335873", "0.5261891", "0.52576077", "0.5255897", "0.524078", "0.52367526", "0.5231285", "0.5219999", "0.51982653", "0.5198164", "0.5195615", "0.5194262", "0.51915586", "0.5181086", "0.5178116", "0.517609", "0.51682377", "0.5159793", "0.5154479", "0.5152954", "0.5148054", "0.51468027", "0.5124782", "0.5122582", "0.5090716", "0.5089069", "0.50825566", "0.50728315", "0.5057272", "0.50451046", "0.5044435", "0.5028817", "0.5020275", "0.50171775", "0.5016124", "0.5004849", "0.4998894", "0.49957192", "0.49954548", "0.49940473", "0.49902263", "0.49810895", "0.497886", "0.49770087", "0.4963892", "0.49593574", "0.49505684", "0.49472263", "0.4944826", "0.49390873", "0.49347538", "0.49299616", "0.49281433", "0.49148", "0.49143454", "0.4913575", "0.49117506", "0.4911468", "0.49114418", "0.4907344", "0.4905801", "0.48931122", "0.4888988", "0.48871619", "0.48833963", "0.48790532", "0.48739895", "0.48706645", "0.48695418", "0.48690704", "0.4866198", "0.48629043", "0.48621416", "0.48575544", "0.4853054", "0.4851764", "0.4851764", "0.4851764", "0.48480698", "0.48468444", "0.48463714", "0.48463714", "0.4843469" ]
0.0
-1
Revisar si a un proceso especifico se le pueden asignar sus recursos
private boolean chequear(int i) { for (int j = 0; j < necesarios[0].length; j++) { if (disponibles[j] < necesarios[i][j]) { return false; } } return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "boolean isRecursive();", "boolean hasRecursive();", "private static <V> boolean profPrimeroCiclos(Graph<V> pGraph, V pInicio, V vertAnterior, Set<V> pConjunto) {\n pConjunto.put(pInicio);\n List<V> adyacencias = pGraph.getAdjacentNodes(pInicio);\n for (int x = 1; x <= adyacencias.size(); x++) {\n V adyacencia = adyacencias.get(x);\n if (!adyacencia.equals(vertAnterior)) {\n if (!pConjunto.isMember(adyacencia)) {\n return profPrimeroCiclos(pGraph, adyacencia, pInicio, pConjunto);\n } else {\n return false;\n }\n }\n }\n return true;\n }", "@Override \n public boolean shouldTraverse(Traversal traversal, Exp e, Exp parent) {\n return true; \n }", "private boolean check_only_call_relatives(Element element){\n\t\tArrayList<Element> relatives = new ArrayList<Element>();\n\t\tfor(Element elem_called : element.getRefFromThis()){\n\t\t\t//if they are brothers\n\t\t\tif(element.getParentName() != null && elem_called.getParentName() != null && element.getParentName().equals(elem_called.getParentName())){\n\t\t\t\trelatives.add(elem_called);\n\t\t\t}\n\t\t\t//if they are son - father\n\t\t\tif(element.getParentName() != null && element.getParentName().equals(elem_called.getIdentifier())){\n\t\t\t\trelatives.add(elem_called);\n\t\t\t}\t\t\t\n\t\t}\n\t\tif (relatives.size() == element.getRefFromThis().size()){\n\t\t\treturn true;\n\t\t}\n\t\treturn false;\n\t}", "public boolean testTraversal() {\n if (parent == null){\n return false;\n }\n return testTraversalComponent(parent);\n }", "private boolean revisar(GrafoAristaPonderada G) {\n\n // check peso\n double pesoTotal = 0.0;\n for (Arista a : aristas()) {\n pesoTotal += a.peso();\n }\n if (Math.abs(pesoTotal - peso()) > EPSILON_PUNTO_FLOTANTE) {\n System.err.printf(\n \"Peso de la aristas no es igual a peso(): %f vs. %f\\n\",\n pesoTotal, peso());\n return false;\n }\n\n // check that it is acyclic\n UF uf = new UF(G.V());\n for (Arista e : aristas()) {\n int v = e.unVertice(), w = e.otroVertice(v);\n if (uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque\");\n return false;\n }\n uf.union(v, w);\n }\n\n // check that it is a spanning forest\n for (Arista a : G.aristas()) {\n int v = a.unVertice(), w = a.otroVertice(v);\n if (!uf.estanConectados(v, w)) {\n System.err.println(\"No es un bosque de expansion\");\n return false;\n }\n }\n\n // check that it is a minimal spanning forest (cut optimality conditions)\n for (Arista a : aristas()) {\n\n // all aristas in MST except a\n uf = new UF(G.V());\n for (Arista o : aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (o != a) uf.union(x, y);\n }\n\n // check that e is min peso edge in crossing cut\n for (Arista o : G.aristas()) {\n int x = o.unVertice(), y = o.otroVertice(x);\n if (!uf.estanConectados(x, y)) {\n if (o.peso() < a.peso()) {\n System.err.println(\"Arista \" + o + \n \" viola las condiciones de optimalidad\"\n + \"del corte\");\n return false;\n }\n }\n }\n\n }\n\n return true;\n }", "private static boolean preOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the current node, then the left child, then finally the right child\n else {\n preorder.add(current);\n preOrderTraversal(current.getLeftChild());\n preOrderTraversal(current.getRightChild());\n }\n return true;\n }", "private Boolean precond() {\r\n\t\tcalculoCantidadSacar(grupoPuestosController.getIdConcursoPuestoAgr());\r\n\t\t/**\r\n\t\t * fin incidencia 0001649\r\n\t\t */\r\n\t\tBoolean respuesta = validacionesIteracion();\r\n\t\treturn respuesta;\r\n\t}", "public boolean GO ()\r\n\t{\r\n\t\t\r\n\t\t for (GenericTreeNode<String> node : ActualNode.getChildren()) {\r\n\t\t\t if (node.getData().equalsIgnoreCase(Navigation_WHERE)){\r\n\t\t\t\t Path.add(new GenericTreeNode<String>(ActualNode));\r\n\t\t\t\t ActualNode=new GenericTreeNode<String>(node);\r\n\t\t\t return true;\r\n\t\t\t }\r\n\t }\r\n\t\t return false;\r\n\t}", "private static boolean inOrderTraversal(Node current) {\n //Break if the node is null\n if(current == null) {\n return false;\n }\n //Recursively check the left child, then the current node, then finally the right child\n else {\n inOrderTraversal(current.getLeftChild());\n inorder.add(current);\n inOrderTraversal(current.getRightChild());\n }\n return true;\n }", "boolean hasNarratorChain();", "@Override\n public boolean shouldTraverse(Traversal t, Exp e, Exp parent) {\n return true;\n }", "public boolean getForkOnTraversal();", "public void inOrderTraverseRecursive();", "public boolean alterar(GrauParentesco grauParentesco) throws Exception;", "private boolean helperDFS(Node current){\n\n if(expandedNode.size() == 999){\n //limit has been reached. jump out of recursion.\n expandedNode.add(current);\n System.out.println(\"No solution found.\");\n printExpanded(expandedNode);\n System.exit(0);\n return false;\n }\n\n boolean b = cycleCheck(current,expandedNode);\n\n if(!b){\n expandedNode.add(current);\n }else{\n return false;\n }\n\n if(current.getDigit().getDigitString().equals(goalNode.getDigit().getDigitString())){\n //goal reached.\n //expandedNode.add(current);\n solutionPath(current);\n printExpanded(expandedNode);\n System.exit(0);\n }\n\n //Now make the children.\n\n if(!forbidden.contains(current.getDigit().getDigitString())){\n\n if(current.getDigit().last_changed != 0){\n\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child first digit\n if ((Integer.parseInt(current.getDigit().getFirst_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseFirstDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(0);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 1){\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n\n //+1 child\n if ((Integer.parseInt(current.getDigit().getSecond_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseSecondDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(1);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n\n if(current.getDigit().last_changed != 2){\n if ((Integer.parseInt(current.getDigit().getThird_digit()) - 1 >= 0)) {\n Node child_node = new Node(current.getDigit().decreaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n //+1 child\n if ((Integer.parseInt(current.getDigit().getThird_digit()) + 1 <= 9)) {\n Node child_node = new Node(current.getDigit().increaseThirdDigit());\n child_node.setParent(current);\n child_node.getDigit().setLastChanged(2);\n if(!forbidden.contains(child_node.getDigit().getDigitString()) && helperDFS(child_node)){\n return true;\n }\n }\n }\n }\n return false;\n }", "public boolean isHierarchical() {\n/* 2889 */ throw new RuntimeException(\"Stub!\");\n/* */ }", "@Override\n public void paso0() {\n n = graph.getNodeIndices().indexOf(actual);\n nodo = graph.getNodes().get(n);\n nodo.setEstado(Node.State.CURRENT);\n nodo.pintarNodo(g);\n // comprueba si es objetivo\n if (nodo.getEsObjetivo()) {\n // establece el objetivo encontrado\n miObjetivo = nodo.toString();\n // termina con exito\n Step = 4;\n } else {\n // se prepara para explorar los sucesores\n m = nodo.maxSucesores();\n j = 0;\n // siguiente paso\n Step = 1;\n }\n }", "public boolean esConexo() {\n\t\tboolean result = true;\n\t\tint indice = 0;\n\t\tBusquedaEnProfundidad busqueda = new BusquedaEnProfundidad(this, 0);\n\n\t\twhile (result && indice < cantNodos) {\n\t\t\tif (!busqueda.estaVisitado(indice))\n\t\t\t\tresult = false;\n\t\t\tindice++;\n\t\t}\n\n\t\treturn result;\n\t}", "private boolean revisar(DigrafoAristaPonderada G) {\n\n // edge-weighted digraph is cyclic\n if (tieneCiclo()) {\n // verify ciclo\n AristaDirigida primero = null, ultimo = null;\n for (AristaDirigida a : ciclo()) {\n if (primero == null) primero = a;\n if (ultimo != null) {\n if (ultimo.hacia() != a.desde()) {\n System.err.printf(\n \"aristas de ciclo %s and %s no incidentes\\n\",\n ultimo, a);\n return false;\n }\n }\n ultimo = a;\n }\n\n if (ultimo.hacia() != primero.desde()) {\n System.err.printf(\n \"aristas de ciclo %s and %s no incidentes\\n\", \n ultimo, primero);\n return false;\n }\n }\n\n\n return true;\n }", "public boolean continueTraversal() \r\n\t{\r\n\treturn true;\r\n\t}", "boolean getRecursiveNull();", "boolean hasParentalStatus();", "private Node<T> LongestPathRec(Node<T> nodo, int prof, Node<T> ret) {\r\n\t\tif (nodo.getChildren() != null) {// Si tiene hijos\r\n\t\t\tprof++;// Aumenta la profundidad\r\n\t\t\tif (prof == this.getMaxDepth()) {// Si es el mas profundo\r\n\t\t\t\tret = nodo.getChildren().get(1);// Asigna ret como el mas\r\n\t\t\t\t\t\t\t\t\t\t\t\t// profundo\r\n\t\t\t\treturn ret;// Retorna\r\n\t\t\t}\r\n\t\t\tList<Node<T>> hijos = nodo.getChildren();// Hijos\r\n\t\t\tfor (int i = 1; i <= hijos.size(); i++) {\r\n\t\t\t\tret = LongestPathRec(hijos.get(i), prof, ret);// Recursividad\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t// del metodo\r\n\t\t\t}\r\n\t\t}\r\n\t\treturn ret;\r\n\t}", "private boolean sugerencia(Palabra c){\n MaxHeap<Palabra> l = dic.opcionesSuguerencias(c);\n int d =0;\n if (!l.esVacio()) {\n Palabra n = l.elimina();\n d = JOptionPane.showConfirmDialog(null, \"---Tal vez quizo decir: \\n -\"+n.toString(), \"¿?\", JOptionPane.YES_NO_OPTION);\n if (d ==0 ) {\n c.setCadena(n);\n return false;\n }else if (d == 1) {\n return true;\n }\n }\n return false;\n }", "public boolean canFinishRecursive(Map<Integer, Set<Integer>> courses, Set<Integer> prerequisite, int start, Set<Integer> visited){\n for(Integer p: prerequisite){\n if(visited.contains(p)){\n continue;\n }\n visited.add(p);\n //if you detect a circular dependency then return false since course can never be completed\n if(p.intValue() == start){\n return false;\n }\n if(courses.get(p).size() == 0){\n continue;\n }\n if(!canFinishRecursive(courses,courses.get(p), start, visited)){\n return false;\n }\n }\n return true;\n }", "boolean insertar(Nodo_B nuevo){\n if(this.primero == null){\n this.primero = nuevo;\n this.ultimo = nuevo;\n size ++;\n return true;\n }else{\n if(this.primero == this.ultimo){ // -------------------------solo hay un nodo \n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }\n }else{ // ---------------------------------------------------hay mas de un nodo\n if(nuevo.valor < this.primero.valor){\n nuevo.siguiente = this.primero;\n this.primero.anterior = nuevo;\n this.primero.izq = nuevo.der; // -----cambia los punteros a las paginas\n this.primero = nuevo;\n size++; \n return true;\n }else if(nuevo.valor > this.ultimo.valor){\n this.ultimo.siguiente = nuevo;\n nuevo.anterior = this.ultimo;\n this.ultimo.der = nuevo.izq; //------ cambia los punteros a las paginas \n this.ultimo = nuevo;\n size++; \n return true;\n }else{\n Nodo_B pivote = this.primero;\n while(pivote != null){\n if(nuevo.valor < pivote.valor){\n nuevo.siguiente = pivote;\n nuevo.anterior = pivote.anterior;\n //--------------------------- cambia los punteros a las paginas\n pivote.izq = nuevo.der;\n pivote.anterior.der = nuevo.izq;\n //-----------------------------------------------------------\n pivote.anterior.siguiente = nuevo;\n pivote.anterior = nuevo;\n size++;\n return true;\n }else if(nuevo.valor == pivote.valor){\n System.out.println (\"ya hay un destino con ese codigo registrado\");\n return false;\n }else{\n pivote = pivote.siguiente;\n }\n }\n }\n }\n }\n return false;\n }", "private void solveViolation(NodeRB<K, V> x) {\n\t\tNodeRB<K, V> uncle = x.getUncle();\n\t\tif (uncle != null && uncle.color == true) {\n\n\t\t\t// Step 1.1 Change color of parent and uncle as BLACK.\n\t\t\tx.parent.color = false;\n\t\t\tuncle.color = false;\n\n\t\t\t// Step 1.2 color of grand parent as RED.\n\t\t\tx.getGrandParent().color = true;\n\n\t\t\t// Step 1.3 Change x = x's grandparent, repeat steps 2 and 3 for new x.\n\t\t\tbalanceRBTree(x.getGrandParent());\n\n\t\t\t// Case 2: If x's uncle is BLACK, then there can be four configurations for x,\n\t\t\t// x's parent (p) and x's grandparent (g)\n\t\t} else {\n\n\t\t\t// i) Left Left Case (p is left child of g and x is left child of p)\n\t\t\tif (x.parent.isLeftChild() && x.isLeftChild()) {\n\t\t\t\tleftLeftCase(x);\n\t\t\t}\n\n\t\t\t// ii) Left Right Case (p is left child of g and x is right child of p)\n\t\t\telse if (x.parent.isLeftChild() && x.isRightChild()) {\n\t\t\t\tif (x.parent == root) {\n\t\t\t\t\troot = rotateLeft(x.parent);\n\t\t\t\t} else {\n\t\t\t\t\trotateLeft(x.parent);\n\t\t\t\t}\n\t\t\t\tleftLeftCase(x.left);\n\t\t\t}\n\n\t\t\t// iii) Right Right Case (Mirror of case i)\n\t\t\telse if (x.parent.isRightChild() && x.isRightChild()) {\n\t\t\t\trightRightCase(x);\n\t\t\t}\n\n\t\t\t// iv) Right Left Case (Mirror of case ii)\n\t\t\telse if (x.parent.isRightChild() && x.isLeftChild()) {\n\t\t\t\tif (x.parent == root) {\n\t\t\t\t\troot = rotateRight(x.parent);\n\t\t\t\t} else {\n\t\t\t\t\trotateRight(x.parent);\n\t\t\t\t}\n\t\t\t\trightRightCase(x.right);\n\t\t\t}\n\t\t}\n\t}", "protected boolean hasParentSteps(CoreOperation operation) {\n for (Expression exp : operation.getArguments()) {\n if (exp instanceof LocationPath) {\n return hasParentSteps((LocationPath) exp);\n } else if (exp instanceof CoreOperation) {\n return hasParentSteps((CoreOperation) exp);\n } else {\n logDebug(\"{} is not a location Path or a core operation to check for parent steps\", operation);\n }\n }\n return false;\n }", "public boolean augmentedPath(){\n QueueMaxHeap<GraphNode> queue = new QueueMaxHeap<>();\n graphNode[0].visited = true;//this is so nodes are not chosen again\n queue.add(graphNode[0]);\n boolean check = false;\n while(!queue.isEmpty()){//goes through and grabs each node and visits that nodes successors, will stop when reaches T or no flow left in system from S to T\n GraphNode node = queue.get();\n for(int i = 0; i < node.succ.size(); i++){//this will get all the nodes successors\n GraphNode.EdgeInfo info = node.succ.get(i);\n int id = info.to;\n if(!graphNode[id].visited && graph.flow[info.from][info.to][1] != 0){//this part just make sure it hasn't been visited and that it still has flow\n graphNode[id].visited = true;\n graphNode[id].parent = info.from;\n queue.add(graphNode[id]);\n if(id == t){//breaks here because it has found the last node\n check = true;\n setNodesToUnvisited();\n break;\n }\n }\n }\n if(check){\n break;\n }\n }\n return queue.isEmpty();\n }", "private boolean resolver(int[][] sudoku, Posicion p) {\n if (sudoku[p.getF()][p.getC()] == 0) {\r\n for (int n = 1; n <= 9; n++) {\r\n if (esValido(n, p.getF(), p.getC(), sudoku)) {\r\n sudoku[p.getF()][p.getC()] = n;\r\n if (resolver(sudoku, pSiguiente(p))) {\r\n return true;\r\n } else {\r\n sudoku[p.getF()][p.getC()] = 0;\r\n //continuamos el 'for' probando valores\r\n }\r\n }\r\n }\r\n return false;\r\n }\r\n //Si estamos ante una celda ocupada y...\r\n //si hemos llegado al final\r\n if (p.getF() == 8 && p.getC() == 8) {\r\n System.out.println(\"solucion:\");\r\n System.out.println(Arrays.deepToString(sudoku));\r\n return true;\r\n }\r\n //si no hemos llegado al final continuamos en la siguiente posicion\r\n return resolver(sudoku, pSiguiente(p));\r\n }", "private boolean isCyclicUtil(String v, Set<String> visited, String parent) {\n\t\tvisited.add(v);\n\t\tSet<String> neighbors = this.neighbors.get(v);\n\t\tfor (String n: neighbors) {\n\t\t\tif (!visited.contains(n)) {\n\t\t\t\tif (isCyclicUtil(n, visited, v)) {\n\t\t\t\t\treturn true;\n\t\t\t\t}\n\t\t\t}\n\t\t\telse if (!n.equals(parent)) {\n\t\t\t\treturn true;\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "private int resolver(int x, int y, int pasos) {\n \n \tif(visitado[x][y]){ // si ya he estado ahi vuelvo (como si fuera una pared el sitio en el que ya he estado)\n \t\treturn 0;\n \t}\n \tvisitado[x][y]=true; // marcamos el sitio como visitado y lo pintamos de azul\n \tStdDraw.setPenColor(StdDraw.BLUE);\n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \tif(x==Math.round(N/2.0)&& y== Math.round(N/2.0)){// Si estoy en la posicion central cambio encontrado y lo pongo true.\n \t\ttotal=pasos;\n \t\tencontrado=true;\n \t\treturn total;\n \t}\n \tif(encontrado)return total;\n \t\n \tdouble random = Math.random()*11;//creo un numero aleatorio\n \t\n \tif(random<3){\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);// voy pal norte y vuelvo a empezar el metodo con un paso mas\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \t}\n \tif (random >=3 && random<6){\n \t\tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \t}\n \tif(random>=6 && random<9){\n \t\tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \t}\n \tif(random >=9){\n \t\tif(!oeste[x][y])resolver(x-1,y,pasos+1);\n \tif(!norte[x][y])resolver(x,y+1,pasos+1);\n \tif(!este[x][y])resolver(x+1,y,pasos+1);\n \tif(!sur[x][y])resolver(x,y-1,pasos+1);\n \t}\n \t\n \tif(encontrado){\n \t\treturn total;\n \t}\n \tStdDraw.setPenColor(StdDraw.GRAY);// si no puedo ir a ningún lado lo pinto de gris \n \tStdDraw.filledCircle(x+0.5, y+0.5, 0.25);\n \tStdDraw.show(0);\n \treturn 0;// vuelvo al punto anterior \n \n }", "@Override\n public boolean continueExecuting()\n {\n return !this.entity.getNavigator().noPath();\n }", "private static <V> void recorridoProf(Graph<V> graph, V pInicio, Set<V> pRevisado, Graph<V> grafoNuevo) {\n grafoNuevo.addNode(pInicio);\n pRevisado.put(pInicio);\n List<V> adyacencias = graph.getAdjacentNodes(pInicio);\n for (int x = 1; x <= adyacencias.size(); x++) {\n V adyacencia = adyacencias.get(x);\n if (!pRevisado.isMember(adyacencia)) {\n recorridoProf(graph, adyacencia, pRevisado, grafoNuevo);\n }\n grafoNuevo.addEdge(pInicio, adyacencia, graph.getWeight(pInicio, adyacencia));\n }\n }", "@Override\npublic boolean fjern(T verdi) {\n Node<T> curr = hode;\n while (curr != null) {\n if (curr.verdi.equals(verdi)) {\n if (antall == 1) {\n hode = hale = null;\n } else if (curr == hode) {\n hode = hode.neste;\n hode.forrige = null;\n } else if (curr == hale) {\n hale = hale.forrige;\n hale.neste = null;\n } else {\n curr.forrige.neste = curr.neste;\n curr.neste.forrige = curr.forrige;\n }\n antall--;\n endringer++;\n return true;\n }\n curr = curr.neste;\n }\n return false;\n}", "private boolean procesoComer(int a, int b)\n {\n ArrayList<Integer> muertes;\n muertes = animales.get(a).get(b).come();\n if (muertes.get(0) > krill) {\n krill = 0;\n return false;\n } else {\n krill -= muertes.get(0);\n }\n for (int i = 1; i < muertes.size(); i++) {\n for (int j = 0; j < muertes.get(i); j++) {\n if (animales.get(i).size() > 0) {\n animales.get(i).get(0).destruir(); //Reduce en 1 la cantidad\n animales.get(i).remove(0);\n } else {\n return false;\n }\n }\n }\n return true;\n }", "boolean coreHasParent();", "void fixViolation(Node node){\n\t\tNode parentPtr = nil;\n\t\tNode grParentPtr = nil;\n\t\t\n\t\twhile( node != root && node.colour != \"Black\" && node.parent.colour == \"Red\" && node.parent.parent != nil){\n\t\t\t\n\t\t\tparentPtr = node.parent;\n\t\t\tgrParentPtr = node.parent.parent;\n\t\t\t//case A\n\t\t\t//parent of node is the left child of grandparent\n\t\t\tif(parentPtr == grParentPtr.left){\n\t\t\t\tNode unclePtr = grParentPtr.right;\n\t\t\t\t\n\t\t\t\t//case 1 \n\t\t\t\t//Uncle is red in color\n\t\t\t\tif(unclePtr != nil && unclePtr.colour == \"Red\"){\n\t\t\t\t\tgrParentPtr.colour = \"Red\";\n\t\t\t\t\tparentPtr.colour = \"Black\";\n\t\t\t\t\tunclePtr.colour = \"Black\";\n\t\t\t\t\tnode = grParentPtr;\n\t\t\t\t}else{\n\t\t\t\t\t//case 2\n\t\t\t\t\t//of node is the right child of its parent\n\t\t\t\t\tif(node == parentPtr.right){\n\t\t\t\t\t\trotateLeft(parentPtr);\n\t\t\t\t\t\tnode = parentPtr;\n\t\t\t\t\t\tparentPtr = node.parent;\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\t//case 3\n\t\t\t\t\t//node is the left child of its parent left rotation is required\n\t\t\t\t\trotateRight(grParentPtr);\n\t\t\t\t\tString temp = parentPtr.colour;\n\t\t\t\t\tparentPtr.colour = grParentPtr.colour;\n\t\t\t\t\tgrParentPtr.colour = temp;\n\t\t\t\t\tnode = parentPtr;\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\t//case B\n\t\t\t//parent of the node is the right child of grand parent\n\t\t\tif(parentPtr == grParentPtr.right){\n\t\t\t\tNode unclePtr = grParentPtr.left;\n\t\t\t\t//case 1\n\t\t\t\t//uncle pointer is red\n\t\t\t\tif(unclePtr != nil && unclePtr.colour == \"Red\"){\n\t\t\t\t\tgrParentPtr.colour = \"Red\";\n\t\t\t\t\tparentPtr.colour = \"Black\";\n\t\t\t\t\tunclePtr.colour = \"Black\";\n\t\t\t\t\tnode = grParentPtr;\n\t\t\t\t}else{\n\t\t\t\t\t//case 2\n\t\t\t\t\t//node is the left child of its parent right rotation is required\n\t\t\t\t\tif(node == parentPtr.left){\n\t\t\t\t\t\trotateRight(parentPtr);\n\t\t\t\t\t\tnode = parentPtr;\n\t\t\t\t\t\tparentPtr = node.parent;\n\t\t\t\t\t}\n\t\t\t\t\t//case 3\n\t\t\t\t\t//node is the right child of its parent left rotation is required\n\t\t\t\t\trotateLeft(grParentPtr);\n\t\t\t\t\tString temp = parentPtr.colour;\n\t\t\t\t\tparentPtr.colour = grParentPtr.colour;\n\t\t\t\t\tgrParentPtr.colour = temp;\n\t\t\t\t\tnode = parentPtr;\n\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\troot.colour = \"Black\";\n\t}", "public abstract boolean levelUp();", "private boolean validarMezcla() {\n\t\tint grado = nodos.get(0).getGrado();\n\t\tboolean retorno = true;\n\t\tfor (Nodo n : nodos) {\n\t\t\tif (n.getGrado() != grado) {\n\t\t\t\tif (n.getGrado() < grado) {\n\t\t\t\t\tSystem.err.println(\"Error en la mezcla del grafo\");\n\t\t\t\t\tSystem.exit(4321);\n\t\t\t\t} else\n\t\t\t\t\tgrado = n.getGrado();\n\t\t\t}\n\t\t}\n\t\treturn retorno;\n\t}", "@Override\n public boolean step() {\n boolean ejecutandose = true;\n switch (Step) {\n case 0:\n paso0();\n break;\n case 1:\n paso1();\n break;\n case 2:\n paso2();\n break;\n case 3:\n paso3();\n break;\n default: {\n ejecutandose = false;\n graph.NodoObjetivo = miObjetivo;\n graph.paintGrafo();\n }\n }\n return ejecutandose;\n }", "public boolean reducible() {\n if (dfsTree.back.isEmpty()) {\n return true;\n }\n int size = controlFlow.transitions.length;\n boolean[] loopEnters = dfsTree.loopEnters;\n TIntHashSet[] cycleIncomings = new TIntHashSet[size];\n // really this may be array, since dfs already ensures no duplicates\n TIntArrayList[] nonCycleIncomings = new TIntArrayList[size];\n int[] collapsedTo = new int[size];\n int[] queue = new int[size];\n int top;\n for (int i = 0; i < size; i++) {\n if (loopEnters[i]) {\n cycleIncomings[i] = new TIntHashSet();\n }\n nonCycleIncomings[i] = new TIntArrayList();\n collapsedTo[i] = i;\n }\n\n // from whom back connections\n for (Edge edge : dfsTree.back) {\n cycleIncomings[edge.to].add(edge.from);\n }\n // from whom ordinary connections\n for (Edge edge : dfsTree.nonBack) {\n nonCycleIncomings[edge.to].add(edge.from);\n }\n\n for (int w = size - 1; w >= 0 ; w--) {\n top = 0;\n // NB - it is modified later!\n TIntHashSet p = cycleIncomings[w];\n if (p == null) {\n continue;\n }\n TIntIterator iter = p.iterator();\n while (iter.hasNext()) {\n queue[top++] = iter.next();\n }\n\n while (top > 0) {\n int x = queue[--top];\n TIntArrayList incoming = nonCycleIncomings[x];\n for (int i = 0; i < incoming.size(); i++) {\n int y1 = collapsedTo[incoming.getQuick(i)];\n if (!dfsTree.isDescendant(y1, w)) {\n return false;\n }\n if (y1 != w && p.add(y1)) {\n queue[top++] = y1;\n }\n }\n }\n\n iter = p.iterator();\n while (iter.hasNext()) {\n collapsedTo[iter.next()] = w;\n }\n }\n\n return true;\n }", "@Test\n\t\tpublic void applyRecursivelyGoal() {\n\t\t\tassertSuccess(\" ;H; ;S; s ⊆ ℤ |- r∈s ↔ s\",\n\t\t\t\t\trm(\"\", ri(\"\", rm(\"2.1\", empty))));\n\t\t}", "public Boolean validarCodigoRecursoPrestamo(String codigoRecurso) {\r\n Boolean resultado = false;\r\n try {\r\n\r\n Prestamo p = new Prestamo();\r\n p.setCodigoRecurso(codigoRecurso);\r\n p.setEstado(\"Activo\");\r\n ArrayList<Prestamo> prestamo = (ArrayList<Prestamo>) prestamoDao.searchMatching(conexion.obtenerConexion(), p);\r\n Prestamo validarPrestamo = (prestamo != null && prestamo.size() > 0) ? prestamo.get(0) : null;\r\n //si no existe un recurso con ese Codigo se puede agregar\r\n resultado = validarPrestamo == null;\r\n\r\n } catch (SQLException ex) {\r\n Logger.getLogger(PrestamoBL.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n return resultado;\r\n }", "private boolean poseeSaldoAnterior() {\n boolean retorno = false;\n if(saldoAnterior !=null){\n retorno = true;\n }\n return retorno;\n }", "private ParentEntityNode cToCOwnerCheckLeveOneHavingParentOrChildren(String entityId, LosConfigDetails owner, // NOSONAR\n\t\t\tLosConfigDetails affilated, String commercialSuffix, List<String> iterationChildIds, List<String> entityIds, // NOSONAR\n\t\t\tList<ParentEntityNode> treeData, List<String> levelTwoChildIds) {// NOSONAR\n\t\tList<ParentEntityNode> levelOneData = getParentDataReverseOrder(entityIds);\n\t\tlevelOneData.stream().forEach(removeExisting -> cToCOwnerIfOwnedIsPresentChangeToOwner(entityId, owner,\n\t\t\t\ttreeData, levelTwoChildIds, removeExisting));\n\t\tif (!levelTwoChildIds.isEmpty()) {\n\t\t\tlevelTwoCToCOwnerGetComEntitySetAsAffiliated(entityId, owner, affilated, commercialSuffix, // NOSONAR\n\t\t\t\t\titerationChildIds, entityIds, treeData, levelTwoChildIds);// NOSONAR\n\t\t}\n\t\treturn entityRelationshipTreeServiceImpl.createTreeFromParent(treeData, entityId);\n\t}", "public boolean isCustomersLinked(Customer fromAccount, Customer toAccount) {\n\n // Get the LinkedLoyalty for the fromAccount\n LinkedLoyalty fromLinkedLoyalty = accountBundlingUtils.getCustomerLinkedLoyalty(fromAccount.getCusMerchantNo(),fromAccount.getCusLoyaltyId());\n\n // Get the LinkedLoyalty for the toAccount\n LinkedLoyalty toLinkedLoyalty = accountBundlingUtils.getCustomerLinkedLoyalty(toAccount.getCusMerchantNo(),toAccount.getCusLoyaltyId());\n\n\n\n // If both linked loyaltys are null, none of them are child\n if ( fromLinkedLoyalty == null && toLinkedLoyalty == null ){\n\n return false;\n\n }\n\n\n // If both of thme are not null , then check if they have a common parent\n if ( fromLinkedLoyalty != null && toLinkedLoyalty != null ) {\n\n // Check if the parents for the linked loyalties are different\n if ( fromLinkedLoyalty.getLilParentCustomerNo().longValue() == toLinkedLoyalty.getLilParentCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> From and two accounts are linked and having same parent\");\n\n // return true\n return true;\n\n }\n\n }\n\n\n\n // If the fromLinkedLoyalty is not null, then kk if toACcount is parent\n if ( fromLinkedLoyalty != null ) {\n\n // Check if the from account's parent is toAccount\n if ( fromLinkedLoyalty.getLilParentCustomerNo().longValue() == toAccount.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> To account is parent of from account\");\n\n // return true\n return true;\n\n\n }\n\n }\n\n\n\n // If toLinkedLoyalty is not null, then check if the fromAccount is parent\n if ( toLinkedLoyalty != null ) {\n\n // Check if the fromAccount is parent for toAccount\n if ( toLinkedLoyalty.getLilParentCustomerNo().longValue() == fromAccount.getCusCustomerNo().longValue() ) {\n\n // Log the information\n log.info(\"transferPoints -> isCustomersLinked -> From account is parent of to account\");\n\n // return true\n return true;\n\n }\n\n }\n\n\n\n // Finally return false indicating that they are not linked\n return false;\n\n }", "boolean isCyclic() {\n\n // if we are processing the course currently that is a cyclic graph and we can't\n // do all the courses\n if (processed) {\n return false;\n }\n\n // if we already visited the course and no cycle was found then we can return\n if (visited) {\n return true;\n }\n //else we set the course and visited\n visited = true;\n\n //we then loop through all the prerequisites performing the same check\n for (Course preCourse : pre) {\n if (preCourse.isCyclic()) {\n return true;\n }\n }\n\n //if we arrive here then we have gone through all the combinations and there is no cyclic graph\n visited = false;\n processed = true;\n return false;\n }", "private static void extendPath(Grafo g, List<Integer> caminho) {\n Integer next = null;\n for (Integer v : caminho) {\n if (g.estaConectado(v, caminho.get(caminho.size() - 1))) { //Vi\n int index = caminho.indexOf(v); //Vi+1\n int unvisited, maxEta = 0;\n for (Integer w : g.vizinhos(caminho.get(index + 1))) { //Checando se Vi+1 tem vizinhos não visitados\n if (caminho.contains(w)) {\n continue;\n }\n unvisited = 0;\n for (Integer m : g.vizinhos(w)) { //eta de w\n if (!caminho.contains(m)) {\n unvisited++;\n }\n }\n if (unvisited > maxEta) {\n next = w;\n maxEta = unvisited;\n }\n }\n if (next != null) {\n //Reorganizar o caminho\n Collections.reverse(caminho.subList(index + 1, caminho.size()));\n caminho.add(next);\n findAPath(g, caminho, null);\n extendPath(g, caminho);\n break;\n }\n }\n }\n }", "public boolean tienePrepaga() {\r\n\t\treturn obraSocial != null;\r\n\t}", "boolean hasRecursionDepth();", "@Override\r\n\tpublic boolean hasPredecessor() {\n\t\treturn false;\r\n\t}", "protected void recursiveInitialize(List<JoinPath> joinPaths, Object rootObj) throws OgnlException\n {\n\n Map<String, Object> joinPathMap = new HashMap<String, Object>();\n Map<String, Object> flatIndex = new HashMap<String, Object>();\n HashMap parentMap = new HashMap();\n parentMap.put(\"alias\",\"this\");\n parentMap.put(\"joinType\", JoinType.LEFT_JOIN);\n joinPathMap.put(\"this\", parentMap);\n flatIndex.put(\"this\", parentMap);\n\n for (JoinPath joinPath : joinPaths)\n {\n if(StringUtils.isBlank(joinPath.alias))\n {\n //kalo kosong lewati\n/*\n String[] pathArray = joinPath.path.split(\"[.]\");\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = pathArray[pathArray.length - 1];\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n*/\n }\n else\n {\n HashMap mapMember = new HashMap();\n mapMember.put(\"joinType\", joinPath.joinType);\n String key = joinPath.alias;\n if(flatIndex.get(key)!=null)//ada alias kembar tolak !!\n {\n throw new RuntimeException(\"Alias dari Join Path :\"+key+\" terdefinisi lebih dari sekali\");\n }\n flatIndex.put(key, mapMember);\n }\n }\n for (JoinPath joinPath : joinPaths)\n {\n String[] pathArray = joinPath.path.split(\"[.]\");\n if(pathArray.length>1)\n {\n //gabung alias ke pathnya\n //cari parent\n Map mapParent = (Map) flatIndex.get(pathArray[0]);\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[1]);\n }\n mapParent.put(pathArray[1], mapChild);\n }\n else\n {\n //gabung alias ke pathnya\n //cari parent -- this\n Map mapParent = (Map) flatIndex.get(\"this\");\n if(mapParent==null)\n continue;\n //cari alias child\n Map mapChild;\n //ambil dari alias dari looping atas\n if(StringUtils.isNotBlank(joinPath.alias))\n {\n mapChild = (Map) flatIndex.get(joinPath.alias);\n }\n else\n {\n mapChild = (Map) flatIndex.get(pathArray[0]);\n }\n mapParent.put(pathArray[0], mapChild);\n }\n }\n if(cleanUp((Map<String, Object>) joinPathMap.get(\"this\")))\n {\n if (Collection.class.isAssignableFrom(rootObj.getClass()))\n {\n for (Object rootObjIter : ((Collection) rootObj))\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObjIter, true);\n }\n }\n else\n {\n recursiveInitialize((Map<String, Object>) joinPathMap.get(\"this\"), rootObj, false);\n }\n }\n }", "private boolean sePuedeColorear(int indice, int color) {\n\t\tint i = 0;\n\t\tboolean sePuede = true;\n\t\tif (nodos.get(indice).getColor() != 0) // si el nodo fue coloreado\n\t\t\tsePuede = false;\n\t\twhile (i < cantNodos && sePuede) {\n\t\t\t// Si hay un nodo adyacente con ese color, no se puede colorear. Si el nodo fue\n\t\t\t// coloreado tampoco se puede.\n\t\t\tif (nodos.get(i).getColor() == color && i != indice) {\n\t\t\t\tif (esAdyacente(nodos.get(i).getNumero() - 1, nodos.get(indice).getNumero() - 1))\n\t\t\t\t\tsePuede = false;\n\t\t\t}\n\t\t\ti++;\n\t\t}\n\t\treturn sePuede;\n\t}", "public void selectParents1() {\n // Create a new parent list for this reproductive cycle. Let the garbage\n // handler dispose of the old list, if there was one.\n switch (Defines.parentAlgo) {\n case Defines.PA_RANDOM:\n this.parents = this.selectParentsRandom();\n break;\n\n case Defines.PA_ROULETTE:\n this.parents = this.selectParentsRoulette();\n break;\n\n case Defines.PA_TOURNAMENT:\n this.parents = this.selectParentsTournament();\n break;\n }\n// this.howGoodAreParents();\n }", "private void inorder() {\n inorder(root);\n }", "public boolean prestamo(){\n boolean prestado = true;\n if (cantPres < cantLibro) {\n cantPres++;\n } else {\n prestado = false;\n }\n return prestado;\n }", "protected boolean acceptForTraversal(Atom atom)\r\n {\r\n return true;\r\n }", "private static void noDirigido(TraductorGrafo grafo){\r\n\r\n\t\t// Inicializa variable booleana que almacena si el grafo es no dirigido\r\n\t\tboolean esNoDirigido = true;\r\n\r\n\t\t// Itera sobre la matriz de adyacencias del grafo verificando que paratodo i,j se cumple que\r\n\t\t// grafo[i][j] == grafo[j][i]\r\n\t\tfor(int i=0;i<grafo.grafo.length;i++){\r\n\t\t\tfor(int j=0;j<grafo.grafo.length;j++){\r\n\t\t\t\tif(grafo.grafo[i][j] != grafo.grafo[j][i]){\r\n\t\t\t\t\t// En caso de encontrar un caso para el cual no se cumple, se asigna a la variable booleana false\r\n\t\t\t\t\tesNoDirigido = false;\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\t// Verifica el estado de la variable booleana, y dependiendo de este imprime el mensaje correspondiente\r\n\t\tif(esNoDirigido){\r\n\t\t\tSystem.out.println(\"El grafo es no dirigido\");\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"El grafo es dirigido\");\r\n\t\t}\r\n\r\n\t}", "public void setForkOnTraversal(boolean forkOnTraversal);", "private void checkBalance(Node n) {\n if (n == mRoot) { // case 1: new node is root.\n n.mIsRed = false; // Paint it black.\n }\n // Case 2: Parent is black...\n else if (!n.mParent.mIsRed) {} // nothing will happen.\n // Case 3: Parent and Uncle are red.\n else if (getUncle(n).mIsRed) {\n n.mParent.mIsRed = false;\n getUncle(n).mIsRed = false; // Repaint P, U and G\n getGrandparent(n).mIsRed = true; \n checkBalance(getGrandparent(n)); // Recurse on G\n }\n // Case 4: n is LR or RL grandchild\n else if (n == getGrandparent(n).mLeft.mRight) { // n is LR\n singleRotateLeft(n.mParent); // Rotate on P\n singleRotateRight(n.mParent); // Then on G... which is now n's parent\n n.mIsRed = false; n.mRight.mIsRed = true; // Repaint G and P\n // These two lines were case 5, modified so as to not screw up.\n }\n else if (n == getGrandparent(n).mRight.mLeft) {// n is RL\n singleRotateRight(n.mParent);\n singleRotateLeft(n.mParent); // As above, reversed.\n n.mIsRed = false; n.mLeft.mIsRed = true;\n }\n // Case 5: n is LL or RR grandchild\n else if (n == getGrandparent(n).mLeft.mLeft) {// n is LL\n singleRotateRight(getGrandparent(n));\n n.mParent.mIsRed = false; // Rotate at G, repainting as above\n n.mParent.mRight.mIsRed = true;\n }\n else if (n == getGrandparent(n).mRight.mRight) { // n is RR\n singleRotateLeft(getGrandparent(n));\n n.mParent.mIsRed = false; // Same here.\n n.mParent.mLeft.mIsRed = true;\n }\n }", "public boolean hasNoParents()\r\n\t{\treturn (this.strongParents.isEmpty()) && (this.weakParents.isEmpty());\t}", "private SchedulePaths calculateAllPaths(final SchedulePaths schedulePaths, final Set<Edge> path,\n final Operation operation) {\n\n final Set<Edge> parentEdges;\n if (operation instanceof EndVertex) {\n parentEdges = ((EndVertex) operation).getEndParentEdges();\n } else {\n parentEdges = operation.getParentEdges();\n }\n\n LOG.trace(\"Checking operation J: {}, M: {}\", operation.getJob(), operation.getMachine());\n LOG.trace(\"Number of parent edges: {}\", parentEdges.size());\n\n //Runs while not root operation\n if (!parentEdges.isEmpty()) {\n\n //Gets maximum edge size\n Integer maxEdge = 0;\n for (final Edge edge : parentEdges) {\n\n if (path.contains(edge)) {\n LOG.trace(\"Detected loop\");\n LOG.trace(\"Loop parent: {}\\n From path: {}\", edge.toString(), path.toString());\n schedulePaths.setIsFeasible(false);\n schedulePaths.setNodeCausingCycle(edge);\n\n return schedulePaths;\n }\n\n LOG.trace(\"Parent of operation: J:{} M:{}\", edge.getOperationFrom().getJob(), edge.getOperationFrom()\n .getMachine());\n if (edge.getMaxDistanceToMe() > maxEdge) {\n maxEdge = edge.getMaxDistanceToMe();\n }\n }\n\n LOG.trace(\"Maximum edge is {}\", maxEdge);\n\n Set<Edge> pathCopy = null;\n boolean firstEdge = true;\n for (final Edge edge : parentEdges) {\n\n if (Objects.equals(edge.getMaxDistanceToMe(), maxEdge)) {\n\n LOG.trace(\"Edge: {} maxd: {}\", edge, edge.getMaxDistanceToMe());\n\n if (firstEdge) {\n\n pathCopy = new LinkedHashSet<>(path);\n\n path.add(edge);\n LOG.trace(\"Adding edge: {}\", edge);\n firstEdge = false;\n calculateAllPaths(schedulePaths, path, edge.getOperationFrom());\n } else {\n\n final Set<Edge> newPath = new LinkedHashSet<>(pathCopy);\n LOG.trace(\"Creating new path, copying: {}\", pathCopy);\n\n newPath.add(edge);\n LOG.trace(\"New Path copy, adding edge: {}\", edge);\n calculateAllPaths(schedulePaths, newPath, edge.getOperationFrom());\n }\n }\n }\n } else {\n\n LOG.trace(\"Added new path to path set.\");\n schedulePaths.addPath(path);\n }\n\n return schedulePaths;\n }", "public boolean esHoja(Nodo hoja){\r\n\t\tif ((hoja.getLeft()==null)&&(hoja.getRight()==null))\r\n\t\t\treturn true;\r\n\t\telse\r\n\t\t\treturn false;\r\n\t}", "private static void checkRecurse(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1258 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1259 */ throw new XMLSchemaException(\"rcase-Recurse.1\", new Object[] {\n/* 1260 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1261 */ Integer.toString(max1), \n/* 1262 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1263 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1266 */ int count1 = dChildren.size();\n/* 1267 */ int count2 = bChildren.size();\n/* */ \n/* 1269 */ int current = 0;\n/* 1270 */ for (int i = 0; i < count1; i++) {\n/* */ \n/* 1272 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* 1273 */ int k = current; while (true) { if (k < count2) {\n/* 1274 */ XSParticleDecl particle2 = bChildren.elementAt(k);\n/* 1275 */ current++;\n/* */ try {\n/* 1277 */ particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler);\n/* */ \n/* */ break;\n/* 1280 */ } catch (XMLSchemaException e) {\n/* 1281 */ if (!particle2.emptiable())\n/* 1282 */ throw new XMLSchemaException(\"rcase-Recurse.2\", null); \n/* */ } k++; continue;\n/* */ } \n/* 1285 */ throw new XMLSchemaException(\"rcase-Recurse.2\", null); }\n/* */ \n/* */ } \n/* */ \n/* 1289 */ for (int j = current; j < count2; j++) {\n/* 1290 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* 1291 */ if (!particle2.emptiable()) {\n/* 1292 */ throw new XMLSchemaException(\"rcase-Recurse.2\", null);\n/* */ }\n/* */ } \n/* */ }", "private void propagatePathImprovements(Node p) {\n\t\tfor (Node c : p.kids) {\n\t\t\tif(p.g + arcCost(p, c) < c.g){\n\t\t\t\tc.parent = p;\n\t\t\t\tc.g = p.g + arcCost(p, c);\n\t\t\t\tc.f = c.g + c.h;\n\t\t\t\tpropagatePathImprovements(c);\n\t\t\t}\n\t\t\t\n\t\t}\n\t\t\n\t}", "private boolean shouldReplanPath(State.StateView state, History.HistoryView history, Stack<MapLocation> currentPath)\n {\n \t\t/* TODO: Write this method\n \t\t * Check if the path is blocked every step or check if the next spot is blocked?\n \t\t * Does enemy attack if you get too close?\n \t\t */\n \t\n \t\n \t\t//checking if the next step is blocked\n \t\t//setting up local fields\n \t\tUnitView enemy = state.getUnit(enemyFootmanID);\n \t\tMapLocation next;\n \t\tif (!path.isEmpty()) {\n \t\t\tnext = path.peek();\n \t\t\n \t\t\tif(next.x == enemy.getXPosition() && next.y == enemy.getYPosition()) \n \t\t\t\treturn true;\n \t\t\t\n \t\t}\n \t\t\n return false;\n }", "private static void backtrackHelper(TreeNode current, int targetSum, List<TreeNode> path, List<List<Integer>> allPaths){\n if(current.left == null && current.right == null){\n if(targetSum == current.val){\n List<Integer> tempResultList = new ArrayList<>();\n // for(TreeNode node: path){\n // tempResultList.add(node.val);\n // }\n tempResultList.addAll(path.stream().mapToInt(o -> o.val).boxed().collect(Collectors.toList()));\n tempResultList.add(current.val);\n\n allPaths.add(tempResultList); // avoid reference puzzle\n }\n return;\n }\n\n // loop-recursion (Here only 2 choices, so we donot need loop)\n if(current.left != null){\n path.add(current);\n backtrackHelper(current.left, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n\n if(current.right != null){\n path.add(current);\n backtrackHelper(current.right, targetSum - current.val, path, allPaths);\n path.remove(current);\n }\n }", "private void inorder() {\r\n\t\t\tinorder(root);\r\n\t\t}", "public boolean attivaPulsanteProsegui(){\n\t\tif(!model.isSonoInAggiornamentoIncasso()){\n\t\t\tif(null!=model.getGestioneOrdinativoStep1Model().getOrdinativo() && model.getGestioneOrdinativoStep1Model().getOrdinativo().isFlagCopertura() && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso()!= null && model.getGestioneOrdinativoStep2Model().getListaSubOrdinativiIncasso().size()>0){\n\t\t\t return true;\t\n\t\t\t}else{\n\t\t\t\treturn false;\n\t\t\t}\n\t\t}else{\n\t\t\treturn false;\n\t\t}\n\t\t\n\t}", "private boolean isRemovableDecInReachableParents(Node decision, Node valueNode) {\n NodeList reachableParents;\n boolean removable = true;\n\n if (valueNode.getKindOfNode() == Node.UTILITY) {\n //Utility nodes hasn't got any children, so the decision isn't removable\n //in its parents.\n removable = false;\n } else {\n //It must be able to remove the decision in all the reachable parents.\n reachableParents = getReachableParents(decision, valueNode);\n removable = true;\n for (int i = 0; (i < reachableParents.size()) && removable; i++) {\n removable = (isRemovableDecInValueNode(decision, reachableParents.elementAt(i)));\n }\n }\n\n return removable;\n }", "public boolean possuiMonopolioEmAlgumGrupoDeCores(){\r\n verificaMonopolioDePropriedades();\r\n return this.monopolioNoGrupoDeCor.size() > 0;\r\n }", "public void fixViolationDelete(Node node){ \n\t\t\n\t while(node!=root && node.colour==\"Black\"){\n\t if(node==node.parent.left){\n\t \t//if the node is the left child and sibling is in the right\n\t Node sibling=node.parent.right;\n\t //check if the color of sibling is red then exchange the color with parent and rotate left \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateLeft(node.parent);\n\t sibling=node.parent.right;\n\t }\n\t if(sibling.left.colour==\"Black\" && sibling.right.colour ==\"Black\"){\n\t \t//if both the children of sibling are black, change the color of the sibling and transfer the problem up the parent\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }\n\t else{ \n\t if(sibling.right.colour==\"Black\"){\n\t \t//if the left child of the sibling in red exchange the color of the sibling's child with sibling and color the child black\n\t \t// and rotate right\n\t \tsibling.left.colour = \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateRight(sibling);\n\t sibling=node.parent.right;\n\t }\n\t //followed my the left rotation\n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.right.colour = \"Black\";\n\t rotateLeft(node.parent);\n\t node=root;\n\t }\n\t }\n\t else{\n\t \t//node is the right child of the parent and sibling is the left child\n\t Node sibling=node.parent.left;\n\t \n\t if(sibling.colour == \"Red\"){\n\t \tsibling.colour = \"Black\";\n\t node.parent.colour = \"Red\";\n\t rotateRight(node.parent);\n\t sibling=node.parent.left;\n\t }\n\t \n\t if(sibling.right.colour==\"Black\" && sibling.left.colour==\"Black\"){\n\t \tsibling.colour = \"Red\";\n\t node=node.parent;\n\t }else{\n\t if(sibling.left.colour==\"Black\"){\n\t \tsibling.right.colour= \"Black\";\n\t \tsibling.colour = \"Red\";\n\t rotateLeft(sibling);\n\t sibling=node.parent.left;\n\t }\n\t \n\t sibling.colour = node.parent.colour;\n\t node.parent.colour = \"Black\";\n\t sibling.left.colour = \"Black\";\n\t rotateRight(node.parent);\n\t node=root;\n\t }\n\t }\n\t }\n\t //we color the node black\n\t node.colour = \"Black\";\n\t}", "private static void checkRecurseLax(Vector<XSParticleDecl> dChildren, int min1, int max1, SubstitutionGroupHandler dSGHandler, Vector<XSParticleDecl> bChildren, int min2, int max2, SubstitutionGroupHandler bSGHandler) throws XMLSchemaException {\n/* 1357 */ if (!checkOccurrenceRange(min1, max1, min2, max2)) {\n/* 1358 */ throw new XMLSchemaException(\"rcase-RecurseLax.1\", new Object[] {\n/* 1359 */ Integer.toString(min1), (max1 == -1) ? \"unbounded\" : \n/* 1360 */ Integer.toString(max1), \n/* 1361 */ Integer.toString(min2), (max2 == -1) ? \"unbounded\" : \n/* 1362 */ Integer.toString(max2)\n/* */ });\n/* */ }\n/* 1365 */ int count1 = dChildren.size();\n/* 1366 */ int count2 = bChildren.size();\n/* */ \n/* 1368 */ int current = 0;\n/* 1369 */ for (int i = 0; i < count1; i++) {\n/* */ \n/* 1371 */ XSParticleDecl particle1 = dChildren.elementAt(i);\n/* 1372 */ int j = current; while (true) { if (j < count2) {\n/* 1373 */ XSParticleDecl particle2 = bChildren.elementAt(j);\n/* 1374 */ current++;\n/* */ \n/* */ \n/* */ try {\n/* 1378 */ if (particleValidRestriction(particle1, dSGHandler, particle2, bSGHandler)) {\n/* 1379 */ current--;\n/* */ }\n/* */ break;\n/* 1382 */ } catch (XMLSchemaException xMLSchemaException) {}\n/* */ j++;\n/* */ continue;\n/* */ } \n/* 1386 */ throw new XMLSchemaException(\"rcase-RecurseLax.2\", null); }\n/* */ \n/* */ } \n/* */ }", "private boolean checkAction() {\n if (nodes == null || nodes.length > 1) {\r\n return false;\r\n }\r\n // No parent\r\n if (nodes == null || nodes.length != 1) {\r\n JOptionPane.showMessageDialog(JZVNode.this, bundle\r\n .getString(\"dlg.error.updateWithoutParent\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "private void generaProcesoCoactivo(List<ObligacionCoactivoDTO> obligaciones, ConfiguracionCoactivoDTO configuracion)\n throws CirculemosNegocioException {\n\n if (obligaciones != null && !obligaciones.isEmpty() && configuracion != null) {\n\n // Crea proceso coactivo\n ProcesoDTO procesoDTO = registrarProcesoCoactivo();\n\n // Crea Participantes\n PersonaDTO persona = iRFachadaAdminNegocio\n .consultarPersona(obligaciones.get(0).getCoactivo().getPersona().getId());\n registrarParticipante(persona, procesoDTO);\n\n // Se crea el coactivo\n Coactivo coactivo = registrarCoactivo(obligaciones, procesoDTO, configuracion);\n\n // Se crean las obligaciones\n registrarObligaciones(obligaciones, coactivo, procesoDTO);\n\n // Actualizacion de estado a mandamiento de pago\n TrazabilidadProcesoDTO trazabilidadMandamiento = iRFachadaProceso\n .actualizarEstadoProceso(procesoDTO.getId(), EnumEstadoProceso.ECUADOR_COACTIVO_MANDAMIENTO, false);\n try {\n em.flush();\n\n boolean financiacionIncumplida = false;\n for (ObligacionCoactivoDTO obligacionCoactivoDTO : obligaciones) {\n financiacionIncumplida = validarProcesoFianciacionIncumplido(\n obligacionCoactivoDTO.getNumeroObligacion());\n if (financiacionIncumplida) {\n financiacionIncumplida = true;\n break;\n }\n }\n\n if (financiacionIncumplida) {\n // TODO genera auto de pago especial\n } else {\n // Genera documento apertura\n if (validarDireccionPersona(persona)) {\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.AUTO_PAGO, trazabilidadMandamiento,\n coactivo, EnumTipoDocumentoProceso.COACTIVO_AUTO_PAGO, null);\n } else {\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.AUTO_PAGO_SIN_DIRECCION,\n trazabilidadMandamiento, coactivo,\n EnumTipoDocumentoProceso.COACTIVO_AUTO_PAGO_SIN_DIRECCION, null);\n }\n }\n\n // Genera documento posesion\n registrarDocumentoCoactivo(EnumTipoDocumentoGenerado.ACTA_DE_POSESION, trazabilidadMandamiento,\n coactivo, EnumTipoDocumentoProceso.COACTIVO_ACTA_DE_POSESION, null);\n\n } catch (CirculemosAlertaException e) {\n logger.error(\"Error en generación de documentos de mandamiento de pago\", e);\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002001);\n }\n\n // Verifica si se debe generar los documentos con el siguiente parametro : 225 Generar documentos de notificacion\n generarNotificacion(procesoDTO, coactivo);\n\n // Generacion de oficio de solicitud de bienes\n generarSolicitudBien(configuracion, procesoDTO, coactivo);\n\n // Valida si debe registrar el coactivo en axis\n registrarCoactivoAxis(coactivo, persona);\n\n } else {\n throw new CirculemosNegocioException(ErrorCoactivo.GenerarCoactivo.COAC_002002);\n }\n }", "public void inOrder(){\n inOrder(root);\n }", "@Override\n public boolean reconocer(LexicAnalyzer lexic, TokensVisitor visitor, SintacticAnalyzer sintactic, ClaseNodo arbolH, ArbolHandler arbolS,\n TablaDeSimbolos tablaH) {\n boolean valida;\n\n ArbolHandler arbolSp = new ArbolHandler();\n valida = producciones.get(0).reconocer(lexic, visitor, sintactic, arbolH, arbolSp, tablaH);\n if (valida) {\n ArbolHandler arbolSp2 = new ArbolHandler();\n valida = producciones.get(1).reconocer(lexic, visitor, sintactic, arbolSp.getArbol(), arbolSp2, tablaH);\n arbolS.setArbol(arbolSp2.getArbol());\n }\n return valida;\n }", "@Override\n public boolean shouldContinueSwitchedRootFound() {\n return false;\n }", "@Override\n protected void checkPolicyRefChain(final TopLevelPolicyElementEvaluator nonNullRefResultPolicy, final EvaluationContext evalCtx, final Optional<EvaluationContext> mdpCtx)\n {\n }", "boolean hasParent();", "boolean hasParent();", "private boolean checkAction() {\n if (nodes == null || nodes.length > 1) {\r\n return false;\r\n }\r\n // Emptry node name\r\n if (jtfChildName.getText().isEmpty()) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutName\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n // No parent\r\n if (nodes == null || nodes.length != 1) {\r\n JOptionPane.showMessageDialog(JZVNode.this,\r\n bundle.getString(\"dlg.error.addWithoutParent\"),\r\n bundle.getString(\"dlg.error.title\"),\r\n JOptionPane.ERROR_MESSAGE);\r\n return false;\r\n }\r\n return true;\r\n }", "private boolean dfs(int n, int[] P) { // 0 is empty, 1 is false, 2 is true\n if (P[n] != 0) {\n if (P[n] == 1) {\n return false;\n }\n else {\n return true;\n }\n }\n\n if (n == 1) {\n P[1] = 2;\n //return true;\n }\n else if (n == 2) {\n P[2] = 2;\n //return true;\n }\n else if (n == 3) {\n P[3] = 1;\n //return false;\n }\n else {\n boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n P[n] = res ? 2 : 1;\n }\n\n return P[n] == 2;\n\n //P[n] = P[n-2] + P[n-3] == 4 || P[n-3] + P[n-4] == 4 ? 2 : 1;\n //boolean res = dfs(n-2, P) && dfs(n-3, P) || dfs(n-3, P) && dfs(n-4, P);\n //P[n] = res ? 2 : 1;\n //return res;\n }", "private Boolean pulouPeca(String posicao, int eixo, Casa casa, Casa destino, Tabuleiro tabuleiro) {\n \n int x = destino.x;\n int y = destino.y;\n \n if(posicao == \"reta\") {\n switch(eixo) {\n case 1:\n if(y > casa.y){ \n for(int i = casa.y + 1; i < y; i++){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) { \n return true; }\n } \n } \n if(y < casa.y){ \n for(int i = casa.y - 1; i > y; i--){ \n if (tabuleiro.getCasa(casa.x, i).getPeca() instanceof Peca ) {\n return true; }\n }\n }\n return false;\n case 2:\n if(x > casa.x){\n for(int i = casa.x + 1; i < x; i++){\n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n if(x < casa.x){\n for(int i = casa.x - 1; i > x; i--){\n \n if (tabuleiro.getCasa(i, casa.y).getPeca() instanceof Peca ) {\n return true; }\n } \n }\n return false;\n } \n \n }\n \n if(posicao == \"diagonal\") {\n \n switch(eixo) {\n case 1:\n if(x > casa.x){\n //verifica se pulou peca\n for(int j = 1; j < x - casa.x; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.x > x){\n //verifica se pulou peca\n for(int j = 1; j < casa.x - x; j++){\n if(tabuleiro.getCasa(x + j, y + j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false; \n case 2:\n if(y > casa.y){\n //verifica se pulou peca\n for(int j = 1; j < y - casa.y; j++){\n if(tabuleiro.getCasa(casa.x - j, casa.y + j).getPeca() instanceof Peca){\n return true;\n }\n }\n }\n if(casa.y > y){\n //verifica se pulou peca\n for(int j = 1; j < casa.y - y; j++){\n if(tabuleiro.getCasa(casa.x + j, casa.y - j).getPeca() instanceof Peca){\n return true;\n }\n } \n }\n return false;\n }\n }\n \n return false;\n }", "private boolean existePrise(Couleur couleurJoueur) {\n\t\tif (deplacementMax(couleurJoueur) > 2) {\n\t\t\treturn true;\n\t\t}\n\t\tDeplacement deplacementCourant;\n\t\tfor(int i = 0; i < Constantes.N; i++) {\n\t\t\tfor(int j = 0; j < Constantes.N; j++) {\n\t\t\t\tPosition pos = new Position(i, j);\n\t\t\t\tif((obtenirPion(pos) != null) && obtenirPion(pos).aMemeCouleur(couleurJoueur)) {\n\t\t\t\t\tdeplacementCourant = new Deplacement();\n\t\t\t\t\tdeplacementCourant.add(pos);\n\t\t\t\t\tfor(int ii = 0; ii < Constantes.N; ii++) {\n\t\t\t\t\t\tfor(int jj = 0; jj < Constantes.N; jj++) {\n\t\t\t\t\t\t\tdeplacementCourant.add(new Position(ii, jj));\n\t\t\t\t\t\t\tif(estValide(deplacementCourant, couleurJoueur) && estPrise(deplacementCourant, couleurJoueur)) {\n\t\t\t\t\t\t\t\treturn true;\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\tdeplacementCourant.remove(1);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\treturn false;\n\t}", "public void inOrder() {\r\n \r\n // call the private inOrder method with the root\r\n inOrder(root);\r\n }", "public abstract boolean isNextVisited();", "public boolean excluir(GrauParentesco grauParentesco) throws Exception;", "public static void test13() {\n\t\tTreeNodeP n1 =new TreeNodeP(1);\n\t\tTreeNodeP n2 =new TreeNodeP(2);\n\t\tTreeNodeP n3 =new TreeNodeP(3);\n\t\tTreeNodeP n4 =new TreeNodeP(4);\n\t\tTreeNodeP n5 =new TreeNodeP(5);\n\t\tTreeNodeP n6 =new TreeNodeP(6);\n\t\tTreeNodeP n7 =new TreeNodeP(7);\n\t\tTreeNodeP n8 =new TreeNodeP(8);\n\t\t\n\t\tn1.left = n2;\n\t\tn1.right = n3;\n\t\t\n\t\tn2.left = n4;\n\t\tn2.right = n5;\n\t\t\n\t\tn3.left = n6; \n\t\tn3.right = n7;\n\t\t\n\t\tn4.left = n8;\n\t\t\n\t\tn2.parent = n1;\n\t\tn3.parent = n1;\n\t\t\n\t\tn4.parent = n2;\n\t\tn5.parent = n2;\n\t\t\n\t\tn6.parent = n3;\n\t\tn7.parent = n3;\n\t\t\n\t\tn8.parent = n4;\n\t\t\n\t\tTreeNodeP n9 = new TreeNodeP(9);\n\t\tTreeNodeP lca = task13_LCA(n1, n7);\n\t\tif (lca != null) {\n\t\t\tSystem.out.println(\"lca.value = \" + lca.val);\n\t\t} else {\n\t\t\tSystem.out.println(\"LCA is null\");\n\t\t}\n\t\t\n\t}", "boolean ePrimo(int n) {\n \n if (n < 2) {\n return false;\n }\n \n \n // Guarda o numero de divisores de n. Inicialmente eh 1. Todos os numeros\n // sao divisiveis por 1\n \n int numeroDeDivisores = 1;\n \n // O primeiro candidato a divisor nao trivial eh 2.\n \n int candidatoADivisor = 2;\n \n // Testa a divisao por todos os numeros menores ou iguais a n/2 ou ate \n // encontrar o primeiro divisor.\n \n while((candidatoADivisor <= Math.sqrt(n)) && (numeroDeDivisores == 1)) {\n if (n % candidatoADivisor == 0) {\n // o resto da divisao eh zero. Logo, candidatoADivisor eh um divisor de n. \n // Por isso, que o numero de divisores eh incrementado em 1.\n numeroDeDivisores = numeroDeDivisores + 1;\n }\n candidatoADivisor = candidatoADivisor + 1;\n }\n \n if (numeroDeDivisores == 1) {\n return true;\n }\n else {\n return false;\n }\n }", "public boolean SiguienteBodega(){\n if(!lista_inicializada){\n Nodo_bodega_actual = Nodo_bodega_inicial;\n lista_inicializada = true;\n if(Size>0){\n return true;\n }\n }\n \n if(Size > 1 ){\n if(Nodo_bodega_actual.obtenerSiguiente()!= null){\n Nodo_bodega_actual = Nodo_bodega_actual.obtenerSiguiente();\n return true;\n } \n }\n return false;\n }", "public abstract boolean impliesWithoutTreePathCheck(Permission permission);", "public TreeStructure<String> optimiseTree() throws IllegalAccessException {\n\n canonicalTree.createStack(canonicalTree.getRootNode());\n TreeStructure.Node<String> popNode;\n TreeStructure.Node<String> whereNodeToDelete = null;\n Stack<TreeStructure.Node<String>> stack = canonicalTree.getStack();\n Stack<TreeStructure.Node<String>> optimizationStack = new Stack<>();\n\n boolean conditionAlready;\n while (!stack.empty()) {\n popNode = stack.pop();\n switch (popNode.getNodeStatus()) {\n case RELATION_NODE_STATUS:{\n conditionAlready = false;\n /*if there is a condition associated with that relation then call the method. and set set conditionAlready to TRue so that\n if a node is associated with more than one conditions all the associated conditions will be added to it's parent node.\n after every iteration of the loop the popNode is becoming the node that holds the condition if any so need to make pop node to hold the\n relation node again (if node has a child node-> avoid exception)!!!*/\n while(optimizedWhere.containsValue(new LinkedList<>(Collections.singleton(popNode.getData())))) {\n conditionAlready = relationNodeAction(popNode, conditionAlready);\n if(popNode.getChildren().size() == 1) popNode = popNode.getChildren().get(0);\n }\n associatedRelations = new LinkedList<>();\n break;\n }\n case CARTESIAN_NODE_STATUS: {\n\n cartesianNodeAction(popNode,(Stack<TreeStructure.Node<String>>) optimizationStack.clone());\n cartesianNodesIncludeCond(popNode);\n associatedRelations = new LinkedList<>();\n }\n case WHERE_NODE_STATUS:{\n whereNodeToDelete = popNode;\n break;\n }\n }\n optimizationStack.push(popNode);\n }\n //Delete node that holds the condition if any from the initial tree\n if(whereNodeToDelete!=null){\n /*The condition node will be removed so the root node level must become the condition node's level\n *Make the root node the parent of its child node so the whole tree won't be deleted when the node is deleted*/\n canonicalTree.getRootNode().setNodeLevel(whereNodeToDelete.getNodeLevel());\n whereNodeToDelete.getChildren().get(0).setParentNode(whereNodeToDelete.getParentNode());\n canonicalTree.deleteNode(whereNodeToDelete);\n }\n convertCartesianToJoin();\n\n\n return canonicalTree;\n }", "public void carroNoAgregado(){\n System.out.println(\"No hay un parqueo para su automovil\");\n }", "private void sacaOperadores(Stack PilaNumeros, Stack PilaOperadores, String operador) {\n //Todas las funciones que se manejan como paréntesis de apertura\n final String parentesis = \"( ln log abs sen sin cos tan sec csc cot sgn asen asin acos \"\n + \"atan asec acsc acot senh sinh cosh tanh sech csch coth \"\n + \"sqrt round asenh asinh acosh atanh asech acsch acoth\";\n\n //mientras la pila no esté vacía, el operador que sigue no sea un \n //paréntesis de apertura, la longitud del operador sea uno (para que sea un operador), y la prioridad indique\n //que tiene que seguir sacando elementos\n while (!PilaOperadores.empty() && !parentesis.contains((String) PilaOperadores.peek())\n && ((String) PilaOperadores.peek()).length() == 1\n && prioridad(((String) PilaOperadores.peek()).charAt(0)) >= prioridad(operador.charAt(0))) {\n sacaOperador(PilaNumeros, PilaOperadores); //Saca el siguiente operador\n }\n PilaOperadores.push(operador);//Al final mete el nuevo operador luego de sacar todo lo que tenía que sacar.\n }", "public boolean comprobarLibrosPrestados(Estudiante estudiante){\n try{\n return estudiante.getPrestamosActuales().size() == 3;\n }\n catch(NullPointerException e){\n return false;\n } \n }", "public void agregarNodo(Nodo nuevo){\n agregarNodoRec(root, nuevo);//la primera vez inicia en la raiz \n }", "public void checaColision() {\n //Si el proyectil colisiona con la barra entonces..\n if (objBarra.colisiona(objProyectil)) {\n //Guardo el centro x del proyectil para no facilitar su comparacion\n int iCentroProyectil = objProyectil.getX()\n + objProyectil.getAncho() / 2;\n //Si el nivel de Y del lado inferior del proyectil es el mismo que\n //el nivel de Y del lado superior de la barra...\n if (objProyectil.getY() + objProyectil.getAlto()\n >= objBarra.getY()) {\n //Dividimos el ancho de la barra en 2 secciones que otorgan \n //diferente velocidad dependiendo que seccion toque el proyectil\n //Si el centro del proyectil toca la primera parte de la \n //barra o el lado izquierdo del proyectil esta mas a la \n //izquierda que el lado izquierdo de la barra...\n if ((iCentroProyectil > objBarra.getX() && iCentroProyectil\n < objBarra.getX() + objBarra.getAncho() / 2)\n || (objProyectil.getX() < objBarra.getX())) {\n bDireccionX = false; // arriba\n bDireccionY = false; // izquierda\n } //Si el centro del proyectil toca la ultima parte de la barra o\n //el lado derecho del proyectil esta mas a la derecha que el \n //lado derecho de la barra\n else if ((iCentroProyectil > objBarra.getX()\n + (objBarra.getAncho() / 2) && iCentroProyectil\n < objBarra.getX() + (objBarra.getAncho()\n - objBarra.getAncho() / 18)) || (objProyectil.getX()\n + objProyectil.getAncho() > objBarra.getX()\n + objBarra.getAncho())) {\n bDireccionX = true; // arriba\n bDireccionY = false; // derecha\n }\n }\n\n }\n for (Object objeBloque : lnkBloques) {\n Objeto objBloque = (Objeto) objeBloque;\n //Checa si la barra choca con los bloques (Choca con el poder)\n if(objBarra.colisiona(objBloque)) {\n bPoderes[objBloque.getPoder()] = true;\n }\n // Checa si el proyectil choca contra los bloques\n if (objBloque.colisiona(objProyectil)) {\n iScore++; // Se aumenta en 1 el score\n iNumBloques--; //Se resta el numero de bloques\n //Se activa el bloque con el poder para que se mueva para abajo\n if (objBloque.getPoder() != 0) {\n URL urlImagenPoder\n = this.getClass().getResource(\"metanfeta.png\");\n objBloque.setImagen(Toolkit.getDefaultToolkit()\n .getImage(urlImagenPoder));\n objBloque.setVelocidad(2);\n bAvanzaBloque = true;\n }\n if(objProyectil.colisiona(objBloque.getX(), \n objBloque.getY()) ||\n objProyectil.colisiona(objBloque.getX(), \n objBloque.getY()+objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionX = false; //va hacia arriba\n }\n if(objProyectil.colisiona(objBloque.getX()+objBloque.getAncho(), \n objBloque.getY()) ||\n objProyectil.colisiona(objBloque.getX()+objBloque.getAncho(), \n objBloque.getY()+objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionX = true; //va hacia arriba\n }\n //Si la parte superior de proyectil es mayor o igual a la parte\n //inferior del bloque(esta golpeando por abajo del bloque...\n if((objProyectil.getY() <= objBloque.getY() \n + objBloque.getAlto()) && (objProyectil.getY() \n + objProyectil.getAlto() > objBloque.getY() \n + objBloque.getAlto())) {\n objBloque.setX(getWidth() + 50);\n bDireccionY = true; //va hacia abajo\n \n \n }\n //parte inferior del proyectil es menor o igual a la de la parte\n //superior del bloque(esta golpeando por arriba)...\n else if(( objProyectil.getY() + objProyectil.getAlto()\n >= objBloque.getY())&&( objProyectil.getY() \n < objBloque.getY())) {\n objBloque.setX(getWidth() + 50);\n bDireccionY = false; //va hacia arriba\n }\n //Si esta golpeando por algun otro lugar (los lados)...\n else {\n objBloque.setX(getWidth()+50);\n bDireccionX = !bDireccionX;\n }\n }\n }\n //Si la barra choca con el lado izquierdo...\n if (objBarra.getX() < 0) {\n objBarra.setX(0); //Se posiciona al principio antes de salir\n } //Si toca el lado derecho del Jframe...\n else if (objBarra.getX() + objBarra.getAncho() - objBarra.getAncho() / 18\n > getWidth()) {\n objBarra.setX(getWidth() - objBarra.getAncho() + objBarra.getAncho()\n / 18);// Se posiciciona al final antes de salir\n }\n //Si el Proyectil choca con cualquier limite de los lados...\n if (objProyectil.getX() < 0 || objProyectil.getX()\n + objProyectil.getAncho() > getWidth()) {\n //Cambias su direccion al contrario\n bDireccionX = !bDireccionX;\n } //Si el Proyectil choca con la parte superior del Jframe...\n else if (objProyectil.getY() < 0) {\n //Cambias su direccion al contrario\n bDireccionY = !bDireccionY;\n } //Si el proyectil toca el fondo del Jframe...\n else if (objProyectil.getY() + objProyectil.getAlto() > getHeight()) {\n iVidas--; //Se resta una vida.\n // se posiciona el proyectil en el centro arriba de barra\n objProyectil.reposiciona((objBarra.getX() + objBarra.getAncho() / 2\n - (objProyectil.getAncho() / 2)), (objBarra.getY()\n - objProyectil.getAlto()));\n }\n }" ]
[ "0.603195", "0.59468275", "0.57273185", "0.57203543", "0.56984246", "0.567499", "0.5517996", "0.5509834", "0.548751", "0.5477361", "0.54735106", "0.5463974", "0.5444439", "0.54309845", "0.5413537", "0.53949606", "0.5384747", "0.538311", "0.5352562", "0.53206444", "0.531765", "0.5286191", "0.52599156", "0.52141446", "0.5213508", "0.520274", "0.5189864", "0.5184672", "0.51797426", "0.51795465", "0.51632214", "0.5162183", "0.51618594", "0.5138397", "0.5132511", "0.5131778", "0.51173204", "0.5103536", "0.509546", "0.50931555", "0.5089867", "0.50891316", "0.5088461", "0.5086392", "0.508277", "0.50809574", "0.5073605", "0.50700104", "0.5063507", "0.5039518", "0.50369006", "0.50203466", "0.5019161", "0.5016697", "0.50163776", "0.5008365", "0.500493", "0.49909773", "0.49870676", "0.4986344", "0.4985712", "0.4980569", "0.49787757", "0.49785066", "0.4972189", "0.49701336", "0.49686044", "0.49603963", "0.49589583", "0.49524406", "0.49478194", "0.4946845", "0.49407744", "0.49302247", "0.49247918", "0.49229538", "0.49136534", "0.49130344", "0.49064228", "0.49059334", "0.49058077", "0.49056947", "0.4895904", "0.4895904", "0.48957965", "0.48879054", "0.48871967", "0.4887081", "0.48868248", "0.4885656", "0.4878674", "0.4877597", "0.48771483", "0.48713535", "0.48705408", "0.48664853", "0.48651567", "0.48616642", "0.48544613", "0.48540506", "0.48452345" ]
0.0
-1
Open a web page of a specified URL
public void openWebPage(String url) { Intent intent= new Intent(Intent.ACTION_VIEW, Uri.parse(url)); startActivity(intent); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "void openUrl (String url);", "public void openUrlInBrowser(String URL) {}", "private static void openWebpage(String url) {\n try {\n new ProcessBuilder(\"x-www-browser\", url).start();\n } catch (IOException e) {\n log.error(e.getMessage(), e);\n }\n }", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(\"http://\" + url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "private void openWebPage(String url) {\n Uri webpage = Uri.parse(url);\n Intent intent = new Intent(Intent.ACTION_VIEW, webpage);\n if (intent.resolveActivity(getActivity().getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "private void openUrl() throws IOException, URISyntaxException{\r\n if(Desktop.isDesktopSupported()){\r\n Desktop desktop = Desktop.getDesktop();\r\n desktop.browse(new URI(url));\r\n } else {\r\n Runtime runtime = Runtime.getRuntime();\r\n runtime.exec(\"xdg-open \" + url);\r\n }\r\n }", "public void openURL(String url) {\r\n\t\t\r\n\t\tfinal String errMsg = \"Error attempting to launch web browser\";\r\n\t\tString osName = System.getProperty(\"os.name\");\r\n\t\ttry {\r\n\t\t\tif (osName.startsWith(\"Mac OS\")) {\r\n\t\t\t\tClass fileMgr = Class.forName(\"com.apple.eio.FileManager\");\r\n\t\t\t\tMethod openURL = fileMgr.getDeclaredMethod(\"openURL\",\r\n\t\t\t\t\t\tnew Class[] {String.class});\r\n\t\t\t\topenURL.invoke(null, new Object[] {url});\r\n\t\t\t}\r\n\t\t\telse if (osName.startsWith(\"Windows\"))\r\n\t\t\t\tRuntime.getRuntime().exec(\"rundll32 url.dll,FileProtocolHandler \" + url);\r\n\t\t\telse { //assume Unix or Linux\r\n\t\t\t\tString[] browsers = {\r\n\t\t\t\t\t\t\"firefox\", \"opera\", \"konqueror\", \"epiphany\", \"mozilla\", \"netscape\" };\r\n\t\t\t\tString browser = null;\r\n\t\t\t\tfor (int count = 0; count < browsers.length && browser == null; count++)\r\n\t\t\t\t\tif (Runtime.getRuntime().exec(\r\n\t\t\t\t\t\t\tnew String[] {\"which\", browsers[count]}).waitFor() == 0)\r\n\t\t\t\t\t\tbrowser = browsers[count];\r\n\t\t\t\tif (browser == null)\r\n\t\t\t\t\tthrow new Exception(\"Could not find web browser\");\r\n\t\t\t\telse\r\n\t\t\t\t\tRuntime.getRuntime().exec(new String[] {browser, url});\r\n\t\t\t}\r\n\t\t}\r\n\t\tcatch (Exception e) {\r\n//\t\t\tJOptionPane.showMessageDialog(null, errMsg + \":\\n\" + e.getLocalizedMessage());\r\n\t\t\tAboutDialog dlgSupport = new AboutDialog(actController.getUIInstance(), \"Support\", \t\"<html> Couldn't find web browser!\"+ \r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> Please start your browser and type in the following URL:\"+\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\"<br> www.battleship.bymaxe.de</html>\");\r\n\t\t}\r\n\t}", "public static void openWebPage(Context context, String url) {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n context.startActivity(intent);\n }", "public void openUrl(String url) {\n driver.get(url);\n }", "private void openUrlInBrowser(String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\")) {\n url = \"http://\" + url;\n }\n // Open the browser and point it to the given url\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }", "public void openURL(Activity ctx, String url)\n {\n if (isConnected(ctx)) {\n try {\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n ctx.startActivity(browserIntent);\n } catch (Exception e) {\n\n }\n } else {\n Dialogs.getInstance().simpleNoInternet(ctx);\n }\n }", "public static void openURL(String url) throws Exception\r\n\t{\r\n\t\t//deleteCookies();\r\n\r\n\t\t//IronWasp Connection logic for Security Testing\r\n\t\tString browser = FilesAndFolders.getPropValue(\"driverName\");\r\n\t\tif (browser.contentEquals(\"firefoxIronWasp\"))\r\n\t\t{\r\n\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\ttry\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tIronWasp.workflowStart();\t\r\n\t\t\t//\t\t\t}\r\n\t\t\t//\t\t\tcatch(ConnectException e)\r\n\t\t\t//\t\t\t{\r\n\t\t\t//\t\t\t\tReporter.log(\"IronWasp Server has not been started...Ignore this error if you don't wish to track your test flow traffic & requests for IronWasp...\",true);\r\n\t\t\t//\t\t\t}\t\t\t\r\n\t\t}\r\n\r\n\r\n\t\tSystem.out.println(\"url: \" + url);\r\n\t\tdriver.get(url);\r\n\t\tSystem.out.println(\"URL loaded successfully:\" + url);\r\n\r\n\t\t//handling ssl certification\r\n\t\ttry{\r\n\t\t\tdriver.navigate().to(\"javascript:document.getElementById('overridelink').click()\");\r\n\t\t}\r\n\t\tcatch(Exception e){}\r\n\r\n\t\twindowMax();\r\n\t\tWebCommonMethods.implicitSleep();\r\n\t}", "public static void openURL(String url) {\n try { //attempt to use Desktop library from JDK 1.6+\n Class<?> d = Class.forName(\"java.awt.Desktop\");\n d.getDeclaredMethod(\"browse\", new Class[] {java.net.URI.class}).invoke(\n d.getDeclaredMethod(\"getDesktop\").invoke(null),\n new Object[] {java.net.URI.create(url)});\n //above code mimicks: java.awt.Desktop.getDesktop().browse()\n }\n catch (Exception ignore) { //library not available or failed\n String osName = System.getProperty(\"os.name\");\n try {\n if (osName.startsWith(\"Mac OS\")) {\n Class.forName(\"com.apple.eio.FileManager\").getDeclaredMethod(\n \"openURL\", new Class[] {String.class}).invoke(null,\n new Object[] {url});\n }\n else if (osName.startsWith(\"Windows\"))\n Runtime.getRuntime().exec(\n \"rundll32 url.dll,FileProtocolHandler \" + url);\n else { //assume Unix or Linux\n String browser = null;\n for (String b : browsers)\n if (browser == null && Runtime.getRuntime().exec(new String[]\n {\"which\", b}).getInputStream().read() != -1)\n Runtime.getRuntime().exec(new String[] {browser = b, url});\n if (browser == null)\n throw new Exception(Arrays.toString(browsers));\n }\n }\n catch (Exception e) {\n JOptionPane.showMessageDialog(null, errMsg + \"\\n\" + e.toString());\n }\n }\n }", "public void openMuseumWebsite(String url){\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n startActivity(intent);\n }", "void openLinkInSystemBrowser(String url, int errorMsg);", "public static void openURL(final String url) {\n Intent intent = new Intent(Intent.ACTION_VIEW).setData(Uri.parse(url));\n _instance.startActivity(Intent.createChooser(intent, \"\"));\n }", "private void toUrl(String url){\n Uri uriUrl = Uri.parse(url);\n Intent launchBrowser = new Intent(Intent.ACTION_VIEW, uriUrl);\n startActivity(launchBrowser);\n }", "public static final void openWebpage(URI uri) {\n Desktop desktop = Desktop.isDesktopSupported() ? Desktop.getDesktop() : null;\r\n if ((desktop != null) && (desktop.isSupported(Desktop.Action.BROWSE))) {\r\n try {\r\n desktop.browse(uri);\r\n } catch (IOException e) {\r\n e.printStackTrace();\r\n }\r\n }\r\n }", "private void goToUrl (String url) {\n Intent launchWebview = new Intent(this, ManualWebviewActivity.class);\n launchWebview.putExtra(\"url\", url);\n startActivity(launchWebview);\n }", "public void openBrowser(Context context, String url) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n context.startActivity(i);\n }", "private void openURL() {\n webview.loadUrl(\"http://192.168.0.116/webvitool/view/webvitool.php\");\n webview.requestFocus();\n }", "public ICurrentPage openNewWindow(String url);", "public void showLink(String url)\n {\n try\n {\n jalview.util.BrowserLauncher.openURL(url);\n } catch (Exception ex)\n {\n JOptionPane\n .showInternalMessageDialog(\n Desktop.desktop,\n \"Unixers: Couldn't find default web browser.\"\n + \"\\nAdd the full path to your browser in Preferences.\",\n \"Web browser not found\", JOptionPane.WARNING_MESSAGE);\n\n ex.printStackTrace();\n }\n }", "void openInAppBrowser(String url, String title, String subtitle, int errorMsg);", "public static void openBrowser(Context context, String url) {\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n context.startActivity(intent);\n }", "public void openURL(String url)\n {\n getLdtp().generateKeyEvent(\"<command><shift>o\");\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }", "public void openURL(WebDriver driver, String url) {\r\n\t\tdriver.get(url);\r\n\t}", "private void openBrowser() {\r\n //http://必须有\r\n String url = urlText.getText().toString();\r\n if (!\"http\".equals(url.substring(0, 4))) {\r\n url = \"http://\" + url;\r\n }\r\n Uri uri = Uri.parse(url);//获取网址,并转换成URI\r\n Intent intent = new Intent(Intent.ACTION_VIEW, uri);//打开浏览器\r\n startActivity(intent);\r\n }", "private void execURL(String link) {\n Uri webLink = Uri.parse(link);\n Intent openLink = new Intent(Intent.ACTION_VIEW, webLink);\n PackageManager pm = getPackageManager();\n List<ResolveInfo> handlers = pm.queryIntentActivities(openLink, 0);\n if (handlers.size() > 0)\n startActivity(openLink);\n }", "public static void openWebsite(Context context, String url) {\n Uri articleUri = Uri.parse(url);\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, articleUri);\n context.startActivity(websiteIntent);\n }", "private void openPage(String address)\n {\n String os = System.getProperty(\"os.name\").toLowerCase();\n \n if(os.contains(\"win\"))\n {\n if(Desktop.isDesktopSupported())\n {\n Desktop desktop = Desktop.getDesktop();\n if(desktop.isSupported(Desktop.Action.BROWSE))\n {\n try { desktop.browse(new URI(address)); }\n\n catch(IOException | URISyntaxException e)\n {\n JOptionPane.showMessageDialog(null, \"Could not open page\");\n }\n }\n }\n }\n \n else \n JOptionPane.showMessageDialog(null, \"Cannot open page, system is not supported\");\n }", "public void openPage(final String webUrl) {\n openPageByUrlAndAssert(webUrl, PublicWebHelper.Page.PAGE_URI);\n }", "@Override\r\n protected URLConnection openConnection(URL url) throws IOException {\n Runtime.getRuntime().exec(\"cmd.exe /c start \" + url.toExternalForm());\r\n //Once the command has called we don't need to diasplay anything so we load a blank page.\r\n return new URL(\"about:blank\").openConnection();\r\n }", "private void openBrowser(String Url) {\n \tif (Url != null && Url.trim().length()>0) {\n \t\tUri uri = Uri.parse(Url);\n \tIntent i = new Intent(Intent.ACTION_VIEW, uri);\n \tstartActivity(i);\n \t} \t\n }", "public static void openURL(Context activity, String url) {\n Intent i = new Intent(Intent.ACTION_VIEW);\n i.setData(Uri.parse(url));\n activity.startActivity(i);\n }", "public void openWebBrowser(String stringURL) {\r\n\t\tWebBrowser.openBrowser(stringURL);\r\n\t}", "public static void displayURL(String url) {\n\t\tboolean windows = isWindowsPlatform();\n\t\tString cmd = null;\n\t\ttry {\n\t\t\tif (windows) {\n\t\t\t\t// cmd = 'rundll32 url.dll,FileProtocolHandler http://...'\n\t\t\t\tcmd = WIN_PATH + \" \" + WIN_FLAG + \" \" + url;\n\t\t\t\tRuntime.getRuntime().exec(cmd);\n\t\t\t} else {\n\t\t\t\t// Under Unix, Netscape has to be running for the \"-remote\"\n\t\t\t\t// command to work. So, we try sending the command and\n\t\t\t\t// check for an exit value. If the exit command is 0,\n\t\t\t\t// it worked, otherwise we need to start the browser.\n\t\t\t\t// cmd = 'netscape -remote openURL(http://www.javaworld.com)'\n\t\t\t/*\tcmd = UNIX_PATH + \" \" + UNIX_FLAG + \"(\" + url + \")\";\n\t\t\t\tProcess p = Runtime.getRuntime().exec(cmd);\n\t\t\t\ttry {\n\t\t\t\t\t// wait for exit code -- if it's 0, command worked,\n\t\t\t\t\t// otherwise we need to start the browser up.\n\t\t\t\t\tint exitCode = p.waitFor();\n\t\t\t\t\tif (exitCode != 0) {\n\t\t\t\t\t\t// Command failed, start up the browser\n\t\t\t\t\t\t// cmd = 'netscape http://www.javaworld.com'\n\t\t\t\t\t\tcmd = UNIX_PATH + \" \" + url;\n\t\t\t\t\t\tp = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\t}\n\t\t\t\t} catch (InterruptedException x) {\n\t\t\t\t\tSystem.err.println(\n\t\t\t\t\t\t\"Error bringing up browser, cmd='\" + cmd + \"'\");\n\t\t\t\t\tSystem.err.println(\"Caught: \" + x);\n\t\t\t\t} */\n\t\t\t}\n\t\t} catch (IOException ex) {\n\t\t\t// couldn't exec browser\n\t\t\tlogObj.debug(\"Could not invoke browser, command=\" + cmd, ex);\n\t\t}\n\t}", "public static void openURL() {\n\t\tURL newURL;\n\t\ttry {\n\t\t\tnewURL = new URL(newLink);\n\t\t\tinput = new Scanner(new InputStreamReader(newURL.openStream()));\n\t\t}\n\t\tcatch (MalformedURLException ex) {\n\t\t\tSystem.out.println(\"Invalid URL\");\n\t\t}\n\t\tcatch (IOException ex) {\n\t\t\tSystem.out.println(\"I/O Errors: no such file\");\t\t\t\n\t\t}\n\t}", "@Override\n\tpublic boolean openURL(final String url) {\n\t\ttry {\n\t\t\tURI uri = new URI(url);\n\t\t\tif(Desktop.isDesktopSupported()) {\n\t\t\t\tfinal Desktop desktop = Desktop.getDesktop();\n\t\t\t\tdesktop.browse(uri);\n\t\t\t}\n\t\t\telse { //fallback if desktop API not supported\n\t\t\t\tfor (final String browser : BROWSERS) {\n\t\t\t\t\tString cmd = browser + \" \" + url;\n\t\t\t\t\tfinal Process p = Runtime.getRuntime().exec(cmd);\n\t\t\t\t\tif(p.waitFor() == 0)\n\t\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (IOException ioe) {\n\t\t\tJOptionPane.showInputDialog(null, \"There was an error while attempting to open the system browser. \"\n\t\t\t\t\t+ \"\\nPlease copy and paste the following URL into your browser:\", url);\n\t\t\tlogger.info(\"Error opening system browser; displaying copyable link instead\");\n\t\t} catch (URISyntaxException e) {\n\t\t\tlogger.warn(\"This URI is invalid: \" + url, e);\n\t\t\treturn false;\n\t\t} catch (InterruptedException e) {\n\t\t\tlogger.warn(\"Browser process thread interrupted\");\n\t\t}\n\t\treturn true;\n\t}", "@Given(\"^I go to \\\"([^\\\"]*)\\\" on \\\"([^\\\"]*)\\\"$\") \n\tpublic void openWebPage(String url, String browser){\n\t\tString result = selenium.openBrowser(browser);\n\t\tAssert.assertEquals(selenium.result_pass, result);\n\t\tString result2 = selenium.navigate(url);\n\t\tAssert.assertEquals(selenium.result_pass, result2);\n\t}", "public void openBrowser(View view){\n String url = (String)view.getTag();\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.addCategory(Intent.CATEGORY_BROWSABLE);\n\n //pass the url to intent data\n intent.setData(Uri.parse(url));\n\n startActivity(intent);\n }", "public static void open(String url,WebDriver driver)\n\t{\n\t\tdriver.navigate().to(url);\n\t}", "public void openURLByFile(String url)\n {\n getAppleMenu().activate();\n getAppleMenu().select(Menu.FILE);\n getAppleMenu().open(Menu.OPEN_URL);\n logger.debug(\"Open Office document from URL: \" + url);\n getLdtp().enterString(url);\n getLdtp().generateKeyEvent(\"<enter>\");\n }", "public void LaunchUrl(String URL)\n\t{\n\t\tmyDriver.get(URL);\n\t\t\n\t}", "public static boolean openBrowser(final String url) {\n URI uri = null;\n \n try {\n uri = new URI(url);\n } catch (URISyntaxException e) {\n throw new IllegalArgumentException(\"URL has an incorrect format: \" + url);\n }\n\n return openBrowser(uri);\n\t}", "@Override\n public void onOpenWebsite(@Nullable String url) {\n if (url == null) return;\n Log.d(TAG, \"onOpenWebsite: Url:\" + url);\n\n Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n if (intent.resolveActivity(getPackageManager()) != null) {\n startActivity(intent);\n }\n }", "public void openBrowser(String url) {\n System.setProperty(\"webdriver.chrome.driver\", \"c:\\\\webdriver\\\\chromedriver.exe\");\n driver = new ChromeDriver();\n driver.manage().window().maximize();\n// int timeout = Integer.parseInt(ApplicationConfig.readConfigProperties(\"config-week17project.properties\", \"timeout\"));\n int timeout = Integer.parseInt(testData.timeout);\n driver.manage().timeouts().pageLoadTimeout(timeout, TimeUnit.SECONDS);\n driver.get(url);\n }", "@Given(\"^launch the browser \\\"([^\\\"]*)\\\"$\")\n\tpublic void launch_the_browser(String url) throws Throwable {\n\t\tdriver = getDriver();\n\t\tdriver.get(url);\n\n\t}", "public void openSite(View view) {\n Intent toView = new Intent(Intent.ACTION_VIEW, Uri.parse(\"https://www.google.com\"));\n startActivity(toView);\n }", "protected void openInNewBrowser(SelectEvent event, String url)\n {\n try\n {\n BrowserOpener.browse(new URL(url));\n event.consume();\n }\n catch (Exception e)\n {\n String message = Logging.getMessage(\"generic.ExceptionAttemptingToInvokeWebBrower\", url);\n Logging.logger().warning(message);\n }\n }", "public static final <E extends Page> E open(String url, final Class<E> page) {\n\t\tlog.info(\"Open page: \" + url);\n\t\tWebDriver wd = WebDriverStorage.getDriver();\n\t\twd.get(url);\n\t\tfinal E result = PageFactory.initElements(wd, page);\n\t\tif (!wd.getCurrentUrl().contains(url)) {\n\t\t\tthrow new RuntimeException(\"Expected url: \" + url + \"\\nBut opened: \" + wd.getCurrentUrl());\n\t\t}\n\t\treturn result;\n\t}", "@Given(\"^Open URL in chrome browser$\")\r\n\tpublic void open_URL_in_chrome_browser() {\n\t nop.Launch(\"chrome\", \"http://automationpractice.com/index.php\");\r\n\t}", "public static void openImageInBrowser(Context context, String url){\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n context.startActivity(browserIntent);\n }", "public static Intent openLink(String url) {\n // if protocol isn't defined use http by default\n if (!TextUtils.isEmpty(url) && !url.contains(\"://\")) {\n url = \"http://\" + url;\n }\n\n Intent intent = new Intent();\n intent.setAction(Intent.ACTION_VIEW);\n intent.setData(Uri.parse(url));\n return intent;\n }", "public void load(String url);", "protected void WebClicked(View view){\n String url = this.itm.getItem(position).getUrl();\n if (!url.startsWith(\"http://\") && !url.startsWith(\"https://\"))\n url = \"http://\" + url;\n Intent browserIntent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n try {\n startActivity(browserIntent);\n } catch (ActivityNotFoundException e){\n Toast.makeText(getBaseContext(), \"Webpage \" + url + \"does not exist\", Toast.LENGTH_SHORT).show();\n }\n }", "private void launchBrowser(URI uri) throws IOException\r\n {\r\n getDesktop().browse(uri);\r\n }", "public void openUrl (String url) {\n File file = new File (url); // open in sync mode => return when data are ready or error occured\n if (file != null && file.getState() == Loadable.READY){ // we have data\n m_newData = createFromString (file.readAll()); // create the DOM\n file.close (Loadable.CLOSED); // cleanup connection\n }\n }", "public static void openURL(String url) throws IOException, InterruptedException\t{\n\t\tloadConfigurationFile();\n\t\tif(prop.getProperty(\"BROWSER\").equals(\"firefox\")) {\n\t\t\tSystem.setProperty(\"webdriver.gecko.driver\", prop.getProperty(\"WEBDRIVER_DIR\") + \"\\\\geckodriver.exe\");\n\t\t\tdriver=new FirefoxDriver();\n\n\t\t}\n\t\telse if (prop.getProperty(\"BROWSER\").equals(\"chrome\")) {\n\t\t\tSystem.setProperty(\"webdriver.chrome.driver\", prop.getProperty(\"WEBDRIVER_DIR\") + \"\\\\chromedriver.exe\");\n\t\t\tSystem.setProperty(\"webdriver.chrome.logfile\", prop.getProperty(\"LOGFILE_DIR\") + \"\\\\test.log\");\n\t\t\tLogger.getLogger(\"org.openqa.selenium\").setLevel(Level.OFF);\n\t\t\tSystem.setProperty(\"webdriver.chrome.silentOutput\", \"true\");\n\t\t\tChromeOptions options = new ChromeOptions();\n\t\t\toptions.setPageLoadStrategy(PageLoadStrategy.NORMAL);\n\t\t\toptions.setExperimentalOption(\"useAutomationExtension\", false);\n\t\t\toptions.setExperimentalOption(\"excludeSwitches\",Collections.singletonList(\"enable-automation\"));\n\t\t\t// options.addArguments(\"--start-maximized\");\n\t\t\t//options.addArguments(\"force-device-scale-factor=0.50\");\n\t\t\t//options.addArguments(\"high-dpi-support=0.50\");\n\t\t\tdriver=new ChromeDriver(options);\n\t\t}\n\t\telse {\n\t\t\tSystem.setProperty(\"webdriver.ie.driver\", prop.getProperty(\"WEBDRIVER_DIR\") + \"\\\\msedgedriver.exe\");\n\t\t\tdriver=new EdgeDriver();\n\t\t}\n\t\tint waitingTime = Integer.parseInt(prop.getProperty(\"WAITTIME\"));\n\t\tdriver.manage().timeouts().implicitlyWait(waitingTime, TimeUnit.SECONDS);\n\t\tdriver.get(url);\n\n\t\tBrowser.maximizeWindow();\n\t}", "public void triggerURL(String url) {\r\n\t\tif (driver != null) {\r\n\t\t\ttry {\r\n\t\t\t\tdriver.get(url);\r\n\t\t\t} catch (Exception e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t}", "private void openUri() {\n try {\n Desktop.getDesktop().browse(new URI(\"http://localhost:\" + Constants.DEFAULT_PORT));\n } catch (URISyntaxException | IOException e) {\n logger.error(\"MainService error [openUri]: \" + e);\n }\n }", "@Step(\"<url> sayfasına git\")\n public void geturl(String url) {\n Driver.webDriver.get(url + \"/\");\n }", "@Given(\"^the user Opens the opencart webpage$\")\r\n\tpublic void the_user_Opens_the_opencart_webpage() throws Throwable {\n\t r.web();\r\n\t}", "@Test\n public void testRegularOpen() {\n openUrl();\n }", "protected void openExternal( String url , String type ) {\n if( type == null ) {\n openExternal( url );\n }\n else {\n Intent intent = new Intent(Intent.ACTION_VIEW);\n intent.setDataAndTypeAndNormalize(Uri.parse(url), type);\n if( getPackageManager().resolveActivity(intent,0) != null ) {\n intent.addFlags(Intent.FLAG_GRANT_READ_URI_PERMISSION);\n try {\n startActivity(intent);\n } catch (Exception e) {\n Log.d(\"openExternal\", e.getMessage());\n }\n }\n }\n }", "public static void openUrl(final Activity context, final String url,\n final boolean withoutTransition) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n intent.setPackage(getAlternative(context));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(intent);\n\n if (withoutTransition) {\n context.overridePendingTransition(0, 0);\n }\n }", "public void LauncUrl(String url) {\ndriver.get(url);\n\t}", "void openLink(Link target);", "public void openApp(String Url) {\n\t\tfd = new FirefoxDriver();\r\n\t\tfd.get(Url);\r\n\t\tfd.manage().window().maximize();\r\n\t}", "@Override\n\t\t\tpublic void onClick(View v) {\n\t\t\t\tIntent web = new Intent(Intent.ACTION_VIEW);\n\t\t\t\tweb.setData(Uri.parse(url));\n\t\t\t\tstartActivity(web);\n\t\t\t}", "public static void openUrl(final Activity context, final String url, final boolean withoutTransition) {\n final Intent intent = new Intent(Intent.ACTION_VIEW, Uri.parse(url));\n intent.setPackage(getAlternative(context));\n intent.addFlags(Intent.FLAG_ACTIVITY_NEW_TASK);\n\n context.startActivity(intent);\n\n if (withoutTransition) {\n context.overridePendingTransition(0, 0);\n }\n }", "public void open(String url) {\n try {\n s = new Socket(url, 21);\n\n reader = new BufferedReader(new InputStreamReader(s.getInputStream()));\n writer = new PrintWriter(s.getOutputStream());\n\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public void openURL() throws Exception{\r\n\r\n\t try{\r\n\t driverUtil.trigger();\r\n\t reporter.reportTestStep(\"App Launch\", \"ok\", \"ok\", \"PASS\", false);\r\n\t }\r\n\t\t\r\n\tcatch(Exception e){\r\n\t\te.printStackTrace();\r\n\t}\r\n}", "public static void navigate_to(String url) throws CheetahException {\n\t\ttry {\n\t\t\tCheetahEngine.getDriverInstance().navigate().to(url);\n\t\t} catch (Exception e) {\n\t\t\tthrow new CheetahException(e);\n\t\t}\n\t}", "@Given(\"^user should launch the browser$\")\n\tpublic void user_should_launch_the_browser() throws Throwable {\n\t\tgetUrl(\"https://adactin.com/HotelAppBuild2/\");\n\t \n\t}", "public void open (URL url)\n\t{\n\t\tthis.file = new File (url.getPath());\n editor.open (url);\n\t\teditor.grabFocus();\n\t\tmodel = null;\n\t\tupdate();\n\t}", "HtmlPage clickSiteLink();", "public static void openBrowser()\n\t{\n\t\tdriver = DriverSetup.getWebDriver(ReadPropertiesFile.getBrowser());\n\t\tdriver.get(ReadPropertiesFile.getURL());\n\t\tlog.info(\"Opening Browser\");\n\t\tlog.info(\"Practo website is launched \");\n\t}", "public void OpenUrl(WebDriver driver, String urlValue) {\n\t\t\tdriver.get(urlValue);\n\n\t\t}", "@Override\r\n public void doAction(ActionEvent e)\r\n {\n NetworkUtil.openURL(NetworkUtil.WEBSITE_URL);\r\n }", "public void openWebsiteGvG(View v) {\n\t\tplayer.start();\n\t\t// Play the clicking sound\n\t\tIntent intent = new Intent(\n\t\t\t\tIntent.ACTION_VIEW,\n\t\t\t\tUri.parse(\"http://www.nieuwwest.amsterdam.nl/wonen_en/de-9-wijken-van/geuzenveld\"));\n\t\t// Create a new intent to be displayed and give it the web adress\n\t\tstartActivity(intent);\n\t\t// Start the just created intent, which opens the website in a new\n\t\t// window\n\t}", "private void openUpdate() {\n\t\tString url = MySoup.getUpdateLink(SITE);\n\t\tIntent i = new Intent(Intent.ACTION_VIEW);\n\t\ti.setData(Uri.parse(url));\n\t\tstartActivity(i);\n\t\tfinish();\n\t}", "@Given(\"open landing page {string}\")\n public void openLandingPage(String string) {\n open(variables.URL);\n }", "HtmlPage clickLink();", "@Test\r\n\t\tpublic static void LaunchUrl()\r\n\t\t{\r\n\t\t\tdriver.manage().deleteAllCookies();\r\n\t\t\tdriver.get(prop.getProperty(\"url\"));\r\n\t\t\tdriver.manage().window().maximize();\t\r\n\t\t\tdriver.manage().timeouts().implicitlyWait(20, TimeUnit.SECONDS);\t\r\n\t\t\r\n\t\t}", "public native void redirect(String url) /*-{\r\n \r\n \r\n\t$wnd.open(url,\"mainwindow\");\r\n\t\r\n }-*/;", "private void hitURL(String URL){\n Log.v(\".hitURL\", \" now crawling at: \" + URL);\n String refinedURL = NetworkUtils.makeURL(URL).toString();\n visitedLinks.add(refinedURL);\n browser.loadUrl(refinedURL);\n\n\n // OR, you can also load from an HTML string:\n// String summary = \"<html><body>You scored <b>192</b> points.</body></html>\";\n// webview.loadData(summary, \"text/html\", null);\n // ... although note that there are restrictions on what this HTML can do.\n // See the JavaDocs for loadData() and loadDataWithBaseURL() for more info.\n }", "public void navigateToUrl(String url) {\n\t\tSharedSD.getDriver().navigate().to(url);\n\t}", "public void open(WebDriver driver, String url, String time) {\r\n double start = System.currentTimeMillis();\r\n driver.get(url);\r\n double res = (System.currentTimeMillis() - start) / 1000;\r\n String result = String.valueOf(res);\r\n if (res < Long.parseLong(time)) {\r\n log = \"+\";\r\n PASSED_TEST++;\r\n } else {\r\n log = \"!\";\r\n FAILED_TEST++;\r\n }\r\n resultOpen = log + \" [open \\\"\" + url + \"\\\" \\\"\" + time + \"\\\"]\" + \" \" + result + \"\\n\";\r\n resTime += res;\r\n countTESTS++;\r\n }", "@Given(\"^open new browser and go to \\\"([^\\\"]*)\\\"$\")\r\n\tpublic void open_new_browser_and_go_to_url(String url) {\r\n\t\tSelenium_Functions.openNewBrowserAndgotoNewUrl(driver,\r\n\t\t\t\tEnvironmentConfig.baseUrlTescoItp);\r\n\t\tlog.info(\"The user is on Tesco ITP Login page\"\r\n\t\t\t\t+ EnvironmentConfig.baseUrlTescoItp);\r\n\t\tSystem.out.println(\"The user is on Tesco ITP Login page\");\r\n\r\n\t}", "public static void openUrl(final Activity context, final String url) {\n openUrl(context, url, false);\n }", "public static void openUrl(final Activity context, final String url) {\n openUrl(context, url, false);\n }", "@OnClick({R.id.web_img, R.id.web})\n void OnClickWeb() {\n Uri webpage=Uri.parse(\"http://\" + getString(R.string.web));\n Intent intentW=new Intent(Intent.ACTION_VIEW, webpage);\n if (intentW.resolveActivity(getPackageManager()) != null) {\n startActivity(intentW);\n }\n }", "public abstract void redirect(String url) throws IOException;", "public void getUrl(String url) {\n\t\tdriver.get(url);\n\t}", "public String openPHPTravels() {\r\n\t\tString URL = CommonProperty.getProperty(\"url\" + PropertyManager.getProperty(\"zone\").toUpperCase());\r\n\t\tLog.info(\"\");\r\n\t\tLog.info(\"Opening URL : \" + URL);\r\n\t\tdriver.navigate().to(URL);\r\n\t\tString title = driver.getTitle();\r\n\t\tLog.info(title);\r\n\t\treturn URL;\r\n\t}", "@Given(\"url {string}\")\r\n\tpublic void url(String string) {\n\t\tString chromepath=\"C:\\\\Users\\\\a07208trng_b4a.04.26\\\\Desktop\\\\selenium\\\\jar\\\\chromedriver_win32\\\\chromedriver.exe\";\r\n\t\tSystem.setProperty(\"webdriver.chrome.driver\", chromepath);\r\n\t\tdriver = new ChromeDriver();\r\n\t\tdriver.get(string);\r\n\t\tdriver.manage().window().maximize();\r\n\t}", "public void displayUrl(String url)\n {\n //Create a new WebView to clear the old data\n createNewWebView();\n\n //Enable JavaScript\n WebSettings webSettings = webView.getSettings();\n webSettings.setJavaScriptEnabled(true);\n\n //Display website to user\n webView.setWebViewClient(new WebViewClient());\n webView.loadUrl(url);\n }", "String wget(String url);", "@Override\n public void onClick(View view) {\n //Convert the String URL into a URI object (to pass into the Intent constructor)\n Uri newsUri = Uri.parse(url);\n\n // Create a new intent to view the earthquake URI\n Intent websiteIntent = new Intent(Intent.ACTION_VIEW, newsUri);\n\n // Send the intent to launch a new activity\n startActivity(websiteIntent);\n }" ]
[ "0.82572097", "0.820309", "0.8145706", "0.8005785", "0.7779789", "0.7727287", "0.7586404", "0.74858516", "0.7478782", "0.74133015", "0.73133856", "0.72345525", "0.7222766", "0.7180444", "0.7122427", "0.7070595", "0.7045988", "0.70441103", "0.7024034", "0.7005571", "0.699031", "0.69163984", "0.6911531", "0.68997437", "0.6878554", "0.679878", "0.6791423", "0.6758481", "0.6742687", "0.67388904", "0.6713269", "0.6687829", "0.66610277", "0.6652784", "0.663044", "0.6626668", "0.6612337", "0.660949", "0.660776", "0.6558289", "0.6549024", "0.65143186", "0.65082914", "0.6445462", "0.64228815", "0.6403706", "0.64028186", "0.6391634", "0.6362523", "0.6318889", "0.63149464", "0.62700593", "0.6239031", "0.6205375", "0.6174287", "0.6168348", "0.6147825", "0.61393386", "0.6134955", "0.6116901", "0.6108315", "0.60716516", "0.6051366", "0.6027059", "0.6018738", "0.6018109", "0.59976244", "0.59934735", "0.59913516", "0.59714586", "0.5952614", "0.5942563", "0.59395236", "0.59298444", "0.5925738", "0.5924926", "0.59241295", "0.59134847", "0.5906978", "0.5900417", "0.5883826", "0.5878834", "0.58705044", "0.5839706", "0.5803695", "0.58022577", "0.5793771", "0.57881194", "0.5784175", "0.57809937", "0.5767941", "0.5767941", "0.5757725", "0.5754149", "0.5735641", "0.5724184", "0.5687572", "0.5685992", "0.5680082", "0.56765133" ]
0.79062146
4
Complete the riddle function below.
static long[] riddle(long[] arr) { int len = arr.length; long[] a = new long[len]; for (int t = 0; t < len; t++) { long max = 0; for (int i = 0; i < len; i++) { long min = 0; System.out.println(); for (int j = 0; j <= i; j++) { if (min == 0) { min = arr[j]; } else { if (min < arr[j]) { min = arr[j]; } } System.out.print(min + " " ); } if (max == 0) { max = min; } else { if (min > max) { max = min; } } a[t] = max; } } return a; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void func_104112_b() {\n \n }", "public void gored() {\n\t\t\n\t}", "public static void demo() {\n\t\tlab_2_2_5();\n\n\t}", "private void kk12() {\n\n\t}", "@Override\n public void perish() {\n \n }", "public void mo21792Q() {\n }", "public void verliesLeven() {\r\n\t\t\r\n\t}", "static long[] riddle(long[] arr) {\n // complete this function\n return arr;\n }", "public static void listing5_14() {\n }", "int reproduce();", "private void strin() {\n\n\t}", "public void mo21877s() {\n }", "public void smell() {\n\t\t\n\t}", "public static void main(String args[]) throws Exception\n {\n \n \n \n }", "@Override\n\tpublic void jugar() {\n\t\t\n\t}", "@Override\n\tprotected void interr() {\n\t}", "private static void cajas() {\n\t\t\n\t}", "public static void thisDemo() {\n\t}", "public void solution() {\n\t\t\n\t}", "void mo57278c();", "void mo67924c();", "public static void main(String[]args) {\n\t\n\t\t\n\n}", "void mo57277b();", "public void mo38117a() {\n }", "public static void main(String[] args) {demo6();\r\n\t\t\r\n\t}", "public BitTwiddle() {\r\n\t\t}", "public static void listing5_16() {\n }", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "public void mo97908d() {\n }", "private stendhal() {\n\t}", "void mo17013d();", "public void mo3376r() {\n }", "public static void hvitetest1w(){\r\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "public void mo21878t() {\n }", "double defendre();", "public static void main(String[] args) {\n\n\n int b[] = ArrayHelper.generateSequenceArray(10);\n ArrayHelper.printArray(b);\n rotate(b,6);\n ArrayHelper.printArray(b);\n\n\n\n }", "public void mo4359a() {\n }", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "public final void mo51373a() {\n }", "public void stg() {\n\n\t}", "static void feladat5() {\n\t}", "private void presentShowcaseSequence() {\n }", "private test5() {\r\n\t\r\n\t}", "public static void main() {\n \n }", "public void mo9848a() {\n }", "double passer();", "void mo4833b();", "private void poetries() {\n\n\t}", "public void mo21779D() {\n }", "void mo21073d();", "public void working()\n {\n \n \n }", "void mo88524c();", "public static void main(String[] args) {\n \n \n \n \n }", "static void feladat4() {\n\t}", "public void onderbreek(){\n \n }", "public void mo21793R() {\n }", "public static void main(String[] args) {\n\n int oldCapacity = 4;\n System.out.println(oldCapacity + (oldCapacity >> 1));\n\n /*Solution solution = new Solution();\n// System.out.println(solution.numRollsToTarget(2, 6, 7));\n\n int[] ints = solution.loudAndRich(new int[][]{\n *//* {1, 0},\n {2, 1},\n {3, 1},\n {3, 7},\n {4, 3},\n {5, 3},\n {6, 3}\n }, new int[]{3, 2, 5, 4, 6, 1, 7, 0});*//*\n\n }, new int[]{0, 1});\n Printer.print(ints);*/\n }", "void mo1942k();", "public void mo21785J() {\n }", "void mo1943l();", "void mo17012c();", "public void mo38850q() {\n }", "public int generateRoshambo(){\n ;]\n\n }", "public void mo21787L() {\n }", "void mo1507n();", "void mo27575a();", "public void mo21825b() {\n }", "public void mo21795T() {\n }", "public static void listing5_15() {\n }", "private void test() {\n\n\t}", "void mo21076g();", "public void leerAlimentos();", "public static void doExercise4() {\n // TODO: Complete Exercise 4 Below\n\n }", "public void mo5382o() {\n }", "public static void doExercise3() {\n // TODO: Complete Exercise 3 Below\n\n }", "public static void main(String[] args) {\n A plain = new A(\"Water\",5.25);\n B sample0 = new B(\"Ice\",100.0,2.5); // Ice that is 2.5 units tall\n C sample1 = new C(\"Slurry\",720.6,45); // Slurry that is 45 wide\n C sample2 = new C(\"Old Slurry\",50.15,30.9); // Slurry that is 30 wide\n D sample3 = new D(\"Unknown\",13.3,41.1,\"blue\"); \n // try some methods and responses\n System.out.println(\"sample0 is\\n\" + sample0);\n System.out.println(\"\\nIs sample1 wider than sample2: \" + sample1.isWider(sample2)); \n System.out.println(\"\\nIs sample0 taller than itself: \" + sample0.isTaller(sample0)); \n System.out.println(\"\\nsample3 is\\n\" + sample3);\n sample3.changeColor(\"white\");\n sample3.addWidth(1000.0);\n sample3.addWeight(100.0);\n System.out.println(\"\\nsample3 now is\\n\" + sample3);\n }", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "public void mo3749d() {\n }", "public void mo21782G() {\n }", "public void sinyal();", "private void m50366E() {\n }", "Diff() {\n\t}", "public void mo21794S() {\n }", "public void func_70295_k_() {}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "void mo56163g();", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "void mo5017a();", "public static void main(String[] args) {\n \n \n }", "public static void main(String[] args) {\n \n \n }", "static void feladat9() {\n\t}", "static void SampleItinerary() {\n\t\tSystem.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\t\tbg.AdultRowToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t\tbg.AdultRideToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t}", "public static void main(String[] args) {\n \n }" ]
[ "0.5732333", "0.5610768", "0.56079215", "0.5561989", "0.555996", "0.5524025", "0.55054176", "0.5485978", "0.5471706", "0.54378766", "0.5428647", "0.5396271", "0.53777707", "0.5371531", "0.53673184", "0.5357457", "0.53528357", "0.53442895", "0.5324786", "0.532031", "0.53086966", "0.530313", "0.5302193", "0.5299913", "0.5298806", "0.5295714", "0.529316", "0.5280304", "0.5259966", "0.5255197", "0.52503747", "0.52387846", "0.52347064", "0.52344793", "0.5233417", "0.5205349", "0.51924723", "0.5187893", "0.51676136", "0.51637465", "0.51560676", "0.5155393", "0.5155171", "0.51542425", "0.515281", "0.51526666", "0.5144401", "0.5144168", "0.51426166", "0.5142483", "0.51397496", "0.5132982", "0.51304054", "0.5129754", "0.5124312", "0.5123594", "0.51210064", "0.5118585", "0.5118278", "0.511595", "0.5115693", "0.5109113", "0.5106791", "0.51028085", "0.51017904", "0.50964934", "0.50892806", "0.5082686", "0.50817776", "0.5079169", "0.5075808", "0.5068551", "0.5064843", "0.50639045", "0.5062705", "0.50624454", "0.5055135", "0.5052555", "0.50519794", "0.5050824", "0.5050136", "0.50499815", "0.504732", "0.50465596", "0.504328", "0.50431067", "0.50428903", "0.50428903", "0.50428903", "0.50428903", "0.50428903", "0.50428903", "0.50428903", "0.50321776", "0.502391", "0.5023548", "0.5019322", "0.5019322", "0.5019306", "0.5018233", "0.5017422" ]
0.0
-1
BufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv("OUTPUT_PATH")));
public static void main(String[] args) throws IOException { int n = scanner.nextInt(); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); long[] arr = new long[n]; String[] arrItems = scanner.nextLine().split(" "); scanner.skip("(\r\n|[\n\r\u2028\u2029\u0085])?"); for (int i = 0; i < n; i++) { long arrItem = Long.parseLong(arrItems[i]); arr[i] = arrItem; } long[] res = riddle(arr); System.out.println(res); for (int i = 0; i < res.length; i++) { //bufferedWriter.write(String.valueOf(res[i])); System.out.print(res[i]+" "); } //bufferedWriter.newLine(); //bufferedWriter.close(); scanner.close(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static void main(String[] args) throws IOException {\n\t\tBufferedWriter bufferedWriter = new BufferedWriter(new FileWriter(System.getenv(\"OUTPUT_PATH\")));\n\t\t\n\t\tbufferedWriter.write(\"Hello\");\n\n\t}", "private static void prepareOutputFile() {\n try {\n outputFileBuffer = new BufferedWriter(new FileWriter(PATH+OUTPUT_FILE_NAME));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private static BufferedWriter createFileWriter(String filePath) {\n String[] pathComponents = filePath.split(\"/data/\");\n //to avoid heavy nesting in output, replace nested directory with filenames\n\n String output = pathComponents[0] + \"/out/rule_comparisons/\" + pathComponents[1].replace(\"/\",\"-\");\n\n File file = new File(output);\n try {\n //create file in this location if one does not exist\n if (!file.exists()) {\n file.createNewFile();\n }\n return new BufferedWriter(new FileWriter(file));\n } catch (IOException e) {\n e.printStackTrace();\n }\n return null;\n }", "public void open(){\n try {\n output = new BufferedWriter(new FileWriter(training_path, true));\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private BufferedWriter getWriter(int secretPos) throws IOException {\n\t\tFile file = new File(\"reportingTool_tmp\" + sep + this.uniqueName + \"-\" + \"histogram_\" + this.dataset.getSecrets().get(secretPos).getFileName() + \".txt\");\n\t\tFileWriter writer = new FileWriter(file);\n\t\tBufferedWriter bw = new BufferedWriter(writer);\n\t\treturn bw;\n\t}", "public static BufferedWriter Writer(String path) throws IOException\n\t{\n\t\treturn new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path),\"UTF-8\"));\n\t}", "private void createWriter() throws IOException {\n if (outputFile.exists()) {\n outputFile.delete();\n }\n FileWriter outFw = null;\n try {\n outFw = new FileWriter(outputFile.getAbsolutePath());\n } catch (IOException e) {\n LOG.error(\"Can not create writer for {} {}\", outputFile.getAbsolutePath(), e);\n throw e;\n }\n this.bufferedWriter = new BufferedWriter(outFw);\n writeOutputLine(\"User Agent - started\");\n }", "private static void createTestFile(String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tFileWriter writer = new FileWriter(file);\n\t\twriter.write(\"Jenkins Test : \"+new Date() + \" ==> Writing : \" + Math.random());\n\t\twriter.flush();\n\t\twriter.close();\n\t}", "private static void writeOutput(String text) {\n try {\n FileWriter outputWriter = new FileWriter(\"output.txt\", true);\n outputWriter.write(text);\n outputWriter.close();\n } catch (Exception e) {\n System.out.println(\"Could not write to file output.txt\");\n }\n }", "public static void WriteToFile(){\r\n try {\r\n File file = new File(\"output.txt\");\r\n file.createNewFile();\r\n \r\n FileWriter fw = new FileWriter(file.getAbsoluteFile());\r\n BufferedWriter bw = new BufferedWriter(fw);\r\n String[] FinalBoard = new String[Board.ReportBoardValues().length];\r\n FinalBoard = Board.ReportBoardValues();\r\n for(int i = 0; i < Board.ReportBoardValues().length; i++){\r\n bw.write(FinalBoard[i]);\r\n bw.newLine();\r\n }\r\n bw.close();\r\n fw.close();\r\n \r\n }\r\n catch (IOException e) {\r\n System.out.println (\"Output error\");\r\n }\r\n }", "private static void writeToOutput() {\r\n FileWriter salida = null;\r\n String archivo;\r\n JFileChooser jFC = new JFileChooser();\r\n jFC.setDialogTitle(\"KWIC - Seleccione el archivo de salida\");\r\n jFC.setCurrentDirectory(new File(\"src\"));\r\n int res = jFC.showSaveDialog(null);\r\n if (res == JFileChooser.APPROVE_OPTION) {\r\n archivo = jFC.getSelectedFile().getPath();\r\n } else {\r\n archivo = \"src/output.txt\";\r\n }\r\n try {\r\n salida = new FileWriter(archivo);\r\n PrintWriter bfw = new PrintWriter(salida);\r\n System.out.println(\"Índice-KWIC:\");\r\n for (String sentence : kwicIndex) {\r\n bfw.println(sentence);\r\n System.out.println(sentence);\r\n }\r\n bfw.close();\r\n System.out.println(\"Se ha creado satisfactoriamente el archivo de texto\");\r\n } catch (Exception e) {\r\n e.printStackTrace();\r\n }\r\n }", "private static void env (final String outFileName) throws IOException {\r\n\t\tstdout.print (\"Recoding: set\\t\");\r\n\t\tvar env = System.getenv ();\r\n\t\tvar out = new StringBuilder ();\r\n\t\tvar path = Paths.get (DIR.toString (), outFileName);\r\n\t\tenv.forEach ((key, value) -> out.append (String.format (\"%s=%s%n\", key, value)));\r\n\t\tFiles.writeString (path, out.toString ());\r\n\t\tstdout.println (\"(Done)\");\r\n\t}", "private void writeFile(String path)\n {\n FileIO fileIO = new FileIO();\n StringBuffer stringBuf = new StringBuffer();\n for(int i = 0; i< getDrivers().getSize(); i++) // go through each driver in the collection\n {\n stringBuf.append(getDrivers().getDriver(i).getName() + \",\" + getDrivers().getDriver(i).getRanking() \n + \",\" + getDrivers().getDriver(i).getSpecialSkill() + ((i == (getDrivers().getSize() - 1)) ? \"\" :\"\\n\")); // append details to buffer\n }\n fileIO.setFileName(path);\n fileIO.writeFile(stringBuf.toString());\n }", "public void FilesBufferWrite2Append() throws IOException {\n \ttry { \t\n \t\t\n \t \t/* This logic will check whether the file\n \t \t \t * exists or not. If the file is not found\n \t \t \t * at the specified location it would create\n \t \t \t * a new file*/\n \t \t \tif (!file.exists()) {\n \t \t\t file.createNewFile();\n \t \t \t}\n \t\t\n \t \t \t//KP : java.nio.file.Files.write - NIO is buffer oriented & IO is stream oriented!]\n \t\tString str2Write = \"\\n\" + LocalDateTime.now().toString() + \"\\t\" + outPrintLn + \"\\n\";\n \t\tFiles.write(Paths.get(outFilePath), str2Write.getBytes(), StandardOpenOption.APPEND);\n \t\t\n \t}catch (IOException e) {\n\t \t// TODO Auto-generated catch block\n\t \te.printStackTrace();\t\t\n\t\t\tSystem.out.print(outPrintLn);\n\t\t\tSystem.out.println(outPrintLn);\t\n \t}\n }", "private static void writeToFile(String[] writeStringArr, String outputFileName){\n BufferedWriter outputBuffer = null;\n try{\n File outputFile = new File(outputFileName);\n if(!outputFile.exists()){\n outputFile.createNewFile();\n }\n\n outputBuffer = new BufferedWriter(new FileWriter(outputFile)); //create buffered reader\n// outputBuffer.write(writeString);\n\n for(int i=0; i< writeStringArr.length; i++){\n outputBuffer.write(writeStringArr[i]);\n outputBuffer.newLine();\n }\n } catch (IOException e){System.err.println(\"Error Writing File\");}\n finally {\n try {\n outputBuffer.close();\n }catch (IOException e){System.err.println(\"Error Closing File\");}\n }\n }", "private void saveLocalFile(ByteArrayOutputStream out) {\n //sava in local files\n FileWriter fw;\n File file = new File(\"/home/shaowen2/testdata/\" + \"vm\" +servers.getServerAddress().substring(15, 17) +\"-ouput.log\");\n\n try {\n if (!file.exists()) {\n file.createNewFile();\n }\n fw = new FileWriter(file);\n BufferedWriter bw = new BufferedWriter(fw);\n bw.write(out.toString());\n //bw.write(\"\\n\" + \"Query Count:\" + count + \"|| Time:\" + new SimpleDateFormat(\"yyyy-MM-dd HH:mm:ss\").format(new Date()) + \"\\n\");\n bw.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "public static BufferedWriter getWriter(Path path) throws IOException {\n return Files.newBufferedWriter(path);\n }", "public void outputToFile(String filemame)\n {\n }", "@Override\n public void write(String str) {\n BufferedWriter writer;\n try {\n String path = FileManager.getInstance().getPath();\n writer = new BufferedWriter(new FileWriter(path, true));\n writer.write(str);\n writer.newLine();\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }", "private void createSaveData(){\n try {\n File f = new File(filePath, highScores);\n FileWriter output = new FileWriter(f);\n BufferedWriter writer = new BufferedWriter(output);\n\n writer.write(\"0-0-0-0-0\");\n writer.newLine();\n writer.write(\".....-.....-.....-.....-.....\");\n writer.close();\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "private PrintWriter createOutputFile(String outputFile) throws IOException {\n return new PrintWriter(new BufferedWriter(new FileWriter(outputFile)));\n }", "private static void writeToOutput(String path, Apriori apriori){\n try{\n BufferedWriter output = new BufferedWriter(new FileWriter(path, false));\n for (String s : apriori.mItemSet){\n output.write(s);\n }\n output.close();\n } catch (IOException e){\n e.printStackTrace();\n }\n }", "private void outputFile() {\n // Define output file name\n Scanner sc = new Scanner(System.in);\n System.out.println(\"What do you want to call this file?\");\n String name = sc.nextLine();\n\n // Output to file\n Path outputFile = Paths.get(\"submissions/\" + name + \".java\");\n try {\n Files.write(outputFile, imports);\n if (imports.size() > 0)\n Files.write(outputFile, Collections.singletonList(\"\"), StandardOpenOption.APPEND);\n Files.write(outputFile, lines, StandardOpenOption.APPEND);\n } catch (IOException e) {\n e.printStackTrace();\n }\n\n }", "@Override\r\n\tpublic int saveProgramToFile(Robot robot, String path)\r\n\t{\r\n\t\ttry\r\n\t\t{\r\n\t\t\tBufferedWriter out = new BufferedWriter(new java.io.FileWriter(new java.io.File(path)));\r\n\t\t\tout.write(robot.getProgram().toString());\r\n\t\t\tout.close();\r\n\t\t} \r\n\t\tcatch (IOException e) \r\n\t\t{\r\n\t\t\tSystem.out.println(\"The operation failed.\");\r\n\t\t\treturn -1;\r\n\t\t}\r\n\t\t\r\n\t\treturn 0;\r\n\t}", "public ThingToWriteFile(String filename) { \n\t\ttry { \t\n\t\t\tout = new BufferedWriter(new FileWriter(filename));\n\t\t}\n\t\tcatch (FileNotFoundException ee){\n\t\t\tSystem.out.println(\"File \" + filename + \" not found.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t\tcatch (IOException e){\n\t\t\tSystem.out.println(\"File \" + filename + \" cannot be read.\");\n\t\t\tSystem.exit(0);\n\t\t}\n\t}", "private void writeTo(String logEntry, File logFile) throws IOException {\n try (FileWriter logFileWriter = new FileWriter(logFile, true);) {\n logFileWriter.write(logEntry);\n logFileWriter.write(System.lineSeparator());\n logFileWriter.flush();\n logFileWriter.close();\n }\n}", "private void writeToFile(){\n try(BufferedWriter br = new BufferedWriter(new FileWriter(filename))){\n for(Teme x:getAll())\n br.write(x.toString()+\"\\n\");\n br.close();\n }catch (IOException e){\n e.printStackTrace();\n }\n }", "public static void main(String[] args) throws IOException {\nFileInputStream fin=new FileInputStream(\"C:\\\\\\\\Users\\\\\\\\Dell\\\\\\\\Desktop\\\\\\\\input.txt\");\nFileOutputStream fout=new FileOutputStream(\"C:\\\\\\\\\\\\\\\\Users\\\\\\\\\\\\\\\\Dell\\\\\\\\\\\\\\\\Desktop\\\\\\\\\\\\\\\\output.txt\");\nint c=0;\nwhile((c=fin.read())!=-1)\n{\n\tfout.write(c);\n}\nSystem.out.println(\"written completed\");\n\t}", "public void write(File output) throws IOException {\n }", "void save(String output);", "protected void fileSet() throws IOException {\n//\t\tfos = new FileOutputStream(outFile, false);\n//\t\tdos = new DataOutputStream(fos);\n\t\trealWriter = new BufferedWriter(new FileWriter(outFile.getAbsolutePath()));\n\t}", "private static void writeOutputFile(BufferedWriter brWr, OutputBean outBean) throws IOException, Exception {\n\t\tif(outBean != null) {\n\t\t\tif(outBean.isNoPathAvailable()) {\n\t\t\t\tbrWr.write(outBean.getExpansion());\n\t\t\t\tbrWr.newLine();\n\t\t\t\tbrWr.write(\"NoPathAvailable\");\n\t\t\t\t//System.out.println(\"NoPathAvailable\");\n\t\t\t}\n\t\t\telse {\n\t\t\t\tbrWr.write(outBean.getExpansion());\n\t\t\t\tbrWr.newLine();\n\t\t\t\tbrWr.write(outBean.getOutput());\n\t\t\t\tbrWr.newLine();\n\t\t\t\tbrWr.write(String.valueOf(outBean.getPathCost()));\n\t\t\t\t//System.out.println(outBean.getExpansion());\n\t\t\t\t//System.out.println(outBean.getOutput());\n\t\t\t\t//System.out.println(outBean.getPathCost());\n\t\t\t\t}\n\t\t\t}\n\t\telse {\n\t\t\t\tSystem.out.println(\"null outbean object...Check file for validity\");\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\t\tFileWriter fw = new FileWriter(\"C:\\\\Users\\\\shami\\\\OneDrive\\\\Desktop\\\\WriteData.txt\");\n\t\tBufferedWriter bw = new BufferedWriter(fw);\n\t\tbw.write(\"Hello I am Working\");\n\t\tbw.write(\"Hello I am Sleeping\");\n\t\tSystem.out.println(\"Hey Done\");\n\t\tbw.close();\n\t\t\n\n\t}", "private static void writeDataLog(String string, String result) throws IOException {\n\t\tBufferedWriter bw = new BufferedWriter(new FileWriter(new File(string), true));\n\t\tbw.write(result);\n\t\tbw.newLine();\n\t\tbw.flush();\n\t\tbw.close();\n\t}", "public static void main(String args[])\n {\n String FILENAME = \"myfile.txt\";\n\n // When used, the FileWriter object will immediately put it's output\n // to the file. So FileWriter output attempts to write to the file as\n // fast as possible. Maybe this is a good thing in some\n // circumstances, but I think it would be better to write data in\n // chunks. We employ a BufferedWriter object to capture the\n // FileWriter output into a collection of bytes that can be written\n // to the file.\n FileWriter fWriter = null;\n BufferedWriter bWriter = null;\n\n // Wrapping our attempt to write to the file inside a try / catch\n // statement allows us to trap some errors if they happen\n try\n {\n // Here is the content that we will write to the file.\n String fileContent = \"Dude, I'm totally writing to a file!!\";\n\n // These lines instantiate FileWriter and BufferedWriter objects.\n // When instantiating the FileWriter object we pass in the file\n // name that we are writing to. If no path is given in our\n // filename, the file will be created and written in the root\n // directory.\n fWriter = new FileWriter(FILENAME);\n\n // The BufferedWriter object is instantiated on this line and the\n // FileWriter object is passed in as an argument.\n bWriter = new BufferedWriter(fWriter);\n\n // Now that we have our buffer and writer objects created, we can\n // attempt to write content to the file. Here is what\n // (I think) this is doing. The BufferedWriter object will receive\n // the content to be written, and then pass that content as a\n // whole to the FileWriter so it can be written to the file as a\n // chunk. If we did not do it this way, the content would be read\n // passed into the FileWriter object, converted to bytes on the\n // fly, and immediately written, byte by byte as it is converted,\n // to the file. By buffering we are increasing the performance of\n // this action.\n bWriter.write(fileContent);\n }\n\n // The catch statement will trap and display any exception that is\n // created when we are attempting to create our writer objects, open\n // or create the file, or write content.\n catch(Exception e)\n {\n System.out.println(\"Unable to write to file : \" + e.getMessage());\n }\n\n // This 'finally' statement will always happen, regardless of what\n // happens in our try/catch statement. If we put this code into the\n // try statement and we received an error, it would never be\n // processed. Additionally, if we put this code at the bottom of our\n // program and ran into an error half way through, it would never be\n // processed. Placing the code into a finally statement allows us to\n // ensure that it is run every time.\n finally\n {\n // Another try and catch statement to trap any error that happens\n // when closing the files.\n try\n {\n // The last thing we want to do is close out our writer\n // objects. This is a best practice since if you leave the\n // writer open you are at best wasting system resources, and\n // at worst you could lock this file for editing while other\n // resources are trying to use it. We check to make sure it\n // is not already disposed of, and then we call the close()\n // method.\n if (bWriter != null) {\n bWriter.close();\n }\n\n if (fWriter != null) {\n fWriter.close();\n }\n }\n // Our final catch reveals any errors that popped up when we were\n // attempting to close the writer and buffer objects.\n catch (Exception e)\n {\n System.out.println(\"Unable to close writer objects :\"\n + e.getMessage());\n }\n }\n }", "public void saveFile() {\n\t\tPrintWriter output = null;\n\t\ttry {\n\t\t\toutput = new PrintWriter(\"/Users/katejeon/Documents/Spring_2020/CPSC_35339/avengers_project/game_result.txt\");\n\t\t\toutput.println(textArea.getText());\n\t\t\toutput.flush();\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t\tSystem.out.println(\"File doesn't exist.\");\n\t\t} finally {\n\t\t\toutput.close();\n\t\t}\n\t}", "public static void main(String[] args) {\ntry\r\n{\r\n\tFileWriter fw= new FileWriter(\"D:/abc.txt\");\r\n\tString s=\"india \\t is my country\";\r\n\tfw.write(s);\r\n\tfw.flush();\r\n\tfw.close();\r\n}\r\ncatch(IOException e)\r\n{\r\n\tSystem.out.println(e);\r\n}\r\n\t}", "private void cmdWrite(String filename) throws NoSystemException {\n MSystem system = system();\n PrintWriter out = null;\n try {\n if (filename == null)\n out = new PrintWriter(System.out);\n else {\n out = new PrintWriter(new BufferedWriter(new FileWriter(\n filename)));\n }\n out\n .println(\"-- Script generated by USE \"\n + Options.RELEASE_VERSION);\n out.println();\n system.writeSoilStatements(out);\n } catch (IOException ex) {\n Log.error(ex.getMessage());\n } finally {\n if (out != null) {\n out.flush();\n if (filename != null)\n out.close();\n }\n }\n }", "protected void writeCompareOutputFile(String outputText) {\n try {\n BufferedWriter writer = new BufferedWriter(new FileWriter(getFile(), true));\n String lineSeparator = System.getProperty(\"line.separator\");\n writer.write(outputText + lineSeparator);\n writer.flush();\n writer.close();\n } catch (IOException e) {\n System.out.println(e.toString());\n }\n }", "public static void main(String[] args) throws IOException {\n PrintWriter outputFile = new PrintWriter(\"ResultFile.txt\");\n\n outputFile.println(\"Line 1\");\n outputFile.println(\"Line 2\");\n outputFile.println(\"Line 3\");\n outputFile.println(\"Line 4\");\n\n\n outputFile.close();\n\n }", "private void createFile(String outputData, File file) {\n try {\n FileWriter writer = new FileWriter(file);\n writer.write(outputData);\n writer.close();\n } catch (IOException e) {\n e.getSuppressed();\n }\n }", "private void saveOutputFile() {\n FileChooser fileChooser = new FileChooser();\n if (textMergeScript.hasCurrentDirectory()) {\n fileChooser.setInitialDirectory (textMergeScript.getCurrentDirectory());\n }\n chosenOutputFile = fileChooser.showSaveDialog (ownerWindow);\n if (fileChooser != null) {\n writeOutput();\n openOutputDataName.setText (tabNameOutput);\n }\n }", "private BufferedWriter abrirArquivoEscrita() {\n\t\ttry{\n\t\t\tBufferedWriter file = null;\n\t\t\tfile = new BufferedWriter(new FileWriter(caminho));\n\t\t\treturn file;\n\t\t}catch(Exception e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t\treturn null;\n\t}", "@Test\n public void testWriteToPrintWriter() throws Exception {\n System.out.println(\"writeToPrintWriter\");\n PrintWriter output = new PrintWriter(\"tmp.log\");\n String data = \"abc\";\n boolean expResult = true;\n boolean result = IOUtil.writeToPrintWriter(output, data);\n assertEquals(expResult, result);\n result = IOUtil.writeToPrintWriter(output, null);\n assertEquals(false, result);\n\n }", "public abstract void saveToFile(PrintWriter out);", "private PrintWriter getStorageFile() throws IOException {\n Path path = Paths.get(filePath);\n\n // Create directories if necessary\n if (path.getParent() != null) {\n Files.createDirectories(path.getParent().getFileName());\n }\n\n return new PrintWriter(new BufferedWriter(new FileWriter(filePath)));\n }", "private static void writeStringToFile(String string) {\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(OUTPUT_FILE_TEMP))) {\n\t\t\twriter.write(string);\n\t\t} catch (IOException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "private void writeProc() throws Exception {\n\t\tWriter writer = new Writer(this.procPath,this.procDataList);\n\t\twriter.running();\n\t}", "public static void writeFile(String outFile, String text) {\n try{\n FileWriter fileWriter = new FileWriter(outFile,false);\n PrintWriter pw = new PrintWriter(fileWriter,true);\n \n if (text==null) {\n pw.println();\n }\n else\n {\n pw.println(text);\n }\n \n pw.close();\n fileWriter.close();\n }\n catch(Exception e) {\n e.printStackTrace();\n }\n }", "static void write (String filename, String graph_str) throws IOException {\n \ttry (FileWriter writer = new FileWriter(filename);\n BufferedWriter bw = new BufferedWriter(writer)) {\n bw.write(graph_str);\n } catch (IOException e) {\n System.err.format(\"IOException: %s%n\", e);\n }\n\t}", "public void writeCSVtable(String outBuffer) throws IOException\n {\n String csvFile;\n // Create a file chooser\n File currentDir = new File(\"\").getAbsoluteFile();\n final JFileChooser fc = new JFileChooser(currentDir);\n // In response to a button click:\n int returnVal = fc.showSaveDialog(null);\n // open file\n File file = fc.getSelectedFile();\n // obtain filename\n csvFile = file.getName();\n\n // open the file\n fWriter = new FileWriter(csvFile); \n // write ALL the to the file in 1 burst\n fWriter.write(outBuffer); \n // close the file\n fWriter.close();\n }", "public void createLogFile() {\n\t\tBufferedWriter out = null;\n\t\ttry {\n\t\t\tFile root = Environment.getExternalStorageDirectory();\n\t\t\tLog.e(\"SD CARD WRITE ERROR : \", \"SD CARD mounted and writable? \"\n\t\t\t\t\t+ root.canWrite());\n\t\t\tif (root.canWrite()) {\n\t\t\t\tFile gpxfile = new File(root, \"ReadConfigLog.txt\");\n\t\t\t\tFileWriter gpxwriter = new FileWriter(gpxfile);\n\t\t\t\tout = new BufferedWriter(gpxwriter);\n\t\t\t\tout.write(\"Hello world\");\n\t\t\t\t// out.close();\n\t\t\t}\n\t\t} catch (IOException e) {\n\t\t\tLog.e(\"SD CARD READ ERROR : \", \"Problem reading SD CARD\");\n\t\t\tLog.e(\"SD CARD LOG ERROR : \", \"Please take logs using Logcat\");\n\t\t\tLog.e(\"<<<<<<<<<<WifiPreference>>>>>>>>>>>>\",\n\t\t\t\t\t\"Could not write file \" + e.getMessage());\n\t\t}\n\t}", "private void saveInFile() {\n try {\n FileOutputStream fos = openFileOutput(FILENAME,\n Context.MODE_PRIVATE);//goes stream based on filename\n BufferedWriter out = new BufferedWriter(new OutputStreamWriter(fos)); //create buffer writer\n Gson gson = new Gson();\n gson.toJson(countbookList, out);//convert java object to json string & save in output\n out.flush();\n fos.close();\n } catch (FileNotFoundException e) {\n throw new RuntimeException();\n } catch (IOException e) {\n throw new RuntimeException();\n }\n }", "private void writeFile(String string) {\n\t\ttry {\n\t\t\tFormatter fileWriter = new Formatter(new File( System.getProperty(\"user.dir\") + \"\\\\highscores.txt\"));\n\t\t\t\n\t\t\tfileWriter.format(string);\n\t\t\t\n\t\t\tfileWriter.close();\n\t\t} catch (FileNotFoundException e) {\n\t\t\tSystem.out.print(\"ERROR: Line 132: Unable to write file\");\n\t\t\t//e.printStackTrace();\n\t\t}\n\t}", "public static void createSaveFile( )\n {\n try\n {\n new File( \"data\" ).mkdirs( );\n PrintWriter writer = new PrintWriter( \"data/\" + Game.instance.getCurrentSaveFile( ).SAVEFILENAME + \".txt\", \"UTF-8\" );\n writer.println( \"dkeys: \" + Game.START_DIAMOND_KEY_COUNT );\n writer.close( );\n }\n catch ( IOException e )\n {\n e.printStackTrace( );\n System.exit( 1 );\n }\n }", "String getFileOutput();", "public static void RedirectOutput() {\t\n\t\ttry {\n\t\t\tPrintStream out = new PrintStream(new FileOutputStream(\"ybus.txt\"));\n\t\t\tSystem.setOut(out); //Re-assign the standard output stream to a file.\n\t\t} catch (FileNotFoundException e) {\n\t\t\te.printStackTrace();\n\t\t}\n\t}", "public void writeFile() {\n try {\n FileWriter writer = new FileWriter(writeFile, true);\n writer.write(user + \" \" + password);\n writer.write(\"\\r\\n\"); // write new line\n writer.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n \n }", "static void writeFile(String path , String data) throws IOException{\n\t\tFileOutputStream fo = new FileOutputStream(path,true);\n\t\tfo.write(data.getBytes());\n\t\tfo.close();\n\t\tSystem.out.println(\"Done...\");\n\t}", "private static void dosyaYazici(String text)\n {\n File log = new File(\"log.txt\");\n try\n {\n if (!log.exists())\n {\n log.createNewFile();\n }\n FileWriter fileWriter = new FileWriter(log,true);\n BufferedWriter bufferedWriter = new BufferedWriter(fileWriter);\n bufferedWriter.append(text+\"\\n\");\n bufferedWriter.close();\n //System.out.print(\"TEST\");\n }\n catch (IOException e)\n {\n System.out.print(\"DOSYA HATASI!\");\n e.printStackTrace();\n }\n\n }", "void createFile()\n {\n //Check if file already exists\n try {\n File myObj = new File(\"src/main/java/ex45/exercise45_output.txt\");\n if (myObj.createNewFile()) {\n System.out.println(\"File created: \" + myObj.getName());// created\n } else {\n System.out.println(\"File already exists.\"); //exists\n }\n //Error check\n } catch (IOException e) {\n System.out.println(\"An error occurred.\");\n e.printStackTrace();\n }\n }", "private void writeToFile(SVGGraphics2D generator, String path) throws IOException {\n\t\tFile file = new File(path);\n\t\tif (!file.exists())\n\t\t\tfile.createNewFile();\n\t\tFileWriter fw = new FileWriter(file);\n\t\tPrintWriter writer = new PrintWriter(fw);\n\t\tgenerator.stream(writer);\n\t\twriter.close();\n\t}", "public void saveFile(TaskList tasklist) {\n try {\n String cwd = System.getProperty(\"user.dir\");\n FileWriter fw = new FileWriter(cwd + filePath);\n for (Task task : tasklist.getTasks()) {\n String data = task.getData();\n fw.write(data + System.lineSeparator());\n }\n fw.close();\n } catch (IOException e) {\n System.out.println(\"Something went wrong: \" + e.getMessage());\n }\n\n }", "void setOutputPath(String outputPath);", "void writeToFile() throws IOException{\n\t\tString fileName = f.getTitle() + \".txt\";\n\t\tfileWrite = new BufferedWriter( new FileWriter(fileName));\n\t\tfileWrite.write(history);\n\t\tSystem.out.println(fileName + \" File Writing Successful!!\");\n\t\tSystem.out.println(\"Data in file :\\n\" + history);\n\t\tfileWrite.flush();\n\t\tFile file = new File(fileName);\n\t\tjava.awt.Desktop.getDesktop().open(file);\n\n\t}", "public static void WriteFile()throws java.io.FileNotFoundException,java.io.IOException\n {\n FileOutputStream out1= new FileOutputStream(\"Sample.bin\") ; \n String ab=\"Welcome to sample file\";\n out1.write(ab.getBytes());\n out1.flush();\n out1.close();\n }", "public void writeFile(String data){\n\t\t\n\t\tcurrentLine = data;\n\t\t\n\t\t\ttry{ \n\t\t\t\tFile file = new File(\"/Users/bpfruin/Documents/CSPP51036/hw3-bpfruin/src/phfmm/output.txt\");\n \n\t\t\t\t//if file doesnt exists, then create it\n\t\t\t\tif(!file.exists()){\n\t\t\t\t\tfile.createNewFile();\n\t\t\t\t}\n \n\t\t\t\t//true = append file\n\t\t\t\tFileWriter fileWriter = new FileWriter(file,true);\n \t \tBufferedWriter bufferWriter = new BufferedWriter(fileWriter);\n \t \tbufferWriter.write(data);\n \t \tbufferWriter.close();\n \n \n\t\t\t}catch(IOException e){\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\t\n\t\t\n\t}", "public abstract void writeToFile( );", "private BufferedWriter openCacheFile() throws IOException {\n boolean hasLock = false;\n while (!hasLock) {\n synchronized (this) {\n if (!lock) {\n lock = true;\n hasLock = true;\n }\n }\n if (!hasLock) try {\n Thread.sleep(1000);\n } catch (Exception e) {\n }\n }\n tmpFile = new File(cacheDir, \"changeLog.tmp\");\n if (tmpFile.exists()) tmpFile.delete();\n tmpFile.createNewFile();\n BufferedWriter out = new BufferedWriter(new FileWriter(tmpFile));\n if (cacheFile.exists()) {\n BufferedReader in = new BufferedReader(new FileReader(cacheFile));\n String nextLine = in.readLine();\n while (nextLine != null) {\n out.write(nextLine);\n out.newLine();\n nextLine = in.readLine();\n }\n in.close();\n }\n return out;\n }", "private void writeFile(String line, BufferedWriter theOutFile) throws Exception {\n\t\ttheOutFile.append(line);\t\t\t// write the line out\n\t\ttheOutFile.newLine();\t\t\t\t// skip to the next line\t\t\n\t}", "private void setupWriter() {\n output = new StringWriter();\n writer = new PrintWriter(output);\n }", "public static void writeToFile(String path, String text) throws IOException {\n Charset charSet = Charset.forName(\"US-ASCII\");\n BufferedWriter writer = new BufferedWriter(new FileWriter(path));\n writer.write(text,0,text.length());\n writer.close();\n }", "private void writeToFile(){\n Calendar c = Calendar.getInstance();\n String dateMedTaken = DateFormat.getDateInstance(DateFormat.FULL).format(c);\n FileOutputStream fos = null;\n\n try {\n fos = openFileOutput(FILE_NAME, MODE_APPEND);\n fos.write(dateMedTaken.getBytes());\n } catch (FileNotFoundException e) {\n e.printStackTrace();\n } catch (IOException e) {\n e.printStackTrace();\n } finally {\n if(fos != null){\n try {\n fos.close();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n }\n\n }", "public void writeToFile(String s,String outFile) \n\t{\n\t\ttry \n\t\t{\n\t\t\tbw = new BufferedWriter(new FileWriter(outFile));\n\t\t\tbw.write(s);\n\t\t\tMyLogger.writeMessage(\"Results written to file\", MyLogger.DebugLevel.RESULTS);\n\t\t\tbw.close();\n\t\t}\n\t\tcatch(IOException e) {\n\t\t\tSystem.err.println(\"Exception: writing to output.txt\");\n\t\t\tSystem.err.println(\"Exiting\");\n\t\t\tSystem.err.println(e.getMessage());\n\t\t\te.printStackTrace();\n\t\t\tSystem.exit(1);\n\t\t}\n\t\t\n\t}", "private BufferedWriter createWriter(String filePath, String fileName)\r\n\t\t\tthrows IOException {\r\n\t\tString fullPath = filePath + \"/\" + fileName;\r\n\t\tFile file = new File(fullPath);\r\n\t\tboolean exists = new File(filePath).exists();\r\n\t\tif (!exists) {\r\n\t\t\tfile.mkdir();\r\n\t\t}\r\n\t\tFileWriter writer = new FileWriter(file);\r\n\t\tBufferedWriter bufferWriter = new BufferedWriter(writer);\r\n\r\n\t\treturn bufferWriter;\r\n\t}", "private static void writeToFile(String string){\n try {\n buffer.write(string);\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public static void writeToFile(String context, String outputFileName) throws IOException {\n KubernetesDataHolder dataHolder = KubernetesContext.getInstance().getDataHolder();\n outputFileName = dataHolder.getOutputDir() + File\n .separator + extractBalxName(dataHolder.getBalxFilePath()) + outputFileName;\n DeploymentModel deploymentModel = dataHolder.getDeploymentModel();\n JobModel jobModel = dataHolder.getJobModel();\n // Priority given for job, then deployment.\n if (jobModel != null && jobModel.isSingleYAML()) {\n outputFileName =\n dataHolder.getOutputDir() + File.separator + extractBalxName(dataHolder.getBalxFilePath()) + YAML;\n } else if (jobModel == null && deploymentModel != null && deploymentModel.isSingleYAML()) {\n outputFileName =\n dataHolder.getOutputDir() + File.separator + extractBalxName(dataHolder.getBalxFilePath()) + YAML;\n \n }\n File newFile = new File(outputFileName);\n // append if file exists\n if (newFile.exists()) {\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8), StandardOpenOption.APPEND);\n return;\n }\n //create required directories\n if (newFile.getParentFile().mkdirs()) {\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8));\n return;\n }\n Files.write(Paths.get(outputFileName), context.getBytes(StandardCharsets.UTF_8));\n }", "public void writeOut(PrintWriter pw){}", "public static void saveAs(String line,String path)\n {\n \ttry (BufferedWriter writer = new BufferedWriter(new OutputStreamWriter(new FileOutputStream(path), \"utf-8\"))) {//goes to the directory\n \t\n \t\twriter.write(line,0,line.length());//saves the lines starting from 0 till the length of the lines\n \t} catch (Exception x) {\n \t\tx.printStackTrace();\n \t}\n }", "Path getWritePath()\n {\n return writePath;\n }", "private void writeToFiles(Context resultContext) throws IOException {\n\t\tMap<String, Map<Object, ArrayList<Object>>> keyValMappingByBaseOutputPath = resultContext.getKeyValMappingsByBaseOutputPath(); \n\t\t//Write key & value to each baseOutputPath's \n\t\tPath targetOutputDir = null;\n\t\tMap<Object, ArrayList<Object>> keyValMapping = null;\n\t\tPath finalOutputBaseDir = this.config.getFinalOutputDir();\n\t\tfor (String baseOutputPath: keyValMappingByBaseOutputPath.keySet()) {\n\t\t\tif (baseOutputPath.equals(\"\")) {\n\t\t\t\t//Regular output goes into the mapper output buffer directory.\n\t\t\t\ttargetOutputDir = this.config.getMapOutputBufferDir();\n\t\t\t}else {\n\t\t\t\t//Multiple output to a particular outputPath which was \n\t\t\t\t//specified by user goes into the final output directory. \n\t\t\t\ttargetOutputDir = Paths.get(finalOutputBaseDir.toString(), baseOutputPath);\n\t\t\t}\n\t\t\tkeyValMapping = keyValMappingByBaseOutputPath.get(baseOutputPath);\n\t\t\tthis.writeEachMapping(targetOutputDir, keyValMapping);\n\t\t};\n\t}", "public void writer(Vector<String> toWrite, String path) throws IOException {\n file = new File(path);\n fw = new FileWriter(file);\n\n for (int i = 0; i < toWrite.size(); i++) {\n fw.write(toWrite.get(i));\n fw.write('\\n');\n fw.flush();\n }\n }", "protected abstract void writeFile();", "public static void writeToCSV() {\n final String CSV_SEPARATOR = \",\";\n final String QUOTE = \"\\\"\";\n if (!Crawler.getKeyWordsHits().isEmpty()) {\n try (BufferedWriter bufferedWriter =\n new BufferedWriter(\n new OutputStreamWriter(\n new FileOutputStream(\"results.csv\", true), StandardCharsets.UTF_8))) {\n\n Crawler.getKeyWordsHits().forEach((keyWord, hitsNumber) -> {\n String oneLine = QUOTE + keyWord + QUOTE +\n CSV_SEPARATOR +\n hitsNumber;\n try {\n bufferedWriter.write(oneLine);\n bufferedWriter.newLine();\n } catch (IOException e) {\n e.printStackTrace();\n }\n });\n String lastLine = QUOTE + Crawler.getUrl() + QUOTE + CSV_SEPARATOR + Crawler.getTotalHits();\n bufferedWriter.write(lastLine);\n bufferedWriter.newLine();\n bufferedWriter.flush();\n } catch (IOException e) {\n e.printStackTrace();\n }\n }\n Crawler.setKeyWordsHits(new HashMap<>());\n Crawler.setTotalHits(0);\n }", "public static void save(String line)\n {\n \ttry (BufferedWriter writer = Files.newBufferedWriter(path, StandardCharsets.UTF_8)) {\n \t\twriter.write(line,0,line.length());//takes the lines stars from the index 0 and saves till the end\n \t} catch (Exception x) {\n \t\tx.printStackTrace();//prints stack if something is worng\n \t}\n }", "public static void createJsonFile(JsonObject json) throws IOException {\n\r\n FileWriter file = new FileWriter(\"outputfile\", false);\r\n try {\r\n file.write(Jsoner.prettyPrint(json.toJson(),2));\r\n file.flush();\r\n } catch (IOException e) {\r\n out.println(\"Error \" + e);\r\n }\r\n }", "private void writeToFile() throws IOException {\n\t\tFileWriter write = new FileWriter(path);\n\t\tPrintWriter print_line = new PrintWriter(write);\n\t\t\n\t\tEnumeration<String> fd_key_Enum = fileData.keys();\n\t\tEnumeration<String> fd_value_Enum = fileData.elements();\n\t\twhile (fd_key_Enum.hasMoreElements() && fd_value_Enum.hasMoreElements()) {\n\t\t\tprint_line.printf(\"%s\" + \"%n\", fd_key_Enum.nextElement() + \":\" + fd_value_Enum.nextElement());\n\t\t}\n\t\t\n\t\tprint_line.close();\n\t\twrite.close();\n\t}", "private void CreateNewFile() {\n\tcheckState();\n\t\n\tif (CanR=CanW=true)\n\t{\n\t\t\n\t\ttry {\n\t\t root = Environment.getExternalStorageDirectory();\n\t\t \n\t\t if (root.canWrite()){\n\t\t gpxfile = new File(root, \"Speed_SD.csv\");\n\t\t gpxwriter = new FileWriter(gpxfile,true);\n\t\t out = new BufferedWriter(gpxwriter);\nout.append(\"\"+\",\"+\"\"+\",\"+\"\");\n\t\t out.newLine();\n\t\t }\n\t\t} catch (IOException e) {\n\t\t //Log.e(, \"Could not write file \" + e.getMessage());\ne.printStackTrace();\n\t\t\n\t}\n\t\t\n}\n\t\t}", "public void generateOutputFile(String inputFile) {\n\n String outputFile = properties.getProperty(\"output.directory\")\n + properties.getProperty(\"output.file.distinct\");\n\n\n try (PrintWriter out = new PrintWriter(new BufferedWriter(\n new FileWriter(outputFile)))){\n\n loopThroughTokens(out);\n\n\n } catch (FileNotFoundException fileNotFound) {\n fileNotFound.printStackTrace();\n } catch (IOException inputOutputException) {\n inputOutputException.printStackTrace();\n } catch (Exception exception) {\n exception.printStackTrace();\n }\n }", "public static BufferedOutputStream getOutput(Path path) throws IOException {\n return get(Files.newOutputStream(path));\n }", "public static void main(String[] args) throws IOException {\n\r\n\t\t\r\n\t\tString file = \"data/example.txt\";\r\n\t\t\r\n\t\t\r\n\t\t//2. Create object of FileWrite\r\n\t\t\r\n\t\tFileWriter fw = new FileWriter (file);\r\n\t\t\r\n\t\tfw.write(\"This is my example file\");\r\n\t\t\r\n\t\t//3. you have to close the file.\r\n\t\t\r\n\t\tfw.close();\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "private boolean writeToFile(String message) \n\t{\n\t BufferedWriter writer = null;\n\t boolean status = false;\n\t\ttry {\n\t\t\twriter = new BufferedWriter(new FileWriter(outputFile, true));\n\t\t\twriter.write(\"\\n\"+message);\n\t\t writer.close();\n\t\t status = true;\n\t\t} catch (IOException e) {\n\t\t\tSystem.err.println(\"Error occured in writing output to file: \"+e.getLocalizedMessage());\n\t\t\ttry {\n\t\t\t\tif(writer!=null) {\n\t\t\t\t\twriter.close();\n\t\t\t\t}\n\t\t\t} catch (IOException e1) {\n\t\t\t\tSystem.err.println(\"Error occured in closing filewriter: \"+e1.getLocalizedMessage());\n\t\t\t}\n\t\t\treturn status;\n\t\t}\n\t\treturn status; \n\t \n\t}", "private void saveResourceFile()\r\n\t{\t\r\n\t\tFile file = null;\r\n\t\tFileWriter fw = null;\r\n\t\t//File complete = null;//New file for the completed list\r\n\t\t//FileWriter fw2 = null;//Can't use the same filewriter to do both the end task and the complted products.\r\n\t\ttry{\r\n\t\t\tfile = new File(outFileName);\r\n\t\t\tfile.createNewFile();\r\n\t\t\tfw = new FileWriter(outFileName,true);\r\n\t\t\tfor(FactoryObject object : mFObjects)\r\n\t\t\t{\r\n\t\t\t\tif(object instanceof FactoryReporter) {\r\n\t\t\t\t\t((FactoryReporter)object).report(fw);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t} catch (IOException ioe) {\r\n\t\t\tSystem.out.println(ioe.getMessage());\r\n\t\t\tif(file != null) {\r\n\t\t\t\tfile.delete();\r\n\t\t\t}\r\n\t\t} finally {\r\n\t\t\tif(fw != null) {\r\n\t\t\t\ttry{\r\n\t\t\t\t\tfw.close();\r\n\t\t\t\t} catch (IOException e) {\r\n\t\t\t\t\tSystem.out.println(\"Failed to close the filewriter!\");\r\n\t\t\t\t}\r\n\t\t\t}\r\n\t\t}\r\n\t}", "public void writeFile(String text, String writePath)\r\n\t{\r\n\t\t//Use a filewriter but change it to a buffered writer. Open writing on the file provided by writePath\r\n\t\ttry (BufferedWriter writer = new BufferedWriter(new FileWriter(writePath)))\r\n\t\t{\r\n\t\t\t// Write given text to file\r\n\t\t\twriter.write(text);\t\r\n\t\t} \r\n\t\tcatch (IOException except)\r\n\t\t{\r\n\t\t\texcept.printStackTrace();\r\n\t\t}\r\n\r\n\t}", "public void writeFile(String content){\n\t\tFile file = new File(filePath);\n\t\t\n\t\tBufferedWriter bw = null;\n\t\t\n\t\ttry{\n\t\t\tif (!file.exists())\n\t\t\t\tfile.createNewFile();\n\t\t\t\n\t\t\tbw = new BufferedWriter(new FileWriter(file));\n\t\t\tbw.write(content);\n\t\t}\n\t\tcatch (Exception oops){\n\t\t\tSystem.err.print(\"There was an error writing the file \"+oops.getStackTrace());\n\t\t}\n\t\tfinally{\n\t\t\ttry{\n\t\t\t\tbw.close();\n\t\t\t}\t\n\t\t\tcatch(IOException oops){\n\t\t\t\tSystem.err.print(\"There was an error closing the write buffer \"+oops.getStackTrace());\n\t\t\t}\n\t\t}\n\t}", "public void writeToFile(String outputName) throws Exception{\n if (trials == null || data == null) throw new Exception(\"Must read marker and data file before writing it out\");\n BufferedWriter bw = new BufferedWriter(new FileWriter(outputName));\n \n //.. write out the headers\n for (int i= FIRSTPROBEINDEX; i < header.length; i++) {\n bw.write(header[i]);\n bw.write(\",\");\n }\n \n //.. write out condition\n bw.write(\"condition\");\n \n bw.write(\"\\n\");\n int rowNum =0;\n \n //.. write out actual data\n for (String [] row : data) {\n if (row.length!= header.length) System.out.println(\"Row has \" + row.length + \" whereas header has \" + header.length);\n String label =null;\n for (int i = FIRSTPROBEINDEX; i < row.length; i++) {\n label = getLabel(rowNum); //.. will be null if it doesn't exist\n \n if (label != null ) {\n bw.write(row[i]);\n bw.write(\",\");\n }\n }\n if (label!=null) {\n //System.out.println(\"Writing \" + getLabel(rowNum));\n String condition = getLabel(rowNum);\n bw.write(condition);\n bw.write(\"\\n\");\n \n //.. this is a hack since my program gives an error if a conditon jsut has one line\n if (condition.equals(\"passed\")) duplicateLastLine(bw, row, condition,20 );\n \n }\n rowNum++;\n }\n \n bw.close();\n }", "public void writeFile(String filename, ArrayList<String> output)\n {\n try\n {\n PrintWriter write = new PrintWriter(filename);\n for(String out : output)\n {\n write.println(out);\n }\n write.close();\n }\n catch(FileNotFoundException exception) \n {\n String error = filename + \" not found\";\n System.out.println(error);\n }\n \n catch(IOException exception) \n {\n String error = \"Unexpected I/O error occured\";\n System.out.println(error); \n } \n }", "public void printDataToFile(){\n\ttry {\n\t File file = new File(\"media/gameOutput.txt\");\n \n\t // if file doesnt exists, then create it\n\t if (!file.exists()) {\n\t\tfile.createNewFile();\n\t }\n \n\t FileWriter fw = new FileWriter(file.getAbsoluteFile());\n\t BufferedWriter bw = new BufferedWriter(fw);\n\t bw.write(printString);\n\t bw.close();\n\t} catch (IOException e) {\n\t e.printStackTrace();\n\t}\n }", "public void writeOutputFile(String inputFilePath) {\n\n String outputFile = properties.getProperty(\"output.dir\") +\n properties.getProperty(\"output.file.token.size\");\n\n PrintWriter writer = null;\n try {\n writer = createOutputFile(outputFile);\n writeTotalsToFile(writer);\n writer.println();\n writer.println();\n writeHistograms(writer);\n } catch (IOException iOE) {\n System.out.println(\"Error Writing to \" + outputFile);\n iOE.printStackTrace();\n } catch (Exception exception) {\n System.out.println(\"General Error\");\n exception.printStackTrace();\n } finally {\n try {\n if (writer != null) {\n writer.close();\n }\n } catch (Exception exception) {\n\n exception.printStackTrace();\n }\n }\n }", "void writeToFile () throws IOException{\n FileWriter deleteFile = new FileWriter(\"Resolved Ticket of \" + this.resovedDate + \".txt\");\n BufferedWriter FileDeleted = new BufferedWriter(deleteFile);\n\n FileDeleted.write(\"Resolution: \" + this.Resolution + \" ; Date: \" + this.resovedDate);\n FileDeleted.close();\n }", "public void writeFile(String OUTPUT_PATH, boolean header) throws IOException {\r\n\t\t\r\n\t\tif(System.getProperty(\"os.name\").contains(\"indows\")) {\r\n\t\t\t// do nothing, hopefully\r\n\t\t} else {\r\n\t\t\tOUTPUT_PATH = OUTPUT_PATH.replace(\"\\\\\", \"/\");\r\n\t\t}\r\n\t\t\r\n\t\tBufferedWriter output = null;\r\n\t\tFile file = new File(OUTPUT_PATH);\r\n\t\toutput = new BufferedWriter(new FileWriter(file));\r\n\t\t\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t\tif(header == true) {\r\n\t\t\tfor(int i = 0; i < this.fieldNames.length; i++) {\r\n\t\t\t\tsb.append(this.fieldNames[i]);\r\n\t\t\t\tif(i != this.fieldNames.length-1) {\r\n\t\t\t\t\tsb.append(\"\\t\");\r\n\t\t\t\t}\r\n\t\t\t} sb.append(\"\\n\");\r\n\t\t\toutput.write(sb.toString());\r\n\t\t\tsb = new StringBuilder();\r\n\t\t}\r\n\t\t\r\n\t\tfor(int i = 0; i < this.nrow(); i++) {\r\n\t\t\toutput.write(String.join(\"\\t\", this.get(i)) + \"\\n\");\r\n\t\t}\r\n\t\tSystem.out.println(this.nrow());\r\n\t\toutput.close();\r\n\t}" ]
[ "0.7209033", "0.6818546", "0.6047626", "0.60265696", "0.6008954", "0.59189796", "0.5894183", "0.5816089", "0.57773685", "0.5760066", "0.56148213", "0.5603723", "0.5583358", "0.5578361", "0.5570003", "0.5536915", "0.5536325", "0.55081826", "0.5499659", "0.5495905", "0.5481965", "0.54480207", "0.54331785", "0.54312605", "0.5426656", "0.5420687", "0.5403581", "0.54004353", "0.5399426", "0.5382526", "0.5379378", "0.5374422", "0.53396195", "0.5338198", "0.5333611", "0.53241014", "0.5309166", "0.5300822", "0.52979255", "0.5294225", "0.52885216", "0.52875966", "0.5280542", "0.52708155", "0.5264814", "0.5261012", "0.52493054", "0.5236179", "0.52253133", "0.5225064", "0.52204835", "0.5215742", "0.5214586", "0.5209804", "0.5175562", "0.517429", "0.51660967", "0.51613086", "0.5153791", "0.515263", "0.514958", "0.5140612", "0.5132459", "0.51262724", "0.5126202", "0.51231736", "0.5120141", "0.5119553", "0.5119478", "0.5118357", "0.5116266", "0.511445", "0.5104102", "0.5099819", "0.5097541", "0.50919986", "0.5081959", "0.5079085", "0.50724715", "0.5071142", "0.50675863", "0.5061962", "0.5055268", "0.50478417", "0.5044755", "0.50412303", "0.50381625", "0.5026369", "0.50208086", "0.50010383", "0.5000552", "0.49937782", "0.4983647", "0.49775597", "0.4976967", "0.4974679", "0.49682644", "0.49646634", "0.49591386", "0.49533448", "0.4952207" ]
0.0
-1
Inflate the menu; this adds items to the action bar if it is present.
@Override public boolean onCreateOptionsMenu(Menu menu) { getMenuInflater().inflate(R.menu.user_book, menu); return true; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tMenuInflater inflater = getMenuInflater();\n \tinflater.inflate(R.menu.main_activity_actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.actions, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n \tgetMenuInflater().inflate(R.menu.actions, menu);\n \treturn super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.actions_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main_actions, menu);\n\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n\t\tinflater.inflate(R.menu.action_bar_menu, menu);\r\n\t\tmMenu = menu;\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.act_bar_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_actions, menu);\r\n\t\treturn true;\r\n //return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\r\n\t inflater.inflate(R.menu.action_bar_all, menu);\r\n\t return super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\t super.onCreateOptionsMenu(menu);\n\t\tMenuInflater muu= getMenuInflater();\n\t\tmuu.inflate(R.menu.cool_menu, menu);\n\t\treturn true;\n\t\t\n\t\t\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.adventure_archive, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.archive_menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n \tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n \t\tinflater.inflate(R.menu.main, menu);\n \t\tsuper.onCreateOptionsMenu(menu, inflater);\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.action_menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater bow=getMenuInflater();\n\t\tbow.inflate(R.menu.menu, menu);\n\t\treturn true;\n\t\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.action_menu, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\t\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\t\t\n\t\t/* Inflate the menu; this adds items to the action bar if it is present */\n\t\tgetMenuInflater().inflate(R.menu.act_main, menu);\t\t\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflate = getMenuInflater();\n inflate.inflate(R.menu.menu, ApplicationData.amvMenu.getMenu());\n return true;\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.menu, menu);\n\t\t\treturn true; \n\t\t\t\t\t\n\t\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.main, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) \n {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_bar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_item, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tinflater.inflate(R.menu.menu, menu);\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t MenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t return super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t inflater.inflate(R.menu.menu, menu);\n\t \n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\t//menu.clear();\n\t\tinflater.inflate(R.menu.soon_to_be, menu);\n\t\t//getActivity().getActionBar().show();\n\t\t//getActivity().getActionBar().setBackgroundDrawable(\n\t\t\t\t//new ColorDrawable(Color.rgb(223, 160, 23)));\n\t\t//return true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n this.getMenuInflater().inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.main, menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu( Menu menu, MenuInflater inflater )\n\t{\n\t\tsuper.onCreateOptionsMenu( menu, inflater );\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\r\n\t\treturn super.onCreateOptionsMenu(menu);\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\r\n \t// We must call through to the base implementation.\r\n \tsuper.onCreateOptionsMenu(menu);\r\n \t\r\n MenuInflater inflater = getMenuInflater();\r\n inflater.inflate(R.menu.main_menu, menu);\r\n\r\n return true;\r\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main, menu);//Menu Resource, Menu\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n inflater.inflate(R.menu.inter_main, menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.action, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu (Menu menu){\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.menu_main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.custom_action_bar, menu);\n\t\treturn true;\n\t}", "public void initMenubar() {\n\t\tremoveAll();\n\n\t\t// \"File\"\n\t\tfileMenu = new FileMenuD(app);\n\t\tadd(fileMenu);\n\n\t\t// \"Edit\"\n\t\teditMenu = new EditMenuD(app);\n\t\tadd(editMenu);\n\n\t\t// \"View\"\n\t\t// #3711 viewMenu = app.isApplet()? new ViewMenu(app, layout) : new\n\t\t// ViewMenuApplicationD(app, layout);\n\t\tviewMenu = new ViewMenuApplicationD(app, layout);\n\t\tadd(viewMenu);\n\n\t\t// \"Perspectives\"\n\t\t// if(!app.isApplet()) {\n\t\t// perspectivesMenu = new PerspectivesMenu(app, layout);\n\t\t// add(perspectivesMenu);\n\t\t// }\n\n\t\t// \"Options\"\n\t\toptionsMenu = new OptionsMenuD(app);\n\t\tadd(optionsMenu);\n\n\t\t// \"Tools\"\n\t\ttoolsMenu = new ToolsMenuD(app);\n\t\tadd(toolsMenu);\n\n\t\t// \"Window\"\n\t\twindowMenu = new WindowMenuD(app);\n\n\t\tadd(windowMenu);\n\n\t\t// \"Help\"\n\t\thelpMenu = new HelpMenuD(app);\n\t\tadd(helpMenu);\n\n\t\t// support for right-to-left languages\n\t\tapp.setComponentOrientation(this);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp=getMenuInflater();\n\t\tblowUp.inflate(R.menu.welcome_menu, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.item, menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.resource, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater= getMenuInflater();\n inflater.inflate(R.menu.menu,menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.home_action_bar, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.template, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n Log.d(\"onCreateOptionsMenu\", \"create menu\");\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.socket_activity_actions, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_menu, menu);//Menu Resource, Menu\n\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actionbar, menu);\n return true;\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(toolbar_res, menu);\n updateMenuItemsVisibility(menu);\n return true;\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t// \n\t\tMenuInflater mi = getMenuInflater();\n\t\tmi.inflate(R.menu.thumb_actv_menu, menu);\n\t\t\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t}", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.swag_list_activity_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n super.onCreateOptionsMenu(menu, inflater);\n\n }", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n MenuInflater inflater = getMenuInflater();\n inflater.inflate(R.menu.main_menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(android.view.Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\n\t\treturn true;\n\t}", "@Override\n\t\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\t\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.jarvi, menu);\n\t\treturn super.onCreateOptionsMenu(menu);\n\t}", "public void onCreateOptionsMenu(Menu menu, MenuInflater inflater){\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater menuInflater) {\n menuInflater.inflate(R.menu.main, menu);\n\n }", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.add__listing, menu);\r\n\t\treturn true;\r\n\t}", "@Override\r\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.actmain, menu);\r\n return true;\r\n }", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.buat_menu, menu);\n\t\treturn true;\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.layout.menu, menu);\n\t\treturn true;\n\t}", "@Override\npublic boolean onCreateOptionsMenu(Menu menu) {\n\n\t\n\t\n\tgetMenuInflater().inflate(R.menu.main, menu);\n\t\n\treturn super.onCreateOptionsMenu(menu);\n}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ichat, menu);\n\t\treturn true;\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.menu, menu);\n return super.onCreateOptionsMenu(menu);\n }", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater)\n\t{\n\t\tsuper.onCreateOptionsMenu(menu, inflater);\n\t\tinflater.inflate(R.menu.expenses_menu, menu);\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.action_bar, menu);\n return true;\n }", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n \tpublic boolean onCreateOptionsMenu(Menu menu) {\n \t\tgetMenuInflater().inflate(R.menu.main, menu);\n \t\treturn true;\n \t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tsuper.onCreateOptionsMenu(menu);\n\t\tMenuInflater blowUp = getMenuInflater();\n\t\tblowUp.inflate(R.menu.status, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.menu, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n\tpublic void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n\t}", "@Override\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tMenuInflater inflater = getMenuInflater();\n\t\tinflater.inflate(R.menu.main, menu);\n\t\treturn true;\n\t}", "@Override\r\n\tpublic boolean onCreateOptionsMenu(Menu menu) {\n\t\tgetMenuInflater().inflate(R.menu.ui_main, menu);\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onCreateOptionsMenu(Menu menu) {\n getMenuInflater().inflate(R.menu.main_activity_actions, menu);\n return true;\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }", "@Override\n public void onCreateOptionsMenu(Menu menu, MenuInflater inflater) {\n inflater.inflate(R.menu.menu_main, menu);\n super.onCreateOptionsMenu(menu, inflater);\n }" ]
[ "0.72473437", "0.7202402", "0.71960324", "0.7177793", "0.7108265", "0.7040525", "0.70388484", "0.70126176", "0.70101976", "0.6981143", "0.69461405", "0.694", "0.69346833", "0.69183874", "0.69183874", "0.6891571", "0.6884306", "0.68758994", "0.687534", "0.68627334", "0.68627334", "0.68627334", "0.68627334", "0.6853258", "0.6847784", "0.6820167", "0.68177783", "0.68134266", "0.68132955", "0.68132955", "0.6806282", "0.68011856", "0.6798178", "0.67916524", "0.67897713", "0.6788724", "0.6783952", "0.6759952", "0.6757919", "0.6748738", "0.67445415", "0.67445415", "0.6741439", "0.67401767", "0.6726359", "0.6724678", "0.6723058", "0.6723058", "0.6721303", "0.67123276", "0.670777", "0.67050874", "0.670039", "0.66992784", "0.6697299", "0.6695259", "0.6686728", "0.668404", "0.668404", "0.6683142", "0.668091", "0.66799283", "0.6677784", "0.6669004", "0.66677624", "0.66630834", "0.66577506", "0.66577506", "0.66577506", "0.6656902", "0.66553235", "0.66553235", "0.66553235", "0.66530025", "0.66522014", "0.6650771", "0.66497517", "0.6647805", "0.66470283", "0.66469866", "0.6646818", "0.6645723", "0.66454786", "0.66439635", "0.66434425", "0.6642393", "0.6639529", "0.6635146", "0.6634077", "0.6632954", "0.66327274", "0.66327274", "0.66327274", "0.66297686", "0.66288346", "0.66275346", "0.66271275", "0.6625066", "0.6621276", "0.6619167", "0.6619167" ]
0.0
-1
Handle action bar item clicks here. The action bar will automatically handle clicks on the Home/Up button, so long as you specify a parent activity in AndroidManifest.xml.
@Override public boolean onOptionsItemSelected(MenuItem item) { int id = item.getItemId(); if (id == R.id.import_book) { Intent intent = new Intent(NavUserBookActivity.this, FileChooserActivity.class); startActivity(intent); } return super.onOptionsItemSelected(item); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public boolean onOptionsItemSelected(MenuItem item) { Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n\n //\n // HANDLE BACK BUTTON\n //\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // Back button clicked\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // app icon in action bar clicked; goto parent activity.\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n switch (id) {\r\n case android.R.id.home:\r\n // app icon in action bar clicked; go home\r\n this.finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // app icon in action bar clicked; go home\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n Log.e(\"clik\", \"action bar clicked\");\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\t public boolean onOptionsItemSelected(MenuItem item) {\n\t int id = item.getItemId();\n\t \n\t\t\tif (id == android.R.id.home) {\n\t\t\t\t// Respond to the action bar's Up/Home button\n\t\t\t\t// NavUtils.navigateUpFromSameTask(this);\n\t\t\t\tonBackPressed();\n\t\t\t\treturn true;\n\t\t\t}\n\t \n\t \n\t return super.onOptionsItemSelected(item);\n\t }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n // Respond to the action bar's Up/Home button\r\n case android.R.id.home:\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n\n switch (item.getItemId()) {\n case android.R.id.home:\n\n // app icon in action bar clicked; goto parent activity.\n this.finish();\n return true;\n default:\n\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle presses on the action bar items\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n case R.id.action_clear:\n return true;\n case R.id.action_done:\n\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onActionHomePressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId())\n {\n case android.R.id.home :\n super.onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId ()) {\n case android.R.id.home:\n onBackPressed ();\n return true;\n\n default:\n break;\n }\n return super.onOptionsItemSelected ( item );\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t switch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\t// app icon in action bar clicked; go home \n\t\t\tIntent intent = new Intent(this, Kelutral.class); \n\t\t\tintent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP); \n\t\t\tstartActivity(intent); \n\t\t\treturn true;\t\t\n\t case R.id.Search:\n\t \treturn onSearchRequested();\n\t\tcase R.id.AppInfo:\n\t\t\t// Place holder menu item\n\t\t\tIntent newIntent = new Intent(Intent.ACTION_VIEW,\n\t\t\t\t\tUri.parse(\"http://forum.learnnavi.org/mobile-apps/\"));\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\n\t\tcase R.id.Preferences:\n\t\t\tnewIntent = new Intent(getBaseContext(), Preferences.class);\n\t\t\tstartActivity(newIntent);\n\t\t\treturn true;\t\n\t }\n\t return false;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n onBackPressed();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // Intent homeIntent = new Intent(this, MainActivity.class);\n // homeIntent.addFlags(Intent.FLAG_ACTIVITY_CLEAR_TOP);\n // startActivity(homeIntent);\n finish();\n return true;\n default:\n return (super.onOptionsItemSelected(item));\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // setResult and close the activity when Action Bar Up Button clicked.\n if (item.getItemId() == android.R.id.home) {\n setResult(RESULT_CANCELED);\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n // This ID represents the Home or Up button. In the case of this\n // activity, the Up button is shown. Use NavUtils to allow users\n // to navigate up one level in the application structure. For\n // more details, see the Navigation pattern on Android Design:\n //\n // http://developer.android.com/design/patterns/navigation.html#up-vs-back\n //\n \tgetActionBar().setDisplayHomeAsUpEnabled(false);\n \tgetFragmentManager().popBackStack();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if(id == android.R.id.home){\n onBackPressed();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@RequiresApi(api = Build.VERSION_CODES.M)\n @Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif(item.getItemId()==android.R.id.home)\r\n\t\t{\r\n\t\t\tgetActivity().onBackPressed();\r\n\t\t}\r\n\t\treturn super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if(item.getItemId()==android.R.id.home){\n super.onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n onBackPressed();\n return false;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n //Back arrow\n case android.R.id.home:\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // android.R.id.home是Android内置home按钮的id\n finish();\n break;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n super.onBackPressed();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n this.onBackPressed();\n return false;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Handle action bar item clicks here. The action bar will\n // automatically handle clicks on the Home/Up button, so long\n // as you specify a parent activity in AndroidManifest.xml.\n int id = item.getItemId();\n\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n return true;\n default:\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n switch (item.getItemId()) {\r\n\r\n case android.R.id.home:\r\n /*Intent i= new Intent(getApplication(), MainActivity.class);\r\n i.setFlags(Intent.FLAG_ACTIVITY_NEW_TASK | Intent.FLAG_ACTIVITY_CLEAR_TOP);\r\n startActivity(i);*/\r\n onBackPressed();\r\n finish();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case android.R.id.home:\n this.finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n // Pass the event to ActionBarDrawerToggle, if it returns\n // true, then it has handled the app icon touch event\n if (mDrawerToggle.onOptionsItemSelected(item)) {\n return true;\n }\n\n // Handle your other action bar items...\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n // Respond to the action bar's Up/Home button\n case android.R.id.home:\n NavUtils.navigateUpFromSameTask(getActivity());\n return true;\n case R.id.action_settings:\n Intent i = new Intent(getActivity(), SettingsActivity.class);\n startActivity(i);\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n //Fixes the Up Button\n if(id == android.R.id.home) {\n BuildRoute.this.finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()){\n case android.R.id.home:\n onBackPressed();\n break;\n }\n return true;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if (id == android.R.id.home) {\n NavUtils.navigateUpFromSameTask(this);\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n break;\r\n }\r\n return true;\r\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tif (item.getItemId() == android.R.id.home) {\n\t\t\tfinish();\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n onBackPressed();\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if ( id == android.R.id.home ) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.home) {\r\n NavUtils.navigateUpFromSameTask(this);\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_about) {\r\n AboutDialog();\r\n return true;\r\n }\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == R.id.action_exit) {\r\n finish();\r\n return true;\r\n }\r\n\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n\n this.finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item)\n {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if( id == android.R.id.home ) // Back button of the actionbar\n {\n finish();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n//noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n// finish the activity\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\t\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\t\tswitch (item.getItemId()) {\r\n\t\t\tcase android.R.id.home:\r\n\t\t\t\tfinish();\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\treturn super.onOptionsItemSelected(item);\r\n\t\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n return true;\n }\n return false;\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n\n if(id == android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n\n if (item.getItemId() == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\r\n\t\tcase android.R.id.home:\r\n\t\t\tsetResult(RESULT_OK, getIntent());\r\n\t\t\tfinish();\r\n\t\t\tbreak;\r\n\t\t}\r\n\t\treturn true;\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n // If we got here, the user's action was not recognized.\n // Invoke the superclass to handle it.\n return super.onOptionsItemSelected(item);\n\n }\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n\n case android.R.id.home:\n this.finish();\n return true;\n }\n return true;\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\tbreak;\n\n\t\tdefault:\n\t\t\tbreak;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tint id = item.getItemId();\n\t\tif (id == android.R.id.home) {\n\t\t\tfinish();\n\t\t\treturn true;\n\t\t}\n\t\treturn super.onOptionsItemSelected(item);\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n if (id == android.R.id.home) {\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n onBackPressed();\n //NavUtils.navigateUpFromSameTask(this);\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n // todo: goto back activity from here\n finish();\n return true;\n\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\r\n // Handle item selection\r\n switch (item.getItemId()) {\r\n case android.R.id.home:\r\n onBackPressed();\r\n return true;\r\n\r\n case me.cchiang.lookforthings.R.id.action_sample:\r\n// Snackbar.make(parent_view, item.getTitle() + \" Clicked \", Snackbar.LENGTH_SHORT).show();\r\n return true;\r\n default:\r\n return super.onOptionsItemSelected(item);\r\n }\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n case android.R.id.home:\n finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n\n\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tonBackPressed();\n\t\t\treturn true;\n\t\tcase R.id.scan_menu:\n\t\t\tonScan();\n\t\t\tbreak;\n\t\tcase R.id.opt_about:\n\t\t\t//onAbout();\n\t\t\tbreak;\n\t\tcase R.id.opt_exit:\n\t\t\tfinish();\n\t\t\tbreak;\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t\treturn true;\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n if (id == android.R.id.home) {\n super.onBackPressed();\n return true;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id) {\n case android.R.id.home:\n this.finish();\n return true;\n default:\n return super.onOptionsItemSelected(item);\n }\n }", "@Override\n public boolean onOptionsItemSelected(@NonNull MenuItem item) {\n if (item.getItemId() == android.R.id.home) {\n onBackPressed();\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n switch (id) {\n case android.R.id.home:\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId()) {\n\n case android.R.id.home:\n finish();\n return true;\n\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\r\n\t switch (item.getItemId()) {\r\n\t \t// back to previous page\r\n\t case android.R.id.home:\r\n\t finish();\r\n\t return true;\r\n\t }\r\n\t return super.onOptionsItemSelected(item);\r\n\t}", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if(id==android.R.id.home){\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n if (id == android.R.id.home) {\n finish();\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\r\n\r\n //noinspection SimplifiableIfStatement\r\n if (id == android.R.id.home) {\r\n // finish the activity\r\n onBackPressed();\r\n return true;\r\n }\r\n\r\n return super.onOptionsItemSelected(item);\r\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n switch (item.getItemId())\n {\n case android.R.id.home:\n this.finish();\n return (true);\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n if (id == android.R.id.home) {\n finish();\n return true;\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n switch (id){\n case R.id.home:{\n NavUtils.navigateUpFromSameTask(this);\n return true;\n }\n }\n return super.onOptionsItemSelected(item);\n }", "@Override\n public boolean onOptionsItemSelected(MenuItem item) {\n int id = item.getItemId();\n\n //noinspection SimplifiableIfStatement\n switch(item.getItemId())\n {\n case android.R.id.home:\n super.onBackPressed();\n break;\n }\n\n return super.onOptionsItemSelected(item);\n }", "@Override\n\tpublic boolean onOptionsItemSelected(MenuItem item) {\n\t\tswitch (item.getItemId()) {\n\t\tcase android.R.id.home:\n\t\t\tfinish();\n\t\t\treturn true;\n\n\t\tdefault:\n\t\t\treturn super.onOptionsItemSelected(item);\n\t\t}\n\t}", "@Override\r\n public boolean onOptionsItemSelected(MenuItem item) {\n\r\n int id = item.getItemId();\r\n if(id==android.R.id.home){\r\n finish();\r\n return true;\r\n }\r\n return super.onOptionsItemSelected(item);\r\n }" ]
[ "0.7904454", "0.78056747", "0.77659833", "0.7727365", "0.7631989", "0.76223314", "0.7584553", "0.75306034", "0.7487836", "0.745791", "0.745791", "0.7438328", "0.74220496", "0.74034584", "0.7391494", "0.73866826", "0.73788977", "0.7370167", "0.7362255", "0.73555887", "0.7345252", "0.734152", "0.73303276", "0.7328559", "0.73255897", "0.73185426", "0.73165184", "0.73132133", "0.7303868", "0.7303868", "0.7301464", "0.7297915", "0.72930884", "0.72863466", "0.72832656", "0.72807384", "0.7278446", "0.72596914", "0.7259592", "0.7259592", "0.7259592", "0.7259204", "0.72497207", "0.7225063", "0.7219175", "0.7216816", "0.720443", "0.7201328", "0.71997535", "0.71924156", "0.71846914", "0.7177496", "0.7168223", "0.7167547", "0.7153918", "0.7153812", "0.71360034", "0.7135014", "0.7135014", "0.7129386", "0.7129096", "0.7124025", "0.7123219", "0.7122818", "0.71221405", "0.7117256", "0.71171826", "0.71171826", "0.71171826", "0.71171826", "0.71166563", "0.7116579", "0.71148115", "0.7112163", "0.71096337", "0.7109013", "0.7105877", "0.70992535", "0.70982933", "0.7095853", "0.7093862", "0.7093862", "0.70863163", "0.7082383", "0.7080991", "0.7080324", "0.7073529", "0.7068395", "0.7061839", "0.7060443", "0.7060233", "0.7051591", "0.70377344", "0.70377344", "0.7035971", "0.7035638", "0.7035638", "0.7032344", "0.7030622", "0.7029514", "0.70190036" ]
0.0
-1
INTERFACE METHODS Interface OnClickListener
@Override public void onClick(DialogInterface dialog, int which) { Intent intent; switch (which){ case DialogInterface.BUTTON_POSITIVE: //Yes button clicked intent = new Intent(CallIntent.ACCEPT_CALL); intent.putExtra("callId", mCallId); LocalBroadcastManager.getInstance(getBaseContext()).sendBroadcast( intent); break; case DialogInterface.BUTTON_NEGATIVE: //No button clicked intent = new Intent(CallIntent.REJECT_CALL); intent.putExtra("callId", mCallId); LocalBroadcastManager.getInstance(getBaseContext()).sendBroadcast( intent); break; } mAlertDialog.hide(); finish(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public interface OnClickListener {\n\n void onClick(View v, int position, Activity activity);\n }", "public interface OnClickListener{\n\t\tabstract boolean onClick(Polyline polyline, MapView mapView, GeoPoint eventPos);\n\t}", "public interface ClickListener {\n void onClick(View view, int position);\n }", "public interface ClickListener {\n\n public void Onclick(int pos);\n}", "public interface OnClickItemViewListener{\n void onClickItemView(int idMovie);\n }", "@Override\n \t\tpublic void onClick(View v) {\n \t\t\t\n \t\t}", "@Override\n \t\tpublic void onClick(View v) {\n \t\t\t\n \t\t}", "public interface ClickListener{\n void onClick(Contact contact);\n }", "interface ClickListener {\n void onClick(View view, int position);\n\n}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\tlistener(v);\n\n\t\t}", "@Override\n\t\tpublic void onClick(View v) {\n\t\t\t\n\t\t}", "public interface ItemClickListener {\nvoid onClick(View view, int position);\n}", "public interface OnClickHandler {\n void onClick(View v);\n }", "@Override\r\n public void onClick(View v) {\r\n }", "@Override\r\n public void onClick(View v) {\n }", "@Override\r\n public void onClick(View v) {\n }", "@Override\r\n public void onClick(View v) \r\n {\n }", "public interface OnItemClicklistner {\n\n void onItemClick(View v, int position);\n }", "@Override\n\tpublic void onClick(View v) {\n\t\t\n\t\t\n\t\t\n\t}", "@Override public void onClick(View arg0) {\n\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View v) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "@Override\n public void onClick(View arg0) {\n }", "public interface ItemClickListener\n{\n void onClick(View view , int position);\n}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\t\t\t\t\t\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t}", "@Override\n\t\t\t\tpublic void onClick(View v) {\n\n\t\t\t\t}", "@Override\r\n public void onClick(View v) {\n }", "public interface OnButtonClickedListener {\n public void onButtonClicked(View v);\n }", "@Override\r\n\tpublic void onClick(View v) \r\n\t{\n\t}", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }", "@Override\n public void onClick(View v) {\n\n }" ]
[ "0.8199308", "0.80772454", "0.8032427", "0.7978098", "0.7845922", "0.7834294", "0.7834294", "0.7815332", "0.77753764", "0.77733815", "0.77670777", "0.7765773", "0.7758633", "0.7755649", "0.7729285", "0.7729285", "0.7710485", "0.77097327", "0.770672", "0.7700085", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7699758", "0.7692069", "0.7692069", "0.7692069", "0.7692069", "0.7692069", "0.7690467", "0.76871496", "0.76871496", "0.76871496", "0.7680106", "0.7677322", "0.7677322", "0.76728976", "0.76725256", "0.7669519", "0.76641816", "0.76641816", "0.76641816", "0.76641816", "0.76641816" ]
0.0
-1
/Scanner sc=new Scanner(System.in); System.out.println("Introduceti datele despre primul monitor:"); System.out.println("Rezolutia: "); int dimen = sc.nextInt(); System.out.println("Dimenisunea:"); double size = sc.nextDouble(); System.out.println("Culoarea:"); String Color = sc.next(); MonitorCharac FirstMonit = new MonitorCharac(dimen, size, Color); System.out.println("Introduceti datele despre al doilea monitor:"); System.out.println("Rezolutia: "); dimen = sc.nextInt(); System.out.println("Dimenisunea:"); size = sc.nextDouble(); System.out.println("Culoarea:"); Color = sc.next(); sc.close(); MonitorCharac SecondMonit = new MonitorCharac(dimen, size, Color); System.out.println(FirstMonit.Resol(SecondMonit)); System.out.println(FirstMonit.Dimen(SecondMonit)); System.out.println("Culoarea primului monitor este:"); System.out.println(FirstMonit.getColor()); System.out.println("Culoarea celui deal doilea monitor este:"); System.out.println(SecondMonit.getColor());
public static void main(String[] args){ SecondTask Fst = new SecondTask("Sandu", 21, 9.9); SecondTask SecSt = new SecondTask("Ion", 22, 8.9); SecondTask ThrSt = new SecondTask("Vasile", 21, 8.5); ArrayList FirstU = new ArrayList<Object>(); FirstU.add(Fst); FirstU.add(SecSt); FirstU.add(ThrSt); SecondTask FirstUniv = new SecondTask("UTM", 1988, FirstU ); System.out.println(FirstUniv.getUnFoundY()); System.out.println(FirstUniv.getUnName()); System.out.println(FirstUniv.getStudents()); /*SecondTask asd= (SecondTask) FirstUniv.getStudents().get(0); for (Object a:FirstUniv.getStudents()) { ((SecondTask) a).ge }*/ /***********************************************/ SecondTask st1 = new SecondTask("Alex", 21, 9.2); SecondTask st2 = new SecondTask("Vladimir", 22, 8.9); SecondTask st3 = new SecondTask("Ioana", 21, 8.0); ArrayList ScdUn = new ArrayList<Object>(); ScdUn.add(st1); ScdUn.add(st2); ScdUn.add(st3); SecondTask SecondUniv = new SecondTask("ULIM", 1990, ScdUn); SecondTask std1 = new SecondTask("Vasilisa", 21, 7.4); SecondTask std2 = new SecondTask("Cleopatra", 22, 8.7); SecondTask std3 = new SecondTask("Cristian", 21, 8.3); ArrayList ThrUn = new ArrayList<Object>(); ThrUn.add(std1); ThrUn.add(std2); ThrUn.add(std3); SecondTask ThrdUniv = new SecondTask("ASEM", 1990, ThrUn); System.out.println("Media pentru UTM:"); Average(FirstUniv.getStudents()); System.out.println("Media pentru ULIM:"); Average(SecondUniv.getStudents()); System.out.println("Media pentru ASEM:"); Average(ThrdUniv.getStudents()); /**********************************************************/ }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public static Object conversie(){\n Scanner Meters= new Scanner(System.in);\n Scanner Hours= new Scanner(System.in);\n Scanner Minutes= new Scanner(System.in);\n Scanner Seconds= new Scanner(System.in);\n\n //unitatile de masura pentru distanta este metrul, iar pentru timp sunt secundele\n\n System.out.println(\"Introduceti valoarea distantei D: \"); //distanta in metri\n double D= Meters.nextInt();\n\n System.out.println(\"Introduceti ora H: \"); //introducere valoare ora\n double H= Hours.nextInt();\n\n System.out.println(\"Introduceti minutele MM: \"); //introducere valoare minute\n double MM= Minutes.nextInt();\n\n System.out.println(\"Introduceti secundele SS: \"); //introducere valoare secunde\n double SS= Seconds.nextInt();\n\n double time= H*3600 + MM*60 + SS; //formula de calcul pentru transformare ore:minute:secunde in secunde\n\n double V1= D / time; //formula matematica a vitezei( viteza= distanta/ timp)\n //rezultatul va fi in metri/secunda\n\n double V2= V1*3.6; // formula de conversie din m/s in km/h\n double V3= V1*2.236936; // formula de conversie din m/s in miles/h\n\n System.out.println(V1 + \" m/s\"); //afisare rezultat viteza in m/s\n System.out.println(V2 + \" km/h\"); //afisare conversie in km/h\n System.out.println(V3 + \" miles per hour\"); //afisare conversie in miles/h\n return \"\\n\";\n }", "public void inicio(){\n d.display(\"Para un calcular conversiones de grados Farenheit y Celsius\\n\"\n + \"o viceversa\");\n //System.out.println(\"Para un nadaro que ha ganado medallas en 5 competencias\");\n }", "public static void main (String args[]){\n Scanner leitor = new Scanner(System.in);\n \n //Define as variáveis locais\n int x, y;\n \n //Lê:\n System.out.print(\"Informe o primeiro valor: \");\n x = leitor.nextInt();\n \n System.out.print(\"Informe o segundo valor: \");\n y = leitor.nextInt();\n \n //Cria a intância da classe Matematica utilizando o construtor\n Matematica mat = new Matematica(x, y);\n \n //Imprime o resultado das operações através de \n //chamadasaos métodos da classe Matematica\n System.out.println(\"--------------------\"); //Apenas para organiar a saída\n System.out.println(\"O valor da soma é: \" + mat.soma());\n System.out.println(\"O valor da subtração é: \" + mat.subtrai());\n System.out.println(\"O valor da multiplicação é: \" + mat.multiplica());\n System.out.println(\"O valor da divisão é: \" + mat.divide());\n System.out.println(\"--------------------\"); //Apenas para organiar a saída\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.print(\"Unesi ime: \");\n\t\tScanner unos = new Scanner(System.in);\n\t\tString ime = unos.next();\n\t\t\n\t\t//prvi red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t System.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//drugi red crtica\n\t\tSystem.out.println(\": : : TABLICA MNOZENJA : : :\");\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tSystem.out.print(\" * |\");\n\t\tfor(int j=1;j<=9;j++){\n\t\t\tSystem.out.printf(\"%3d\",j);\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t//treci red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\tfor(int i=1;i<=9;i++){\n\t\t\tSystem.out.printf(\"%2d |\",i);\n\t\t\tfor(int j=1;j<=9;j++){\n\t\t\t\tSystem.out.printf(\"%3d\",i*j);\n\t\t\t}\n\t\t\tSystem.out.println();\n\t\t}\n\t\t\n\t\t//cetvrti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\t\n\t\t\n\t\t\n\t\tfor(int k=0;k<8;k++){\n\t\t\tSystem.out.printf(\": \");\n\t\t}\n\t\tSystem.out.print(\":by \"+ime);\n\t\tSystem.out.println();\n\t\t\n\t\t//peti red crtica\n\t\tfor(int dash=0;dash<31;dash++){\n\t\t\tSystem.out.printf(\"-\");\n\t\t}\n\t\tSystem.out.println();\n\t\tunos.close();\n\t}", "public static void main(String[] args) {\n\t\tScanner tec = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Primer empleado: \");\r\n\t\tSystem.out.println(\"Nombre: \");\r\n\t\tString nombre1 = tec.nextLine();\r\n\t\tSystem.out.println(\"Dni: \");\r\n\t\tString dni1 = tec.nextLine();\r\n\t\tSystem.out.println(\"Aņo ingreso: \");\r\n\t\tint anyo1 = tec.nextInt();\r\n\t\tSystem.out.println(\"Sueldo: \");\r\n\t\tdouble sueldo1 = tec.nextDouble();tec.nextLine();\r\n\t\t\r\n\t\t\r\n\t\tSystem.out.println(\"Segundo empleado: \");\r\n\t\tSystem.out.println(\"Nombre: \");\r\n\t\tString nombre2 = tec.nextLine();\r\n\t\tSystem.out.println(\"Dni: \");\r\n\t\tString dni2 = tec.nextLine();\r\n\t\tSystem.out.println(\"Aņo ingreso: \");\r\n\t\tint anyo2 = tec.nextInt();\r\n\t\tSystem.out.println(\"Sueldo: \");\r\n\t\tdouble sueldo2 = tec.nextDouble();\r\n\t\t\r\n\t\t//Creamos dos empleados\r\n\t\tEmpleado e1 = new Empleado(nombre1,dni1,anyo1,sueldo1);\r\n\t\tEmpleado e2 = new Empleado(nombre2,dni2,anyo2,sueldo2);\r\n\t\t\r\n\t\tSystem.out.println(e1.toString());\r\n\t\tSystem.out.println(e2.toString());\r\n\t\t\r\n\t\t//Incrementar 20 al que menos cobra\r\n\t\tif(e1.getSueldoBruto() < e2.getSueldoBruto()) {\r\n\t\t\te1.incrementarSueldo(20);\r\n\t\t} else if(e1.getSueldoBruto() > e2.getSueldoBruto()) {\r\n\t\t\te2.incrementarSueldo(20);\r\n\t\t}\r\n\t\t\r\n\t\t//Incremenar 10 al mas antiguo\r\n\t\tif(e1.antiguedad()>e2.antiguedad()){\r\n\t\t\te1.incrementarSueldo(10);\r\n\t\t} else if(e1.antiguedad()<e2.antiguedad()){\r\n\t\t\te2.incrementarSueldo(10);\r\n\t\t}\r\n\t\tSystem.out.println(e1.toString());\r\n\t\tSystem.out.println(e2.toString());\r\n\t\t\r\n\t\tSystem.out.println(Empleado.calcularIRPF((e1.getSueldoBruto())));\r\n\t\tSystem.out.println(Empleado.calcularIRPF((e2.getSueldoBruto())));\r\n\t}", "public static void main(String[] args) {\n Scanner scan = new Scanner(System.in);\n\n // Declaración de variables\n String nombre;\n String asignatura;\n double calificacion_bim1;\n double calificacion_bim2;\n double total;\n\n // Lectura de datos\n System.out.print(\"Nombres completos del estudiante: \");\n nombre = scan.nextLine();\n System.out.print(\"Asignatura: \");\n asignatura = scan.nextLine();\n System.out.print(\"Calificación del Primer Bimestre: \");\n calificacion_bim1 = scan.nextDouble();\n System.out.print(\"Calificación del Segundo Bimestre: \");\n calificacion_bim2 = scan.nextDouble();\n\n // Creación de objeto con inicialización de variables\n EstadoEstudiante estado = new EstadoEstudiante(nombre, asignatura, calificacion_bim1, calificacion_bim2);\n\n // Salida\n System.out.println(estado.reportar(nombre, asignatura, estado.calcular_total(calificacion_bim1,\n calificacion_bim2), estado.aprobar_reprobar(estado.calcular_total(calificacion_bim1,\n calificacion_bim2))));\n }", "public static void main(String[] args) {\n\t\t\r\n\tFile arxiu = null;\r\n\tFileReader fr = null; //el pipe (tub de lectura)\r\n\tBufferedReader br = null; //on emmagatzem la informació del pipe\r\n\t\r\n\t//Creem cada un dels treballadors, ja que són de tipus diferents\r\n\tAlumne_DUAL alumnedual = new Alumne_DUAL();\r\n\tTreballador_Parcial treballadorParcial = new Treballador_Parcial();\r\n\tTreballador_TempsComplet treballadorTempsComplet = new Treballador_TempsComplet();\r\n\t\r\n\tString tipus_treballador = \"\"; //Aqui guardarem el tipus de trebllador, ex: alumnedual, temps parcial...\r\n\tString agafar_preu_hora = \"\"; //Agafem el preu per hora que tenen els treballadors tipus alumnedual i temps parcial (variable tipus String que convertirem a double)\r\n\tdouble preu_hora = 0.0; //Aquí guardem el preu per hora que tenen els treballadors tipus alumnedual i temps parcial (després de convertir-lo a double) \r\n\tString agafar_hores_totals = \"\"; //Agafem les hores totals que tenen els treballadors tipus alumnedual i temps parcial (variable tipus String que convertirem a int)\r\n\tint hores_totals = 0; //Aquí guardem les hores totals que tenen els treballadors tipus alumnedual i temps parcial (després de convertir-les a int)\r\n\tString nom_treballador = \"\"; //Agafem el nom de cada treballador\r\n\tString nom_feina = \"\"; //Agafem l'ofici de cada treballador\r\n\r\n\t\r\n\ttry{\r\n\t\t//Obrim el fitxer\r\n\t arxiu = new File(\"nomines.txt\"); //el fitxer es diu nomines.txt\r\n\t fr = new FileReader(arxiu);\r\n\t br = new BufferedReader(fr);\r\n\t \r\n\t //Amb el bucle llegirem linia a linia\r\n\t String linia;\r\n\t\twhile((linia = br.readLine())!=null){//mentre hi ha linies per llegir\t\t\t\r\n\t\t\tint i = 0;\r\n\t \tString [] paraula = linia.split(\" \"); //dividim el text en paraula per paraula\r\n\t \twhile(i<paraula.length){\r\n\t \t\tnom_treballador = paraula[1]; //la segona paraula que llegim correspon al nom del treballador\r\n\t \t\tnom_feina = paraula[2]; //la tercera paraula que llegim correspon al nom del treball del treballador\r\n\t \t\tagafar_preu_hora = paraula[3]; //la quarta paraula que llegim correspon al preu per hora del treballador menys en el tipus de treballador TEMPS_COMPLET, que equival al salari setmanal\r\n\t \t\tagafar_hores_totals = paraula[4]; //la cinquena paraula que llegim correspon a les hores totals del treballador menys en el tipus de treballador TEMPS_COMPLET, que equival a les deduccions fiscals\r\n\t \t\ti++;\r\n\t \t}\r\n\t \t\t \t\r\n\t \tpreu_hora = Double.parseDouble(agafar_preu_hora); //convertim la variable string preu_hora a tipus double per poder fer els càlculs\r\n\t \thores_totals = Integer.parseInt(agafar_hores_totals); //convertim la variable string hores_totals a numero enter per poder fer els càlculs\r\n\t \t \r\n\t \tif(linia.startsWith(\"1\")){ //si al començament de la línia hi ha un 1 es tracta del tipus de treballador temps_complet\r\n\t\t \ttipus_treballador = \"TREBALLADOR A TEMPS COMPLET\";\r\n\t\t \ttreballadorTempsComplet.setsalariSetmanal(Double.parseDouble(paraula[3])); //li assignem el salari setmanal per poder calcular quan li correspon a pagar\r\n\t\t \ttreballadorTempsComplet.deduccioFiscal(Double.parseDouble(paraula[4])); //li assignem les deduccions fiscals per poder calcular quan li correspon a pagar\r\n\t\t \t//quantitat a pagar correspon a la resta del salari setmanal - deduccions fiscals\r\n\t\t \tSystem.out.println(\"Al treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+treballadorTempsComplet.quantitatAPagar()+\" €\"); \r\n\t \t}else{\r\n\t \t\tif(linia.startsWith(\"2\")){ //si al començament de la línia hi ha un 2 es tracta del tipus de treballador temps_parcial\r\n\t \t\t\ttipus_treballador = \"TREBALLADOR A TEMPS PARCIAL\";\r\n\t \t\t\ttreballadorParcial.setPreuHora(preu_hora);\r\n\t \t\t\tSystem.out.println(\"\\nAl treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+treballadorParcial.quantitatAPagar(hores_totals)+\" €\");\r\n\t \t\t}\r\n\t \t\telse{\r\n\t \t\t\ttipus_treballador = \"ALUMNE DUAL\"; //si al començament de la línia hi ha un 3 es tracta del tipus de treballador alumne_dual\r\n\t \t\t\talumnedual.setPreuHora(preu_hora); \t\r\n\t\t\t \tSystem.out.println(\"\\nAl treballador \"+nom_treballador+\", treballador del tipus (\"+tipus_treballador+\"), que treballa de \"+nom_feina+\" li correspon ---> \"+alumnedual.quantitatAPagar(hores_totals)+\" €\");\r\n\t \t\t}\r\n\t \t}\t\r\n\t\t}\r\n\t \t\r\n\t }catch(Exception e){\r\n\t \t\tSystem.out.println(e.getMessage());\r\n\t }finally{\r\n\t \t//Entrarà al finally tant si falla com si no, per tal de tancar el fitxer\r\n\t \ttry{\r\n\t \t\tif(null!=fr){\r\n\t \t\t\tfr.close();\r\n\t \t\t}\r\n\t \t}catch(Exception e){\r\n\t \t\tSystem.out.println(e.getMessage());\r\n\t \t}\r\n\t }\r\n\t\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\nScanner leia = new Scanner(System.in);\n\t\t\n\t\tdouble nota1, nota2, nota3, mediaFinal;\n\n\t\tSystem.out.println(\"Digite a nota 1: \");\n\t\tnota1 = leia.nextInt();\n\t\t\n\t\tSystem.out.println(\"Digite a nota 2: \");\n\t\tnota2 = leia.nextInt();\n\t\t\n\t\tSystem.out.println(\"Digite a nota 3: \");\n\t\tnota3 = leia.nextInt();\n\t\t\n\t\tmediaFinal = ((nota1*2) + (nota2*3) + (nota3*5))/10;\n\t\tSystem.out.println(\"Sua média final é: \" + mediaFinal);\n\t\t\n\t\tleia.close();\n\t\n\t}", "public static void main(String[] args) {\n\t\tScanner leitura = new Scanner(System.in);\r\n\t\tSystem.out.println(\"digite o nome do Aluno\");\r\n\t\tString aluno = leitura.next();\r\n\t\tSystem.out.println(\"digite a primeira nota do aluno\");\r\n\t\tdouble nota1 = leitura.nextDouble();\r\n\t\tSystem.out.println(\"digite a segunda nota do aluno\");\r\n\t\tdouble nota2 = leitura.nextDouble();\r\n\t\tSystem.out.println(\"digite a terceira nota do aluno\");\r\n\t\tdouble nota3 = leitura.nextDouble();\r\n\t\tdouble media = (nota1+nota2+nota3)/3;\r\n\t\tif(media >= 7){\r\n\t\t\tSystem.out.println(aluno+\" Você está Aprovado\");\r\n\t\t\tSystem.out.println(\"sua media é :\"+media);\r\n\t\t}\r\n\t\telse if(media >= 6){\r\n\t\t\tSystem.out.println(aluno+\" Você está em Recuperação\");\r\n\t\t\tSystem.out.println(\"sua media é :\"+media);\r\n\t\t}\r\n\t\telse{\r\n\t\t\tSystem.out.println(aluno+\" Você está Reprovado\");\r\n\t\t\tSystem.out.println(\"sua media é :\"+media);\r\n\t\t}\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tdouble anser1;\r\n\t\tdouble anser2;\r\n\t\tint a;\r\n\t\tdouble b;\r\n\t\tString d=null;\r\n\t\tint c;\r\n\t\tdouble s;\r\n\t\tSystem.out.println(\"기간\");\r\n\t\t//year\r\n\t\ta = scanner.nextInt();\r\n\t\tSystem.out.println(\"이율\");\r\n\t\t//r\r\n\t\tb = scanner.nextDouble();\r\n\t\tSystem.out.println(\"원금\");\r\n\t\t//a\r\n\t\tc = scanner.nextInt();\r\n\t\tSystem.out.println(\"All\");\r\n\t\ts = scanner.nextDouble();\r\n\t\tanser1 = pa(a,b,c);\r\n\t\tanser2 = ba(a,b,c);\r\n\t\tSystem.out.println(\"수학적 정답\"+anser1);\r\n\t\tSystem.out.println(\"이율 반올림\"+anser2);\r\n\t\tscanner.close();\r\n\t\tanser1 = (c*(1+b)*(anser2-1))/b;\r\n\t\tSystem.out.println(\"기간 초에 적립\"+anser1);\r\n\t\tanser1 = (c*(anser2-1))/b;\r\n\t\tSystem.out.println(\"기간 말에 적립\"+anser1);\r\n\t\tanser1 = s*b/((b+1)*(anser2-1));\r\n\t\tSystem.out.println(\"매월초 적립할 금액 구하기\"+anser1);\r\n\t\tanser1 = (s*b)/(anser2-1);\r\n\t\tSystem.out.println(\"매월말 적립할 금액 구하기\"+anser1);\r\n\t}", "public static void main(String[] args) {\n\t\tScanner lectorInt = new Scanner(System.in);\n\t\tScanner lectorString = new Scanner(System.in);\n\t\tSystem.out.println(\"Ingrese información de pasajero\");\n\t\tSystem.out.println(\"Ingrese nombre: \");\n\t\tString nombre = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese apellido: \");\n\t\tString apellido = lectorString.nextLine();\n\t\tSystem.out.println(\"Ingrese edad: \");\n\t\tint edad = lectorInt.nextInt();\n\t\tSystem.out.println(\"Que tipo de pasajero es: 1:Pasajero Vip 2:Pasajero Económico \");\n\t\tint opcion = lectorInt.nextInt();\n\t\tString membresia = \"\";\n\t\tString descuento = \"\";\n\t\tif (opcion == 1) {\n\t\t\tSystem.out.println(\"Ingrese Código de Membresía\");\n\t\t\tmembresia = lectorString.nextLine();\n\n\t\t} else {\n\t\t\tSystem.out.println(\"Ingrese Código de Descuento\");\n\t\t\tdescuento = lectorString.nextLine();\n\t\t}\n\n\t\tPasajeroVip pasajero1 = new PasajeroVip();\n\t\tpasajero1.setNombre(nombre);\n\t\tpasajero1.setApellido(apellido);\n\t\tpasajero1.setCodigoMembresia(membresia);\n\t\tpasajero1.setEdad(edad);\n\n\t\tPasajeroVip pasajero2 = new PasajeroVip(\"Juan\", \"Tandre\", \"as2345\", 23);\n\n\t\tPasajeroEconomico pasajeroEconomico1 = new PasajeroEconomico();\n\t\tpasajeroEconomico1.setNombre(\"Helena\");\n\t\tpasajeroEconomico1.setApellido(\"Frias\");\n\t\tpasajeroEconomico1.setCodigoDescuento(\"1234df\");\n\t\tpasajeroEconomico1.setEdad(25);\n\n\t\tPasajero[][] asientos = new Pasajero[4][5];\n\t\tasientos[0][0] = pasajero1;\n\t\tasientos[0][1] = pasajero2;\n\t\tasientos[0][2] = pasajero1;\n\t\tasientos[0][3] = pasajeroEconomico1;\n\t\tasientos[1][0] = pasajero1;\n\t\tasientos[1][1] = pasajeroEconomico1;\n\n\t\tint opcionSalir = 0;\n\t\tdo {\n\t\t\tSystem.out.println();\n\t\t\tSystem.out.println(\"Ingrese datos del asiento, 0:continuar, -1:SALIR\");\n\t\t\topcionSalir = lectorInt.nextInt();\n\t\t\tif (opcionSalir == 0) {\n\t\t\t\tSystem.out.print(\"Ingrese fila del asiento: \");\n\t\t\t\tint fila = lectorInt.nextInt();\n\t\t\t\tSystem.out.print(\"Ingrese columna del asiento: \");\n\t\t\t\tint columna = lectorInt.nextInt();\n\t\t\t\tSystem.out.println(\"Los datos del pasajero son: \");\n\t\t\t\tSystem.out.println(asientos[fila][columna]);\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Va ha salir del sistema\");\n\t\t\t}\n\t\t} while (opcionSalir != -1);\n\n\t}", "public static void main(String args[])\n {\n //instanciar (crear) el objeto empleados_comcel de la clase empleados\n //instanciar el objeto empleados_comcel de la clase empleados\n empleados empleados_comcel = new empleados();\n \n //acciones al objeto empleados_comcel asignando valores\n //empleados_comcel.cedula=5555;\n //empleados_comcel.nombre=\"felipe completo\";\n //empleados_comcel.sueldo=50000;\n //llamando las acciones\n /*int intTotalSueldo = empleados_comcel.calcularSueldo();\n System.out.println(\"total sueldo \"+intTotalSueldo);*/\n \n Scanner scanner = new Scanner(System.in);\n System.out.println(\"ingrese prestamos\");\n int prestamos = scanner.nextInt();\n\n \n int intTotalSueldo2 = empleados_comcel.calcularSueldo(prestamos, 5, 70000);\n System.out.println(\"total sueldo \"+intTotalSueldo2);\n\n \n //instanciar\n vehiculo transmilenio = new vehiculo();\n transmilenio.kmsActualmente=20000;\n transmilenio.modelo=2005;\n \n vehiculo sitp = new vehiculo();\n \n \n /*Scanner scanner = new Scanner(System.in);\n System.out.println(\"ingrese numero 1\");\n int numero_entero1 = scanner.nextInt();\n System.out.println(\"ingrese numero 2\");*/\n int numero_entero2 = scanner.nextInt();\n int suma = 0;\n \n System.out.println(\"resultado suma \"+suma);\n \n String nombre = \"\";\n System.out.println(\"Ingresar nombre \");\n nombre =scanner.next();\n System.out.println(\"Ingresó el nombre \"+nombre);\n \n float numero1float=233.44f;\n float numero2float=23.2f;\n float resultadofloat = numero1float + numero2float;\n System.out.println(\"resultado float \"+resultadofloat);\n \n }", "public static void main(String[] args) {\n\t\t\tString nome;\n\t\t\tint prova \t\t= 5; \n\t\t\tint projeto\t\t= 3; \n\t\t\tint exercicio \t= 2;\n\t\t\tint qtdAlunos = 0;\n\t\t\tint nAprovados \t= 0;\n\t\t\tint nRprovados \t= 0;\n\t\t\tint nAf \t\t= 0;\n\t\t\tdouble nota1,nota2,nota3,notaAf,sem1,sem2;\n\t\t\tdouble mediaGeral = 0;\n\t\t\tdouble menor = 0;\n\t\t\tdouble maior=0;\n\t\t\tdouble bim1=0;\n\t\t\tdouble bim2=0;\n\n\t\t\t\n\t\t\t\n\t\t\tScanner Al = new Scanner(System.in);\n\t\t\tSystem.out.print(\"Informe o numero de alunos.\");\n\t\t\tqtdAlunos = Al.nextInt();\n\t\t\tString [][]alunos = new String[qtdAlunos][3];\n\t\t\n\t\t\t\n\t\t\tScanner Nota = new Scanner(System.in);\n\t\t\tsem1=0;\n\t\t\tsem2=0;\n\t\t\tScanner Al2 = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Informe a Disciplina para lançamento das notas:\t \");\n\t\t\t\n\t\t\tString disciplina = Al2.nextLine();\n\n\t\t\t\tfor(int x=0;x < qtdAlunos;x++){\n\t\t\t\t\tnota1=0;\n\t\t\t\t\tnota2=0;\n\t\t\t\t\tnota3=0;\n\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"Informe o Nome do Aluno\t \");\n\t\t\t\t\tnome = Al2.nextLine();\n\t\t\t\t\t\n\t\t\t\t\tfor(int y=1;y<=4;y++) {\n\t\t\t\t\t\tSystem.out.println(\"*************************************************************\");\n\t\t\t\t\t\tSystem.out.println(\"* \"+y+\"° Bimestre *\");\n\t\t\t\t\t\tSystem.out.println(\"*************************************************************\");\n\t\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.print(\"Informe a Nota da Prova\t \");\n\t\t\t\t\t\tnota1 = Nota.nextDouble();\n\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.print(\"Informe a Nota do Projeto\t \");\n\t\t\t\t\t\tnota2 = Nota.nextDouble();\n\n\t\t\t\t\t\tSystem.out.print(\"Informe a Nota do Exercício \");\n\t\t\t\t\t\tnota3= Nota.nextDouble();\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(y==1) {\n\t\t\t\t\t\t\tbim1=((nota1*prova)+(nota2*projeto)+(nota3*exercicio))/(prova+projeto+exercicio);\n\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\tbim2=((nota1*prova)+(nota2*projeto)+(nota3*exercicio))/(prova+projeto+exercicio);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\tif(y==2) {\n\t\t\t\t\t\t\tsem1=(bim1+bim2)/2;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif(y==4) {\n\t\t\t\t\t\t\tsem2=(bim1+bim2)/2;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\tif((sem1+sem2)/2 < 5 ) {\n\t\t\t\t\t\t\t\tSystem.out.println(\"Aluno reprovado \");\n\t\t\t\t\t\t\t\t//reprovado\n\t\t\t\t\t\t\t\talunos[x][0]= nome;\n\t\t\t\t\t\t\t\talunos[x][1]= Double.toString((sem1+sem2)/2);\n\t\t\t\t\t\t\t\talunos[x][2]= \"Reprovado\";\t\t\n\t\t\t\t\t\t\t\tnRprovados=nRprovados+1;\n\t\t\t\t\t\t\t}else if((sem1+sem2)/2 > 5 && (sem1+sem2)/2<=7.9 ){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Aluno Necessita realiar a AF \");\n\t\t\t\t\t\t\t\tSystem.out.println(\"Nota Necessaria para Aprovacao: \"+ Math.round((10+(-(sem1+sem2)/2))* 100.0)/100.0);\n\t\t\t\t\t\t\t\tSystem.out.println(\"Informe a Nota da AF \");\n\t\t\t\t\t\t\t\tnotaAf = Nota.nextDouble();\n\t\t\t\t\t\t\t\tnAf=nAf+1;\n\t\t\t\t\t\t\t\tif(notaAf<(10+(-(sem1+sem2)/2))) {\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\talunos[x][0]= nome;\n\t\t\t\t\t\t\t\t\talunos[x][1]= Double.toString(notaAf);\n\t\t\t\t\t\t\t\t\talunos[x][2]= \"Reprovado - AF\";\t\n\t\t\t\t\t\t\t\t\tnRprovados=nRprovados+1;\n\t\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\t\talunos[x][0]= nome;\n\t\t\t\t\t\t\t\t\talunos[x][1]= Double.toString(notaAf);\n\t\t\t\t\t\t\t\t\talunos[x][2]= \"Aprovado -AF\";\t\t\n\t\t\t\t\t\t\t\t\tnAprovados=nAprovados+1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}else {\n\t\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t\talunos[x][0]= nome;\n\t\t\t\t\t\t\t\talunos[x][1]= Double.toString(Math.round(((sem1+sem2)/2)* 100.0)/100.0);\n\t\t\t\t\t\t\t\talunos[x][2]= \"Aprovado\";\t\n\t\t\t\t\t\t\t\tnAprovados=nAprovados+1;\n\t\t\t\t\t\t\t\n\t\t\t\t\t\t\t}\t\t\t\t\t\n\t\t\t\t\t\t\tif(menor==0 || Double.parseDouble(alunos[x][1])< menor) {\n\t\t\t\t\t\t\t\tmenor=Double.parseDouble(alunos[x][1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif(maior==0 || Double.parseDouble(alunos[x][1])> maior){\n\t\t\t\t\t\t\t\tmaior=Double.parseDouble(alunos[x][1]);\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tmediaGeral+=Double.parseDouble(alunos[x][1]);\n\t\t\t\t\t\t}\n\t\t\t\t\t\t\n\t\t\t\t\t\t\n\t\t\t\t\t}\t\n\t\t\t\t}\n\t\t\t\tSystem.out.println(\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \");\n\t\t\t\tSystem.out.println(\"\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \");\n\t\t\t\tSystem.out.println(\"#############################################################\");\n\t\t\t\tSystem.out.println(\"# Disciplina : \"+disciplina+\" \");\n\t\t\t\tSystem.out.println(\"#============================================================\");\n\t\t\t\tSystem.out.println(\"# Entrada de Dados dos alunos \");\n\t\t\t\tSystem.out.println(\"#============================================================\");\n\t\t\t\tSystem.out.println(\"# Quantidade de Alunos :\"+qtdAlunos+\" \");\n\t\t\t\tSystem.out.println(\"#============================================================\");\n\t\t\t\tSystem.out.println(\"#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \");\n\t\t\t\tSystem.out.println(\"# Menor Nota :\"+menor+\" \");\n\t\t\t\tSystem.out.println(\"# Maior Nota :\"+maior+\" \");\n\t\t\t\tSystem.out.println(\"#\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t \");\n\t\t\t\tSystem.out.println(\"#Numero de Aprovados :\"+nAprovados+\"\t\t\t\t\t\t \");\n\t\t\t\tSystem.out.println(\"#Numero de Reprovados:\"+nRprovados+\"\t\t\t\t\t\t \");\n\t\t\t\tSystem.out.println(\"#Numero de AF :\"+nAf+\"\t\t\t\t\t\t\t\t \");\n\t\t\t\tSystem.out.println(\"#===========================================================#\");\n\t\t\t\tSystem.out.println(\"# Média Turma :\"+Math.round(((mediaGeral/qtdAlunos)* 100.0)/100.0));\n\t\t\t\tSystem.out.println(\"#===========================================================#\");\t\t\t\n\t\t\t\tSystem.out.println(\"#===========================================================#\");\n\t\t\t\tSystem.out.println(\"#...................Lista dos Alunos........................#\");\n\t\t\t\tSystem.out.println(\"#===========================================================#\");\n\t\t\t\tSystem.out.println(\"#############################################################\");\n\t\t\t\tSystem.out.println(\"Nome: |Nota |Status \");\n\t\t\t\tSystem.out.println(\"-------------------------------------------------------------\");\n\t\t\t\t\n\t\t\t\tfor(int i=0;i<alunos.length;i++){\n\t\t\t\t\tSystem.out.println(alunos[i][0].length()<= 29 ? String.format (\"%-29.29s\",alunos[i][0]) +\"|\"+ String.format (\"%-14.14s\",alunos[i][1])+\"|\"+ alunos[i][2] : alunos[i][0].substring(0, 29) +\"|\"+ alunos[i][1]+\"|\"+ alunos[i][2] );\t\n\n\t\t\t\t}\n\t\t\t\tAl.close();\n\t\t\t\tAl2.close();\n\t\t\t\tNota.close();\n\t\t\n\t}", "public static void main(String[] args) {\n\n Locale.setDefault(Locale.US); //1\n Scanner sc = new Scanner(System.in); //1\n\n Calculator_Membros_Estaticos2 calc = new Calculator_Membros_Estaticos2(); //2\n System.out.print(\"Enter radius: \"); //3\n\n double radius = sc.nextDouble(); //4\n double c = calc.circumference(radius); //5\n double v = calc.volume(radius); //5\n\n System.out.printf(\"Circumference: %.2f%n\", c); //6\n System.out.printf(\"Volume: %.2f%n\", v); //6\n System.out.printf(\"PI value: %.2f%n\", calc.PI); //6\n\n sc.close();\n }", "static void soustraire() throws IOException {\n\t\tScanner clavier = new Scanner(System.in);\n\t\tint nb1, nb2, resultat;\n\t\tnb1 = lireNombreEntier();\n\t\tnb2 = lireNombreEntier();\n\t\tresultat = nb1 - nb2;\n\t\tSystem.out.println(\"\\n\\t\" + nb1 + \" - \" + nb2 + \" = \" + resultat);\n\t}", "public static void main(String[] args) throws IOException {\n\t\tfloat examen;\n\t\tfloat tarea1;\n\t\tfloat tarea2;\n\t\tfloat tarea3;\n\t\tString str;\n\t\tBufferedReader teclado= new BufferedReader(new InputStreamReader(System.in));\n\t\t\n\t\tSystem.out.println(\"Introduce la nota del examen de Matemáticas: \");\n\t\tstr = teclado.readLine();\n\t\texamen = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 1 de Matemáticas: \");\n\t\tstr = teclado.readLine();\n\t\ttarea1 = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 2 de Matemáticas: \");\n\t\tstr = teclado.readLine();\n\t\ttarea2 = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 3 de Matemáticas: \");\n\t\tstr = teclado.readLine();\n\t\ttarea3 = Float.parseFloat(str);\n\t\t\n\t\tfloat mediamatematicas=(float) ((examen*0.9)+((tarea1+tarea2+tarea3)/3)*0.1);\n\t\tSystem.out.println(\"La nota media de matemáticas es: \"+String.format(\"%.2f\",(mediamatematicas)));\n\t\t\n\t\tSystem.out.println(\"Introduce la nota del examen de Física: \");\n\t\tstr = teclado.readLine();\n\t\texamen = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 1 de Física: \");\n\t\tstr = teclado.readLine();\n\t\ttarea1 = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 2 de Física: \");\n\t\tstr = teclado.readLine();\n\t\ttarea2 = Float.parseFloat(str);\n\t\t\t\t\n\t\tfloat mediafisica=(float) ((examen*0.8)+((tarea1+tarea2)/2)*0.2);\n\t\tSystem.out.println(\"La nota media de física es: \"+String.format(\"%.2f\",(mediafisica)));\n\t\t\n\t\tSystem.out.println(\"Introduce la nota del examen de Química: \");\n\t\tstr = teclado.readLine();\n\t\texamen = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 1 de Química: \");\n\t\tstr = teclado.readLine();\n\t\ttarea1 = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 2 de Química: \");\n\t\tstr = teclado.readLine();\n\t\ttarea2 = Float.parseFloat(str);\n\t\tSystem.out.println(\"Introduce la nota de la tarea 3 de Química: \");\n\t\tstr = teclado.readLine();\n\t\ttarea3 = Float.parseFloat(str);\n\t\t\n\t\tfloat mediaquimica=(float) ((examen*0.85)+((tarea1+tarea2+tarea3)/3)*0.15);\n\t\tSystem.out.println(\"La nota media de química es: \"+String.format(\"%.2f\",(mediaquimica)));\n\t\t\n\t\tfloat mediatotal=(mediamatematicas+mediaquimica+mediafisica)/3;\n\t\tSystem.out.println(\"La nota media total es: \"+ mediatotal );\n\t}", "public void intro(){Scanner teclado = new Scanner(System.in);\nSystem.out.println(\"Introduzca la unidad de medida a la que transformar \"\n + \"pies, cm o yardas\");\nSystem.out.println(\"o escriba salir si quiere volver al primer menu\");\nopcion=teclado.nextLine();}", "public static void main(String[] args) {\n Rectangulo R = new Rectangulo();\n R.setAltura(4);\n R.setBase(6);\n R.getAltura();\n R.getBase();\n R.area();\n R.perimetro();\n Scanner scanner = new Scanner(System.in);\n System.out.println(\"Ingrese la base nueva del rectangulo: \");\n double base = scanner.nextDouble();\n R.setBase(base);\n System.out.println(\"Ingrese la altura nueva del rectangulo: \");\n double altura = scanner.nextDouble();\n R.setAltura(altura);\n System.out.println(\"Area con nuevos valores: \");\n R.area();\n Rectangulo R1 = new Rectangulo();\n System.out.println(\" \\nRectangulo 1 : \");\n R1.getBase();\n R1.getAltura();\n }", "public static void principal(String[] args) \n {\n Exercicio01 e = new Exercicio01();\n // declaração de variaveis que armazenam o valor dos lados\n float a,b,c;\n // instancia de objeto da classe Scanner para ler teclado\n Scanner teclado = new Scanner(System.in);\n // inserção dos valores dos lados\n System.out.println(\"Digite o valor do lado A\");\n a = teclado.nextFloat();\n System.out.println(\"Digite o valor do lado B\");\n b = teclado.nextFloat();\n System.out.println(\"Digite o valor do lado C\");\n c = teclado.nextFloat();\n // estrutura para verificar tipo do triangulo\n if((a != b)&& (a != c)&& (b!=c))\n {\n System.out.println(\"O triangulo é ESCALENO\");\n }\n else if((a == b) && (a == c)&& (c == b))\n {\n System.out.println(\"O triangulo é EQUILATERO\");\n }\n else\n {\n System.out.println(\"O triangulo é ISOCELES\");\n }\n System.out.println(\"=======================================\");\n System.out.print(\"O perimetro do triangulo é : \");\n System.out.println(e.calcPerimetro(a, b, c));\n System.out.print(\"A área do triangulo é : \");\n System.out.println(e.calcArea(a, b, c));\n System.out.println(\"\");\n }", "private void visualizarm(){\r\n switch(this.opc){\r\n case 1:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t\\t\\t\\t\"+min+\":\"+seg+\"\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<2;i++){\r\n for(int j=0;j<5;j++){\r\n System.out.printf(\"%s\\t\",mfacil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 2:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\n\");\r\n System.out.printf(\"-----------------------------------------------------\\n\");\r\n for(int i=0;i<3;i++){\r\n for(int j=0;j<6;j++){\r\n System.out.printf(\"%s\\t\",mmedio[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n case 3:\r\n System.out.printf(\"0\\t1\\t2\\t3\\t4\\t5\\t6\\n\");\r\n System.out.printf(\"------------------------------------------------------------------------\\n\");\r\n for(int i=0;i<4;i++){\r\n for(int j=0;j<7;j++){\r\n System.out.printf(\"%s\\t\",mdificil[i][j]);\r\n }\r\n System.out.printf(\"|\"+i+\"\\n\");\r\n }\r\n break;\r\n }\r\n }", "public static void main(String[] args) {\n Scanner entrada = new Scanner(System.in);\n System.out.println(\" Vamos calucular estoque medio da peca! \");\n System.out.println(\" Insira nome da peca : \");\n String peca = entrada.nextLine();\n System.out.println(\" Qual quantidade minima da peca? \");\n double qtdminima = entrada.nextDouble();\n System.out.println(\" Por ultimo qual quantidade maxima? \");\n double qtdmaxima = entrada.nextDouble();\n\n double estoquemedio = (qtdminima+qtdmaxima)/2;\n\n System.out.println(\"O estoque medio da peca \"+ peca +\" e de \"+estoquemedio);\n\n entrada.close();\n }", "public static void main(String args[]) {\n var edad = Integer.parseInt(\"20\");\n System.out.println(\"edad = \" + edad);\n \n double valorPI = Double.parseDouble(\"3.1416\");\n System.out.println(\"valorPI = \" + valorPI);\n \n //Convertir un char a un String\n //Realmente no es convertir toda la cadena \"hola\"\n //sino seleccionar uno de los elementos un caracter de este string\n char c = \"hola\".charAt(3);\n System.out.println(\"c = \" + c);\n \n var scanner = new Scanner(System.in);\n edad = Integer.parseInt(scanner.nextLine());\n System.out.println(\"edad = \" + edad);\n \n char caracter = scanner.nextLine().charAt(0);\n System.out.println(\"caracter = \" + caracter);\n \n //Conversion de tipos enteros a string\n String edadTexto = String.valueOf(25);\n System.out.println(\"edadTexto = \" + edadTexto);\n \n \n \n }", "public static void dormir(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int restoDeMana; //variables locales a utilizar\n int restoDeVida;\n if(oro>=30){ //condicion de oro para recuperar vida y mana\n restoDeMana=10-puntosDeMana;\n puntosDeMana=puntosDeMana+restoDeMana;\n restoDeVida=150-puntosDeVida;\n puntosDeVida=puntosDeVida+restoDeVida;\n //descotando oro al jugador\n oro=oro-30;\n System.out.println(\"\\nrecuperacion satisfactoria\");\n }\n else{\n System.out.println(\"no cuentas con 'Oro' para recuperarte\");\n }\n }", "public static void main(String[] args) {\n\t\t\n\t\tScanner sc = new Scanner(System.in);\n\t\t\n\t\t/*Alumno alumnos = new Alumno();\n\t\t\n\t\tSystem.out.println(alumnos);\n\t\tSystem.out.println(\"esta es la mejor nota; \"+alumnos.mejorNota());\n\t\t\n\t\tSystem.out.println(\"esta es la peor nota; \"+alumnos.menorNota());\n\t\talumnos.mostar();*/\n\t\t\n\t\tboolean repetir;\n\t\tString respuesta;\n\t\t\n\t\t\n\t\tdo {\n\t\t\t\n\t\t\t\n\n\t\t\tSystem.out.println(\"desea meter un alumno? (s/N)\");\n\t\t\trespuesta=sc.nextLine();\n\t\t\t\n\t\t\trepetir = false;\n\t\t\t\n\t\t\tif (\"s\".equalsIgnoreCase(respuesta)) {\n\t\t\t\tAlumno alumno = new Alumno();\n\t\t\t\trepetir = true;\n\t\t\t\tSystem.out.println(\"nombre del alumno: \"+alumno.getNombre());\n\t\t\t\tSystem.out.println(\"mejor nota del alumno: \"+alumno.mejorNota());\n\t\t\t\tSystem.out.println(\"nota media del alumno: \"+ alumno.media());\n\t\t\t}\n\t\t\t\n\t\t} while (repetir);\n\t\tSystem.out.println(\"adios!\");\n\n\t\tsc.close();\n\t\n\t\t\n\t}", "public void solicitarDatos() {\n Scanner scanner = new Scanner(System.in);\n Terreno terreno = new Terreno();\n Vivienda vivienda = new Vivienda();\n\n //preguntamos datos:\n System.out.println(\"Metros cuadrados: \");\n Integer m2 = scanner.nextInt();\n\n System.out.println(\"Precio: \");\n Double precio = scanner.nextDouble();\n\n System.out.println(\"Nombre del pueblo: \");\n String nombrePueblo = scanner.next();\n\n System.out.println(\"ID: \");\n Integer id = scanner.nextInt();\n\n //escogemos opción:\n\n System.out.println(\"Estás creando un Terreno(t) o una Vivienda(v)?: \");\n String opcion = scanner.next();\n //controlamos que la opción introducida sea válida y el precio mayor que 0 en ambos casos:\n //(si el precio es menor a 0, directamente no se crea el objeto a la hora de añadir)\n if (opcion.equals(\"t\") && precio > 0) {\n terreno.solicitarDatos(m2, precio, nombrePueblo, id);\n } else if (opcion.equals(\"v\") && precio > 0) {\n vivienda.solicitarDatos(m2, precio, nombrePueblo, id);\n } else {\n System.out.println(\"El precio es menor a 0 o no has introducido una opción correcta\");\n }\n }", "public static void main(String[] args) {\n double carMiles;\n double carHalon;\n double carCost;\n\n Scanner sc = new Scanner(System.in);\n\n System.out.println(\"Введите пробег автомобиля в американских милях:\");\n carMiles = sc.nextInt();\n\n System.out.println(\"Введите расход топлива автомобиля в галонах на милю:\");\n carHalon = sc.nextInt();\n\n System.out.println(\"Введите стоимость автомобиля $:\");\n carCost = sc.nextInt();\n\n //перевод в европейскую систему\n System.out.println(\"Пробег автомобиля: \" + carMiles * 1.61 + \"км\"); //формул: http://www.for6cl.uznateshe.ru/mili-v-kilometry/\n\n System.out.println(\"Расход топлива автомобиля: \" + ( 378.5 / ( carHalon * 1.609 )) + \" литров на 100 км\" ); // формула: https://planetcalc.ru/4357/\n\n System.out.println(\"Стоимость автомобиля: \" + carCost * 28.3 + \" грн\");\n\n\n\n }", "public static void main(String[] args) throws IOException {\n Scanner entrada = new Scanner(System.in);\n\n //Variables\n String strNombre;\n String strCalle;\n String strCiudad;\n String strEstado;\n double dbCantidad;\n String strDescripcion;\n double dbPrecio;\n boolean bandera = true;\n\n //objetos\n Domicilio objDomicilio;\n Producto objProducto;\n CrearArchivo objCrear = new CrearArchivo();\n LecturaArchivo objLec = new LecturaArchivo();\n Factura objFactura = null;\n\n\n System.out.println(\"------ Datos Factura ------\");\n System.out.print(\"Ingrese el nombre: \");\n strNombre = entrada.nextLine();\n System.out.print(\"Ingrese las calles: \");\n strCalle = entrada.next();\n System.out.print(\"Ingrese la cuidad: \");\n strCiudad = entrada.next();\n System.out.print(\"Ingrese el estado: \");\n strEstado = entrada.next();\n\n System.out.println(\"\\n------ Datos del Producto ------\");\n System.out.print(\"Ingrese la cantidad: \");\n dbCantidad = entrada.nextDouble();\n System.out.print(\"Ingrese la Descripcion: \");\n strDescripcion = entrada.next();\n System.out.print(\"Ingese el precio: \");\n dbPrecio = entrada.nextDouble();\n \n objLec.abrirArchivo();\n \n objDomicilio = new Domicilio(strNombre, strCalle, strCiudad, strEstado);\n\n objFactura = new Factura(objDomicilio);\n objProducto = new Producto(strDescripcion, dbPrecio);\n\n objFactura.AddProducto(objProducto, (int) dbCantidad);\n System.out.print(objFactura.toString());\n objLec.leerInformacion();\n objLec.cerrarArchivo();\n\n String cadena = String.format(\"%s;%s;%s;%s;%.2f;%s;%.2f;\", strNombre, strCalle, strCiudad, strEstado, dbCantidad, strDescripcion, dbPrecio);\n objCrear.agregarRegistro(cadena);\n \n System.out.println(\"\\n------------------------\");\n System.out.println(\" Factura Registrada\");\n }", "public static void main(String[] args) {\n\t\tScanner entrada = new Scanner(System.in);\r\n\t\tSystem.out.println(\"Dame la nota del primer trimestre\");\r\n\t\tdouble nota1 = entrada.nextDouble();\r\n\t\tSystem.out.println(\"Dame la nota del segundo trimestre\");\r\n\t\tdouble nota2 = entrada.nextDouble();\r\n\t\tSystem.out.println(\"Dame la nota del tercer trimestre\");\r\n\t\tdouble nota3 = entrada.nextDouble();\r\n\t\tentrada.close();\r\n\t\tdouble media = (nota1 + nota2 + nota3) / 3;\r\n\t\tSystem.out.println(\"La nota media de la evaluación es \" + media);\r\n\t}", "public void main(String[] args) {\n\t\tManipulationChaine car = new ManipulationChaine();\n\n\t\tchar premierCaractere = car.chaine.charAt(0);\n\t\tint longueur = car.chaine.length();\n\t\tint index = car.chaine.indexOf(';');\n\t\tString familyName = car.chaine.substring(0,index);\n\t\tString majName = familyName.toUpperCase();\n\t\tString minName = familyName.toLowerCase();\n\t\tString[] allChar = car.chaine.split(\";\");\n\t\tSystem.out.println(\"Premier caractère: \" + premierCaractere);\n\t\tSystem.out.println(\"Le longueur de la chaine est de: \" + longueur);\n\t\tSystem.out.println(\"Le caractère ; se trouve a l'index: \" + index);\n\t\tSystem.out.println(\"Le nom de famille est : \" + familyName);\n\t\tSystem.out.println(\"Le nom de famille en majuscule est: \" + majName);\n\t\tSystem.out.println(\"Le nom de famille en minuscule est: \" + minName);\n\t\tSystem.out.println(Arrays.toString(allChar));\n\t\tallChar[2] = allChar[2].replace(\" \",\"\");\n\t\tdouble salaire = Double.parseDouble(allChar[2]); \n\t\tSalarie newSalarie = new Salarie(allChar[0],allChar[1],salaire);\n\t\t\n\t\tSystem.out.println(newSalarie.toString());\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\tScanner scanner = new Scanner(System.in);\r\n\t\tSystem.out.println(\"inserisci un valore per la base\");\r\n\t\tdouble b = scanner.nextDouble();\r\n\r\n\t\tSystem.out.println(\"inserisci un valore per l'altezza\");\r\n\t\tdouble a = scanner.nextDouble();\r\n\t\t\r\n\t\t\r\n\t\tTriangolo t1 = new Triangolo(b,a);\r\n\t\tSystem.out.println(\"figura n.: \" + t1.getFigura());\r\n\t\tSystem.out.println(\"L'area del triangolo è: \" + t1.calcolaArea());\r\n\t\tSystem.out.println(\"Il perimetro del triangolo è: \" + t1.calcolaPerimetro());\r\n\t\tSystem.out.println(\"------------------------------------\");\r\n\t\tTriangolo t2 = new Triangolo(7,4);\r\n\t\tSystem.out.println(\"figura n.: \" + t2.getFigura());\r\n\t\tSystem.out.println(\"L'area del triangolo è: \" + t2.calcolaArea());\r\n\t\tSystem.out.println(\"Il perimetro del triangolo è: \" + t2.calcolaPerimetro());\r\n\t\tSystem.out.println(\"------------------------------------\");\r\n\t\t\r\n\t\tRettangolo r1 = new Rettangolo(b,a);\r\n\t\tSystem.out.println(r1.calcolaArea());\r\n\t\tSystem.out.println(r1.calcolaPerimetro());\r\n\t\t\r\n\t\tSystem.out.println(\"totale triangoli: \" + Triangolo.contatore);\r\n\t}", "public static void main(String[] args) { //Inicio metodo main \n\n //Cria um Scanner para obter entrada da janela de comando (receber entradas do teclado)\n Scanner entrada = new Scanner(System.in);\n //declarar variaveis\n\n int numero;\n\n System.out.println(\"Digite o numero referente ao mes:\");\n numero = entrada.nextInt();\n\n switch (numero) {\n case 1:\n System.out.println(\"Janeiro\");\n break;\n case 2:\n System.out.println(\"Fevereiro\");\n break;\n case 3:\n System.out.println(\"Março\");\n break;\n case 4:\n System.out.println(\"Abril\");\n break;\n case 5:\n System.out.println(\"Maio\");\n break;\n case 6:\n System.out.println(\"Junho\");\n break;\n case 7:\n System.out.println(\"Julho\");\n break;\n case 8:\n System.out.println(\"Agosto\");\n break;\n case 9:\n System.out.println(\"Setembro\");\n break;\n case 10:\n System.out.println(\"Outubro\");\n break;\n case 11:\n System.out.println(\"Novembro\");\n break;\n case 12:\n System.out.println(\"Dezembro\");\n break;\n default:\n System.out.println(\"Digito incorreto\");\n break;\n }\n }", "public static void main(String[] args) {\n\t\tSystem.out.println(\"---------Prueba 2--------- \");\r\n\t\tScanner teclado = new Scanner(System.in);\r\n\t\tint num, suma, elementos;\r\n\t\t float media; \r\n\t\t System.out.print(\"Ingrese un numero: \");\r\n\t\t num=teclado.nextInt();\r\n\t\t \r\n\t\t suma= 0;\r\n\t\t elementos= 0;\r\n\t\t \r\n\t\t while(num>=0) \r\n\t\t {\r\n\t\t suma+=num;\r\n\t\t elementos++;\r\n\t\t System.out.print(\"Ingrese otro numero: \");\r\n\t\t num=teclado.nextInt();\r\n\t\t }\r\n\t\t if (elementos == 0) \r\n\t\t System.out.println(\"No es posible hacer la media\");\r\n\t\t else\r\n\t\t {\r\n\t\t media= (float)suma/elementos;\r\n\t\t System.out.println(\"La media es de : \" + media);\r\n\t\t }\r\n\t\t }", "public static void main(String[] args) throws AWTException {\n Robot rob = new Robot();\r\n Scanner scanner = new Scanner(System.in);\r\n System.out.println(\"How many columns of pixels would you like to scan?\");\r\n int precision = scanner.nextInt();\r\n int increment = (840/precision);\r\n int greatestY = 0;\r\n Color white = new Color(255,255,255);\r\n long curTime = System.currentTimeMillis();\r\n for(int x = 430; x <= 1250;x+=increment){\r\n System.out.println(x);\r\n for(int y = 100; y <= 1050;y+=30){\r\n if(!rob.getPixelColor(x,y).equals(white) && y > greatestY){\r\n greatestY = y;\r\n }\r\n }\r\n }\r\n long pastTime = System.currentTimeMillis();\r\n System.out.println(pastTime-curTime);\r\n rob.delay(100);\r\n //top-left full screen position\r\n rob.mouseMove(420,45);\r\n //bottom right full screen position\r\n rob.mouseMove(1260,greatestY+20);\r\n System.out.println(rob.getPixelColor(1260,45));\r\n Dimension screenSize = Toolkit.getDefaultToolkit().getScreenSize();\r\n double h = screenSize.getHeight();\r\n double w = screenSize.getWidth();\r\n System.out.println(h + \", \" + w);\r\n //multi monitor config\r\n GraphicsDevice gd = GraphicsEnvironment.getLocalGraphicsEnvironment().getDefaultScreenDevice();\r\n int width = gd.getDisplayMode().getWidth();\r\n int height = gd.getDisplayMode().getHeight();\r\n System.out.println(height + \", \" + width);\r\n }", "public Edificio() {\n leer = new Scanner(System.in);\n int pisoActual = 0;\n System.out.println(\"Dime el piso actual\");\n pisoActual = leer.nextInt();\n PisoActual(pisoActual);\n }", "public static void main(String[] args) {\n\t\t Robot Damian = new Robot();\n\t\t//3. Ask the user what color they would like the robot to draw\n\t\tString color = JOptionPane.showInputDialog(null, \"What color should my robot draw? Red, Blue, or Green\");\n\t\t//5. Use an if/else statement to set the pen color that the user requested\n\t\n\n //6. If the user doesn’t enter anything, choose a random color\nif (color == \" \") {\n\tDamian.setPenColor(255, 255, 0);\n}\n //7. Put a loop around your code so that you keep asking the user for more colors & drawing them\n\t\t\n\t\t//4. Set the pen width to 10\n\t\tDamian.setPenWidth(10);\n\t //2. Make the robot draw a shape (this will take more than one line of code)------------------\n\t\tif (color.equalsIgnoreCase(\"red\")) {\n\t\t\tDamian.setPenColor(255, 0, 0);\n\t\t}\n\t\tif (color.equalsIgnoreCase(\"green\")) {\n\t\t\tDamian.setPenColor(0, 255, 0);\n\t\t}\n\t\tif (color.equalsIgnoreCase(\"blue\")) {\n\t\t\tDamian.setPenColor(0, 0, 255);\n\t\t}\n\tDamian.setSpeed(100);\n\tDamian.penDown();\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\tDamian.turn(90);\n\tDamian.move(150);\n\t\n\t}", "public static void main (String [] args) \n {\n \n // Variables stated that will be used in the methods below.\n double inAmount;\n char menuChoice;\n // A new object called myMeasurement is created for this driver and then \n // a instance of the no-args constructor from MeasurementConverter is called as well:\n MeasurementConverter myMeasurement;\n myMeasurement = new MeasurementConverter();\n // The scanner is activated to change whatever key that is typed to a variable's number/spot\n // @param double the keyboard inserts the value typed into the Scanner.\n Scanner in = new Scanner(System.in);\n \n // A do loop is used to make sure the user repeats when the right character is stated.\n do\n {\n \n // Prints out the menu for which the user can choose one from the following to convert to other units:\n System.out.println(\" To convert inches: type i / I\" + \n \"\\n To convert feet: type f / F\" +\n \"\\n To convert yards: type y / Y\" +\n \"\\n To convert centimeters: type c / C\" +\n \"\\n To convert meters: type m / M\");\n // Changes the value given existing in menuChoice to a value that was just typed:\n // @param char takes the existing value at menuChoice and replaces it with\n // the value typed in from the user's keyboard.\n menuChoice = in.next().charAt(0);\n \n \n // Switch method that allows the user to choose a character that corresponds with \n // a certain unit type which then can be converted into other types with the use of other methods\n // from the MeasurementConverter class.\n switch (menuChoice)\n {\n // If chosen i or I, the switch statement will say this line and then\n // will activate these methods from the MeasurementConverter class.\n case 'i':\n case 'I':\n System.out.println(\"Enter an amount: \");\n inAmount = in.nextDouble();\n myMeasurement.setInches(inAmount);\n myMeasurement.getInches();\n myMeasurement.getFeet();\n myMeasurement.getYards();\n myMeasurement.getCentimeters();\n myMeasurement.getMeters();\n \n // Prints out the toString method from the measurement converter class\n // and then prompts the user whether or not they will go again:\n // @param char takes the existing value at menuChoice and replaces it with\n // the value typed in from the user's keyboard.\n System.out.println(myMeasurement.toString());\n System.out.println(\"\\n\" + \"Enter o to go again: \");\n menuChoice = in.next().charAt(0);\n break;\n \n // If chosen f or F, the switch statement will say this line and then\n // will activate these methods from the MeasurementConverter class.\n // @param double in the in Amount of a unit (feet).\n case 'f':\n case 'F':\n System.out.println(\"Enter an amount: \");\n inAmount = in.nextDouble();\n myMeasurement.setFeet(inAmount);\n myMeasurement.getInches();\n myMeasurement.getFeet();\n myMeasurement.getYards();\n myMeasurement.getCentimeters();\n myMeasurement.getMeters();\n \n // Prints out the toString method from the measurement converter class\n // and then prompts the user whether or not they will go again:\n // @param char takes the existing value at menuChoice and replaces it with\n // the value typed in from the user's keyboard.\n System.out.println(myMeasurement.toString());\n System.out.println(\"\\n\" + \"Enter o to go again: \");\n menuChoice = in.next().charAt(0);\n break;\n \n // If chosen y or Y, the switch statement will say this line and then\n // will activate these methods from the MeasurementConverter class.\n // @param double in the in Amount of a unit (yards).\n case 'y':\n case'Y':\n System.out.println(\"Enter an amount: \");\n inAmount = in.nextDouble();\n myMeasurement.setYards(inAmount);\n myMeasurement.getInches();\n myMeasurement.getFeet();\n myMeasurement.getYards();\n myMeasurement.getCentimeters();\n myMeasurement.getMeters();\n \n // Prints out the toString method from the measurement converter class\n // and then prompts the user whether or not they will go again:\n // @param char takes the existing value at menuChoice and replaces it with\n // the value typed in from the user's keyboard.\n System.out.println(myMeasurement.toString());\n System.out.println(\"\\n\" + \"Enter o to go again: \");\n menuChoice = in.next().charAt(0);\n break;\n \n // If chosen m or M, the switch statement will say this line and then\n // will activate these methods from the MeasurementConverter class.\n // @param double in the in Amount of a unit (meters).\n case 'm':\n case 'M':\n System.out.println(\"Enter an amount: \");\n inAmount = in.nextDouble();\n myMeasurement.setMeters(inAmount);\n myMeasurement.getInches();\n myMeasurement.getFeet();\n myMeasurement.getYards();\n myMeasurement.getCentimeters();\n myMeasurement.getMeters();\n \n // Prints out the toString method from the measurement converter class\n // and then prompts the user whether or not they will go again:\n // @param char takes the existing value at menuChoice and replaces it with\n // the value typed in from the user's keyboard.\n System.out.println(myMeasurement.toString());\n System.out.println(\"\\n\" + \"Enter o to go again: \");\n menuChoice = in.next().charAt(0);\n break;\n \n // If chosen c or C, the switch statement will say this line and then\n // will activate these methods from the MeasurementConverter class.\n // @param double in the in Amount of a unit (centimeters).\n case 'c':\n case 'C':\n System.out.println(\"Enter an amount: \");\n inAmount = in.nextDouble();\n myMeasurement.setCentimeters(inAmount);\n myMeasurement.getInches();\n myMeasurement.getFeet();\n myMeasurement.getYards();\n myMeasurement.getCentimeters();\n myMeasurement.getMeters();\n \n // Prints out the toString method from the measurement converter class\n // and then prompts the user whether or not they will go again:\n // @param char takes the existing value at menuChoice and replaces it with\n // the value typed in from the user's keyboard.\n System.out.println(myMeasurement.toString());\n System.out.println(\"\\n\" + \"Enter o to go again: \");\n menuChoice = in.next().charAt(0);\n break;\n \n // The default switch statement is used to let the user type in another correct letter if\n // a letter that was previously typed was not a proper character that led\n // to a switch statement.\n // @param char takes the existing value at menuChoice and replaces it with\n // the value typed in from the user's keyboard.\n default:\n System.out.println(\"Incorrect letter was typed, please try again.\");\n System.out.println(\"\\n\" + \"Enter o to try again: \");\n menuChoice = in.next().charAt(0);\n break;\n \n } //end of switch method\n // This while statement allows the user to go again if the character o is typed.\n }while (menuChoice == 'o'); // end of do method\n \n // This last statement is given when the user refuses to go again \n //by typing in a different character other than o.\n System.out.println(\" Goodbye.\");\n }", "public static void main(String[] args) {\n\t\tSucursal s1 = new Sucursal();\n\t\tboolean posibilidad = true;\n\t\tint cont;\n\t\twhile (posibilidad) {\n\t\t\tScanner entrada = new Scanner(System.in);\n\t\t\tSystem.out.println(\"Cuantos paquetes quieres enviar:\\n1.Un paquete\\n2.Mas paquetes\\n3.Salir\");\n\t int paquetes = entrada.nextInt();\n\t if (paquetes == 1) {\n\t \tPaquete p1 = new Paquete();\n\t \ts1.setPrecio(p1);\n\t \t/*System.out.println(\"El numero de la sucursal es: \" + (int) s1.getnumero_Sucursal() +\n\t \t\t\t\" con la direccion de \" + s1.getdireccion() + \" en la ciudad de \" + s1.getciudad() +\n\t \t\t\t\" con el numero de referencia \"+ p1.getReferencia() + \" con un peso de \" + p1.getPeso() + \" kg\" + \n\t \t\t\t\" su prioridad es de: \" + p1.getPrioridad() + \" con un precio total de: \" + s1.getprecio());*/\n\t \t\n\t \tSystem.out.println(\"El numero de la sucursal es: \" + (int) s1.getnumero_Sucursal());\n\t \tSystem.out.println(\"La direccion: \" + s1.getdireccion());\n\t \tSystem.out.println(\"Ciudad: \" + s1.getciudad());\n\t \tSystem.out.println(\"Numero de referencia \"+ p1.getReferencia());\n\t \tSystem.out.println(\"con un peso de: \" + p1.getPeso() + \" kg\");\n\t \tSystem.out.println(\"Prioridad: \" + p1.getPrioridad());\n\t \tSystem.out.println(\"Precio total: \" + s1.getprecio() + \" €\");\n\t \t\n\t \t\n\t \tSystem.out.println(\"Muchas gracias por su visita\");\n\t \tposibilidad = false;\n\t }else if (paquetes == 2) {\n\t \tScanner c = new Scanner (System.in);\n\t \tSystem.out.println(\"Cuantos paquetes quieres enviar:\\n1.\\n2\\n3\\nTienes hasta 10 envios\");\n\t \tint cantidad = c.nextInt();\n\t \tint con = cantidad;\n\t \tfor (int i = 0; i < con; i++) {\n\t \t\tPaquete p1 = new Paquete();\n\t\t \ts1.setPrecio(p1);\n\t\t \tSystem.out.println(\"El numero de la sucursal es: \" + (int) s1.getnumero_Sucursal());\n\t\t \tSystem.out.println(\"La direccion: \" + s1.getdireccion());\n\t\t \tSystem.out.println(\"Ciudad: \" + s1.getciudad());\n\t\t \tSystem.out.println(\"Numero de referencia \"+ p1.getReferencia());\n\t\t \tSystem.out.println(\"con un peso de: \" + p1.getPeso() + \" kg\");\n\t\t \tSystem.out.println(\"Prioridad: \" + p1.getPrioridad());\n\t\t \tSystem.out.println(\"Precio total: \" + s1.getprecio() + \" €\");\n\t\t \tSystem.out.println(\"Muchas gracias por su visita\");\n\t\t \tposibilidad = false;\n\t\t \t\n\t\t \n\t \t}\n\t \t\n\t \t\n\t \t\n\t \n\t }else if (paquetes == 3) {\n\t \tSystem.out.println(\"Muchas gracias por su visita\");\n\t \tposibilidad=false;\n\t }\n\t\t\t\n\t\t}\n\n\t}", "private static void estadisticaClase() {\n int numeroAlumnos;\n int aprobados = 0, suspensos = 0; // definición e instanciación de varias a la vez\n int suficentes = 0, bienes = 0, notables = 0, sobresalientes = 0;\n float totalNotas = 0;\n float media;\n Scanner in = new Scanner(System.in);\n\n // Salismos del bucle sólo si nos introduce un número positivo\n do {\n System.out.println(\"Introduzca el número de alumnos/as: \");\n numeroAlumnos = in.nextInt();\n } while (numeroAlumnos <= 0);\n\n // Como sabemos el número de alumnos es un bucle definido\n for (int i = 1; i <= numeroAlumnos; i++) {\n float nota = 0;\n\n // nota solo existe dentro de este for, por eso la definimos aquí.\n do {\n System.out.println(\"Nota del alumno \" + i + \" [0-10]: \");\n nota = in.nextFloat();\n } while (nota < 0 || nota > 10);\n\n // Sumamos el total de notas\n totalNotas += nota;\n\n if (nota < 5) {\n suspensos++;\n } else if (nota >= 5 && nota < 6) {\n aprobados++;\n suficentes++;\n } else if (nota >= 6 && nota < 7) {\n aprobados++;\n bienes++;\n } else if (nota >= 7 && nota < 9) {\n aprobados++;\n notables++;\n } else if (nota >= 9) {\n aprobados++;\n sobresalientes++;\n }\n }\n // De esta manera redondeo a dos decimales. Tengo que hacer un casting porque de Double quiero float\n // Si no debería trabajar con double siempre.\n media = (float) (Math.round((totalNotas / numeroAlumnos) * 100.0) / 100.0);\n\n // Sacamos las estadísticas\n System.out.println(\"Número de alumnos/as: \" + numeroAlumnos);\n System.out.println(\"Número de aprobados/as: \" + aprobados);\n System.out.println(\"Número de suspensos: \" + suspensos);\n System.out.println(\"Nota media: \" + media);\n System.out.println(\"Nº Suficientes: \" + suficentes);\n System.out.println(\"Nº Bienes: \" + bienes);\n System.out.println(\"Nº Notables: \" + notables);\n System.out.println(\"Nº Sobresalientes: \" + sobresalientes);\n\n\n }", "public static void main(String[] args) {\n\t\tCoche renault = new Coche();\n\t\t\n\t\t//renault.setRuedas(20);\n\t\t\n\t\t\n\t\tSystem.out.println(renault.getRuedas());\n\t\n\t\trenault.setColor(\"Verde\",\"Oscuro\");\n\t\t\n\t\tSystem.out.println(renault.getColor());\n\n\t\t\n\t\tSystem.out.println(renault.dimeTodo());\n\t\t\n\t\t//Pregunta por los asientos de cuero.\n\t\tSystem.out.println(\"Quieres asientos de cuero? S/n\");\n\t\tScanner in = new Scanner (System.in);\n\t\trenault.configura_asientos(in.next());\n\t\tSystem.out.println(\"Quieres climatizador? si/no\");\n\t\trenault.setClimatizador(in.next());\n\t\t//Metodo geter para que nos lo diga.\n\t\tSystem.out.println(renault.getClimatizador()+ \". \"+ renault.dime_asientos());\n\t\t\n\t\tSystem.out.println(\"El precio total según su configuración es: \"+renault.getPrecio());\n\t\t\n\t}", "static void gatherInfo() {\n Scanner keyboard = new Scanner(System.in);\n System.out.print(\"Enter the type of measurement (inches, feet, etc.). >> \");\n measurementType = keyboard.nextLine();\n System.out.print(\"Enter the rectangle width. >> \");\n height = keyboard.nextDouble();\n System.out.print(\"Enter the rectangle height. >> \");\n width = keyboard.nextDouble();\n }", "public static void main(String [] args){//inicio del main\r\n\r\n Scanner sc= new Scanner(System.in); \r\n\r\nSystem.out.println(\"ingrese los segundos \");//mesaje\r\nint num=sc.nextInt();//total de segundos\r\nint hor=num/3600;//total de horas en los segundos\r\nint min=(num-(3600*hor))/60;//total de min en las horas restantes\r\nint seg=num-((hor*3600)+(min*60));//total de segundo sen los miniutos restantes\r\nSystem.out.println(\"Horas: \" + hor + \" Minutos: \" + min + \" Segundos: \" + seg);//salida del tiempo\r\n\r\n}", "public static void main(String[] args) {\n\t\tScanner teclado = new Scanner(System.in);\r\n\r\n\t\twhile (true) {\r\n\t\t\tSystem.out.println(\"CALCULADORA\");\r\n\t\t\tSystem.out.println(\"1.- SUMA.\");\r\n\t\t\tSystem.out.println(\"2.- RESTA.\");\r\n\t\t\tSystem.out.println(\"3.- MULTIPLICACION\");\r\n\t\t\tSystem.out.println(\"4.- DIVISION\");\r\n\t\t\tSystem.out.println(\"5.- RAIZ CUADRADA\");\r\n\t\t\tSystem.out.println(\"6.- AREA DE UN CÍRCULO\");\r\n\t\t\tSystem.out.println(\"7.- AREA DE UN TRIANGULO\");\r\n\t\t\tSystem.out.println(\"0.- SALIR\");\r\n\t\t\tSystem.out.println(\"INTRODUZCA OPCION\");\r\n\r\n\t\t\tint opcion = teclado.nextInt();\r\n\t\t\tSystem.out.println(\"Introduzca valor a:\");\r\n\t\t\tint a = teclado.nextInt();\r\n\t\t\tSystem.out.println(\"Introduzca valor b:\");\r\n\t\t\tint b = teclado.nextInt();\r\n\r\n\t\t\tswitch (opcion) {\r\n\t\t\tcase 1:\r\n\t\t\t\tSystem.out.println(\"SUMA:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.suma(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 2:\r\n\t\t\t\tSystem.out.println(\"RESTA:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.resta(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 3:\r\n\t\t\t\tSystem.out.println(\"MULTIPLICACION:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.multiplicacion(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 4:\r\n\t\t\t\tSystem.out.println(\"DIVISION:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.division(a, b));\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 5:\r\n\t\t\t\tSystem.out.println(\"RAIZ CUADRADA\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.raizCuadrada(a));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 6:\r\n\t\t\t\tSystem.out.println(\"ÁREA DE UN CÍRCULO:\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.areaCirculo(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 7:\r\n\t\t\t\tSystem.out.println(\"AREA DEL TRIANGULO\");\r\n\t\t\t\tSystem.out.println(OperacionesBasicas.areatri(a, b));\r\n\t\t\t\tbreak;\r\n\t\t\tcase 0:\r\n\t\t\t\treturn;\r\n\t\t\t}\r\n\r\n\t\t}\r\n\r\n\t}", "public static void main(String[] args) {\n\t\tScanner scn = new Scanner(System.in);\n\t\tfloat n1 = scn.nextFloat();\n\t\tfloat n2 = scn.nextFloat();\n\t\tfloat n3 = scn.nextFloat();\n\t\tfloat n4 = scn.nextFloat();\n\t\tfloat nE = 0;\n\t\tfloat med = (float) (((n1*2)+(n2*3)+(n3*4)+n4)/10);\n\t\tString media = String.format(\"%,.1f\", med);\n\t\tSystem.out.println(\"Media: \"+media);\n\t\t\n\t\tif(med>7){\n\t\t\tSystem.out.println(\"Aluno aprovado.\");\n\t\t\t\n\t\t} else if(med<5) {\n\t\t\tSystem.out.println(\"Aluno reprovado.\");\n\t\t\t\n\t\t} else {\n\t\t\tSystem.out.println(\"Aluno em exame.\");\n\t\t\tnE = scn.nextFloat();\n\t\t\tString exame = String.format(\"%,.1f\", nE);\n\t\t\tSystem.out.println(\"Nota do exame: \"+exame);\n\t\t\tmed = (float)((med+nE)/2);\n\t\t\tif (med<4.9){\n\t\t\t\tSystem.out.println(\"Aluno reprovado.\");\n\t\t\t\t\n\t\t\t} else {\n\t\t\t\tSystem.out.println(\"Aluno aprovado.\");\n\t\t\t}\n\t\t\tmedia = String.format(\"%,.1f\", med);\n\t\t\tSystem.out.println(\"Media final: \"+media);\n\t\t}\n\t\tscn.close();\n\t}", "public void popier() {\n Scanner input1 = new Scanner(System.in);\n //Ivedame vaiku skaiciu\n Scanner input2 = new Scanner(System.in);\n //Idame tevu skaiciu\n Scanner input3 = new Scanner(System.in);\n\n System.out.println(\"Iveskite atlyginimą ant popieriaus: \");\n double atlyginimas = input1.nextDouble();\n\n System.out.println(\"Iveskite turimų vaikų iki 18 metų skaičių.\");\n int vaikai = input2.nextInt();\n if (vaikai == 0) {\n\n //Apskaiciuojame NPD\n double npd = 310 - 0.5 * (atlyginimas - 380);\n if (npd >= 0)\n System.out.println(\"NPD: \" + npd);\n else\n System.out.println(\"NPD: \" + 0);\n\n //Bendras NPD\n double bnpd = npd;\n System.out.println(\"Bendras NPD: \" + bnpd);\n\n //Darbuotojo mokesciai\n System.out.println(\"\\nDarboutojo mokesčiai:\");\n\n //Apskaiciuojame GPM\n //Gauname neapmokestinama dali\n double nep = atlyginimas - bnpd;\n\n //GPM 15%\n double gpm = nep * 1.15 - nep;\n System.out.printf(\"Pajamu mokestis (GPM): %.2f %n\", gpm);\n\n //Apskaiciuojame PSD 6%\n double psd = atlyginimas * 1.06 - atlyginimas;\n System.out.printf(\"Sveikatos draudimas (PSD): %.2f %n\", psd);\n\n //Apskaiciuojame pensija ir soc draudima 3%\n double soc = atlyginimas * 1.03 - atlyginimas;\n System.out.printf(\"Pensijų ir soc. Draudimas: %.2f %n\", soc);\n\n\n //Darbdavio mokesciai\n System.out.println(\"\\nDabdavio mokami mokesčiai:\");\n\n //Sodros imoka 30.98%\n double sod = atlyginimas * 1.3098 - atlyginimas;\n System.out.printf(\"Sodros įmoka (VSD): %.2f %n\", sod);\n\n // Imoka i garantini fonda 0.2%\n double gar = atlyginimas * 1.002 - atlyginimas;\n System.out.printf(\"Įmokos į Garantinį fondą: %.2f %n\", gar);\n\n //Uzmokestis i rankas\n double rank = atlyginimas - gpm - psd - soc;\n System.out.printf(\"%nUžmokestis gaunamas į rankas: %.2f %n\", rank);\n\n //Darbo vietos kaina\n double viet = atlyginimas + sod + gar;\n System.out.printf(\"Darbo vietos kaina darbdaviui: %.2f\", viet);\n\n\n } else {\n\n System.out.println(\"Keliese auginate vaikus?\");\n int tevai = input3.nextInt();\n\n\n //Apskaiciuojame NPD\n double npd = 310 - 0.5 * (atlyginimas - 380);\n if (npd >= 0)\n System.out.println(\"NPD: \" + npd);\n else\n System.out.println(\"NPD: \" + 0);\n\n //Apskaiciuojame PNPD\n double pnpd = (200 * vaikai) / tevai;\n System.out.println(\"PNPD: \" + pnpd);\n\n //Bendras NPD\n double bnpd = npd + pnpd;\n System.out.println(\"Bendras NPD: \" + bnpd);\n\n //Darbuotojo mokesciai\n System.out.println(\"\\nDarboutojo mokesčiai:\");\n\n //Apskaiciuojame GPM\n //Gauname neapmokestinama dali\n double nep = atlyginimas - bnpd;\n\n //GPM 15%\n double gpm = nep * 1.15 - nep;\n System.out.printf(\"Pajamu mokestis (GPM): %.2f %n\", gpm);\n\n //Apskaiciuojame PSD 6%\n double psd = atlyginimas * 1.06 - atlyginimas;\n System.out.printf(\"Sveikatos draudimas (PSD): %.2f %n\", psd);\n\n //Apskaiciuojame pensija ir soc draudima 3%\n double soc = atlyginimas * 1.03 - atlyginimas;\n System.out.printf(\"Pensijų ir soc. Draudimas: %.2f %n\", soc);\n\n\n //Darbdavio mokesciai\n System.out.println(\"\\nDabdavio mokami mokesčiai:\");\n\n //Sodros imoka 30.98%\n double sod = atlyginimas * 1.3098 - atlyginimas;\n System.out.printf(\"Sodros įmoka (VSD): %.2f %n\", sod);\n\n // Imoka i garantini fonda 0.2%\n double gar = atlyginimas * 1.002 - atlyginimas;\n System.out.printf(\"Įmokos į Garantinį fondą: %.2f %n\", gar);\n\n //Uzmokestis i rankas\n double rank = atlyginimas - gpm - psd - soc;\n System.out.printf(\"%nUžmokestis gaunamas į rankas: %.2f %n\", rank);\n\n //Darbo vietos kaina\n double viet = atlyginimas + sod + gar;\n System.out.printf(\"Darbo vietos kaina darbdaviui: %.2f\", viet);\n\n }\n\n\n\n }", "public static void main(String[] args) {\n\t\tScanner input = new Scanner(System.in);\n\t\tSystem.out.println(\"Porfavor entre com o número da conta:\");\n\t\tString numConta = input.nextLine();\n\t\tSystem.out.println(\"Porfavor entre com o valor do depósito:\");\n\t\tdouble valor = input.nextDouble();\n\t\t\n\t\t//Criando o objeto da classe Conta Corrente com a passagem de parâmetros para o construtor \n\t\tConta conta = new ContaFisica(\"Tassio\", numConta, valor);\t\t\t\n\t\t\n\t\tSystem.out.println(conta.toString() + \"\\n\");\n\t\t\n\t\t//Entrada de dados\n\t\tSystem.out.println(\"Porfavor entre com o valor do saque:\");\n\t\tvalor = input.nextDouble();\n\t\t\n\t\t//Envio de menssagem para o objeto \n\t\tconta.saque(valor);\n\t\t\n\t\t//Imprimi os dados da conta\n\t\tSystem.out.println(conta.toString());\n\t\t\n\t\tinput.close();\n\n\t}", "public static void main(String[] args) {\n\n Scanner tc = new Scanner(System.in);\n\n double a, b, c = 0;\n String soma = \"+\";\n String subtração = \"-\";\n String multiplicação = \"*\";\n String divisão = \"/\";\n String potência = \"^\";\n String raiz = \"~\";\n String operação = \"\";\n System.out.println(\"Qual operação deseja fazer ?\");\n operação = tc.nextLine();\n System.out.println(\"insira um numero ó mortal\");\n a = tc.nextDouble();\n System.out.println(\"insira um numero ó mortal\");\n b = tc.nextDouble();\n ;\n if (operação == null ? soma == null : operação.equals(soma)) {\n c = a + b;\n System.out.println(\"o resultado é \" + c);\n } else if (operação == null ? subtração == null : operação.equals(subtração)) {\n c = a - b;\n System.out.println(\"o resultado é \" + c);\n } else if (operação == null ? multiplicação == null : operação.equals(multiplicação)) {\n c = a * b;\n System.out.println(\"o resultado é \" + c);\n }\n else \n c = a/b;\n \n System.out.println(\"o resultado é \" + c);\n }", "public static void main(String[] args) {\n \n Empleado empleado1 =new Empleado();\n empleado1.nombre = \"Hector Rafael\";\n empleado1.apellidos = \"Castillo Molinares\";\n empleado1.genero = \"Masculino\";\n empleado1.fecha_nacimiento = \"24/03/2002\";\n empleado1.nacionalidad = \"Colombiana\";\n empleado1.identificación = \"1129526720\";\n empleado1.telefono = \"123456789\";\n empleado1.profesion = \"ingeniero\";\n empleado1.dirección = \"carrera.25#26-03\";\n empleado1.correo_electronico = \"example@gmail.com\";\n empleado1.Calcular_Edad();\n \n System.out.println(\"Nombre:\"+ empleado1.nombre + empleado1.apellidos);\n System.out.println(\"Genero:\"+ empleado1.genero);\n System.out.println(\"Fecha de nacimiento:\"+ empleado1.fecha_nacimiento);\n System.out.println(\"Nacionalidad:\"+ empleado1.nacionalidad);\n System.out.println(\"Su documeto de identificacion es:\"+ empleado1.identificación);\n System.out.println(\"Telefono:\"+ empleado1.telefono);\n System.out.println(\"Direccion\"+ empleado1.dirección);\n System.out.println(\"Correo electronico:\"+ empleado1.correo_electronico);\n System.out.println(\"Fecha de nacimiento\"+ empleado1.fecha_nacimiento);\n System.out.println(\"Su edad actual es:\"+ empleado1.Calcular_Edad());\n \n Estudiante estudiante1 =new Estudiante();\n estudiante1.nombre = \"Hector Rafael\";\n estudiante1.apellidos = \"Castillo Molinares\";\n System.out.println(\"El estudiante se llama:\"+ estudiante1.nombre + estudiante1.apellidos);\n \n Scanner lectura =new Scanner (System.in);\n int edad, año_nacimiento, año_actual;\n System.out.println(\"ingrese el año de nacimiento\");\n año_nacimiento =lectura.nextInt();\n System.out.println(\"ingrese el año actual\");\n año_actual =lectura.nextInt();\n edad=año_actual-año_nacimiento;\n System.out.println(\"la edad es:\"+edad);\n \n \n \n }", "public static void main(String[] args) {\n\t\tFG rectangle = new intf(20.0,30.0);\r\n\t\tFG tamgiac = new Tamgiac(5.0,5.0,6.0);\r\n\t\tFG hinhtron = new hinhtron(10);\r\n\t\trectangle.println();\r\n\t\ttamgiac.println();\r\n\t\thinhtron.println();\r\n\t\t\r\n\t\t\r\n\t\t\r\n}", "public static void tienda(){\n System.out.print(\"\\033[H\\033[2J\");//limpia pantalla\n System.out.flush();\n int opcionCompra; //variables locales a utilizar\n Scanner scannerDos=new Scanner(System.in);\n //mostrando en pantalla las opciones de la tienda\n System.out.println(\"Bienvenido a la tienda, que deceas adquirir:\\n\");\n\tSystem.out.println(\"PRODUCTO \\tPRECIO \\tBENEFICIO\");\n\tSystem.out.println(\"1.Potion \\t50 oro \\tcura 25 HP\");\n\tSystem.out.println(\"2.Hi-Potion\\t100 oro \\tcura 75 HP\");\n\tSystem.out.println(\"3.M-Potion \\t75 oro \\trecupera 10 MP\");\n //ingresando numero de opcion\n System.out.println(\"\\n\\nIngrese numero de opcion:\");\n opcionCompra=scannerDos.nextInt();\n //comparando la opcion de compra\n switch(opcionCompra){\n case 1:{//condicion de oro necesario para el articulo1 \n\t\t\tif(oro>=50){\n articulo1=articulo1+1;\n System.out.println(\"compra exitosa\");\n }else {\n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t\tcase 2:{//condicion de oro necesario para el articulo2\n if(oro>=100){\n articulo2=articulo2+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\");\n }\n break;\n }\n\t default:{//condicion de oro necesario para el articulo3\n if(oro>=75){\n articulo3=articulo3+1;\n }else{ \n System.out.println(\"oro insuficiente!!!\"); //poner while para ,ejora\n \t\t}\n break;\n }\n }\n }", "public static void main(String[] args) {\n\t\tScanner ent = new Scanner(System.in);\r\n\r\n\t\tSystem.out.println(\"Informe o valor de A:\");\r\n\t\tdouble a = ent.nextDouble();\r\n\r\n\t\tif (a == 0) {\r\n\t\t\tSystem.out.println(\"A equação não é de segundo grau\");\r\n\r\n\t\t} else {\r\n\t\t\tSystem.out.println(\"Insira o valor de B: \");\r\n\t\t\tdouble b = ent.nextDouble();\r\n\r\n\t\t\tSystem.out.println(\"Insira o valor de C: \");\r\n\t\t\tdouble c = ent.nextDouble();\r\n\r\n\t\t\tdouble delta = (b * b) - (4 * a * c);\r\n\r\n\t\t\tif (delta == 0) {\r\n\t\t\t\tSystem.out.println(\"A equação não é de segundo grau\");\r\n\r\n\t\t\t} else if (delta < 0) {\r\n\t\t\t\tSystem.out.println(\"A equação não possui raizes\");\r\n\r\n\t\t\t} else {\r\n\t\t\t\tdouble raiz1 = (-b + Math.sqrt(delta) / (2 * a));\r\n\t\t\t\tdouble raiz2 = (-b - Math.sqrt(delta) / (2 * a));\r\n\t\t\t\tSystem.out.println(\"Raiz 1: \" + raiz1);\r\n\t\t\t\tSystem.out.println(\"Raiz 2: \" + raiz2);\r\n\r\n\t\t\t}\r\n\r\n\t\t}\r\n\t\tent.close();\r\n\r\n\t}", "public void alquilarMultimediaAlSocio(){\n lector = new Scanner(System.in);\n int opcion = -1;\n int NIF = 0;\n int pedirElemento;\n String titulo;\n Socio socio;\n\n\n\n NIF = pedirNIF(); // pido el NIF por teclado\n\n if(tienda.exiteSocio(NIF)){ // Si exite, continuo\n socio = tienda.getSocioWithNIF(NIF); // Si exite el socio, busco en la tienda y lo asigno.\n if(!socio.isAlquilando()) { // si el socio no está actualmente alquilando, no continuo\n opcion = pedirElemento(); // Pido el elemento\n\n switch (opcion) {\n case 1:\n tienda.imprimirDatos(tienda.getPeliculas());\n System.out.println(\"Introduce el titulo de la pelicula que quieres: \");\n titulo = lector.nextLine();\n if (tienda.exitePelicula(titulo)) {\n\n tienda.alquilarPeliculaSocio(NIF, titulo);\n System.out.println(\"PELICULA ANYADIDO EN EL MAIN\");\n\n\n } else {\n System.out.println(\"No exite la pelicula \" + titulo + \".\");\n }\n\n\n break;\n case 2:\n tienda.imprimirDatos(tienda.getVideojuegos());\n System.out.println(\"Introduce el titulo del videojuego que quieres: \");\n titulo = lector.nextLine();\n if (tienda.existeVideojuego(titulo)) {\n\n tienda.alquilarVideojuegoSocio(NIF, titulo);\n System.out.println(\"VIDEOJUEGO ANYADIDO EN EL MAIN\");\n\n\n } else {\n System.out.println(\"No exite el videojuego \" + titulo + \".\");\n }\n break;\n default:\n break;\n }\n }else{\n System.out.println(\"El socio \" + socio.getNombre() + \" tiene recargos pendientes.\");\n }\n\n }else{\n System.out.println(\"El socio con NIF \" + NIF + \" no exite.\");\n }\n\n\n\n\n\n\n }", "public static <Soplo_Humano> void main(String args[])throws Exception{\r\n\t\tScanner entry = new Scanner (System.in);\r\n\t\tString Instrumentos = null;\r\n\t\tSystem.out.print(\"Flauta\"+ \"\\n\" + \"Trompeta\"+ \"\\n\" +\"Marimba\");\r\n\t\tSystem.out.print(\"Ingrese instrumento: \");\r\n\t\t Instrumentos = entry.next();\r\n\t\tif(Instrumentos.equals(\"Flauta\"))\r\n\t \tSystem.out.println(\"Tiene un orificio donde pasa el aire\");\r\n\t\tif(Instrumentos.equals(\"Trompeta\"))\r\n\t\t\tSystem.out.println(\"Tiene un orificio donde pasa el aire\");\r\n\t\tthrow new Exception(\"No tiene orificio por lo tanto no es del tipo Aerofono\");\r\n}", "public static void main(String[] args) {\n try{\n //Peticion de datos al usuario\n System.out.println(\"Resolución de la ecuación cuadrática\");\n System.out.println(\"------------------------------------\");\n System.out.println();\n System.out.println(\"Indique el valor de A: \");\n a = input.nextDouble();\n System.out.println(\"Indique el valor de B: \");\n b = input.nextDouble();\n System.out.println(\"Indique el valor de C: \");\n c = input.nextDouble();\n \n //Resolucion de la ecuacion y obtencion de los dos posibles resultados\n resultado1 = (-b + Math.sqrt(Math.pow(b, 2) - (4*a*c))) / (2*a);\n resultado2 = (-b - Math.sqrt(Math.pow(b, 2) - (4*a*c))) / (2*a);\n \n //Se muestra por consola los valores obtenidos de X\n System.out.println(\"Resolución #1: \\n\" + \"X = \" + resultado1);\n System.out.println(\"Resolución #2: \\n\" + \"X = \" + resultado2);\n }catch(InputMismatchException ex){\n System.out.println(\"ERROR. Los valores introducidos han de ser numéricos\");\n }\n \n \n }", "public static int drwal(String[] args){\n if (args.length == 5) {\n //Sprawdzanie czy argument 1,2,4,5 to inty\n try {\n Integer.parseInt(args[0]);\n Integer.parseInt(args[1]);\n Integer.parseInt(args[3]);\n Integer.parseInt(args[4]);\n }catch (NumberFormatException e){\n System.out.println(\"klops\");\n return 0;\n }\n int xStart = Integer.parseInt(args[1]);\n int yStart = Integer.parseInt(args[0]);\n Character kolor = args[2].charAt(0);\n int szerokosc = Integer.parseInt(args[3]);\n int wysokosc = Integer.parseInt(args[4]);\n Scanner input = new Scanner(System.in);\n char[][] output1 = new char[wysokosc][szerokosc];\n int wyscount = 0;\n int counter = 0;\n //Jezeli szerokosc albo wysokosc > 5000\n //Jezeli xstart > szerokosc, ystart > wysokosc\n if (!((szerokosc > 5000 || wysokosc > 5000)||(xStart > szerokosc || yStart > wysokosc))){\n while(input.hasNextLine()){\n String tmp;\n byte[] isUTF = null;\n try {\n tmp = input.nextLine();\n isUTF = tmp.getBytes(\"UTF-8\");\n }\n catch(UnsupportedEncodingException e){\n System.out.println(\"klops\");\n return 0;\n }\n if (wyscount > wysokosc || tmp.length() > szerokosc){\n System.out.println(\"klops\");\n return 0;\n }\n for (int i = 0;i<tmp.length();i++){\n output1[counter][i] = tmp.charAt(i);\n }\n counter++;\n wyscount++;\n }\n int startx = xStart -1;\n int starty = yStart -1;\n //Jezeli punkt startowy to spacja to zaczynamy kolorowanie\n if (output1[startx][starty]==' '){\n output1 = color(output1,kolor,startx,starty);\n }\n //wypisywanie na wyjsciu pokolorwanego obrazka\n for (int i=0;i<wyscount;i++){\n for (int j=0;j<szerokosc;j++){\n System.out.print(output1[i][j]);\n }\n System.out.println();\n }\n }\n else {\n System.out.println(\"klops\");\n return 0;\n }\n }\n else{\n System.out.println(\"klops\");\n return 0;\n }\n return 0;\n }", "public static void main(String[] args) {\n\t\t\n\t\tSystem.out.println(\"Elige una opci�n: \\n1: Cuadrado \\n2: Rectangulo \\n3: Triangulo \\n4: Circulo\");\n\t\t\n\t\t\n\t\tint figura=new Scanner(System.in).nextInt();\n\t\tswitch(figura) {\n\t\t\n\t\tcase 1://Calculo �rea Cuadrado\n\t\t\tint lado=Integer.parseInt(JOptionPane.showInputDialog(\"Introduce el lado\"));\n\t\t\tSystem.out.println(\"El �rea del cuadrado es: \"+ Math.pow(lado, 2));\n\t\t\n\t\t\tbreak;\n\t\t\n\t\tcase 2://Calculo �rea rectangulo\n\t\t\tint base=Integer.parseInt(JOptionPane.showInputDialog(\"Introduce la base \"));\n\t\t\tint altura=Integer.parseInt(JOptionPane.showInputDialog(\"Introduce la altura\"));\n\t\t\t\n\t\t\tSystem.out.println(\"El �rea del rectangulo es: \"+ (base*altura));\n\t\t\n\t\t\tbreak;\n\t\tcase 3://Calculo �rea rectangulo\n\t\t\tbase=Integer.parseInt(JOptionPane.showInputDialog(\"Introduce la base \"));\n\t\t\taltura=Integer.parseInt(JOptionPane.showInputDialog(\"Introduce la altura\"));\n\t\t\t\n\t\t\tSystem.out.println(\"El �rea del Triangulo es: \"+ ((base*altura)/2));\n\t\t\n\t\t\tbreak;\n\t\tcase 4://Calculo �rea rectangulo\n\t\t\tint radio=Integer.parseInt(JOptionPane.showInputDialog(\"Introduce el radio \"));\n\t\t\t\n\t\t\tSystem.out.println(\"El �rea del circulo es: \");\n\t\t\tSystem.out.printf(\"%.2f\", Math.PI*(Math.pow(radio, 2)));\n\t\t\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.print(\"la opci�n seleccionada no es correcta\");\n\t\t\n\t\t}\n\t\t\n\t\t\n\t\t\n\t}", "public static void main(String[] args) {\n\r\n\t\t\r\n\tint prix=1, paiement=0,montant=0,Reste, Nb10E, Nb5E;\r\n\tchar rep='t';\r\n\tdo {\r\n\t\tSystem.out.println(\"saisir un prix\");\r\n\t\tScanner saisie = new Scanner(System.in);\r\n\t\tprix= saisie.nextInt();\r\n\t\t\r\n\t\tmontant=montant+prix; \r\n\t\t\r\n\t\tSystem.out.println(\"Voulez vous entrer un autre prix ? c pour continuer et t pour terminer\");\r\n\t\tScanner clavier=new Scanner (System.in);\r\n\t\trep= clavier.nextLine().charAt(0);\r\n\t\t\r\n\t}\r\n\t\t\r\n\t\r\n\t while (rep!='t');\r\n\t{\r\n\t\t System.out.println(\"saisir un prix\");\r\n\t\t\tScanner sc = new Scanner(System.in);\r\n\t\t\tprix= sc.nextInt();\r\n\t\t\t\r\n\t }\r\n\t\r\n\tSystem.out.println(\"le montant total est\"+montant); \r\n\r\n\tSystem.out.println(\"Saisir le paiement\");\r\n\tScanner sp = new Scanner(System.in);\r\n\tpaiement= sp.nextInt();\r\n\t\r\n\tReste = paiement-montant;\r\n\r\n\tNb10E = 0;\r\n\t\r\n\twhile (Reste >= 10 ) {\r\n\t Nb10E = Nb10E + 1;\r\n\t Reste = Reste-10;\r\n\t}\r\n\t Nb5E = 0;\r\n\t if (Reste >= 5) {\r\n\t\t Nb5E= 1;\r\n\t\t Reste = Reste-5;\r\n\t }\r\n\t\r\n\r\n\tSystem.out.println(\"Rendu de la monnaie\"); \r\n\tSystem.out.println(\"10 E\"+ Nb10E);\r\n\tSystem.out.println(\"Billets de 5 E\"+Nb5E); \r\n\tSystem.out.println(\"Pièces de 1 E\"+Reste);\r\n\r\n\t\r\n\tsp.close();\r\n\t\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t\t\r\n\t}", "public static void main(String[] args) throws IOException{\n InputStreamReader in = new InputStreamReader(System.in);\r\n BufferedReader input = new BufferedReader(in);\r\n\r\n int[] sistMonetario = {500,200,100,50,20,10,5,2,1};\r\n\r\n Map<Integer,Long> monedasDisponibles = new HashMap<>();\r\n\r\n long numCasos = Long.parseLong(input.readLine());\r\n\r\n String[] partes = input.readLine().split(\" \");\r\n long maxValor = 0;\r\n long numMonedasTotal = 0;\r\n\r\n for(int i=0; i<sistMonetario.length; i++){\r\n long numMonedas = Long.parseLong(partes[i]);\r\n numMonedasTotal+=numMonedas;\r\n maxValor += numMonedas*sistMonetario[i];\r\n monedasDisponibles.put(sistMonetario[i],numMonedas);\r\n }\r\n\r\n for(long i=0; i<numCasos; i++){\r\n long aDevolver = Long.parseLong(input.readLine());\r\n if(aDevolver > maxValor){\r\n System.out.println(\"-1\");\r\n }else if(aDevolver == maxValor){\r\n System.out.println(numMonedasTotal);\r\n }else if(aDevolver == 0){\r\n System.out.println(\"0\");\r\n }else {\r\n System.out.println(voraz(monedasDisponibles, aDevolver, sistMonetario));\r\n }\r\n }\r\n }", "public static void main(String[] args) {\n\t\tScanner keyBoard = new Scanner(System.in);\n\t\t////Bai 1\n\t\t//\t\tSystem.out.println(\"Nhap chieu cao\");\n//\t\tint n = keyBoard.nextInt();\n//\t\ttriagleDraw triagle = new triagleDraw(n);\n//\t\ttriagle.show();\n\n//\t\t//Bai 2\n//\t\tSystem.out.println(\"Input month\");\n//\t\tString month = keyBoard.nextLine();\n//\t\tSystem.out.println(\"Input year\");\n//\t\tString year = keyBoard.nextLine();\n//\t\twhile(!SolveDayOfMonth.isNumeric(year)) {\n//\t\t\tSystem.out.println(\"year is not numeric, input year:\");\n//\t\t\tyear = keyBoard.nextLine();\n//\t\t\t\n//\t\t}\n//\t\tDayOfMonth day = new DayOfMonth();\n//\t\t\n//\t\tint monthInt = SolveDayOfMonth.convertToMonth(month);\n//\t\tint yearInt = SolveDayOfMonth.convertToYear(year);\n//\t\t\n//\t\tday.setMonth(monthInt);\n//\t\tday.setYear(yearInt);\n//\t\tif(!day.checkInput()) {\n//\t\t\tSystem.exit(0);\n//\t\t}\n//\t\tint dayInMonth = day.showDayInMonth();\n//\t\tSystem.out.println(\"Nam \" + day.getYear() + \" Thang \" + day.getMonth() + \": Co \" + dayInMonth + \" Ngay\");\n\t\t\n////\t\tBai 3\n//\t\tint []arrInput = {1, 3, 5, 6};\n//\t\tSolveArray arr = new SolveArray(arrInput);\n//\t\tarr.sortArray();\n//\t\t\n//\t\tarr.sumArray();\n//\t\tarr.averageArray();\n////\t\tBai 4\n//\t\tdouble [][]matrix1 = {{1,2,3},{3,1},{5,4,6}};\n//\t\tdouble [][]matrix2 = {{1,2,3},{2,3,1},{5,4,6}};\n//\t\tSumMatrix sumMatrix = new SumMatrix();\n//\t\tsumMatrix.setMatrix1(matrix1);\n//\t\tsumMatrix.setMatrix2(matrix2);\n//\t\tsumMatrix.sumMatrix();\n//\t\t\n\t}", "public static void main(String[] args) {\n Aviso aviso1 = new Aviso();\n \n aviso1.id=1;\n \n aviso1.tipoAviso=\"General\";\n aviso1.titulo=\"Insumos y bienes muebles de laboratorio disponibles\";\n aviso1.texto=\"La Coordinación de Control Técnico de Insumos (COCTI) de la Dirección de Prestaciones Médicas, pone a disposición del personal que realiza investigación el inventario adjunto.\";\n aviso1.resumen=\"Insumos y bienes muebles de laboratorio disponibles por la Coordinación de Control Técnico de Insumos (COCTI)\";\n aviso1.nombre=\"Eduardo Flores Díaz\";\n aviso1.estatusF=\"Vigente\";\n \n aviso1.diaP=02;\n aviso1.mesP=02;\n aviso1.yearP=2020;\n \n aviso1.diaA=02;\n aviso1.mesA=02;\n aviso1.yearA=2020;\n \n aviso1.diaB=02;\n aviso1.mesB=02;\n aviso1.yearB=2021;\n \n System.out.println(aviso1);\n \n Aviso aviso2 = new Aviso();\n \n aviso2.id=2;\n \n aviso2.tipoAviso=\"Conferencia\";\n aviso2.titulo=\"CONFERENCIA DR. COSSARIZZA\";\n aviso2.texto=\"El Dr. Andrea Cossarizza, ofreció a la comunidad IMSS su conferencia “Clinical Applications of Advanced Cytometry” y aprovechó la presencia de investigadores y estudiantes del IMSS para compartir sus últimos resultados de investigación, aún no publicados, sobre VIH y el uso de citometría de flujo.\\n\" +\n\"\\n\" +\n\"Además, invitó a nuestra comunidad a agregarse a la sociedad internacional sobre citometría: ISAC(International Society for the Advancement of Cytometry) y aprovechar los recursos que tienen como:\\n\" +\n\"\\n\" +\n\"Programa de Liderazgo MARYLOU INGRAM SCHOLARS PROGRAM, de 5 años para formación de citomteristas\\n\" +\n\"Iniciativa de innovación CYTO-Innovation apoya a las propuestas innovadoras que contemplan la conversión de ideas en productos comerciales de alto impacto para ayudar a nuevos empresarios a aprovechar la tecnología de citometría\\n\" +\n\"\\n\" +\n\"Además en la ISAC tienen disponibles una serie de manuales e información de punta sobre la citometría para uso libre. El Dr. Cossarizza reiteró la invitación al personal IMSS a vincularse con la Universidad de Módena y su laboratorio aprovechando el prestigio que tiene el Laboratorio de Citometría de Flujo del Centro de Instrumentos del Centro Médico Nacional Siglo XXI.\";\n \n aviso2.resumen=\"Conferencia de Dr. Andrea Cossarizza del tema “Clinical Applications of Advanced Cytometry\\\"\";\n aviso2.nombre=\"Kevin Meza Gonzalez\";\n aviso2.estatusF=\"No Vigente\";\n \n aviso2.diaP=02;\n aviso2.mesP=03;\n aviso2.yearP=2020;\n \n aviso2.diaA=15;\n aviso2.mesA=02;\n aviso2.yearA=2020;\n \n aviso2.diaB=31;\n aviso2.mesB=03;\n aviso2.yearB=2020;\n \n System.out.println(aviso2);\n \n }", "public void printStat(){\n\t\tdouble tempsMoyen;\n\t\tdouble tempsTotal=0;\n\t\tfor (double temps : tempsPartie) {\n\t\t\ttempsTotal+=temps;\n\t\t}\n\t\ttempsMoyen=tempsTotal/tempsPartie.length;\n\t\tSystem.out.println(\"----------------------------------------------------------------------\");\n\t\tSystem.out.println(\"Durée moyenne d'une partie: \"+tempsMoyen+\" millisecondes\\n\");\n\t\tSystem.out.println(\"----------------------------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(joueur1.getNom()+\":\");\n\t\tSystem.out.println(\"Nombre de parties gagnées en tant que premier joueur: \"+ statJ1[0]);\n\t\tSystem.out.println(\"Nombre de parties gagnées en tant que deuxième joueur: \"+ statJ1[1]);\n\t\tSystem.out.println(\"Nombre de parties gagnées sur \"+tempsPartie.length+\" parties: \"+statJ1[2]);\n\t\tSystem.out.println(\"Nombre de mur placés sur les \"+tempsPartie.length+\" parties: \"+statJ1[3]);\n\t\tSystem.out.println(\"Nombre de déplacements effectués sur les \"+tempsPartie.length+\" parties: \"+statJ1[4]);\n\t\tSystem.out.println(\"Nombre de coups jouées sur les \"+tempsPartie.length+\" parties: \"+statJ1[5]);\n\t\tSystem.out.println(\"----------------------------------------------------------------------\");\n\t\t\n\t\tSystem.out.println(joueur2.getNom()+\":\");\n\t\tSystem.out.println(\"Nombre de parties gagnées en tant que premier joueur: \"+ statJ2[0]);\n\t\tSystem.out.println(\"Nombre de parties gagnées en tant que deuxième joueur: \"+ statJ2[1]);\n\t\tSystem.out.println(\"Nombre de parties gagnées sur \"+tempsPartie.length+\" parties: \"+statJ2[2]);\n\t\tSystem.out.println(\"Nombre de mur placés sur les \"+tempsPartie.length+\" parties: \"+statJ2[3]);\n\t\tSystem.out.println(\"Nombre de déplacements effectués sur les \"+tempsPartie.length+\" parties: \"+statJ2[4]);\n\t\tSystem.out.println(\"Nombre de coups jouées sur les \"+tempsPartie.length+\" parties: \"+statJ2[5]);\n\t\tSystem.out.println(\"----------------------------------------------------------------------\\n\");\n\t\t\n\t}", "public Screen()\n { \n FileReader filereader;\n BufferedReader reader;\n PrintWriter writer;\n String line;\n int defaultColor;\n int defaultDiff;\n int defaultMode;\n int defaultOps;\n try{\n filereader = new FileReader(\"settings.txt\");\n reader = new BufferedReader(filereader);\n \n //if(reader.readLine() !=null)\n line = reader.readLine();\n defaultMode = Integer.parseInt(line);\n line = reader.readLine();\n defaultDiff = Integer.parseInt(line);\n line = reader.readLine();\n defaultColor = Integer.parseInt(line);\n line = reader.readLine();\n defaultOps = Integer.parseInt(line);\n String[] options = {\"Regular Mode\", \"Time Trial\"};\n int n = -1;\n n = JOptionPane.showOptionDialog(null,\"Choose your mode\",\"Mode Selection\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[defaultMode]);\n if(n==0)\n modeT = false;\n else if(n==1)\n {\n modeT = true;\n difficult = \"HARD\";\n \n timer2=5.0;\n }\n else if(n==-1)\n {\n resetSettings();\n System.exit(0);\n }\n if(!modeT)\n {\n difficult = (String)JOptionPane.showInputDialog(null,\"Choose your difficulty\",\"Choose Difficulty\",JOptionPane.QUESTION_MESSAGE,null,difficultyOption,difficultyOption[defaultDiff]);\n if(difficult == null)\n { \n resetSettings();\n System.exit(0);\n }\n }\n int a = 2;\n int b = 0;\n int c = 0;\n int d = 0;\n writer = new PrintWriter(new File(\"settings.txt\"));\n for(int i = 0;i<difficultyOption.length;i++)\n {\n if(difficultyOption[i].equalsIgnoreCase(difficult))\n {\n a = i;\n //writer.println(i);\n //System.out.println(i);\n }\n }\n //On ghost the color will automatically be black so you shouldn't be allowed to select a color\n if(!difficult.equals(\"GHOST\") && difficult != null && color != null )\n {\n color = (String)JOptionPane.showInputDialog(null,\"Select a color for your Snake\",\"Choose Color\",JOptionPane.QUESTION_MESSAGE,null,colorOption,colorOption[defaultColor]);\n if(color == null)\n {\n resetSettings();\n System.exit(0);\n \n }\n for(int i = 0;i<colorOption.length;i++)\n {\n if(colorOption[i].equalsIgnoreCase(color))\n {\n //writer = new PrintWriter(new File(\"settings.txt\"));\n //writer.println(i);\n //System.out.println(i);\n b = i;\n }\n }\n \n int restart = -1;\n String[] ops = {\"Yes\", \"No\"};\n String str1 = \"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die\\nGolden Mushroom: increases head size of snake\\nGhost: turns the snake invisible\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nBanana: reverses the keys\";\n String str2 = \"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die, timer stops\\nGolden Mushroom: adds 3 extra seconds to timer when collected\\nIce Crystal: pauses timer\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nGreen Mushroom: increases head size of state\";\n //int restart = JOptionPane.showOptionDialog(null,\"Choose your mode\",\"Mode Selection\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,options,options[defaultMode]);\n if(!modeT)\n restart = JOptionPane.showOptionDialog(null,str1,\"Specials?\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,ops,ops[defaultOps]);\n //restart = JOptionPane.showConfirmDialog(null,\"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die\\nGolden Mushroom: increases head size of snake\\nGhost: turns the snake invisible\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nBanana: reverses the keys\" ,\"Specials?\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);\n else\n restart = JOptionPane.showOptionDialog(null,str2,\"Specials?\",JOptionPane.YES_NO_CANCEL_OPTION,JOptionPane.QUESTION_MESSAGE,null,ops,ops[defaultOps]);\n //restart = JOptionPane.showConfirmDialog(null,\"Would you like to play with special power ups and challenges?\\nIf yes is selected, different items will occasionally appear which have temporary special effects:\\n\\n\\nBlue Shell: No boundaries\\nStar: snake cannot die, timer stops\\nGolden Mushroom: adds 3 extra seconds to timer when collected\\nIce Crystal: pauses timer\\nPow Block: allows the snake to travel through itself\\nThree Mushrooms: double points\\nGreen Mushroom: increases head size of state\" ,\"Specials?\",JOptionPane.YES_NO_OPTION,JOptionPane.QUESTION_MESSAGE);\n \n if(restart == 1) \n specials = false;\n else if(restart ==0) \n specials = true;\n else if(restart == -1)\n {\n resetSettings();\n System.exit(0);\n }\n \n d = restart;\n }\n if(modeT)\n c = 1;\n \n int[] ab = {c,a,b,d};\n for(int x: ab)\n writer.println(x);\n writer.close();\n //Makes sure the cancel option works\n if(color == null)\n {\n resetSettings();\n System.exit(0);\n }\n }\n catch(IOException e){} \n try { \n image = ImageIO.read(new File(\"Star.png\"));\n image2 = ImageIO.read(new File(\"Mushroom.png\"));\n image3 = ImageIO.read(new File(\"Red Mushroom.png\"));\n image4 = ImageIO.read(new File(\"Blue Shell.png\"));\n image5 = ImageIO.read(new File(\"Boo.png\"));\n image6 = ImageIO.read(new File(\"Three Mushrooms.png\"));\n image7 = ImageIO.read(new File(\"Pow Block.png\"));\n image8 = ImageIO.read(new File(\"Banana.png\"));\n image9 = ImageIO.read(new File(\"Ice Crystal.png\"));\n image10 = ImageIO.read(new File(\"Unmute.png\"));\n image11 = ImageIO.read(new File(\"Mute.png\"));\n image12 = ImageIO.read(new File(\"Green Mushroom.png\"));\n image13 = ImageIO.read(new File(\"Red Shell.png\"));\n image14 = ImageIO.read(new File(\"Red Shell Big.png\"));\n } catch (IOException ex) {\n // handle exception...\n }\n try{\n URL url = this.getClass().getClassLoader().getResource(\"Coin.wav\");\n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n bclip = AudioSystem.getClip();\n \n //URL url2 = this.getClass().getClassLoader().getResource(\"Relaxing Elevator Music.wav\");\n \n //AudioInputStream audioIn2 = AudioSystem.getAudioInputStream(url2);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n //clip2.open(audioIn2); \n }catch(Exception e){}\n \n try{ \n //bclip.stop();\n \n URL url = this.getClass().getClassLoader().getResource(\"Refreshing Elevator Music.wav\");\n \n AudioInputStream audioIn = AudioSystem.getAudioInputStream(url);\n // Get a sound clip resource.\n pclip = AudioSystem.getClip();\n \n // Open audio clip and load samples from the audio input stream.\n //pclip.open(audioIn); \n \n }catch(Exception e){}\n \n \n //Makes sure the cancel option works\n \n \n setFocusable(true);\n requestFocusInWindow();\n setPreferredSize(new Dimension(WIDTH, HEIGHT));\n \n //Creates a list of all locations on the grid\n for(int b = 150; b<630; b+= 15)\n {\n for(int a = 150; a< 1260; a+= 15)\n {\n allLocations.add(new Location(a,b));\n }\n } \n startSnake();\n \n //Makes sure the Dot does not originally start on the snake\n boolean go = true;\n while(go)\n {\n if(snakeOnDot())\n {\n //dots.remove(0);\n \n randomize();\n dot.setA(a);\n dot.setB(b); \n \n //dots.add(dot);\n }\n else\n go = false;\n }\n \n start();\n }", "public static void main(String[] args) {\n\t\tScanner leer = new Scanner(System.in);\r\n\t\tSystem.out.println(\"------------------ Encuentro en la Universidad ----------------\\n\"); // T�tulo del programa\r\n\t\t// Explicacion del programa\r\n\t\tSystem.out.println(\"Mediante este programa usted puede verificar que dia se vuelven a ver en la universidad: Ana, Bernardo y Carlos\\n\");\r\n\t\t// Declaracion de variables.\r\n\t\tint a, b, c;\r\n\t\tSystem.out.print(\"--------- Cada cuantos dias va Ana a la universidad? (a): \");// solicita entrada\r\n\t\ta = leer.nextInt();// lee la entrada\r\n\t\tSystem.out.print(\"--------- Cada cuantos dias va Bernardo a la universidad? (b): \");// solicita entrada\r\n\t\tb = leer.nextInt();// lee la entrada\r\n\t\tSystem.out.print(\"--------- Cada cuantos dias va Carlos a la universidad? (c): \");// solicita entrada\r\n\t\tc = leer.nextInt();// lee la entrada\r\n\t\tmcm(a,b,c);\r\n\t\tleer.close();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n\t\tElementoRadiactivo e1 = new ElementoRadiactivo(\"Uranio 235\", 3.1229827968e-17);\n\t\tSystem.out.println(e1 + \" \" + e1.getVidaMedia());\n\t\te1 = new ElementoRadiactivo(\"Uranio 238\", 4.919326974e-18);\n\t\tSystem.out.println(e1 + \" Vida media=\" + e1.getVidaMedia());\n\t\tSystem.out.println(e1 + \" Desintegrados en t= 10000 =\" + e1.getProporcionDesintegrados(10000));\n\t\t\n\t\te1 = new ElementoRadiactivo(\"Rubidio 87\", 4.5040067466e-19);\n\t\tSystem.out.println(e1 + \" Vida media=\" + e1.getVidaMedia());\n\t\tSystem.out.println(e1 + \" Desintegrados en t= 10000 =\" + e1.getProporcionDesintegrados(10000));\n\t\t\n\t\te1 = new ElementoRadiactivo(\"Calcio 41\", 2.133937177e-13);\n\t\tSystem.out.println(e1 + \" Vida media=\" + e1.getVidaMedia());\n\t\tSystem.out.println(e1 + \" Desintegrados en t= 10000 =\" + e1.getProporcionDesintegrados(10000));\n\t\t\n\t\te1 = new ElementoRadiactivo(\"Radio 226\", 1.3720070489e-11);\n\t\tSystem.out.println(e1 + \" Vida media=\" + e1.getVidaMedia());\n\t\tSystem.out.println(e1 + \" Desintegrados en t= 10000 =\" + e1.getProporcionDesintegrados(10000));\n\t\t\n\t\te1 = new ElementoRadiactivo(\"Cesio 137\", 7.309462229e-10);\n\t\tSystem.out.println(e1 + \" Vida media=\" + e1.getVidaMedia());\n\t\tSystem.out.println(e1 + \" Desintegrados en t= 10000 =\" + e1.getProporcionDesintegrados(10000));\n\t\t\n\t\t\n\t}", "public static void main(String [] args){\n\tdouble radio,pi=3.14,area,perimetro;\n\ttry{\n\tradio=Double.parseDouble(JOptionPane.showInputDialog(null,\"Ingrese El Radio Del Circulo\"));\n\tarea=pi*(radio*radio);\n\tperimetro = (radio*2)*pi;\n\tJOptionPane.showMessageDialog(null, \"El Ciurculo Tiene Un Area De= \"+area+\"cm2 Y Un Perimetro De= \"+perimetro+\"cm\");\n\t}catch(NumberFormatException x){\n\t\tJOptionPane.showMessageDialog(null, \"Has Ingresado Una Letra\");\n\t}\n}", "public static void main(String[] args) {\n String matriz = \"ABCDEFGHIJLMNOPQRSTUVWXYZ\";\n Ejercicio1 c = new Ejercicio1();\n String retorno;\n String mensaje = JOptionPane.showInputDialog(\"Digite el mensaje\");\n// Convierte el mensaje a mayusculas\n mensaje = mensaje.toUpperCase();\n c.llenaMatriz(matriz);\n retorno = c.aTap(mensaje);\n JOptionPane.showMessageDialog(null, retorno);\n\n //Fin de la Primera parte del examen\n /*\n Inicio de la Segunda parte del examen\n */\n /*\n String[] lista = {\" auto \", \" pato \", \" palo \", \" poto \", \" amar \", \" amor \",\n \" loca \", \" loco \", \" polo \", \" poco \", \" poca \", \" rota \", \" roto \"};\n AdminPalabras admin = new AdminPalabras( lista );\n String[] letras = {\" escalopa \", \" automotor\", \" percatado\"};\n for(int i = 0; i < letras . length ; i ++) {\n int cont = admin .ContarPalabrasPosibles(letras [i ]);\n JOptionPane.showMessageDialog(null,letras [i] + \": \" + cont );\n }*/\n //Fin de la Segunda parte del Examen\n }", "public static void main(String[] args) {\n\t\tint a=0, b=0, res=0;\n\t\tString sel=null;\n\t\tScanner entrada= new Scanner(System.in);\n System.out.println(\"Selecciona la opcion:\\n \");\n System.out.println(\"+: Suma\"\n \t\t + \"\\n-: Resta\"\n \t\t + \"\\n*: Multiplicacion\"\n \t\t + \"\\n/: Division\");\n sel=entrada.next();\n switch(sel){ //creo suma con el Scanner, luego copio esto mismo para la resta,mult y div\n \t case \"+\":\n \t\t System.out.println(\"Ha seleccionado suma\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a+b;\n \t\t System.out.println(a+\"+\"+b+\"=\"+res);\n \t\t \t\t break;\n \t case \"-\":\n \t\t System.out.println(\"Ha seleccionado resta\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a-b;\n \t\t System.out.println(a+\"-\"+b+\"=\"+res);\n \t\t \t\t break;\n \t case \"*\":\n \t\t System.out.println(\"Ha seleccionado multiplicacion\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a*b;\n \t\t System.out.println(a+\"*\"+b+\"=\"+res);\n \t\t \t\t break;\n \t case \"/\":\n \t\t System.out.println(\"Ha seleccionado division\\n Ingrese los valores\");\n \t\t System.out.println(\"Ingrese el primer numero:\");\n \t\t a=entrada.nextInt();\n \t\t System.out.println(\"Ingrese el segundo numero: \");\n \t\t b=entrada.nextInt();\n \t\t res=a/b;\n \t\t System.out.println(a+\"/\"+b+\"=\"+res);\n \t\t \t\t break;\n \t\t \t\t default:\n \t\t \t\t\t System.out.println(\"Esa opcion no existe\");\n }\n \n\t}", "public static void main(String[] args) {\n float nuevo=0,suma=0,prom=0;\n System.out.println(\"programa para sacar promedio\");\n Scanner n = new Scanner(System.in);\n System.out.println(\"ingrese la contidad de nota\");\n int notas =n.nextInt();\n for (int i = 1; i <= notas; i++){\n Scanner o = new Scanner(System.in);\n System.out.println(\"ingrese la nota obtenida \" + \"{\"+i+\"}:\");\n nuevo = o.nextFloat();\n suma= suma+nuevo;\n prom= suma/notas;\n }\n System.out.println(\"la suma es: \" +suma);\n System.out.println(\"el promedio es: \" +prom);\n }", "static void diviser() throws IOException {\n\t Scanner clavier = new Scanner(System.in);\n\tdouble nb1, nb2, resultat;\n\tnb1 = lireNombreEntier();\n\tnb2 = lireNombreEntier();\n\tif (nb2 != 0) {\n\tresultat = nb1 / nb2;\n\tSystem.out.println(\"\\n\\t\" + nb1 + \" / \" + nb2 + \" = \" +\n\tresultat);\n\t} else\n\tSystem.out.println(\"\\n\\t le nombre 2 est nul, devision par 0 est impossible \");\n\t}", "view2() {\n Scanner input = new Scanner(System.in);\n Scanner StringInput = new Scanner(System.in);\n System.out.println(\"Calculator\");\n System.out.println(\"Enter the numbers you would like to operate on in order.\");\n System.out.print(\"Enter the first number: \");\n float first = StringInput.nextInt();\n System.out.print(\"which operation would you like to perform? ( Enter +, -, *, or / ) \");\n String operator = input.nextLine();\n System.out.print(\"Enter the second number: \");\n float second = input.nextInt();\n\n setFirstNumber(first);\n setOperator(operator);\n setSecondNumber(second);\n input.close();\n }", "public static void Promedio(){\n int ISumaNotas=0;\n int IFila=0,ICol=0;\n int INota;\n float FltPromedio;\n for(IFila=0;IFila<10;IFila++)\n {\n ISumaNotas+=Integer.parseInt(StrNotas[IFila][1]);\n }\n FltPromedio=ISumaNotas/10;\n System.out.println(\"El promedio de la clase es:\"+FltPromedio);\n }", "public static void main(String[] args) {\n\n Scanner skaityvtuvas = new Scanner(System.in);\n while (true) {\n System.out.println(\"Turime is viso 9 uzduotis\");\n System.out.println(\"Iveskite uzduoties numeri, kad ja vykdyti.\");\n System.out.println(\"Ivedus 0, programa bus baigta.\");\n int pasirinkimas = skaityvtuvas.nextInt();\n\n switch (pasirinkimas) {\n case CHOISE_0:\n return;\n case CHOISE_1:\n Uzduotis01 pirmoji = new Uzduotis01(); // Vykdo konstruktoriu.\n break;\n case CHOISE_2:\n Uzduotis02 antroji = new Uzduotis02();\n break;\n case CHOISE_3:\n Uzduotis03 trecioji = new Uzduotis03();\n break;\n case CHOISE_4:\n Uzduotis04 ketvirta = new Uzduotis04();\n break;\n case CHOISE_5:\n Uzduotis05 penkta = new Uzduotis05();\n break;\n case CHOISE_6:\n Uzduotis06 sesta = new Uzduotis06();\n break;\n case CHOISE_7:\n Uzduotis07 septinta = new Uzduotis07();\n break;\n case CHOISE_8:\n Uzduotis08 astunta = new Uzduotis08();\n case CHOISE_9:\n Uzduotis09 devinta = new Uzduotis09();\n }\n }\n\n\n }", "public void dibujar(){\n\t\tswitch(partida.getErrores()){\n\t\t\tcase 1:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n |\\n |\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n | /\\n |\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n | / \\\\\\n |\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n | /|\\\\\\n |\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n | _/|\\\\\\n |\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n | _/|\\\\_\\n |\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 7:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n | _/|\\\\_\\n | _/\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 8:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | ( )\\n | _/|\\\\_\\n | _/ \\\\_\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 9:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | (x )\\n | _/|\\\\_\\n | _/ \\\\_\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tcase 10:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n | (x x)\\n | _/|\\\\_\\n | _/ \\\\_\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.printf(\"\\n ______\\n | |\\n |\\n |\\n |\\n |\\n |\\n__|__\\n\");\n\t\t\t\tbreak;\n\t\t}\n\t}", "public static void main(String[] args) {\n // maison.chauffer();\n // System.out.println(\"temperature : \"+maison.temperature);\n // maison.refroidir();\n // System.out.println(\"temperature : \"+maison.temperature);\n\n Batiment batiment = new Batiment(30.);\n System.out.println(\"temperature : \"+batiment.temperature);\n\n DataCenter datacenter = new DataCenter(25.0);\n System.out.println(\"temperature : \"+datacenter.temperature);\n System.out.println(\"temperature : \"+datacenter.temperature);\n datacenter.refroidir();\n System.out.println(\"temperature : \"+datacenter.temperature);\n datacenter.refroidir();\n System.out.println(\"temperature : \"+datacenter.temperature);\n\n Maison maison = new Maison(35.);\n System.out.println(\"temperature : \"+maison.temperature);\n maison.chauffer();\n System.out.println(\"temperature : \"+maison.temperature);\n maison.chauffer();System.out.println(\"temperature : \"+maison.temperature);\n maison.refroidir();\n System.out.println(\"temperature : \"+maison.temperature);\n\n }", "public void run() {\t\n\t\tScanner s = new Scanner(System.in);\n\t\tString message = null;\n\t\tString NewMess = null;\n\t\t\ttry {\n\t\t\t\t\t// Flux entrant du Joueur1\n\t\t\t\t\tBufferedReader bw1 = new BufferedReader(new InputStreamReader(socket1.getInputStream()));\n\t\t\t\t\t\n\t\t\t\t\t// Flux entrant du Joueur2\n\t\t\t\t\tBufferedReader bw2 = new BufferedReader( new InputStreamReader(socket2.getInputStream()));\n\t\t\t\t\t\n\t\t\t\t\t// Flux sortant du Joueur1\n\t\t\t\t\tPrintWriter out1 = new PrintWriter(socket1.getOutputStream(),true);\n\t\t\t\t\t\n\t\t\t\t\t// Flux sortant du Joueur2\n\t\t\t\t\tPrintWriter out2 = new PrintWriter(socket2.getOutputStream(),true);\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t// Renvoie le mot-but au joueur 1.\n\t\t\t\t\tString mot1 = \"Le mot à faire découvrir est : \" ;\n\t\t\t\t\tlemot = this.getTab();\n\t\t\t\t\tmot = mot1 + lemot;\n\t\t\t\t\tout1.println( mot);\n\t\t\t\t\tSystem.out.println(mot); // On affiche au serveur le mot à faire découvrir.\n\t\t\t\t\t\n\t\t\t\t\t\n\t\t\t\t\t//Renvoie au Joueur 2 le message du Joueur1 avec les 30% de caractères en moins. \n\t\t\t\t\tString J1 = \"Recu de Joueur 1 : \";\n\t\t\t\t\tString J1Serveur = \"Message du Joueur1 (sans modification) : \";\n\t\t\t\t\twhile(true) {\n\t\t\t\t\t\tString accent = newFormat(bw1.readLine());\n\t\t\t\t\t\tNewMess=SuppressionMot(lemot,accent);\n\t\t\t\t\t\tmessage=getSuppr30(NewMess);\n\t\t\t\t\t\tout2.println(J1 + message);\n\t\t\t\t\t\n\t\t\t\t\t\tSystem.out.println(J1Serveur + accent);\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t}catch (IOException e ) {\n\t\t\t\t\n\t\t\t\t//'Déconnexion' lorsque un des joueurs quitte la partie.\n\t\t\t\tSystem.out.println(\"Déconnexion\");\n\t\t\t\t\n\t\t\t} catch (InterruptedException e) {\n\t\t\t\t\n\t\t\t\te.printStackTrace();\n\t\t\t}\n\t\n\t\t}", "public static void main(String[] args) {\n\t\t\r\n\t\r\n\r\n \tScanner teclado=new Scanner(System.in);\r\n \tint suma,resta,division,multiplicacion;\r\n \tString num1=JOptionPane.showInputDialog(null,\"Ingrese el primer numero: \");\r\n\t\tint n1= new Integer(num1);\r\n \tString num2=JOptionPane.showInputDialog(null,\"Ingrese el segundo numero: \");\r\n\t\tint n2= new Integer(num2);\r\n \t\r\n \tsuma=n1+n2;\r\n \tresta=n1-n2;\r\n \tmultiplicacion=n1*n2;\r\n \t\r\n \tJOptionPane.showMessageDialog(null,\"el resultado es \");\r\n \tJOptionPane.showMessageDialog(null,\"suma es \"+suma);\r\n \tJOptionPane.showMessageDialog(null,\"resta es \"+resta);\r\n \tJOptionPane.showMessageDialog(null,\"multiplicacion es \"+multiplicacion);\r\n\r\n}", "public static void main(String[] args) {\n int op;\r\n int opM;\r\n int opP;\r\n int opA;\r\n int opR;\r\n\r\n //Instanciando clases controladores para acceder a sus constrcutores (CRUD)\r\n ControladorMamifero mamiferoCon = new ControladorMamifero();\r\n ControladorPez pezCon = new ControladorPez();\r\n ControladorAve aveCon = new ControladorAve();\r\n\r\n do {\r\n\r\n System.out.println(\" ►► Menu ◄◄\");\r\n System.out.println(\"1. CRUD> Mamifero\");\r\n System.out.println(\"2. CRUD> Pez\");\r\n System.out.println(\"3. CRUD> Ave\");\r\n System.out.println(\"4. CRUD> Reptil\");\r\n System.out.println(\"5. SALIR \");\r\n\r\n Scanner leer = new Scanner(System.in);\r\n op = leer.nextInt();\r\n\r\n switch (op) {\r\n\r\n case 1: //crud de mamifero\r\n do {\r\n System.out.println(\" ►► Mamifero ◄◄\");\r\n System.out.println(\"1. CREATE \");\r\n System.out.println(\"2. READ \");\r\n System.out.println(\"3. UPDATE \");\r\n System.out.println(\"4. DELETE \");\r\n System.out.println(\"5. LIST \");\r\n System.out.println(\"6. REGRESAR \");\r\n\r\n opM = leer.nextInt();\r\n\r\n switch (opM) {\r\n //Creamos un objeto \"mamifero\".\r\n case 1:\r\n //Creo objeto de la clase ControladorMamifero para \r\n Mamifero mamifero = new Mamifero();\r\n //Asignamos valores\r\n System.out.println(\" CREATE \");\r\n System.out.println(\" Ingresar nombre\");\r\n mamifero.setNombre(leer.nextLine());\r\n mamifero.setNombre(leer.nextLine());\r\n System.out.println(\" Ingresar el tipo de animal\");\r\n mamifero.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingresar el sexo\");\r\n mamifero.setSexo(leer.nextLine());\r\n\r\n System.out.println(\" Ingresar cantidad de patas\");\r\n mamifero.setCantPatas(leer.nextInt());\r\n System.out.println(\" Ingresar cantidad de mamas\");\r\n mamifero.setCantMamas(leer.nextInt());\r\n System.out.println(\" Ingresar el tiempo de gestacion\");\r\n mamifero.setTiempoGest(leer.nextLine());\r\n mamifero.setTiempoGest(leer.nextLine());\r\n System.out.println(\" Ingresar el peso en kilos\");\r\n mamifero.setPeso(leer.nextDouble());\r\n\r\n //llamamos al metodo create en la clase Controlador.\r\n mamiferoCon.create(mamifero);\r\n System.out.println(\" Se ha creado un mamifero \"\r\n + mamifero.getNombre() + \" con el codigo: \" + mamifero.getCodigo());\r\n break;\r\n\r\n //Leemos el objeto creado anteriormente \"mamifero\" mediante el nombre.\r\n case 2:\r\n //Read mamifero\r\n System.out.println(\" \");\r\n System.out.println(\" READ \");\r\n System.out.println(\"Ingresar codigo del mamifero\");\r\n int cod2 = leer.nextInt();\r\n\r\n System.out.println(\" \");\r\n System.out.println(mamiferoCon.read(cod2));\r\n\r\n break;\r\n\r\n //Actualizamos el objeto pidiendo el nombre; el codigo se mantiene. \r\n case 3:\r\n //update mamifero\r\n System.out.println(\" UPDATE \");\r\n Mamifero mamiferoU = new Mamifero();\r\n System.out.println(\"Ingresar codigo del mamifero a modificar \");\r\n mamiferoU.setCodigo(leer.nextInt());\r\n mamiferoCon.update(mamiferoU);\r\n\r\n System.out.println(\"Ingresar nombre:\");\r\n mamiferoU.setNombre(leer.nextLine());\r\n mamiferoU.setNombre(leer.nextLine());\r\n System.out.println(\" Ingresar el tipo de animal\");\r\n mamiferoU.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingresar el sexo\");\r\n mamiferoU.setSexo(leer.nextLine());\r\n\r\n System.out.println(\" Ingresar cantidad de patas\");\r\n mamiferoU.setCantPatas(leer.nextInt());\r\n System.out.println(\" Ingresar cantidad de mamas\");\r\n mamiferoU.setCantMamas(leer.nextInt());\r\n System.out.println(\" Ingresar el tiempo en meses de gestacion\");\r\n mamiferoU.setTiempoGest(leer.nextLine());\r\n mamiferoU.setTiempoGest(leer.nextLine());\r\n System.out.println(\" Ingresar el peso en kilos\");\r\n mamiferoU.setPeso(leer.nextDouble());\r\n\r\n //llama al metodo update de la clase ControladorAuto.\r\n mamiferoCon.update(mamiferoU);\r\n System.out.println(\"Se han actualizado los datos del mamifero de codigo \"\r\n + mamiferoU.getCodigo());\r\n\r\n break;\r\n\r\n //Elimina un objeto y lo buscamos mediante el codigo;\r\n case 4:\r\n //delete mamifero\r\n //Mamifero mamiferoD = new Mamifero();\r\n System.out.println(\" DELETE \");\r\n System.out.println(\" Ingrese el nombre del mamifero a eliminar \");\r\n int cod = leer.nextInt();\r\n //lllama al metodo elimnar de la clase ControladorAuto\r\n mamiferoCon.delete(cod);\r\n System.out.println(\"Se a eliminado el mamifero \" + \" del codigo \" + cod);\r\n\r\n break;\r\n\r\n //Lista todos los objetos en el mismo orden que fueron creados anteriormente. \r\n case 5:\r\n //listar mamiferos creados\r\n System.out.println(\" LISTAR \");\r\n System.out.println(\" Desea listar 1.Si 2.No\");\r\n int lis = leer.nextInt();\r\n //mamifero.listar(leer.nextInt());\r\n mamiferoCon.listar(lis);\r\n\r\n break;\r\n\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\"Continuar en la clase Mamifero = 1.SI / 2.NO\");\r\n opM = leer.nextInt();\r\n\r\n } while (opM != 2);\r\n break;\r\n\r\n //Clase HIJA 2 interface HASHSET y CRUD.\r\n case 2:\r\n do {\r\n System.out.println(\" ►► Pez ◄◄\");\r\n System.out.println(\"1. CREATE \");\r\n System.out.println(\"2. READ \");\r\n System.out.println(\"3. UPDATE \");\r\n System.out.println(\"4. DELETE \");\r\n System.out.println(\"5. LIST \");\r\n System.out.println(\"6. REGRESAR \");\r\n\r\n opP = leer.nextInt();\r\n switch (opP) {\r\n case 1: //create pez\r\n Pez pez = new Pez();\r\n System.out.println(\" CREANDO...\");\r\n System.out.println(\" Ingrese nombre\");\r\n pez.setNombre(leer.nextLine());\r\n pez.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n pez.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingrese el sexo\");\r\n pez.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese el tipo de pez\");\r\n pez.setTipoPez(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de esqueleto \");\r\n pez.setTipoEsqueleto(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n pez.setTamaño(leer.nextDouble());\r\n System.out.println(\"Ingrese el peso\");\r\n pez.setPeso(leer.nextDouble());\r\n\r\n pezCon.create(pez);\r\n System.out.println(\" Se ha creado el pez \" + pez.getNombre()\r\n + \" con codigo \" + pez.getCodigo());\r\n\r\n break;\r\n case 2: //read pez\r\n System.out.println(\" \");\r\n System.out.println(\" LEYENDO... \");\r\n System.out.println(\"Ingrese el codigo del pez\");\r\n int cod = leer.nextInt();\r\n\r\n System.out.println(\" \");\r\n //Imprimiendo el objeto \r\n System.out.println(pezCon.read(cod));\r\n\r\n break;\r\n case 3://update pez\r\n Pez pezU = new Pez();\r\n System.out.println(\" \");\r\n System.out.println(\" Ingrese el codigo del pez a modificar\");\r\n pezU.setCodigo(leer.nextInt());\r\n\r\n pezCon.update(pezU);\r\n\r\n System.out.println(\" ACTUALIZANDO...\");\r\n System.out.println(\" Ingrese nombre\");\r\n pezU.setNombre(leer.nextLine());\r\n pezU.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n pezU.setTipoAnimal(leer.nextLine());\r\n System.out.println(\" Ingrese el sexo\");\r\n pezU.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese el tipo de pez\");\r\n pezU.setTipoPez(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de esqueleto \");\r\n pezU.setTipoEsqueleto(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n pezU.setTamaño(leer.nextDouble());\r\n System.out.println(\"Ingrese el peso\");\r\n pezU.setPeso(leer.nextDouble());\r\n\r\n System.out.println(\" Los datos se han actualizado correctamente\");\r\n\r\n break;\r\n case 4://delete pez\r\n\r\n Pez pezD = new Pez();\r\n System.out.println(\" ELIMINANDO...\");\r\n System.out.println(\" Ingrese el codigo\");\r\n pezD.setCodigo(leer.nextInt());\r\n\r\n pezCon.delete(pezD);\r\n System.out.println(\" Se ha eliminado el pez de codigo \" + pezD.getCodigo());\r\n\r\n break;\r\n case 5://list pez\r\n System.out.println(\" LISTANDO...\");\r\n pezCon.imprimir();\r\n\r\n break;\r\n\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\" Continuar en la clase PEZ= 1.Si 2.No\");\r\n opP = leer.nextInt();\r\n } while (opP != 2);\r\n break;\r\n\r\n case 3: //CRUD de la clase hija 3 y ademas el CRUD\r\n do {\r\n System.out.println(\" ►► Ave ◄◄\");\r\n System.out.println(\"1. CREATE \");\r\n System.out.println(\"2. READ \");\r\n System.out.println(\"3. UPDATE \");\r\n System.out.println(\"4. DELETE \");\r\n System.out.println(\"5. LIST \");\r\n System.out.println(\"6. REGRESAR \");\r\n\r\n opA = leer.nextInt();\r\n\r\n switch (opA) {\r\n case 1://create ave\r\n Ave ave = new Ave();\r\n System.out.println(\" CREANDO...\");\r\n System.out.println(\" Ingrese el nombre\");\r\n ave.setNombre(leer.nextLine());\r\n ave.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n ave.setTipoAnimal(leer.nextLine());\r\n System.out.println(\"Ingrese el sexo\");\r\n ave.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese color de plumaje\");\r\n ave.setColorPlumaje(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de ave\");\r\n ave.setTipoAve(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n ave.setTamaño(leer.nextInt());\r\n System.out.println(\"Ingrese el tiempo de gestacion\");\r\n ave.setTiempoGest(leer.nextLine());\r\n ave.setTiempoGest(leer.nextLine());\r\n\r\n aveCon.create(ave);\r\n System.out.println(\"Se ha creado el ave \" + ave.getNombre()\r\n + \" con el codigo\" + ave.getCodigo());\r\n\r\n break;\r\n\r\n case 2://read ave\r\n System.out.println(\" \");\r\n System.out.println(\"LEYENDO...\");\r\n System.out.println(\" Ingrese el codigo del ave\");\r\n int codA = leer.nextInt();\r\n\r\n System.out.println(aveCon.read(codA));\r\n break;\r\n\r\n case 3://update ave\r\n Ave aveU = new Ave();\r\n System.out.println(\" \");\r\n System.out.println(\" Ingrese el nombre del ave a modificar\");\r\n aveU.setNombre(leer.nextLine());\r\n aveU.setNombre(leer.nextLine());\r\n \r\n aveCon.update(aveU);\r\n\r\n System.out.println(\" ACTUALIZANDO...\");\r\n System.out.println(\" Ingrese el nombre\");\r\n aveU.setNombre(leer.nextLine());\r\n System.out.println(\"Ingrese tipo de animal\");\r\n aveU.setTipoAnimal(leer.nextLine());\r\n System.out.println(\"Ingrese el sexo\");\r\n aveU.setSexo(leer.nextLine());\r\n\r\n System.out.println(\"Ingrese color de plumaje\");\r\n aveU.setColorPlumaje(leer.nextLine());\r\n System.out.println(\"Ingrese el tipo de ave\");\r\n aveU.setTipoAve(leer.nextLine());\r\n System.out.println(\"Ingrese el tamaño\");\r\n aveU.setTamaño(leer.nextInt());\r\n System.out.println(\"Ingrese el tiempo de gestacion\");\r\n aveU.setTiempoGest(leer.nextLine());\r\n aveU.setTiempoGest(leer.nextLine());\r\n \r\n aveCon.update(aveU);\r\n\r\n System.out.println(\"Se han actualizado los datos correctamente\");\r\n break;\r\n\r\n case 4://delete ave\r\n Ave aveD = new Ave();\r\n System.out.println(\" \");\r\n System.out.println(\"ELIMINANDO...\");\r\n System.out.println(\"Ingrese el codigo del ave\");\r\n aveD.setCodigo(leer.nextInt());\r\n\r\n aveCon.delete(aveD);\r\n System.out.println(\" Se ha eliminado el ave de codigo \" + aveD.getCodigo());\r\n break;\r\n\r\n case 5://list todos los objetos creados.\r\n System.out.println(\" LISTANDO...\");\r\n aveCon.imprimir();\r\n break;\r\n }\r\n System.out.println(\" \");\r\n System.out.println(\" Continuar en la clase Ave= 1.Si 2.No\");\r\n opA = leer.nextInt();\r\n } while (opA != 2);\r\n\r\n //case 4:\r\n }\r\n\r\n } while (op != 5);\r\n\r\n }", "public void ejercicio05() {\r\n\t\tcabecera(\"05\",\"\");\r\n\r\n\t\tint a=2, b=5, c=1; //Modificar los valores para realizar pruebas o leerlos por teclado\r\n\t\t\r\n\t\t// Ecuacion2Grado ecuacion=new Ecuacion2Grado(a,b,c);\r\n\t\t// Inicio modificacion\r\n\r\n\t\tSystem.out.println(\"Introduce el numero que multiplica a x²\");\r\n\t\ta = Teclado.readInteger();\r\n\t\tSystem.out.println(\"Introduce el numero que multiplica a x\");\r\n\t\tb = Teclado.readInteger();\r\n\t\tSystem.out.println(\"Introduce el termino independiente\");\r\n\t\tc = Teclado.readInteger();\r\n\r\n\t\tEcuacion2Grado ecuacion = new Ecuacion2Grado(a,b,c);\r\n\r\n\t\tSystem.out.println(ecuacion);\r\n\r\n // Fin modificacion\r\n\t}", "public static void main(String[] args) {\n\t\ttry{\n\t\t\tBufferedReader buffer= new BufferedReader (new InputStreamReader(System.in));\n\t\t\t\n\t\t//primer numer\n\t\t\tSystem.out.println(\"Dime el aņo actual\");\n\t\t\n\t\tString dato1= buffer.readLine();\n\t\tint valor1=Integer.parseInt(dato1);\n\t\t\n\t\t\n\t\t//segundo numero\n\t\tSystem.out.println(\"dime el aņo de tu nacimiento\");\n\t\tString dato2=buffer.readLine();\n\t\tint valor2=Integer.parseInt(dato2);\n\t\t\n\t\t\n \n\n System.out.println(\"Tu edad es \");\n System.out.println(valor1 - valor2);\n \n \n \n\n\n\n\n\n \n \n\n\t}\n\t\tcatch (Exception e){\n\t\tSystem.out.println(\"error\");\n\t}\n\t}", "public static void main(String[] args) {\n do {\n nombre = JOptionPane.showInputDialog(null, \"Introduce el nombre del alumno\");\n notas = 0;\n for (double i = 0; i < 6; i++) {\n nota = Double.parseDouble(JOptionPane.showInputDialog(\"Introduce la nota\"));\n notas += nota;\n \n }\n seguir = JOptionPane.showInputDialog(\"Quieres seguir introduciendo notas de alumnos?(Si quieres parar introduce fin)\");\n contador = contador + 1;\n medias(notas);\n \n } while (!seguir.equalsIgnoreCase(\"fin\"));\n mediasTotales = mediasTotales / contador;\n \n JOptionPane.showMessageDialog(null, \"Esta es la nota media de todos los alumnos: \" + mediasTotales);\n }", "public static void main(String[] args) {\n\t\n\t int velocidad = 130; //KM/H\n\t int limiteVelocidad = 80;\n\t \n//\t if (velocidad > limiteVelocidad) {\n//\t \tSystem.out.println(\"El coche va a excceso de velocidad\");\n//\t }else {\n//\t \tSystem.out.println(\"El coche va en la velocidad adecuada\");\n//\t }\n\t \n//\t IF Anidado\n\t \n\t boolean carretera = true;\n\t \n\t if (carretera) {\n\t \t\n\t System.out.println(\"Estas en una carretera\");\n\t \t\n\t limiteVelocidad = 110;\n\t \t\n\t \tif(velocidad > limiteVelocidad) {\n\t \t \tSystem.out.println(\"El coche va a excceso de velocidad\");\n\t \t }else {\n\t \t \tSystem.out.println(\"El coche va en la velocidad adecuada\");\n\t \t }\n\t }else if (velocidad > limiteVelocidad) {\n\t\t\t\t\tSystem.out.println(\"El coche esta en una calle y va a excceso de velocidad\");\n\t\t}else {\n\t\t\tSystem.out.println(\"El coche esta en una calle y va en la velocidad adecuada\");\n\t\t}\t \n\t \n//\t SWITCH CASE\n\t \n\t int temperatura = 30;\n\t switch(temperatura) {\n\t \n\t case 5:\n\t \tSystem.out.println(\"mucho frio\");\n\t \tbreak;\n\t \t\n\t case 10:\n\t \tSystem.out.println(\"frio\");\n\t \tbreak;\n\n\t case 20:\n\t\t\tSystem.out.println(\"clima agradable\");\n\t\t\tbreak;\t \n\t\t\t\n\t case 30:\n\t\t\tSystem.out.println(\"calor\");\n\t\t\tbreak;\n\t\t\t\n\t\tdefault:\n\t\t\tSystem.out.println(\"no encontro temperatura\");\n\t\t \n\t }\n\t \t\t\n\t}", "public void joueDeuxHumains()\n\t{\n\t\tboolean fin = false;\n\t\tboolean result = false;\n\t\tint etoiles;\n\t\tint choix;\n\t\tint i = 0;\n\t\tint x = 0;\n\t\tint y = 0;\n\t\tint x2 = 0;\n\t\tint y2 = 0;\n\t\tString couleur;\n\t\tetoiles = initialiser();\n\t\twhile (!fin)\n\t\t{\n\t\t\tif (i % 2 == 0)\n\t\t\t{\n\t\t\t\tcouleur = \"bleu\";\n\t\t\t}\n\t\t\telse\n\t\t\t{\n\t\t\t\tcouleur = \"rouge\";\n\t\t\t}\n\t\t\tSystem.out.println(\"1-Jouer\");\n\t\t\tSystem.out.println(\"2-Afficher une composante\");\n\t\t\tSystem.out.println(\"3-Vérifier si une case relie une composante\");\n\t\t\tSystem.out.println(\"4-Regarder s'il existe un chemin entre deux cases d'une couleur donnée\");\n\t\t\tSystem.out.println(\"5-Afficher le nombre minimum de cases entre deux cases données (x,y) et (z,t)\");\n\t\t\tSystem.out.println(\"6-Quitter\");\n\t\t\tchoix = clavier.nextInt();\n\t\t\tafficher(i);\n\t\t\tswitch (choix)\n\t\t\t{\n\t\t\t\tcase 1:\n\t\t\t\t\t\n\t\t\t\t\tSystem.out.println(\"### Ajout d'une case pour jouer ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tresult = tableauPeres_[x][y].colorerCase(couleur);\n\t\t\t\t\t//System.out.println(existeCheminCases(getLesVoisins(x, y, couleur), tableauPeres_[x][y], couleur));\n\t\t\t\t\tif (getNbEtoiles(x, y, couleur) < getNbEtoiles(getLesVoisins(x, y, couleur).getX(), getLesVoisins(x, y, couleur).getY(), couleur))\n\t\t\t\t\t{\n\t\t\t\t\t\tunion(getLesVoisins(x, y, couleur).getX(), getLesVoisins(x, y, couleur).getY(), x, y);\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tunion(x, y, getLesVoisins(x, y, couleur).getX(), getLesVoisins(x, y, couleur).getY());\n\t\t\t\t\t}\n\t\t\t\t\tpreparerScore(x, y, couleur);\n\t\t\t\t\tafficheScores(couleur);\n\t\t\t\t\tnombresEtoiles(x, y, couleur);\n\t\t\t\t\t++i;\n\t\t\t\t\tbreak;\n\t\t\t\tcase 2:\n\t\t\t\t\tSystem.out.println(\"### Afficher une composante ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tcompressionChemin(x2, y2);\n\t\t\t\t\tafficheComposante(x, y, couleur);\n\t\t\t\t\tbreak;\n\t\t\t\tcase 3:\n\t\t\t\t\tSystem.out.println(\"### Tester si une case relie une composante ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tif(!relieComposantes(x, y, couleur))\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Cette case ne relie aucune composante.\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Cette case relie une ou plusieurs composante(s).\");\n\t\t\t\t\t}\n\t\t\t\t\tbreak;\n\t\t\t\tcase 4:\n\t\t\t\t\tSystem.out.println(\"### Tester s'il existe un chemin entre deux cases données ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la première case ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la première case ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la deuxième case ?\");\n\t\t\t\t\tx2 = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la deuxième case ?\");\n\t\t\t\t\ty2 = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tcompressionChemin(x2, y2);\n\t\t\t\t\tif (existeCheminCases(tableauPeres_[x][y], tableauPeres_[x2][y2], couleur))\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Il existe un chemin entre les deux cases.\");\n\t\t\t\t\t}\n\t\t\t\t\telse\n\t\t\t\t\t{\n\t\t\t\t\t\tSystem.out.println(\"Il n'existe pas de chemin entre les deux cases.\");\n\t\t\t\t\t}\n\t\t\t\t\t\n\t\t\t\t\tbreak;\n\t\t\t\tcase 5:\n\t\t\t\t\tSystem.out.println(\"### Afficher nombre minimum de cases qui relie deux cases ###\");\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la première case ?\");\n\t\t\t\t\tx = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la première case ?\");\n\t\t\t\t\ty = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de x de la deuxième case ?\");\n\t\t\t\t\tx2 = clavier.nextInt();\n\t\t\t\t\tSystem.out.println(\"Quel est la valeur de y de la deuxième case ?\");\n\t\t\t\t\ty2 = clavier.nextInt();\n\t\t\t\t\tcompressionChemin(x, y);\n\t\t\t\t\tcompressionChemin(x2, y2);\n\t\t\t\t\tSystem.out.println(relierCasesMin(x, y, x2, y2, couleur));\n\t\t\t\t\tbreak;\n\t\t\t\tcase 6:\n\t\t\t\t\tfin = true;\n\t\t\t\t\tbreak;\n\t\t\t}\n\t\t\tif (scoreJ2_ == etoiles)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Joueur bleu a gagné !\");\n\t\t\t\tfin = true;\n\t\t\t}\n\t\t\telse if (scoreJ1_ == etoiles)\n\t\t\t{\n\t\t\t\tSystem.out.println(\"Joueur rouge a gagné !\");\n\t\t\t\tfin = true;\n\t\t\t}\n\n\t\t}\n\t}", "public static void main(String[] args) throws IOException {\n\n int q = 2;//scanner.nextInt();\n //scanner.skip(\"(\\r\\n|[\\n\\r\\u2028\\u2029\\u0085])?\");\n\n //for (int qItr = 0; qItr < q; qItr++) {\n //String[] xyz = scanner.nextLine().split(\" \");\n\n /*int x = Integer.parseInt(xyz[0]);\n\n int y = Integer.parseInt(xyz[1]);\n\n int z = Integer.parseInt(xyz[2]);*/\n\n String result = catAndMouse(1, 3, 2);\n System.out.println(\"Winner is:\" + result);\n\n //bufferedWriter.write(result);\n //bufferedWriter.newLine();\n // }\n\n //bufferedWriter.close();\n\n //scanner.close();\n }", "public void affiche () {\r\n\t\tSystem.out.println(\"Nom du porteur du compte: \" + this.porteur);\r\n\t\tSystem.out.println(\"numéro du compte: \" + this.IBAN);\r\n\t\tSystem.out.println(\"Solde du compte: \" + this.solde);\r\n\t}", "public static void main(String[] args) {\n\n\t\tScanner sc = new Scanner(System.in);\n\t\tdouble firstNumber, secondNumber;\n\t\tchar operant;\n\t\tboolean calulateIsStillOn = true;\n\t\t// String end;\n\n\t\twhile (calulateIsStillOn) {\n\n\t\t\tSystem.out.println(\"Unesite prvi broj: \");\n\t\t\tfirstNumber = sc.nextDouble();\n\n\t\t\tif (firstNumber == 0) {\n\t\t\t\tSystem.out.println(\"Kraj programa !\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tSystem.out.println(\"Unesite drugi broj: \");\n\t\t\tsecondNumber = sc.nextDouble();\n\n\t\t\tSystem.out.println(\"Unesite operaciju: \");\n\t\t\tsc.nextLine();\n\t\t\toperant = sc.nextLine().charAt(0);\n\n\t\t\tswitch (operant) {\n\t\t\tcase '+':\n\t\t\t\tSystem.out.println(\"Zbir brojeva \" + firstNumber + \" i \" + secondNumber + \" je \"\n\t\t\t\t\t\t+ (firstNumber + secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\tbreak;\n\t\t\tcase '/':\n\t\t\t\tif (firstNumber != 0 & secondNumber != 0) {\n\t\t\t\t\tSystem.out.println(\"Kolicnik brojeva \" + firstNumber + \" i \" + secondNumber + \"jednako je \"\n\t\t\t\t\t\t\t+ (firstNumber / secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\t} else {\n\t\t\t\t\tSystem.out.println(\"Deljenje nulom nije dozvoljeno\" + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\t}\n\t\t\t\tbreak;\n\t\t\tcase '-':\n\t\t\t\tSystem.out.println(\"Razlika brojeva \" + firstNumber + \" i \" + secondNumber + \"jednako je \"\n\t\t\t\t\t\t+ (firstNumber - secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\tbreak;\n\t\t\tcase '*':\n\t\t\t\tSystem.out.println(\"Proizvod brojeva \" + firstNumber + \" i \" + secondNumber + \"jednako je \"\n\t\t\t\t\t\t+ (firstNumber * secondNumber) + '\\n' + \"Ukucaj nulu za prekid programa\" + \"\\n\\n\");\n\t\t\t\tbreak;\n\t\t\tdefault:\n\t\t\t\tSystem.out.println(\"Nekorektan unos !!\");\n\t\t\t\tbreak;\n\t\t\t}\n\t\t}\n\t\tsc.close();\n\n\t}", "public void Caracteristicas(){\n System.out.println(\"La resbaladilla tiene las siguientes caracteristicas: \");\r\n if (escaleras==true) {\r\n System.out.println(\"Tiene escaleras\");\r\n }else System.out.println(\"No tiene escaleras\");\r\n System.out.println(\"Esta hecho de \"+material);\r\n System.out.println(\"Tiene una altura de \"+altura);\r\n }", "public static void main(String[] args) {\n\t\t\r\n\t\tbyte auswahl;\r\n\t\tdouble durchmesser=0, flächeninhalt=0, umfang=0;\r\n\t\tdouble a=0, b=0;\r\n\t\tdouble x=0, y=0, z=0, h=0;\r\n\t\tDecimalFormat df = new DecimalFormat(\",##0.00\");\r\n\t\t\r\n\t\tdo {\r\n\t\t\tString auswahl1 = javax.swing.JOptionPane.showInputDialog(null, \"Wählen Sie bitte: \\n1-Kreisberechnung\\n2-Rechteckberechnung\\n3-Dreieckberechnung\\n0-Programm beendet\", \"Rechnung\", 3);\r\n\t\t\tauswahl=Byte.parseByte(auswahl1);\r\n\t\t\t\r\n\t\t\tswitch (auswahl) {\r\n\t\t\t\tcase 1:\r\n\t\t\t\t\tString rad=javax.swing.JOptionPane.showInputDialog(null, \"Geben Sie bitte Radius (cm) ein\");\t\t\t\t\r\n\t\t\t\t\tdouble radius = Double.parseDouble(rad);\r\n\t\t\t\t\tdurchmesser = radius*2;\r\n\t\t\t\t\tflächeninhalt = Math.PI*radius*radius;\r\n\t\t\t\t\tumfang=2*Math.PI*radius;\r\n\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Flächeninhalt ist \"+ df.format(flächeninhalt) + \" cm^2\"+\"\\n\"+\"Umfang ist \"+ df.format(umfang)+\" cm\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 2: \r\n\t\t\t\t\tString zahl1=javax.swing.JOptionPane.showInputDialog(null, \"Geben Sie bitte ein Zahl (a) (cm) ein:\");\r\n\t\t\t\t\tString zahl2=javax.swing.JOptionPane.showInputDialog(null, \"Geben Sie bitte ein Zahl (b) (cm) ein:\");\r\n\t\t\t\t\ta = Double.parseDouble(zahl1);\r\n\t\t\t\t\tb = Double.parseDouble(zahl2);\r\n\t\t\t\t\tflächeninhalt = a*b;\r\n\t\t\t\t\tumfang = 2*(a+b);\r\n\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Flächeninhalt ist \"+ df.format(flächeninhalt) + \" cm^2\"+\"\\n\"+\"Umfang ist \"+ df.format(umfang)+\" cm\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\t\r\n\t\t\t\tcase 3: \r\n\t\t\t\t\tString zahl3=javax.swing.JOptionPane.showInputDialog(null, \"Geben Sie bitte ein Zahl (ecke x) (cm) ein:\");\r\n\t\t\t\t\tString zahl4=javax.swing.JOptionPane.showInputDialog(null, \"Geben Sie bitte ein Zahl (ecke y) (cm) ein:\");\r\n\t\t\t\t\tString zahl5=javax.swing.JOptionPane.showInputDialog(null, \"Geben Sie bitte ein Zahl (ecke z) (cm) ein:\");\r\n\t\t\t\t\tString zahl6=javax.swing.JOptionPane.showInputDialog(null, \"Geben Sie bitte ein Zahl (Höhe z) (cm) ein:\");\r\n\t\t\t\t\t\r\n\t\t\t\t\tx = Double.parseDouble(zahl3);\r\n\t\t\t\t\ty = Double.parseDouble(zahl4);\r\n\t\t\t\t\tz = Double.parseDouble(zahl5);\r\n\t\t\t\t\th = Double.parseDouble(zahl6);\r\n\t\t\t\t\t\r\n\t\t\t\t\tflächeninhalt = y*h/2;\r\n\t\t\t\t\tumfang = x+y+z;\r\n\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Flächeninhalt ist \"+ df.format(flächeninhalt) + \" cm^2\"+\"\\n\"+\"Umfang ist \"+ df.format(umfang)+\" cm\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t\tcase 0:break;\r\n\t\t\t\t\r\n\t\t\t\tdefault:\r\n\t\t\t\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Falsch Eingabe!!!\");\r\n\t\t\t\t\tbreak;\r\n\t\t\t}\r\n\t\t\tSystem.out.println(\"\\n\");\r\n\t\t}\r\n\t\twhile(auswahl!=0);\t\t\t\t\t\t\t\t\r\n\t\tjavax.swing.JOptionPane.showMessageDialog(null, \"Programm beendet!!!\");\t\r\n\t}", "public void ex() {\n int inches = 86; \n int pie = 12; //1 pie = 12 inches \n //Operaciones para obtener la cantidad de pies e inches\n int cant = inches / pie; \n int res = inches % pie;\n //Muestra de resultados\n System.out.println(inches + \" pulgadas es equivalente a\\n \" + \n cant + \" pies \\n \" + res + \" pulgadas \");\n }", "void datos(ConversionesCapsula c) {\n String v;\n\n\n v = d.readString(\"Selecciona opcion de conversion\"\n + \"\\n1 ingles a metrico\"\n + \"\\n2 metrico a ingles\"\n + \"\\n3 metrico a metrico\"\n + \"\\n4 ingles a ingles\");\n c.setopc((Integer.parseInt(v)));\n int opc = (int) conversion.getopc();\n switch (opc) {\n case 1:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a metros\"\n + \"\\n2 Pies a centimetros\"\n + \"\\n3 Pies a Metros y Centimetros\"\n + \"\\n4 Pulgadas a metros\"\n + \"\\n5 Pulgadas a centimetros\"\n + \"\\n6 Pulgadas a Metros y Centimetros\"\n + \"\\n7 Pies y Pulgadas a metros\"\n + \"\\n8 Pies y Pulgadas a centimetros\"\n + \"\\n9 Pies y Pulgadas a Metros y Centimetros\");\n c.setopc1((Integer.parseInt(v)));\n\n\n break;\n case 2:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Pies\"\n + \"\\n2 Metros a Pulgadas\"\n + \"\\n3 Metros a Pies y Pulgadas\"\n + \"\\n4 Centimetros a Pies\"\n + \"\\n5 Centimetros a Pulgadas\"\n + \"\\n6 Centimetros a Pies y Pulgadas\"\n + \"\\n7 Metros y Centimetros a Pies\"\n + \"\\n8 Metros y Centimetros a Pulgadas\"\n + \"\\n9 Metros y Centimetros a Pies y Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 3:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Metros a Centimetros\"\n + \"\\n2 Metros a Metros y Centimetros\"\n + \"\\n3 Centimetros a Metros\"\n + \"\\n4 Centimetros a Metros y Centimetros\"\n + \"\\n5 Metros y Centimetros a Centimetros\"\n + \"\\n9 Metros y Centimetros a Metros\");\n c.setopc1((Integer.parseInt(v)));\n break;\n case 4:\n v = d.readString(\"Selecciona la opcion de conversion\"\n + \"\\n1 Pies a Pulgadas\"\n + \"\\n2 Pies a Pies y Pulgadas\"\n + \"\\n3 Pulgadas a Pies\"\n + \"\\n4 Pulgadas a Pies y Pulgadas\"\n + \"\\n5 Pies y Pulgadas a Pies\"\n + \"\\n9 Pies y Pulgadas a Pulgadas\");\n c.setopc1((Integer.parseInt(v)));\n break;\n }\n\n do v = d.readString(\"\\n Ingrese el valor: \\n\");\n while (!isNum(v));\n c.setvalor((Double.parseDouble(v)));\n }", "public void daiMedicina() {\n System.out.println(\"Vuoi curare \" + nome + \" per 200 Tam? S/N\");\n String temp = creaturaIn.next();\n if (temp.equals(\"s\") || temp.equals(\"S\")) {\n puntiVita += 60;\n soldiTam -= 200;\n }\n checkStato();\n }", "public SimpleMonitor(Container container, Device device) throws IOException\r\n {\r\n this.container = container;\r\n this.device = device;\r\n \r\n this.container.setLayout(new BoxLayout(this.container, BoxLayout.Y_AXIS));\r\n \r\n this.icon = new JLabel(Utils.getIcon(\"cross_48.png\"));\r\n Box b1 = Box.createHorizontalBox();\r\n b1.add(this.icon);\r\n \r\n this.time = new JLabel(\"?\");\r\n this.time.setForeground(red);\r\n Box b2 = Box.createHorizontalBox();\r\n b2.add(this.time);\r\n \r\n this.time.setFont(font);\r\n this.time.setText(\"?\");\r\n this.time.setForeground(red);\r\n try {\r\n this.icon.setIcon(Utils.getIcon(\"cross_48.png\"));\r\n } catch (IOException ex) {\r\n Logger.getLogger(SimpleMonitor.class.getName()).log(Level.SEVERE, null, ex);\r\n }\r\n \r\n this.container.add(b1);\r\n this.container.add(b2);\r\n \r\n \r\n \r\n JLabel stHeader = new JLabel (\"Statistics\");\r\n stHeader.setFont(new Font(\"sans-serif\", Font.BOLD, 16));\r\n Box b3 = Box.createHorizontalBox();\r\n b3.add(stHeader);\r\n this.container.add(b3);\r\n \r\n JLabel gL = new JLabel(\"< 100 ms : \");\r\n gL.setForeground(green);\r\n this.goodLabel = new JLabel();\r\n this.goodLabel.setForeground(green);\r\n Box b4 = Box.createHorizontalBox();\r\n b4.add(gL);\r\n b4.add(this.goodLabel);\r\n this.container.add(b4);\r\n \r\n JLabel rL = new JLabel(\">= 100 ms : \");\r\n rL.setForeground(yellow);\r\n this.reachableLabel = new JLabel();\r\n this.reachableLabel.setForeground(yellow);\r\n Box b5 = Box.createHorizontalBox();\r\n b5.add(rL);\r\n b5.add(this.reachableLabel);\r\n this.container.add(b5);\r\n \r\n JLabel uL = new JLabel(\"Unreachable : \");\r\n uL.setForeground(red);\r\n this.unreachableLabel = new JLabel();\r\n this.unreachableLabel.setForeground(red);\r\n Box b6 = Box.createHorizontalBox();\r\n b6.add(uL);\r\n b6.add(this.unreachableLabel);\r\n this.container.add(b6);\r\n \r\n \r\n }", "public void imprimirResultados(){\n System.out.println(\"t (tiempo actual) \"+t);\n \n \n System.out.println(\"\\nGanancia total: $\"+R);\n System.out.println(\"Costos por mercaderia comprada: $\"+C);\n System.out.println(\"Costos por mantenimiento inventario: $\"+H);\n System.out.println(\"Ganancia promeio de la tienda por unidad de tiempo: $\"+(R-C-H)/T);\n \n }", "public static void main(String[] args) {\n String nomef = \" \";\r\n Filme f = new Filme();\r\n Filme dur = new Filme();\r\n Integer idade, durac = 0;\r\n \r\n \r\n //entrada\r\n idade = Integer.parseInt(JOptionPane.showInputDialog(\" Informe sua idade: \"));\r\n \r\n \r\n nomef = JOptionPane.showInputDialog(\" Digite o filme: \");\r\n f.atribuirNome(nomef);\r\n durac = Integer.parseInt(JOptionPane.showInputDialog(\" Informe a duração do filme: \"));\r\n dur.atribuirDuracao(durac);\r\n \r\n \r\n //saida\r\n JOptionPane.showMessageDialog(null, f.retornarNome());\r\n //classific = Integer.parseInt(\"50\") converta para inteiro\r\n \r\n //classifc = Integer.parseInt(JOption.showImputDialog(\"\"DIgite a classificacao \"\")\r\n \r\n }", "public static void main(String[] args) {\nPeon peonBlanco1=new Peon();\npeonBlanco1.setColor(\"Blanco\");\npeonBlanco1.setFigura(\"Peon\");\n\nPeon peonBlanco2=new Peon();\npeonBlanco2.setColor(\"Blanco\");\npeonBlanco2.setFigura(\"Peon\");\n\nPeon peonBlanco3=new Peon();\npeonBlanco3.setColor(\"Blanco\");\npeonBlanco3.setFigura(\"Peon\");\n\nPeon peonBlanco4=new Peon();\npeonBlanco4.setColor(\"Blanco\");\npeonBlanco4.setFigura(\"Peon\");\n\nPeon peonBlanco5=new Peon();\npeonBlanco5.setColor(\"Blanco\");\npeonBlanco5.setFigura(\"Peon\");\n\nPeon peonBlanco6=new Peon();\npeonBlanco6.setColor(\"Blanco\");\npeonBlanco6.setFigura(\"Peon\");\n\nPeon peonBlanco7=new Peon();\npeonBlanco7.setColor(\"Blanco\");\npeonBlanco7.setFigura(\"Peon\");\n\nPeon peonBlanco8=new Peon();\npeonBlanco8.setColor(\"Blanco\");\npeonBlanco8.setFigura(\"Peon\");\n\n\n\nPeon peonNegro1=new Peon();\npeonNegro1.setColor(\"Negro\");\npeonNegro1.setFigura(\"Peon\");\n\nPeon peonNegro2=new Peon();\npeonNegro2.setColor(\"Negro\");\npeonNegro2.setFigura(\"Peon\");\n\nPeon peonNegro3=new Peon();\npeonNegro3.setColor(\"Negro\");\npeonNegro3.setFigura(\"Peon\");\n\nPeon peonNegro4=new Peon();\npeonNegro4.setColor(\"Negro\");\npeonNegro4.setFigura(\"Peon\");\n\nPeon peonNegro5=new Peon();\npeonNegro5.setColor(\"Negro\");\npeonNegro5.setFigura(\"Peon\");\n\nPeon peonNegro6=new Peon();\npeonNegro6.setColor(\"Negro\");\npeonNegro6.setFigura(\"Peon\");\n\nPeon peonNegro7=new Peon();\npeonNegro7.setColor(\"Negro\");\npeonNegro7.setFigura(\"Peon\");\n\nPeon peonNegro8=new Peon();\npeonNegro8.setColor(\"Negro\");\npeonNegro8.setFigura(\"Peon\");\n\nAlfil alfilBlancoA=new Alfil();\nalfilBlancoA.setColor(\"Blanco\");\nalfilBlancoA.setFigura(\"Alfil\");\n\nAlfil alfilBlancoB=new Alfil();\nalfilBlancoB.setColor(\"Blanco\");\nalfilBlancoB.setFigura(\"Alfil\");\n\nAlfil alfilNegroA=new Alfil();\nalfilNegroA.setColor(\"Negro\");\nalfilNegroA.setFigura(\"Alfil\");\n\nAlfil alfilNegroB=new Alfil();\nalfilNegroB.setColor(\"Negro\");\nalfilNegroB.setFigura(\"Alfil\");\n\nCaballo caballoBlancoA=new Caballo();\ncaballoBlancoA.setColor(\"Blanco\");\ncaballoBlancoA.setFigura(\"Caballo\");\n\nCaballo caballoBlancoB=new Caballo();\ncaballoBlancoB.setColor(\"Blanco\");\ncaballoBlancoB.setFigura(\"Caballo\");\n\nCaballo caballoNegroA=new Caballo();\ncaballoNegroA.setColor(\"Negro\");\ncaballoNegroA.setFigura(\"Caballo\");\n\nCaballo caballoNegroB=new Caballo();\ncaballoNegroB.setColor(\"Negro\");\ncaballoNegroB.setFigura(\"Caballo\");\n\nTorre TorreBalncaA=new Torre();\nTorreBalncaA.setColor(\"Blanca\");\nTorreBalncaA.setFigura(\"Torre\");\n\nTorre TorreBlancaB=new Torre();\nTorreBlancaB.setColor(\"Blanca\");\nTorreBlancaB.setFigura(\"Torre\");\n\nTorre TorreNegraA=new Torre();\nTorreNegraA.setColor(\"Negro\");\nTorreNegraA.setFigura(\"Torre\");\n\nTorre TorreNegraB=new Torre();\nTorreNegraB.setColor(\"Blanca\");\nTorreNegraB.setFigura(\"Torre\");\n\nDama damaBlanca=new Dama();\ndamaBlanca.setColor(\"Blanco\");\ndamaBlanca.setFigura(\"Dama\");\n\nDama damaNegra=new Dama();\ndamaNegra.setColor(\"Negra\");\ndamaNegra.setFigura(\"Dama\");\n\n\nRey reyBlanco=new Rey();\nreyBlanco.setColor(\"Blanco\");\nreyBlanco.setFigura(\"Rey\");\n\nRey reyNegro= new Rey();\nreyNegro.setColor(\"Negro\");\nreyNegro.setFigura(\"Rey\");\n\nPieza figura[][]=new Pieza[8][8];\nfigura[0][0]=TorreBalncaA;\nfigura[0][1]=caballoBlancoA;\nfigura[0][2]=alfilBlancoA;\nfigura[0][3]=damaBlanca;\nfigura[0][4]=reyBlanco;\nfigura[0][5]=alfilBlancoB;\nfigura[0][6]=caballoBlancoB;\nfigura[0][7]=TorreBlancaB;\n\nfigura[1][0]=peonBlanco1;\nfigura[1][1]=peonBlanco2;\nfigura[1][2]=peonBlanco3;\nfigura[1][3]=peonBlanco4;\nfigura[1][4]=peonBlanco5;\nfigura[1][5]=peonBlanco6;\nfigura[1][6]=peonBlanco7;\nfigura[1][7]=peonBlanco8;\n\n\nfigura[6][0]=peonNegro1;\nfigura[6][1]=peonNegro2;\nfigura[6][2]=peonNegro3;\nfigura[6][3]=peonNegro4;\nfigura[6][4]=peonNegro5;\nfigura[6][5]=peonNegro6;\nfigura[6][6]=peonNegro7;\nfigura[6][7]=peonNegro8;\n\n\nfigura[7][0]=TorreNegraA;\nfigura[7][1]=caballoNegroA;\nfigura[7][2]=alfilNegroA;\nfigura[7][3]=damaNegra;\nfigura[7][4]=reyNegro;\nfigura[7][5]=alfilNegroB;\nfigura[7][6]=caballoNegroB;\nfigura[7][7]=TorreNegraB;\n\nfor (int x=0; x < figura.length; x++) {\n\t System.out.print(\" \");\n\t for (int y=0; y < figura[x].length; y++) {\n\t System.out.print(figura[x][y]+\" \");\n\t if (y!=figura[x].length-1) System.out.print(\" \");\n\t }\n\t System.out.println(\" \");\n\t}\n\t}", "public static void main(String[] args) {\n Scanner entrada = new Scanner(System.in);\n System.out.println(\"Informe a temperatura em Fahrenheit: \");\n\n double Fahrenheit = entrada.nextDouble();\n\n double conversao = (Fahrenheit - 32) / 1.8;\n\n System.out.printf(\"A temperatura em Celsius é: %.2f °C\", conversao);\n\n entrada.close();\n }", "public static void main(String[] args) {\n\n Scanner scanner = new Scanner(System.in);\n\n System.out.println(\"Input first number: \");\n int inputNumber1 = scanner.nextInt();\n\n System.out.println(\"Input second number: \");\n int inputNumber2 = scanner.nextInt();\n\n System.out.println(inputNumber1 + \" x \" + inputNumber2 + \" = \" + inputNumber1 * inputNumber2);\n\n\n // 1.5 Write a Java program that takes a number as input and prints its multiplication table upto 10.\n\n System.out.println(\"Input a number: \");\n int number1 = scanner.nextInt();\n\n for (int i = 0; i < 10; i++) {\n System.out.println(number1 + \" x \" + (i + 1) + \" = \" + (number1 * (i + 1)));\n }\n\n // 1.6 print the area and perimeter of a circle.\n\n double radius = 7.5;\n\n double perimeter = 2 * Math.PI * radius;\n double area = Math.PI * radius * radius;\n\n System.out.println(\"Perimeter is = \" + perimeter);\n System.out.println(\"Area is = \" + area);\n\n // 1.7 Write a Java program to convert temperature from Fahrenheit to Celsius degree.\n\n System.out.println(\"Input a degree in Fahrenheit:\");\n\n double fahrenheit = scanner.nextDouble();\n\n double celsius = ((fahrenheit - 32) * 5 / 9);\n\n System.out.println(fahrenheit + \" degree Fahrenheit is equal to \" + celsius + \" in Celsius\");\n\n // 1.8 Write a Java program that reads a number in inches, converts it to meters.\n\n System.out.println(\"Input a value for inch: \");\n\n double inch = scanner.nextDouble();\n double meters = inch * 0.0254;\n\n System.out.println(inch + \" inch is \" + meters + \" meters\");\n\n // 1.9 Write a Java program to get a number from the user and print whether it is positive or negative.\n\n System.out.print(\"Input a number: \");\n\n int num = scanner.nextInt();\n\n if (num > 0) {\n System.out.println(\"Number is positive\");\n } else if (num < 0) {\n System.out.println(\"Number is negative\");\n } else {\n System.out.println(\"Number is zero\");\n }\n\n // 1.10 Take three numbers from the user and print the greatest number.\n\n System.out.print(\"Input the 1st number: \");\n int num1 = scanner.nextInt();\n\n System.out.println(\"Input the 2nd number: \");\n int num2 = scanner.nextInt();\n\n System.out.println(\"Input the 3rd number: \");\n int num3 = scanner.nextInt();\n\n if ((num1 > num2) && (num1 > num3))\n System.out.println(\"The greatest: \" + num1);\n\n if ((num2 > num1) && (num2 > num3))\n System.out.println(\"The greatest: \" + num2);\n\n if ((num3 > num1) && (num3 > num2))\n System.out.println(\"The greatest: \" + num3);\n\n // 1.11 Write a program in Java to input 5 numbers from the keyboard and find their sum and average.\n\n System.out.println(\"Input the 5 numbers : \");\n\n int num5, sum = 0;\n\n for (int i = 0; i < 5; i++) {\n num5 = scanner.nextInt();\n sum = sum + num5;\n }\n\n int average = sum / 5;\n System.out.println(\"The sum of 5 no is : \" + sum + \"\\nThe Average is : \" + average);\n\n // 1.12 Write a program Check Whether Number is Even or Odd\n\n System.out.println(\"Input: \");\n int num6 = scanner.nextInt();\n\n System.out.println(\"Input: \");\n int num7 = scanner.nextInt();\n\n if (num6 % 2 == 0) {\n System.out.println(\"Even\");\n }\n if (num7 % 2 == 0) {\n System.out.println(\"Even\");\n } else {\n System.out.println(\"Odd\");\n }\n }", "public static String getColorsV()\n {\n Container v = new Container();\n //mal uso del try/catch con streams\n try\n {\n Stream<String> stream = Files.lines( Paths.get( PATHROOT, \"colors2.txt\" ) );\n stream.forEach( x -> v.c = x );\n }\n catch ( Exception e )\n {\n }\n return v.c;\n }", "public static void main (String[] args){\n\t\tScanner scan = new Scanner(System.in); //Acá se declaran las nuevas clases y sus variables para la simulación del juego.\n\t\tGuerrero gue = new Guerrero();\n\t\tExplorador exp = new Explorador();\n\t\tCazador ca = new Cazador(); //Nueva clase agregada.\n\t\tMascota mas = new Mascota(); //Nueva clase agregada.\n\t\tEnemigo ene = new Enemigo();\n\t\tJefe jefe = new Jefe(); \n\t\tJefazo je = new Jefazo(); //Nueva clase agregada.\n\t\tint turnos = 0; //Variables que se usarán para el control de turnos.\n\t\tint turnosJ = 0;\n\t\tint turnosJe = 0;\n\t\tint opcion = 0;\n\t\tint decision = 0;\n\t\ttry{ //Bloque try para obtener excepciones e irregularidades en el programa.\n\t\t//Presentación al usuario.\n\t\t\tSystem.out.println(\"Bienvenido a este simulador de un videojuego, hoy tendras que superar dos batallas para proclamarte vencedor.\\nPero primero, contesta estas preguntas:\\n\");\n\t\t\tgue.DarNombre(); //Método para asignar nombre al guerrero.\n\t\t\texp.DarNombre(); //Método para asignar nombre al explorador.\n\t\t\t\n\t\t\tSystem.out.println(\"\\nOk, ahora que has nombrado a tus personajes, es momento de librar tu primera batalla!\");\n\t\t\tSystem.out.println(\"Pero antes, deseas el modo normal o deseas enfrentar a un jefe especial?\\n1. Modo normal.\\n2. It's boss time!\"); //Decision para tomar el modo normal o enfrentarte al jefe más poderoso.\n\t\t\tdecision = scan.nextInt();\n\t\t\tif (decision == 1){\n\t\t\t\tSystem.out.println(\"Bien, prepárese para el modo normal:\\n\");\n\t\t\t\twhile (turnos != 10){ //Hasta que los turnos lleguen a 10, la batalla sigue su curso.\n\t\t\t\t\tSystem.out.println(\"Turno del guerrero\");\n\t\t\t\t\tgue.AtaqueG(); //Método para el ataque del guerrero.\n\t\t\t\t\tSystem.out.println(\"Turno del explorador\");\n\t\t\t\t\texp.AtaqueE(); //Método para el ataque del explorador.\n\t\t\t\t\tSystem.out.println(\"Turno del enemigo\");\n\t\t\t\t\tene.AtaqueEn(); //Método para el ataque del enemigo.\n\t\t\t\t\tturnos = turnos + 1; //Contador de turnos.\n\t\t\t\t}\n\t\t\t\tif (turnos == 10){ //Cuando llegue a 10 el número de turnos, se le pregunta al usuario si quiere pasar contra el jefe.\n\t\t\t\t\tSystem.out.println(\"Bien, tras 10 turnos seguro que la batalla fue extenuante, desea continuar?\\n1.Si.\\n2.No.\");\n\t\t\t\t\topcion = scan.nextInt();\n\t\t\t\t\tif (opcion == 1){\n\t\t\t\t\t\tSystem.out.println(\"Bien, ahora sigue la batalla contra el jefe, prepárese.\");\n\t\t\t\t\t\twhile (turnosJ != 15){ //15 turnos es el máximo de turnos disponibles para intentar aniquilar al jefe.\n\t\t\t\t\t\t\tnew Guerrero(); //Se reestablecen los valores del Guerrero y el Explorador.\n\t\t\t\t\t\t\tnew Explorador();\n\t\t\t\t\t\t\tnew Jefe();\n\t\t\t\t\t\t\tSystem.out.println(\"Turno del guerrero\");\n\t\t\t\t\t\t\tgue.AtaqueG();\n\t\t\t\t\t\t\tSystem.out.println(\"Turno del explorador\");\n\t\t\t\t\t\t\texp.AtaqueE();\n\t\t\t\t\t\t\tSystem.out.println(\"Turno del jefe\");\n\t\t\t\t\t\t\tjefe.AtaqueJ(); //Método de ataque del jefe.\n\t\t\t\t\t\t\tturnosJ = turnosJ + 1; //Contador de turnos.\n\t\t\t\t\t\t}\n\t\t\t\t\t\tif (turnosJ == 15){ //Cuando llegue a 15 turnos, se acaba la pelea, el jefe y los enemigos que quedaban se van.\n\t\t\t\t\t\t\tSystem.out.println(\"Escuchas de repente unos pasos acercarse cada vez mas. El jefe al que enfrentabas huye despavorido... Deseas quedarte?\\1.Si\\n2.No.\");\n\t\t\t\t\t\t\topcion = scan.nextInt();\n\t\t\t\t\t\t\tif (opcion == 1){\n\t\t\t\t\t\t\t\tSystem.out.println(\"Tu y tu amigo explorador se quedan en el lugar, luego de curarse, ven como un cazador huye con su mascota\\nmientras un temible ser mucho mas poderoso va tras ellos. Preparense para combatir!\");\n\t\t\t\t\t\t\t\twhile (turnosJe != 30){ //30 turnos es el máximo para intentar derrotar al jefazo.\n\t\t\t\t\t\t\t\t\tnew Guerrero();\n\t\t\t\t\t\t\t\t\tnew Explorador();\n\t\t\t\t\t\t\t\t\tnew Cazador();\n\t\t\t\t\t\t\t\t\tnew Mascota();\n\t\t\t\t\t\t\t\t\tnew Jefazo(); //Se reestablecen valores.\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Turno del guerrero\");\n\t\t\t\t\t\t\t\t\tgue.AtaqueG();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Turno del explorador\");\n\t\t\t\t\t\t\t\t\texp.AtaqueE();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Turno del cazador\");\n\t\t\t\t\t\t\t\t\tca.AtaqueC();\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Turno del jefazo\");\n\t\t\t\t\t\t\t\t\tje.AtaqueJe();\n\t\t\t\t\t\t\t\t\tturnosJe = turnosJe + 1;\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\tif (turnosJe == 30){ //Termina la pelea y el juego.\n\t\t\t\t\t\t\t\t\tSystem.out.println(\"Menos mal, el jefazo se canso y ya los dejo en paz, que suerte tuvieron.\");\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tif (opcion == 2){ //Decidió correr, sabia decisión.\n\t\t\t\t\t\t\t\tSystem.out.println(\"Bueno, como bien dicen, patitas para que las quiero, escondase en un lugar seguro y gracias por jugar!\");\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\tif (opcion == 2){ //Si la respuesta es que no quiere luchar contra el jefe, se despide al usuario.\n\t\t\t\t\t\tSystem.out.println(\"Bien, muchas gracias por jugar!\");\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\tif (decision == 2){ //Pelea contra el nuevo jefe.\n\t\t\t\tSystem.out.println(\"Bueno, usted asi lo quiso, le ponemos al mas yuca de todos.\");\n\t\t\t\tSystem.out.println(\"Preparense para combatir!\");\n\t\t\t\twhile (turnosJe != 30){ //30 turnos es el máximo de turnos disponibles para aniquilar al jefazo.\n\t\t\t\t\tnew Guerrero();\n\t\t\t\t\tnew Explorador();\n\t\t\t\t\tnew Cazador();\n\t\t\t\t\tnew Mascota();\n\t\t\t\t\tnew Jefazo();\n\t\t\t\t\tSystem.out.println(\"Turno del guerrero\");\n\t\t\t\t\tgue.AtaqueG();\n\t\t\t\t\tSystem.out.println(\"Turno del explorador\");\n\t\t\t\t\texp.AtaqueE();\n\t\t\t\t\tSystem.out.println(\"Turno del cazador\");\n\t\t\t\t\tca.AtaqueC();\n\t\t\t\t\tSystem.out.println(\"Turno del jefazo\");\n\t\t\t\t\tje.AtaqueJe();\n\t\t\t\t\tturnosJe = turnosJe + 1;\n\t\t\t\t}\n\t\t\t\tif (turnosJe == 30){ //Termina la pelea al llegar a los 30 turnos.\n\t\t\t\t\tSystem.out.println(\"Menos mal, el jefazo se canso y ya los dejo en paz, que suerte tuvieron.\");\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\tcatch(Exception e){ //Mensaje que muestra al hallar excepciones.\n\t\t\tSystem.out.println(\"Por favor, ingrese un numero de opcion que sea valido.\");\n\t\t}\n\t}", "public static void main(String [] args){\n String dato;// no se tiene que importar la clase String del paquete java.lang\n //porque este paquete es por defecto\n Scanner miObjeto;\n }", "public static void main(String[] args) {\n\t\t\n\t\tint quantidade_macas;\n\t\tdouble total_compra1;\n\t\tdouble total_compra2;\n\t\t\n\t\tScanner leitor = new Scanner(System.in);\n\t\t\n\t\tSystem.out.println(\"QUANTAS MAÇÃS FORAM COMPRADAS? \");\n\t\tquantidade_macas = leitor.nextInt();\n\t\t\n\t\tif (quantidade_macas < 12) {\n\t\t\ttotal_compra1 = (quantidade_macas * 0.30);\n\t\t\tSystem.out.printf(\"O VALOR DA COMPRA SERÁ = R$ %.2f \", total_compra1);\t\t\t\n\t\t}else {\n\t\t\ttotal_compra2 = (quantidade_macas * 0.25);\n\t\t\tSystem.out.printf(\"O VALOR DA COMPRA SERÁ = R$ %.2f \", total_compra2);\t\t\n\t\t\n\n\t}\n\n}", "public static void main(String[] args) {\n\t\tElectrodomestico equipo1 = new Electrodomestico( \"Domestico\", \"100x80x120\",\"Monofásico\");\r\n\t\t\r\n\t\t//Mostrar los datos\r\n\t\tSystem.out.println(equipo1.toString());\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n Scanner scanner = new Scanner(System.in);\r\n\r\n //Reads ints from user\r\n int StuNumA = scanner.nextInt();\n int StuNumB = scanner.nextInt();\n int StuNumC = scanner.nextInt();\n\n int Adesks;\n int Bdesks;\n int Cdesks;\r\n\r\n /*\r\n * your code goes here\r\n */\r\n \n if (StuNumA % 2 == 0)\n {\n Adesks = StuNumA/2;\n } else {\n Adesks = (StuNumA/2) + 1;\n }\n\n if (StuNumB % 2 == 0)\n {\n Bdesks = StuNumB/2;\n } else {\n Bdesks = (StuNumB/2) + 1;\n }\n\n if (StuNumC % 2 == 0)\n {\n Cdesks = StuNumC/2;\n } else {\n Cdesks = (StuNumC/2) + 1;\n }\n\n System.out.print(Adesks + Bdesks + Cdesks);\n \r\n // closing the scanner object\r\n scanner.close();\r\n }" ]
[ "0.6247189", "0.60837793", "0.6063994", "0.59946907", "0.59821856", "0.58710533", "0.58662367", "0.583432", "0.5779096", "0.57562214", "0.57526267", "0.5745987", "0.5745177", "0.57317716", "0.5728216", "0.57104796", "0.5701288", "0.5687958", "0.56873065", "0.5680648", "0.5650285", "0.5623194", "0.5621575", "0.56083935", "0.56051", "0.559145", "0.55908936", "0.5589883", "0.55892456", "0.5583309", "0.55725706", "0.55620146", "0.5559538", "0.5556245", "0.55557656", "0.5544938", "0.55346805", "0.5523171", "0.548983", "0.5483535", "0.54804134", "0.54738337", "0.54712164", "0.5467932", "0.54634", "0.5448438", "0.5447559", "0.54434854", "0.5439768", "0.5437189", "0.5426594", "0.54225206", "0.54180056", "0.54170674", "0.5407051", "0.53909606", "0.53876567", "0.53865653", "0.538598", "0.537612", "0.537419", "0.5353912", "0.53463894", "0.53327405", "0.53305364", "0.5325306", "0.53251773", "0.53174955", "0.5312653", "0.53056914", "0.52987546", "0.5298413", "0.52969706", "0.52935666", "0.5291875", "0.529107", "0.5288361", "0.5287883", "0.5286786", "0.5285035", "0.5279532", "0.5279316", "0.5277731", "0.52673274", "0.5266051", "0.526329", "0.5257286", "0.5256061", "0.52524316", "0.52504414", "0.52397925", "0.5237195", "0.52289355", "0.52274245", "0.5226797", "0.5220686", "0.5216148", "0.5214402", "0.52130705", "0.52102643", "0.5209989" ]
0.0
-1
Get the remaining arguments from a list from a point on
public static String[] getRemainingArgs(int starting, String[] arguments) { List<String> args = new ArrayList<>(Arrays.asList(arguments)); return args.subList(starting, args.size()).toArray(new String[]{}); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getArgumentList();", "java.util.List<godot.wire.Wire.Value> \n getArgsList();", "java.util.List<java.lang.String>\n getArgsList();", "java.util.List<java.lang.String>\n getArgsList();", "java.util.List<java.lang.String>\n\t\tgetArgsList();", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.lang.String getArgs(int index);", "java.util.List<com.google.protobuf.ByteString> getArgumentsList();", "List<IArgumentBuilder> getArguments();", "String getArguments();", "public @NonNull List<@NonNull String> getArgs()\n {\n return input.getArgs();\n }", "protected static List<String> arguments(String[] args) {\n List<String> arguments = new ArrayList<>(args.length);\n for (int i = 0; i < args.length; ++i) {\n if (args[i].equals(\"--\")) {\n arguments.addAll(Arrays.asList(args).subList(i + 1, args.length));\n break;\n } else if (!args[i].startsWith(\"-\")) {\n arguments.add(args[i]);\n }\n }\n return arguments;\n }", "public List<Element> getArguments()\n {\n List<Element> args = new ArrayList<>(getSigChildren());\n\n // remove the \"use\", \"no\", or \"require\"\n args.remove(0);\n\n // remove the terminator - ha! - he'll be back!\n if (ElementUtils.isSemiColonToken(args.get(args.size() - 1)))\n {\n args.remove(args.size() - 1);\n }\n\n // remove the module name or version dependency\n args.remove(0);\n\n if (args.isEmpty())\n {\n return Collections.emptyList();\n }\n\n // do we have a required version...\n if (args.get(0) instanceof NumberToken)\n {\n // yup, and that's it...\n if (args.size() == 1)\n {\n return Collections.emptyList();\n }\n\n // yes, and additional arguments\n if (!(args.get(1) instanceof OperatorToken))\n {\n args.remove(0);\n }\n }\n\n return args;\n }", "Object[] getArguments();", "Object[] getArguments();", "ImmutableList<String> mainArgs();", "public java.util.List<java.lang.String>\n getArgsList() {\n return java.util.Collections.unmodifiableList(args_);\n }", "public com.google.protobuf.ProtocolStringList\n\t\t\tgetArgsList() {\n\t\t\t\treturn args_.getUnmodifiableView();\n\t\t\t}", "public java.util.List<godot.wire.Wire.Value> getArgsList() {\n if (argsBuilder_ == null) {\n return java.util.Collections.unmodifiableList(args_);\n } else {\n return argsBuilder_.getMessageList();\n }\n }", "godot.wire.Wire.Value getArgs(int index);", "public List<String> getArgumentList()\n\t{\n\t\treturn m_argumentList;\n\t}", "@java.lang.Override\n public java.util.List<godot.wire.Wire.Value> getArgsList() {\n return args_;\n }", "private ArrayList<String> getUserArguments(ArrayList<String> parameters) {\n return new ArrayList<String>(parameters.subList(POSITION_FIRST_PARAM_ARGUMENT,\n parameters.size()));\n }", "java.util.List<? extends godot.wire.Wire.ValueOrBuilder> \n getArgsOrBuilderList();", "public com.google.protobuf.ProtocolStringList\n getArgsList() {\n return args_.getUnmodifiableView();\n }", "public Vector<Argument> getAllArguments() {\r\n \t\tVector<Argument> args = new Vector<Argument>();\r\n \t\targs.addAll(argumentsFor);\r\n \t\targs.addAll(argumentsAgainst);\r\n \t\targs.addAll(relationships);\r\n \t\treturn args;\r\n \t}", "public com.google.protobuf.ProtocolStringList\n\t\tgetArgsList() {\n\t\t\treturn args_;\n\t\t}", "com.google.protobuf.ByteString getArguments(int index);", "static public Object[] arguments(int argc, Object l0, Object l1, Object l2, Object l3, Object l4, Object l5, Object l6, Object l7, Object[] rest) {\r\n\t\t// return an array of arguments\r\n\t\tObject[] args = new Object[argc];\r\n\t\t// add arguments\r\n\t\tswitch (argc > 8 ? 8 : argc) {\r\n\t\tcase 8: args[7] = l7;\r\n\t\tcase 7: args[6] = l6;\r\n\t\tcase 6: args[5] = l5;\r\n\t\tcase 5: args[4] = l4;\r\n\t\tcase 4: args[3] = l3;\r\n\t\tcase 3: args[2] = l2;\r\n\t\tcase 2: args[1] = l1;\r\n\t\tcase 1: args[0] = l0;\r\n\t\t}\r\n\t\tif (rest != null)\r\n\t\t\tSystem.arraycopy(rest, 0, args, 8, rest.length);\r\n\t\treturn args;\r\n\t}", "public com.google.protobuf.ProtocolStringList\n getArgsList() {\n return args_;\n }", "public java.util.List<java.lang.String>\n getArgsList() {\n return args_;\n }", "public List<Expression> getArgs()\n {\n return args;\n }", "@Override\r\n\tpublic List<String> getArguments()\r\n\t{\n\t\treturn null;\r\n\t}", "public Object[] getArguments() { return args;}", "java.util.List<org.tensorflow.proto.framework.FullTypeDef> \n getArgsList();", "public List<String> getArguments()\n\t{\n\t\treturn mArgs;\n\t}", "@java.lang.Override\n public godot.wire.Wire.Value getArgs(int index) {\n return args_.get(index);\n }", "public static Sequence<? extends String> getArguments() {\n return Entry.getArguments();\n }", "public java.util.List<com.google.protobuf.ByteString>\n getArgumentsList() {\n return java.util.Collections.unmodifiableList(arguments_);\n }", "@Override public int getNumArguments()\t\t\t{ return arg_list.size(); }", "public List<Object> getArguments() {\n return this.arguments;\n }", "public java.util.List<? extends godot.wire.Wire.ValueOrBuilder> \n getArgsOrBuilderList() {\n if (argsBuilder_ != null) {\n return argsBuilder_.getMessageOrBuilderList();\n } else {\n return java.util.Collections.unmodifiableList(args_);\n }\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n\t\t\treturn args_.get(index);\n\t\t}", "public java.lang.String getArgs(int index) {\n\t\t\t\treturn args_.get(index);\n\t\t\t}", "public abstract int getMinimumArguments();", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "public java.lang.String getArgs(int index) {\n return args_.get(index);\n }", "private void extractParameters() throws IndexOutOfBoundsException {\n switch (commandType) {\n case DONE:\n parameters = userInput.substring(INDEX_AFTER_DONE);\n break;\n case TODO:\n parameters = userInput.substring(INDEX_AFTER_TODO);\n break;\n case DEADLINE:\n parameters = userInput.substring(INDEX_AFTER_DEADLINE);\n break;\n case EVENT:\n parameters = userInput.substring(INDEX_AFTER_EVENT);\n break;\n case DELETE:\n parameters = userInput.substring(INDEX_AFTER_DELETE);\n break;\n case FIND:\n parameters = userInput.substring(INDEX_AFTER_FIND);\n break;\n case LIST:\n if (userInput.length() == LIST_LENGTH) {\n parameters = null;\n } else {\n parameters = userInput.substring(INDEX_AFTER_LIST);\n }\n break;\n case HELP:\n // Help does not take any parameters;\n case BYE:\n // Bye does not take any parameters\n default:\n parameters = null;\n }\n }", "private Term[] parseArgumentList() throws ParseException {\n \n final Term[] args = parseTermList();\n final int tt = _tokenizer.next();\n if (tt != ')') {\n _tokenizer.pushBack();\n reportError(\"Missing ')' or ','.\"); /*I18N*/\n }\n \n return args;\n }", "Optional<String[]> arguments();", "java.util.List<com.mwr.jdiesel.api.Protobuf.Message.Argument> \n getElementList();", "public List<Argument> getArguments() {\n return arguments;\n }", "public Object[] getArguments() {\n if (args.length == 0) {\n return args;\n }\n Object[] copy = new Object[args.length];\n System.arraycopy(args, 0, copy, 0, args.length);\n return copy;\n }", "public String[] getArguments(){\r\n\t\treturn args.toArray(new String[args.size()]);\r\n\t}", "godot.wire.Wire.ValueOrBuilder getArgsOrBuilder(\n int index);", "public List<FunctionArgument> resolveArguments(String argumentsPattern) throws InvalidArgumentsPatternException;", "public List<String> getArguments() {\n return arguments;\n }", "public static int maxargs(ExpList list) {\n return maxargs(list, 1);\n }", "public @NonNull Pair<String, String> getLastArgumentData()\n {\n final String[] parts = input.getArgs().get(input.size() - 1).split(separator, 2);\n if (parts.length == 2)\n return new Pair<>(parts[0] + separator, parts[1]);\n return new Pair<>(\"\", parts[0]);\n\n }", "public List<String> getOptionArgList(String[] names) {\n\t\tOpt op = getOption(names);\n\t\tif (op != null) {\n\t\t\treturn op.getArgList();\n\t\t}\n\t\treturn Collections.EMPTY_LIST;\n\t}", "public Collection<T> getArgumentsToAttack(T goalArgument);", "public java.lang.Object[] getArgs() {\n return args;\n }", "public com.google.protobuf.ByteString getArguments(int index) {\n return arguments_.get(index);\n }", "public Object[] getArguments()\n {\n return __m_Arguments;\n }", "private LinkedList<String> getActivatedFeatureArgs(\r\n\t\t\tList<String> myActivatedFeatures) {\r\n\t\tLinkedList<String> args = new LinkedList<String>();\r\n\t\tfor (String feature : myActivatedFeatures) {\r\n\t\t\targs.add(\"-D\" + feature);\r\n\t\t}\r\n\t\treturn args;\r\n\r\n\t}", "int getArgumentsCount();", "public ArgumentList getArgumentList()\n\t{\n\t\treturn argumentList;\n\t}", "private String[] getArgs()\n {\n return cmd.getArgs();\n }", "static boolean argumentListPart(PsiBuilder b, int l) {\n if (!recursion_guard_(b, l, \"argumentListPart\")) return false;\n boolean r;\n Marker m = enter_section_(b, l, _NONE_);\n r = namedArgument(b, l + 1);\n if (!r) r = expression(b, l + 1);\n exit_section_(b, l, m, r, false, DartParser::argument_list_part_recover);\n return r;\n }", "@java.lang.Override\n public java.util.List<? extends godot.wire.Wire.ValueOrBuilder> \n getArgsOrBuilderList() {\n return args_;\n }", "public com.google.protobuf.ByteString getArguments(int index) {\n return arguments_.get(index);\n }", "ArgList createArgList();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "int getArgsCount();", "@Deprecated public List<Property> getArguments(){\n return build(arguments);\n }", "private ArgumentListTree parseArguments() {\n\n SourcePosition start = getTreeStartLocation();\n ImmutableList.Builder<ParseTree> arguments = ImmutableList.builder();\n boolean trailingComma = false;\n ImmutableList.Builder<SourcePosition> commaPositions = ImmutableList.builder();\n\n eat(TokenType.OPEN_PAREN);\n while (peekAssignmentOrSpread()) {\n arguments.add(parseAssignmentOrSpread());\n\n if (!peek(TokenType.CLOSE_PAREN)) {\n Token comma = eat(TokenType.COMMA);\n if (comma != null) {\n commaPositions.add(comma.getStart());\n }\n if (peek(TokenType.CLOSE_PAREN)) {\n if (!config.atLeast8) {\n reportError(comma, \"Invalid trailing comma in arguments list\");\n }\n trailingComma = true;\n }\n }\n }\n eat(TokenType.CLOSE_PAREN);\n return new ArgumentListTree(\n getTreeLocation(start), arguments.build(), trailingComma, commaPositions.build());\n }", "public Object[] getArguments() {\n return arguments;\n }", "org.tensorflow.proto.framework.FullTypeDef getArgs(int index);", "String extractParameters ();", "public java.util.List<com.google.protobuf.ByteString>\n getArgumentsList() {\n return arguments_;\n }", "public Object apply(List<Object> args) {\n Integer s = (Integer)args.get(1);\n Integer e = (Integer)args.get(2);\n int start = s.intValue();\n int end = e.intValue(); \n Engine.Sequence<?> arg1 = ((Engine.Sequence<?>)args.get(0));\n Engine.Sequence<Item> result = new Engine.Sequence<Item>();\n\n for( int i = start - 1; i < end; i++ ){\n result.add((Item)arg1.get(i) );\n }\n return result;\n }", "public Object getArguments() {\n return m_args;\n }", "public final PythonParser.arglist_return arglist() throws RecognitionException {\n PythonParser.arglist_return retval = new PythonParser.arglist_return();\n retval.start = input.LT(1);\n\n PythonTree root_0 = null;\n\n Token COMMA279=null;\n Token COMMA281=null;\n Token STAR282=null;\n Token COMMA283=null;\n Token DOUBLESTAR284=null;\n Token DOUBLESTAR285=null;\n Token STAR286=null;\n Token COMMA287=null;\n Token DOUBLESTAR288=null;\n Token DOUBLESTAR289=null;\n PythonParser.test_return s = null;\n\n PythonParser.test_return k = null;\n\n PythonParser.argument_return argument278 = null;\n\n PythonParser.argument_return argument280 = null;\n\n\n PythonTree COMMA279_tree=null;\n PythonTree COMMA281_tree=null;\n PythonTree STAR282_tree=null;\n PythonTree COMMA283_tree=null;\n PythonTree DOUBLESTAR284_tree=null;\n PythonTree DOUBLESTAR285_tree=null;\n PythonTree STAR286_tree=null;\n PythonTree COMMA287_tree=null;\n PythonTree DOUBLESTAR288_tree=null;\n PythonTree DOUBLESTAR289_tree=null;\n\n\n List arguments = new ArrayList();\n List kws = new ArrayList();\n List gens = new ArrayList();\n\n try {\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:5: ( argument[arguments, kws, gens, true] ( COMMA argument[arguments, kws, gens, false] )* ( COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )? )? | STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )\n int alt147=3;\n switch ( input.LA(1) ) {\n case NAME:\n case LAMBDA:\n case NOT:\n case LPAREN:\n case PLUS:\n case MINUS:\n case TILDE:\n case LBRACK:\n case LCURLY:\n case BACKQUOTE:\n case INT:\n case LONGINT:\n case FLOAT:\n case COMPLEX:\n case STRING:\n {\n alt147=1;\n }\n break;\n case STAR:\n {\n alt147=2;\n }\n break;\n case DOUBLESTAR:\n {\n alt147=3;\n }\n break;\n default:\n if (state.backtracking>0) {state.failed=true; return retval;}\n NoViableAltException nvae =\n new NoViableAltException(\"\", 147, 0, input);\n\n throw nvae;\n }\n\n switch (alt147) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:7: argument[arguments, kws, gens, true] ( COMMA argument[arguments, kws, gens, false] )* ( COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )? )?\n {\n root_0 = (PythonTree)adaptor.nil();\n\n pushFollow(FOLLOW_argument_in_arglist7394);\n argument278=argument(arguments, kws, gens, true);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, argument278.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:44: ( COMMA argument[arguments, kws, gens, false] )*\n loop142:\n do {\n int alt142=2;\n int LA142_0 = input.LA(1);\n\n if ( (LA142_0==COMMA) ) {\n int LA142_1 = input.LA(2);\n\n if ( (LA142_1==NAME||(LA142_1>=LAMBDA && LA142_1<=NOT)||LA142_1==LPAREN||(LA142_1>=PLUS && LA142_1<=MINUS)||(LA142_1>=TILDE && LA142_1<=LBRACK)||LA142_1==LCURLY||(LA142_1>=BACKQUOTE && LA142_1<=STRING)) ) {\n alt142=1;\n }\n\n\n }\n\n\n switch (alt142) {\n \tcase 1 :\n \t // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1586:45: COMMA argument[arguments, kws, gens, false]\n \t {\n \t COMMA279=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7398); if (state.failed) return retval;\n \t if ( state.backtracking==0 ) {\n \t COMMA279_tree = (PythonTree)adaptor.create(COMMA279);\n \t adaptor.addChild(root_0, COMMA279_tree);\n \t }\n \t pushFollow(FOLLOW_argument_in_arglist7400);\n \t argument280=argument(arguments, kws, gens, false);\n\n \t state._fsp--;\n \t if (state.failed) return retval;\n \t if ( state.backtracking==0 ) adaptor.addChild(root_0, argument280.getTree());\n\n \t }\n \t break;\n\n \tdefault :\n \t break loop142;\n }\n } while (true);\n\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1587:11: ( COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )? )?\n int alt145=2;\n int LA145_0 = input.LA(1);\n\n if ( (LA145_0==COMMA) ) {\n alt145=1;\n }\n switch (alt145) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1587:12: COMMA ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )?\n {\n COMMA281=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7416); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COMMA281_tree = (PythonTree)adaptor.create(COMMA281);\n adaptor.addChild(root_0, COMMA281_tree);\n }\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:15: ( STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )? | DOUBLESTAR k= test[expr_contextType.Load] )?\n int alt144=3;\n int LA144_0 = input.LA(1);\n\n if ( (LA144_0==STAR) ) {\n alt144=1;\n }\n else if ( (LA144_0==DOUBLESTAR) ) {\n alt144=2;\n }\n switch (alt144) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:17: STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n {\n STAR282=(Token)match(input,STAR,FOLLOW_STAR_in_arglist7434); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR282_tree = (PythonTree)adaptor.create(STAR282);\n adaptor.addChild(root_0, STAR282_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7438);\n s=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, s.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:52: ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n int alt143=2;\n int LA143_0 = input.LA(1);\n\n if ( (LA143_0==COMMA) ) {\n alt143=1;\n }\n switch (alt143) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1588:53: COMMA DOUBLESTAR k= test[expr_contextType.Load]\n {\n COMMA283=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7442); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COMMA283_tree = (PythonTree)adaptor.create(COMMA283);\n adaptor.addChild(root_0, COMMA283_tree);\n }\n DOUBLESTAR284=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7444); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR284_tree = (PythonTree)adaptor.create(DOUBLESTAR284);\n adaptor.addChild(root_0, DOUBLESTAR284_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7448);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n\n }\n break;\n\n }\n\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1589:17: DOUBLESTAR k= test[expr_contextType.Load]\n {\n DOUBLESTAR285=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7469); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR285_tree = (PythonTree)adaptor.create(DOUBLESTAR285);\n adaptor.addChild(root_0, DOUBLESTAR285_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7473);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n\n }\n break;\n\n }\n\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n\n if (arguments.size() > 1 && gens.size() > 0) {\n actions.errorGenExpNotSoleArg(new PythonTree(((Token)retval.start)));\n }\n retval.args =arguments;\n retval.keywords =kws;\n retval.starargs =actions.castExpr((s!=null?((PythonTree)s.tree):null));\n retval.kwargs =actions.castExpr((k!=null?((PythonTree)k.tree):null));\n \n }\n\n }\n break;\n case 2 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1601:7: STAR s= test[expr_contextType.Load] ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n {\n root_0 = (PythonTree)adaptor.nil();\n\n STAR286=(Token)match(input,STAR,FOLLOW_STAR_in_arglist7520); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n STAR286_tree = (PythonTree)adaptor.create(STAR286);\n adaptor.addChild(root_0, STAR286_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7524);\n s=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, s.getTree());\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1601:42: ( COMMA DOUBLESTAR k= test[expr_contextType.Load] )?\n int alt146=2;\n int LA146_0 = input.LA(1);\n\n if ( (LA146_0==COMMA) ) {\n alt146=1;\n }\n switch (alt146) {\n case 1 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1601:43: COMMA DOUBLESTAR k= test[expr_contextType.Load]\n {\n COMMA287=(Token)match(input,COMMA,FOLLOW_COMMA_in_arglist7528); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n COMMA287_tree = (PythonTree)adaptor.create(COMMA287);\n adaptor.addChild(root_0, COMMA287_tree);\n }\n DOUBLESTAR288=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7530); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR288_tree = (PythonTree)adaptor.create(DOUBLESTAR288);\n adaptor.addChild(root_0, DOUBLESTAR288_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7534);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n\n }\n break;\n\n }\n\n if ( state.backtracking==0 ) {\n\n retval.starargs =actions.castExpr((s!=null?((PythonTree)s.tree):null));\n retval.kwargs =actions.castExpr((k!=null?((PythonTree)k.tree):null));\n \n }\n\n }\n break;\n case 3 :\n // /run/media/abhi/0cc7e6ad-008e-43cd-b47d-f3ed6f127f92/home/abhi/dacapo-9.12-bach-src (2)/benchmarks/bms/jython/build/grammar/Python.g:1606:7: DOUBLESTAR k= test[expr_contextType.Load]\n {\n root_0 = (PythonTree)adaptor.nil();\n\n DOUBLESTAR289=(Token)match(input,DOUBLESTAR,FOLLOW_DOUBLESTAR_in_arglist7553); if (state.failed) return retval;\n if ( state.backtracking==0 ) {\n DOUBLESTAR289_tree = (PythonTree)adaptor.create(DOUBLESTAR289);\n adaptor.addChild(root_0, DOUBLESTAR289_tree);\n }\n pushFollow(FOLLOW_test_in_arglist7557);\n k=test(expr_contextType.Load);\n\n state._fsp--;\n if (state.failed) return retval;\n if ( state.backtracking==0 ) adaptor.addChild(root_0, k.getTree());\n if ( state.backtracking==0 ) {\n\n retval.kwargs =actions.castExpr((k!=null?((PythonTree)k.tree):null));\n \n }\n\n }\n break;\n\n }\n retval.stop = input.LT(-1);\n\n if ( state.backtracking==0 ) {\n\n retval.tree = (PythonTree)adaptor.rulePostProcessing(root_0);\n adaptor.setTokenBoundaries(retval.tree, retval.start, retval.stop);\n }\n }\n\n catch (RecognitionException re) {\n errorHandler.reportError(this, re);\n errorHandler.recover(this, input,re);\n retval.tree = (PythonTree)adaptor.errorNode(input, retval.start, input.LT(-1), re);\n }\n finally {\n }\n return retval;\n }", "public String[] getArguments() {\n return this.arguments;\n }", "protected static String[][] borrowArguments(String[] args, String option) {\n // Find the range of borrowed arguments starting with the option and going until the ';'\n int start = -1;\n int end = args.length;\n for (int i = 0; i < args.length; ++i) {\n if (args[i].startsWith(option)) {\n start = i;\n } else if (args[i].equals(\";\")) {\n end = i;\n }\n }\n\n String[][] result = new String[2][];\n if (start >= 0) {\n // Start by extracting the borrowed arguments (correct the first argument by removing the option)\n result[1] = Arrays.copyOfRange(args, start, end);\n result[1][0] = removePrefix(result[1][0], option);\n\n // Remove the borrowed arguments from the main list of arguments\n result[0] = new String[args.length - result[1].length - (end < args.length ? 1 : 0)];\n System.arraycopy(args, 0, result[0], 0, start);\n if (result[0].length > start) {\n System.arraycopy(args, end + 1, result[0], start, args.length - result[0].length - result[1].length);\n }\n } else {\n // No borrowing, just keep all the original options\n result[0] = args;\n result[1] = new String[0];\n }\n return result;\n }", "@java.lang.Override\n public godot.wire.Wire.ValueOrBuilder getArgsOrBuilder(\n int index) {\n return args_.get(index);\n }", "Object[] args();", "public void tokenizeFunctionArguments(){\n for (int i = 0; i < tokenization.size(); i++){\n if (tokenization.get(i).kind == Token.Kind.FUN && tokenization.get(i+1).kind == Token.Kind.LEFT){\n int argIn = i + 2;\n HashMap<String, String> argNameMap = new HashMap<>();\n int argNum = 1;\n while (tokenization.get(argIn).kind == Token.Kind.ID || tokenization.get(argIn).kind == Token.Kind.COMMA || tokenization.get(argIn).kind == Token.Kind.RIGHT){\n if (tokenization.get(argIn).kind == Token.Kind.ID){\n argNameMap.put(tokenization.get(argIn).varName,\"$\" + argNum);\n tokenization.get(argIn).varName = \"$\" + argNum;\n argNum++;\n }\n argIn++;\n }\n //By here argIn is the index of the right parenthesis if there are arguments\n int funBodyIn = argIn;\n if (tokenization.get(funBodyIn).kind != Token.Kind.LBRACE){\n\n }\n else{\n int bracketBalance = 1;\n funBodyIn = funBodyIn + 1;\n while (bracketBalance > 0){\n if (tokenization.get(funBodyIn).kind == Token.Kind.ID && argNameMap.containsKey(tokenization.get(funBodyIn).varName)){\n tokenization.get(funBodyIn).varName = argNameMap.get(tokenization.get(funBodyIn).varName);\n }\n else if (tokenization.get(funBodyIn).kind == Token.Kind.LBRACE){\n bracketBalance++;\n }\n else if (tokenization.get(funBodyIn).kind == Token.Kind.RBRACE){\n bracketBalance--;\n }\n funBodyIn++;\n }\n }\n }\n }\n }", "public java.lang.String getArgs0() {\r\n return localArgs0;\r\n }", "public java.lang.String getArgs0() {\r\n return localArgs0;\r\n }", "static String nextArg(int currentIndex, String[] allArgs) {\n final int nextIndex = currentIndex + 1;\n if (nextIndex < allArgs.length) {\n return allArgs[nextIndex];\n } else {\n throw new IllegalArgumentException(allArgs[currentIndex] + \": missing required argument\");\n }\n }", "String[] getArgs(String message)\n\t{\n\t\tString[] messageArgs = message.split(\" \");\n\t\tString[] args = new String[messageArgs.length - 1];\n\n\t\tfor (int i = 1; i < messageArgs.length; i++)\n\t\t{\n\t\t\targs[i - 1] = messageArgs[i];\n\t\t}\n\n\t\treturn args;\n\t}", "public ParameterList getAdjustableParams();" ]
[ "0.7002414", "0.7002414", "0.6928558", "0.69043016", "0.68145883", "0.66656494", "0.6369199", "0.6369199", "0.6369199", "0.6322574", "0.6309808", "0.62035155", "0.62012446", "0.61963934", "0.61930203", "0.6128227", "0.6128227", "0.6117106", "0.6041025", "0.60383683", "0.60289073", "0.6009825", "0.60098225", "0.5981053", "0.5955251", "0.5921088", "0.5914299", "0.5881659", "0.58698684", "0.58527154", "0.58495975", "0.5770771", "0.57681537", "0.5765271", "0.5764016", "0.57147163", "0.57014734", "0.56860083", "0.56800735", "0.5675336", "0.565339", "0.56435794", "0.5636235", "0.56284684", "0.5614397", "0.5614397", "0.56039953", "0.5585557", "0.5537051", "0.55337304", "0.55337304", "0.5522263", "0.55018336", "0.5493399", "0.5492996", "0.5488979", "0.5482688", "0.5476659", "0.54703474", "0.5445463", "0.54283154", "0.54207873", "0.5413081", "0.54124665", "0.5390666", "0.5379707", "0.5367916", "0.536343", "0.53508466", "0.535062", "0.5339402", "0.53391474", "0.5331734", "0.53239655", "0.531011", "0.5304929", "0.53032583", "0.53032583", "0.53032583", "0.53032583", "0.53032583", "0.5302813", "0.5300455", "0.52971095", "0.5289939", "0.5279245", "0.52789587", "0.52608746", "0.52483195", "0.5247905", "0.5241854", "0.5221444", "0.5210542", "0.52066326", "0.52013993", "0.5193433", "0.5193433", "0.5191263", "0.51899344", "0.51884604" ]
0.6572884
6
To prevent someone from accidentally instantiating the contract class, give it an empty constructor.
private StoneContract() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "private Contract() {\n }", "public Contracts() {\r\n super();\r\n \r\n }", "public ContractMethod() {\n }", "public BaseContract() {}", "private CatalogContract() {}", "private DishContract() {\n }", "public Contract() {\n // initialise instance variables\n generateContractId();\n }", "private BookMasterContract() {\n }", "public KaChingContract() {\n\t}", "private BookContract() {}", "public CustomerContract() {\n\n }", "private ProjectContract() {\n }", "private TMDBContract() {\n }", "private TodoContract() {}", "private HabitContract() {\n }", "private FavouriteContract() {\n }", "private BookContract() {\n }", "private BookContract() {\n }", "private IgniteContract() {\n }", "private ChildContract() {}", "private DBContract() {}", "private DBContract() {}", "private TrainingContract() {\n }", "private DatabaseContract()\n {\n }", "private CoverageReaderContract() {}", "private FixtureContract() {}", "private DatabaseContract() {}", "public iptablesDBContract() {\n\t}", "public ProductListContract() {}", "@SuppressWarnings(\"unused\")\n public NoConstructor() {\n // Empty\n }", "private FeedReaderContract() {\n }", "public LogContract(){}", "public Contract create(){\n\t\treturn new Contract();\n\t}", "public XpeDccContractLineImpl() {\n }", "private PasskeyContract() {}", "private UserNumbersPersistenceContract() {\n }", "private RecentCardDBContract() {}", "protected Settlement() {\n // empty constructor\n }", "public itemDBContract(){}", "private FeedReaderContract() {}", "public void createContract() {\n\r\n\t}", "private LocationContract() {}", "public FeedReaderContract() {\n }", "public LocationTripViewPersistenceContract()\n\t{\n\t}", "private ATCres() {\r\n // prevent to instantiate this class\r\n }", "private CardExchangeModel() {\n\t}", "public ApiReleaseContractInner() {\n }", "private MoneyPreconditions() {\n }", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public FeedReaderContract() {}", "public Currency() {\n // Instances built via this constructor have undefined behavior.\n }", "@Test\n public void shouldCreateEmptyContract() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertNotNull(\"The created contract is NULL!\", contract);\n }", "public ContractRequest() {\n\t\tsuper(PREFERENCES_NAMES);\n\t}", "@SuppressWarnings(\"unused\")\r\n private Rental() {\r\n }", "private SingleObject()\r\n {\r\n }", "public Clade() {}", "public Member() {\n //Empty constructor!\n }", "@SuppressWarnings(\"unused\")\r\n\tprivate Person() {\r\n\t}", "public Market() {\n }", "public CashPayment()\n {\n super();\n }", "public Cable() {\r\n }", "private Ex() {\n }", "public StubPrivateConstructorPair() {\r\n this(null, null);\r\n }", "public AirlineCompany() {\n\t}", "public TransferMarket() {\n }", "public BoletoPaymentRequest() {\n\n }", "public Party() {\n // empty constructor\n }", "private Conversation()\n {\n }", "public MetaDataContract()\n {\n }", "private Cart() {\n }", "private BankCustomerFacade() {\n }", "public PaymentCard() {\n\t}", "public XxGamMaPaymentReqVOImpl() {\n }", "public InvoiceBalance()\n {\n }", "public Person()\n {\n //intentionally left empty\n }", "public ArrivalQuayStub() {\n\t}", "@SuppressWarnings(\"unchecked\")\n\tpublic InventoryServiceBean() {\n }", "private Message(){\n // default constructor\n }", "VehicleClass() {}", "public XpeDccNewContractSetupROVORowImpl() {\n }", "public Ctacliente() {\n\t}", "private Catalog() {\r\n }", "public Potencial() {\r\n }", "private SimpleRepository() {\n \t\t// private ct to disallow external object creation\n \t}", "@Test\n public void shouldCreateEmptyContractWithoutPreconditions() {\n // Given\n Contract contract;\n\n // When\n contract = ContractFactory.emptyContract();\n\n // Then\n Assert.assertTrue(\"The empty contract has unknown preconditions!\", contract.preconditions().length == 0);\n Assert.assertTrue(\"The empty contract has unknown postconditions!\", contract.postconditions().length == 0);\n Assert.assertEquals(\"The created contract has the wrong annotation type!\", contract.annotationType(),\n Contract.class);\n }", "public TurnoVOClient() {\r\n }", "public Company() {\n\t\tsuper();\n\t}", "public Stock() {\n }", "public Vaccine() {\n\t}", "@SuppressWarnings(\"unused\")\n private Booking() {\n }", "public HLCPaymentDetails() { }", "public VoucherPayment() {\r\n }", "public Account(){\r\n System.out.println(\"Called of empty constructor.\");\r\n }", "public Contact() {\n\t}", "public Method() {\n }", "public BrokerAlgo() {}", "public ProtoVehicle() {\n super();\n }", "public Company() {\r\n\t\tsuper();\r\n\t}" ]
[ "0.8693457", "0.8324439", "0.83032906", "0.81013685", "0.80356055", "0.7951525", "0.7939235", "0.79337823", "0.78928465", "0.78224367", "0.78088003", "0.77988905", "0.7788261", "0.7779118", "0.77635354", "0.7738427", "0.7711529", "0.7711529", "0.7664567", "0.7657398", "0.76095897", "0.76095897", "0.7589248", "0.75374717", "0.7454722", "0.74511206", "0.7373874", "0.71759367", "0.71420914", "0.711939", "0.7022906", "0.6963146", "0.69598454", "0.69397753", "0.6859085", "0.68568873", "0.68220705", "0.6807541", "0.67898065", "0.67781156", "0.6736452", "0.6698294", "0.667492", "0.6668139", "0.66413844", "0.6631145", "0.65961605", "0.65915966", "0.6559223", "0.6559223", "0.6559223", "0.6559223", "0.655893", "0.65376896", "0.65337425", "0.65106034", "0.6473696", "0.646007", "0.645227", "0.64436054", "0.6424271", "0.6402838", "0.6397317", "0.63932186", "0.6393032", "0.63807046", "0.63720775", "0.6364395", "0.63639086", "0.6358881", "0.6357037", "0.63526946", "0.63492876", "0.63382816", "0.63319916", "0.63297844", "0.6317729", "0.6315622", "0.63025063", "0.6294536", "0.62912697", "0.6289304", "0.62772435", "0.626702", "0.62670016", "0.6266624", "0.62601376", "0.6252171", "0.62456197", "0.62450594", "0.6243534", "0.6243374", "0.6240349", "0.62401646", "0.62350976", "0.6228392", "0.6225325", "0.62186295", "0.6217775", "0.6215127" ]
0.8389493
1
TODO Autogenerated method stub
@Override public void a1() { }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public float a2(String x, int b) { return 0; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "private stendhal() {\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.66708666", "0.65675074", "0.65229905", "0.6481001", "0.64770633", "0.64584893", "0.6413091", "0.63764185", "0.6275735", "0.62541914", "0.6236919", "0.6223816", "0.62017626", "0.61944294", "0.61944294", "0.61920846", "0.61867654", "0.6173323", "0.61328775", "0.61276996", "0.6080555", "0.6076938", "0.6041293", "0.6024541", "0.6019185", "0.5998426", "0.5967487", "0.5967487", "0.5964935", "0.59489644", "0.59404725", "0.5922823", "0.5908894", "0.5903041", "0.5893847", "0.5885641", "0.5883141", "0.586924", "0.5856793", "0.58503157", "0.58464456", "0.5823378", "0.5809384", "0.58089525", "0.58065355", "0.58065355", "0.5800514", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57912874", "0.57896614", "0.5789486", "0.5786597", "0.5783299", "0.5783299", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5773351", "0.5760369", "0.5758614", "0.5758614", "0.574912", "0.574912", "0.574912", "0.57482654", "0.5732775", "0.5732775", "0.5732775", "0.57207066", "0.57149917", "0.5714821", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57132614", "0.57115865", "0.57045746", "0.5699", "0.5696016", "0.5687285", "0.5677473", "0.5673346", "0.56716853", "0.56688815", "0.5661065", "0.5657898", "0.5654782", "0.5654782", "0.5654782", "0.5654563", "0.56536144", "0.5652585", "0.5649566" ]
0.0
-1
TODO Autogenerated method stub
@Override public float a2(String x, int b) { return 2.5f; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
TODO Autogenerated method stub
@Override public void run(TaskMonitor arg0) throws Exception { arg0.setTitle("Loading contigs"); arg0.setStatusMessage("Loading contigs..."); BufferedReader reader = new BufferedReader(new FileReader(contigsFile)); manager.getSettings().contigs = contigsFile; String line, header = null; StringBuilder seq = new StringBuilder(); while ((line = reader.readLine()) != null) { line = line.trim(); if (line.charAt(0) == '>') { // System.out.println(header); // System.out.println(seq.toString()); if (header != null) manager.addContig(header, new Contig(seq.toString())); seq = new StringBuilder(); if (line.length() > 1) { header = line.substring(1).split(" ")[0]; } } else seq = seq.append(line); } // System.out.println(header); // System.out.println(seq.toString()); manager.addContig(header, new Contig(seq.toString())); manager.displayContigs(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic void comer() \r\n\t{\n\t\t\r\n\t}", "@Override\n\tpublic void comer() {\n\t\t\n\t}", "@Override\n public void perish() {\n \n }", "@Override\r\n\t\t\tpublic void annadir() {\n\r\n\t\t\t}", "@Override\n\tpublic void anular() {\n\n\t}", "@Override\n\tprotected void getExras() {\n\n\t}", "@Override\r\n\tpublic void anularFact() {\n\t\t\r\n\t}", "@Override\n\tpublic void entrenar() {\n\t\t\n\t}", "@Override\n\tpublic void nadar() {\n\t\t\n\t}", "@Override\r\n\tpublic void tires() {\n\t\t\r\n\t}", "@Override\r\n\t\t\tpublic void ayuda() {\n\r\n\t\t\t}", "@Override\n\tprotected void interr() {\n\t}", "@Override\n\tpublic void emprestimo() {\n\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void bicar() {\n\t\t\r\n\t}", "@Override\n\tpublic void grabar() {\n\t\t\n\t}", "@Override\n\tpublic void gravarBd() {\n\t\t\n\t}", "@Override\r\n\tpublic void rozmnozovat() {\n\t}", "@Override\r\n\tpublic void dormir() {\n\t\t\r\n\t}", "@Override\n protected void getExras() {\n }", "@Override\r\n\tpublic void publierEnchere() {\n\t\t\r\n\t}", "@Override\n\tpublic void nefesAl() {\n\n\t}", "@Override\n\tpublic void ligar() {\n\t\t\n\t}", "@Override\n public void func_104112_b() {\n \n }", "@Override\n\tprotected void initdata() {\n\n\t}", "@Override\n\tpublic void nghe() {\n\n\t}", "@Override\n public void function()\n {\n }", "@Override\n public void function()\n {\n }", "public final void mo51373a() {\n }", "@Override\r\n\tpublic void stehReagieren() {\r\n\t\t//\r\n\t}", "@Override\n public void inizializza() {\n\n super.inizializza();\n }", "@Override\n\tprotected void initData() {\n\t\t\n\t}", "@Override\r\n\t\tpublic void init() {\n\t\t\t\r\n\t\t}", "@Override\n\tpublic void sacrifier() {\n\t\t\n\t}", "@Override\r\n\tprotected void InitData() {\n\t\t\r\n\t}", "public void designBasement() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initialize() {\r\n\t\t\r\n\t\t\r\n\t}", "public void gored() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\r\n\t}", "@Override\n\tpublic void einkaufen() {\n\t}", "@Override\n protected void initialize() {\n\n \n }", "public void mo38117a() {\n }", "@Override\n\tprotected void getData() {\n\t\t\n\t}", "Constructor() {\r\n\t\t \r\n\t }", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void dibujar() {\n\t\t\r\n\t}", "@Override\n\tpublic void one() {\n\t\t\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "@Override\r\n\tprotected void initData() {\n\t\t\r\n\t}", "private stendhal() {\n\t}", "@Override\n\tprotected void update() {\n\t\t\n\t}", "@Override\n\t\t\tpublic void ic() {\n\t\t\t\t\n\t\t\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tprotected void initData() {\n\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\t\t\n\t}", "@Override\n public void init() {\n\n }", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\n\tprotected void initialize() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void init() {\n\t\t\r\n\t}", "@Override\n\tpublic void debite() {\n\t\t\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "@Override\r\n\tpublic void init() {\n\r\n\t}", "public contrustor(){\r\n\t}", "@Override\n\tprotected void initialize() {\n\n\t}", "@Override\r\n\tpublic void dispase() {\n\r\n\t}", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "public void mo55254a() {\n }", "@Override\n\tpublic void dtd() {\n\t\t\n\t}", "@Override\n\tprotected void logic() {\n\n\t}", "@Override\n\tprotected void lazyLoad() {\n\t\t\n\t}", "public void mo4359a() {\n }", "@Override\r\n\tprotected void initialize() {\n\r\n\t}", "@Override\n public void memoria() {\n \n }", "@Override\n\t\tpublic void method() {\n\t\t\t\n\t\t}", "private RepositorioAtendimentoPublicoHBM() {\r\t}", "@Override\n protected void initialize() \n {\n \n }", "@Override\r\n\tpublic void getProposition() {\n\r\n\t}", "@Override\n\tpublic void particular1() {\n\t\t\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n\tpublic void init() {\n\n\t}", "@Override\n protected void prot() {\n }", "@Override\r\n\tpublic void init()\r\n\t{\n\t}", "@Override\n\tprotected void initValue()\n\t{\n\n\t}", "public void mo55254a() {\n }" ]
[ "0.6671074", "0.6567672", "0.6523024", "0.6481211", "0.6477082", "0.64591026", "0.64127725", "0.63762105", "0.6276059", "0.6254286", "0.623686", "0.6223679", "0.6201336", "0.61950207", "0.61950207", "0.61922914", "0.6186996", "0.6173591", "0.61327106", "0.61285484", "0.6080161", "0.6077022", "0.6041561", "0.6024072", "0.6020252", "0.59984857", "0.59672105", "0.59672105", "0.5965777", "0.59485507", "0.5940904", "0.59239364", "0.5910017", "0.5902906", "0.58946234", "0.5886006", "0.58839184", "0.58691067", "0.5857751", "0.58503544", "0.5847024", "0.58239377", "0.5810564", "0.5810089", "0.5806823", "0.5806823", "0.5800025", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5792378", "0.5790187", "0.5789414", "0.5787092", "0.57844025", "0.57844025", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5774479", "0.5761362", "0.57596046", "0.57596046", "0.575025", "0.575025", "0.575025", "0.5747959", "0.57337177", "0.57337177", "0.57337177", "0.5721452", "0.5715831", "0.57142824", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.57140535", "0.5711723", "0.57041645", "0.56991017", "0.5696783", "0.56881124", "0.56774884", "0.56734604", "0.56728", "0.56696945", "0.5661323", "0.5657007", "0.5655942", "0.5655942", "0.5655942", "0.56549734", "0.5654792", "0.5652974", "0.5650185" ]
0.0
-1
LIFO: last in first out
public interface Stack<T> extends Iterable<T> { // ----------------------- // Base Function // ----------------------- /** * push object to stack * @param item object, the item could be null */ void push(T item); T pop(); int size(); boolean isEmpty(); /** * get the last element, but not pop it * @return the top element */ T peek(); // --------------------- // Extend Function // --------------------- default boolean isNotEmpty() { return !isEmpty(); } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "K last();", "T butLast();", "void seekToLast();", "E last() throws NoSuchElementException;", "public E peekLast();", "private void setLast() { this._last = true; }", "@Override\n\tpublic void findLastOverData() {\n\t\t\n\t}", "public Object last()throws ListExeption;", "@Override\n\t@TimeComplexity(\"O(1)\")\n\tpublic Entry<K, V> lastEntry() {\n\t/* TCJ\n\t * Continuous operation: 1\n\t */\n\t\treturn safeEntry(map.size() - 1);\n\t}", "T last();", "@Override\n public int countOut() {\n if (callCheck())\n return EMPTY_INDEX;\n int ret = last.getValue();\n last = last.getPrev();\n return ret;\n }", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public static int lastOneIndexForLoop(int first, int last){\n//\t\tint max = Integer.MAX_VALUE;\n\t\tif(first < 0) first = 0;\n\t\tif(last < 0) last = 0;\n\t\tif(first > last) return 0;\n\n\t\treturn last;\n\t}", "public TypeHere getLast() {\n return items[size - 1];\n }", "private PersistentLinkedList<T> pop() {\n //the latest element won't become empty\n int index = this.treeSize - 1;\n Node<T> newRoot = new Node<>(branchingFactor);\n\n Node<T> currentNode = this.root;\n Node<T> currentNewNode = newRoot;\n\n ArrayList<Node<T>> newNodes = new ArrayList<>();\n newNodes.add(newRoot);\n ArrayList<Integer> newNodesIndices = new ArrayList<>();\n\n for (int b = base; b > 1; b = b / branchingFactor) {\n TraverseData traverseData = traverseOneLevel(\n new TraverseData(currentNode, currentNewNode, newRoot, index, b));\n currentNode = traverseData.currentNode;\n currentNewNode = traverseData.currentNewNode;\n newNodes.add(currentNewNode);\n newNodesIndices.add(index / b);\n index = traverseData.index;\n }\n newNodesIndices.add(index);\n\n for (int i = 0; i < branchingFactor && i < index; i++) {\n currentNewNode.set(i, currentNode.get(i));\n }\n currentNewNode.set(index, null);\n\n if (index == 0) {\n int latestIndex = newNodes.size() - 2;\n newNodes.get(latestIndex).set(newNodesIndices.get(latestIndex), null);\n\n for (int i = latestIndex; i > 0; i--) {\n if (newNodesIndices.get(i) == 0) {\n newNodes.get(i - 1).set(newNodesIndices.get(i - 1), null);\n } else {\n break;\n }\n }\n }\n\n if (newNodes.size() > 1) {\n int nonNullChildren = 0;\n for (Node<T> child : newRoot.children) {\n if (child != null) {\n nonNullChildren++;\n }\n }\n if (nonNullChildren == 1) { //need new root\n newRoot = newRoot.get(0);\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth - 1,\n this.base / branchingFactor, this.treeSize - 1, unusedTreeIndices,\n indexCorrespondingToTheFirstElement, indexCorrespondingToTheLatestElement);\n }\n }\n return new PersistentLinkedList<>(newRoot, this.branchingFactor, this.depth, this.base,\n this.treeSize - 1, unusedTreeIndices, indexCorrespondingToTheFirstElement,\n indexCorrespondingToTheLatestElement);\n }", "public Item getLast();", "private nodeClass findLast(){\n nodeClass aux = pivot; \n do{\n aux=aux.next;\n }while (aux.next!=pivot);\n return aux; //esto te devuelve el ultimo nodo de la lista\n }", "public int getLast() {\n\treturn _last;\n }", "public ReturnKthToLast() {\n\t\thead = null;\n\t}", "public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}", "public int getLast() {\n\t\treturn last;\n\t}", "Position<T> last();", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "private void unsetLast() { this._last = false; }", "public void removelast()\r\n {\r\n Item item = post.item;\r\n post = post.prev;\r\n n--;\r\n }", "public T getLast();", "public T getLast();", "@Override\r\n\tprotected void doLast() {\n\t\t\r\n\t}", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }", "@Override\n\tpublic Position<E> addLast(E e) {\n\t\treturn addBetween(tail.prev, tail, e);\n\t}", "public void pushBack (O o)\r\n {\r\n //create new VectorItem\r\n VectorItem<O> vi = new VectorItem<O> (o,last, null);\r\n if (isEmpty()) \r\n {\r\n last = vi;\r\n first = vi;\r\n }\r\n else \r\n {\r\n last.setNext(vi);\r\n last = vi;\r\n }\r\n count++;\r\n }", "public Object lastElement();", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "@Test\r\n\tvoid testLast2() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\tint output = test.last();\r\n\t\tassertEquals(-1, output);\r\n\t}", "public E pollLast();", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "public Item getLast() {\n return items[size - 1];\n }", "private void linkLast(final T element) {\r\n\t\tfinal int l = last;\r\n\t\tfinal int newNode = setFirstFree(element);\r\n\r\n\t\tsetNextPointer(newNode, -1); // undefined\r\n\t\tsetPrevPointer(newNode, l);\r\n\t\tlast = newNode;\r\n\r\n\t\tif (l == -1) {\r\n\t\t\tfirst = newNode;\r\n\t\t} else {\r\n\t\t\tsetNextPointer(l, newNode);\r\n\t\t}\r\n\t\tsize++;\r\n\t\tmodCount++;\r\n\t}", "default T last(Predicate<? super T> predicate) {\n T result = null;\n for (T t : this) if (predicate.test(t)) result = t;\n return result;\n }", "@Test\r\n\tvoid testLast() {\r\n\t\tSimpleList test = new SimpleList();\r\n\t\ttest.add(3);\r\n\t\ttest.add(7);\r\n\t\ttest.add(10);\r\n\t\tint output = test.last();\r\n\t\tassertEquals(3, output);\r\n\t}", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "public E last() {\n if (this.isEmpty()) return null;\r\n return this.tail.getElement();\r\n }", "public boolean moveLast(\n )\n {\n int lastIndex = objects.size()-1;\n while(index < lastIndex)\n {moveNext();}\n\n return getCurrent() != null;\n }", "@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\n }", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "private void naiveAddLast(Point data, boolean axis){\r\n\t\tContainer toAdd = new Container(data, null);\r\n\t\tif(axis){\r\n\t\t\tif(firstX == null){\r\n\t\t\t\tfirstX = toAdd;\r\n\t\t\t\tlastX = toAdd;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tlastX.next = toAdd;\r\n\t\t\t\ttoAdd.prev = lastX;\r\n\t\t\t\tlastX = toAdd;\r\n\t\t\t}\r\n\t\t}\r\n\t\telse{ //!axis\r\n\t\t\tif(firstY == null){\r\n\t\t\t\tfirstY = toAdd;\r\n\t\t\t\tlastY = toAdd;\r\n\t\t\t}\r\n\t\t\telse{\r\n\t\t\t\tlastY.next = toAdd; \r\n\t\t\t\ttoAdd.prev = lastY;\r\n\t\t\t\tlastY = toAdd;\r\n\t\t\t}\r\n\t\t\tsize++;\r\n\t\t}\r\n\t}", "public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }", "public Node<T> addLast(T t) { \r\n Node<T> currLast = sentinel.prev;\r\n Node<T> newNode = new Node<T>(t, currLast, sentinel);\r\n currLast.next = newNode;\r\n sentinel.prev = newNode;\r\n size++;\r\n return newNode;\r\n }", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "public Room getLastRoom(){return this.aLastRooms.pop();}", "public void addLast(E item){\r\n }", "public int getLastIndex() {\n return lastIndex;\n }", "public E getLast();", "public void addLast(Item x);", "public void addLast(Item item) { // initiation\n if (item != null) {\n if (size == 0) {\n first = new Node();\n last = new Node();\n first.item = item;\n first.front = null;\n first.back = null;\n last = first;\n } else {\n Node oldlast = last;\n last = new Node();\n last.back = null;\n last.item = item;\n last.front = oldlast;\n oldlast.back = last;\n }\n size++;\n } else throw new IllegalArgumentException(\"?\");\n }", "private int lastNotNull() {\n\t\treturn (!this.checkEmpty()) ? findLast() : 0;\n\t}", "@Override\n public Persona Last() {\n return array.get(tamano - 1);\n }", "@Override\r\n\tpublic E peekLast() {\n\t\treturn null;\r\n\t}", "@Override\n public int peekaboo(){\n if (callCheck())\n return EMPTY_INDEX;\n return last.getValue();\n }", "@Override\r\n\tpublic void addLast(E e) {\n\t\t\r\n\t}", "public Node<T> getLast() {\r\n\t\treturn last;\r\n\t}", "public void addLast(T e) {\n if (_size == 0) {\n _end = new DLLNode<T>(e, null, null);// Same thing as in addFront()\n _front = _end;\n }\n else {\n _end.setNext(new DLLNode<T>(e, _end, null));// add something after the last thing and make that the new end\n _end = _end.getNext();\n }\n _size++;\n }", "public void addLast(T item){\n\tif ( _size == 0 ) {\n\t _front = _end = new DLLNode<T>(item, null, null);\n\n\t}\n\telse{\n\t DLLNode<T> temp = new DLLNode<T>(item, null, _end);\n\t _end.setPrev(temp);\n\t _end = temp;\n\t}\n\t_size++;\n }", "public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}", "public ListUtilities goToEnd(){\n\t\tListUtilities temp = new ListUtilities();\n\t\tif(this.nextNum != null){\n\t\t\ttemp = this.nextNum.goToEnd();\n\t\t\treturn temp;\n\t\t}else{\n\t\t\t//System.out.println(\"Returned to... \" + this.num);\n\t\t\treturn this;\n\t\t}\n\t}", "void linkLast(E e) {\r\n \tfinal Node<E> l = last;\r\n \tfinal Node<E> newNode = new Node<>(l, e, null);\r\n \tlast = newNode;\r\n \tif(l == null)\r\n \t\tlast = newNode;\r\n \telse\r\n \t\tl.next = newNode;\r\n \tsize++;\r\n \tmodCount++;\r\n }", "@Override\n public void addLast(Item i) {\n resize();\n items[nextLast] = i;\n size += 1;\n nextLast = moveForward(nextLast, 1);\n }", "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "public void addLast(E item);", "private WALPointer tailPointer(WALPointer from) throws IgniteCheckedException {\n WALIterator it = cctx.wal().replay(from);\n\n try {\n while (it.hasNextX()) {\n IgniteBiTuple<WALPointer, WALRecord> rec = it.nextX();\n\n if (rec == null)\n break;\n }\n }\n finally {\n it.close();\n }\n\n return it.lastRead().map(WALPointer::next).orElse(null);\n }", "public State getLastState() {\n\t\treturn endState;\r\n\t}", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "protected abstract List breakOutOfStateStack();", "public E pollLast() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "private static void BubbleRec(int[] arr, int first, int last) {\n\t\t\n\t\tif(first<last) {\n\t\t\tif (arr[first]>arr[first+1]) swap(arr, first);\n\t\t\t\n\t\t\t//Sort the biggest element to last index\n\t\t\tBubbleRec(arr, first+1, last); \n\t\t\t\n\t\t\t// Prohibit calling n+1 pass before finishing n pass\n\t\t\t// Start n+1 pass\n\t\t\tif (first==0) BubbleRec(arr, first, last-1);\n\t\t}\n\t}", "public int getRear() {\n if(size == 0) return -1;\n return tail.prev.val;\n}", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "public T removeLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> node = endMarker.prev;\r\n\t\ttry{\r\n\t \tmodCount++;\r\n\t \tnumAdded--;\r\n\t \t//calls nested method\r\n\t\t\treturn node.removeLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\t//empty node\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "protected int lastIdx() {\n return arrayIndex(currentWindowIndex() - 1);\n }", "public synchronized int lastEntryIndex() {\n return this.lastIndex;\n }", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "public static void lastNSample() {\n Node ll1_5 = new Node(1, new Node(2, new Node(3, new Node(4, new Node(5, null)))));\n\n ll1_5.lastN(1);\n ll1_5.lastN(2);\n ll1_5.lastN(3);\n ll1_5.lastN(4);\n ll1_5.lastN(5);\n ll1_5.lastN(6);\n }", "@Override\n public Wrapper getAfterLast()\n {\n return null;\n }", "@Test\n public void testLastIndexOf_Overflow() {\n SegmentedOasisList<Integer> instance = new SegmentedOasisList<>(2, 2);\n Collection c = Arrays.asList(1, 1, 7, 7, 1, 1, 1);\n instance.addAll(c);\n Integer arg = 7;\n\n int result = instance.lastIndexOf(arg);\n int expResult = 3;\n\n assertEquals(expResult, result);\n\n }", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "public E removeLast();", "private void lastN(int n) {\n int len = this.getlength();\n if (n > len) {\n System.out.printf(\"too short to have last %d's\\n\", n);\n } else {\n Node slow = this;\n Node fast = this;\n for (int i = n; i > 0; i--) {\n fast = fast.nextNode;\n }\n while (fast != null) {\n slow = slow.nextNode;\n fast = fast.nextNode;\n }\n System.out.printf(\"last %d element is: %d\\n\", n, slow.value);\n }\n }", "public Place tail(){\n return places.get(places.size()-1);\n }", "public int findLast() {\n\t\tint result = 0;\n\t\twhile (!checkHaveThisNode(result))\n\t\t\tresult++;\n\n\t\treturn result;\n\t}", "public void addLast(Item item) {\n\n if (item == null) {\n throw new NullPointerException(\"Item Null\");\n } else {\n\n if (isEmpty()) {\n last = new Node<Item>();\n first = last;\n } else {\n Node<Item> oldLast = last;\n last = new Node<Item>();\n last.item = item;\n last.prev = oldLast;\n oldLast.next = last;\n\n }\n N++;\n }\n }", "public T getLast(){\n\treturn _end.getCargo();\n }", "public E getLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "private void findNewNextInStack() {\n if (stack.empty()) {\n next = Chunk.NONE;\n return;\n }\n next = stack.pop();\n long valueReference = INVALID_VALUE_REFERENCE;\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n while (next != Chunk.NONE && valueReference == INVALID_VALUE_REFERENCE) {\n if (!stack.empty()) {\n next = stack.pop();\n if (next != Chunk.NONE) {\n valueReference = getEntryFieldLong(next, OFFSET.VALUE_REFERENCE);\n }\n } else {\n next = Chunk.NONE;\n return;\n }\n }\n }", "abstract public void removeLast();", "public void visiualizeLastSearch(){\r\n\t\tint number=0;\r\n\t\tNode dummy;\r\n\t\tNode next;\r\n\t\tfor(int i=sl.height(); i>=0; i--){\r\n\t\t\tdummy = sl.getFrom(0,0);\r\n\t\t\tnext = sl.getFrom(i,0);\r\n\t\t\tString seperator=\"-\";\r\n\t\t\tfor(int j=0; j<(sl.size()+2); j++){\r\n\r\n\t\t\t\tnumber = next.getKey();\r\n\t\t\t\t\r\n\t\t\t\tif(i<sl.height() && sl.getVisited()[i+1].getKey()!=sl.getVisited()[i].getKey() && number>sl.getVisited()[i+1].getKey() && number<=sl.getVisited()[i].getKey())\r\n\t\t\t\t\tseperator = \"*\";\r\n\t\t\t\telse\r\n\t\t\t\t\tseperator = \"-\";\r\n\r\n\t\t\t\tif(number==dummy.getKey()){\r\n\r\n\t\t\t\t\tif(number==minf)\r\n\t\t\t\t\t\tSystem.out.print(\"-inf\");\r\n\t\t\t\t\telse if(number==inf)\r\n\t\t\t\t\t\tSystem.out.print(repeatStr(seperator,3)+\"inf\");\r\n\t\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(seperator,2)+number);\r\n\t\t\t\t}\r\n\t\t\t\telse\r\n\t\t\t\t\tSystem.out.print(repeatStr(seperator,4));\r\n\t\t\t\t\r\n\t\t\t\tif(dummy.getKey()==number)\r\n\t\t\t\t\tnext = next.getRight();\r\n\t\t\t\t\r\n\t\t\t\tdummy = dummy.getRight();\r\n\t\t\t}\r\n\t\t\tSystem.out.println();\r\n\t\t}\r\n\t}", "@Override\r\n public Entry<K, V> lastEntry() {\n return null;\r\n }" ]
[ "0.6476658", "0.6222152", "0.6164269", "0.6161039", "0.61397594", "0.6133238", "0.6110968", "0.6094726", "0.6070892", "0.60186255", "0.6000949", "0.59740305", "0.5908033", "0.5898238", "0.58887744", "0.5888351", "0.58866125", "0.5884831", "0.58488554", "0.5845862", "0.5839234", "0.5831818", "0.5823417", "0.5815", "0.5798963", "0.5795887", "0.57827675", "0.57827675", "0.5772986", "0.577253", "0.57714516", "0.5759204", "0.5713708", "0.5704394", "0.56853753", "0.56743985", "0.56722975", "0.5642719", "0.5621224", "0.5594218", "0.55918133", "0.5590692", "0.5581397", "0.55807203", "0.5573148", "0.5571636", "0.5568337", "0.5567713", "0.55668926", "0.55651367", "0.5560762", "0.5551329", "0.55402046", "0.55388147", "0.5538287", "0.5535351", "0.5532377", "0.55231684", "0.5522363", "0.5512864", "0.55104434", "0.5509172", "0.55040634", "0.5501473", "0.54956174", "0.5485015", "0.547624", "0.5470846", "0.5465054", "0.5460097", "0.5458163", "0.54546183", "0.5445494", "0.54286355", "0.5425508", "0.54182327", "0.5416494", "0.5409007", "0.54056853", "0.5403275", "0.54025596", "0.539688", "0.5393342", "0.5393027", "0.539302", "0.5387649", "0.53872377", "0.5377097", "0.5374426", "0.53721815", "0.5371685", "0.5364996", "0.5362307", "0.53612864", "0.53505564", "0.5349715", "0.5349535", "0.53462595", "0.5344278", "0.5340566", "0.53394544" ]
0.0
-1
Base Function push object to stack
void push(T item);
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public void push(E object) {stackList.insertAtFront(object);}", "public void push(Object obj) {\n if (top < stack.length - 1) {\n stack[++top] = obj;\n }\n else\n {\n increaseStackSize(1);\n stack[++top] = obj; \n }\n }", "private final void push(Object ob) {\r\n\t\teval_stack.add(ob);\r\n\t}", "void push(E Obj);", "@Override\n public E push(final E obj) {\n // TODO\n top = new Node<>(obj, top);\n return obj;\n }", "public void push(Object obj) {\n stack.push(requireNonNull(obj));\n }", "public void push(Object ob){\n \t Stack n_item=new Stack(ob);\n \tn_item.next=top;\n \ttop=n_item;\n }", "public void push(Object object) {\n fStack.push(object);\n if (object instanceof IJavaObject) {\n disableCollection((IJavaObject) object);\n }\n }", "public void push(E obj) {\n super.add(obj);\n }", "void push(Object elem);", "public void push(AnyType e) throws StackException;", "void push(Object item);", "public void push (E item){\n this.stack.add(item);\n }", "public void push(T x);", "public void push( Object obj )\n {\n this.top = new Node( obj, this.top );\n \n this.count++;\n }", "public abstract boolean push(Object E);", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Fixed Stack\");\r\n\t\t\r\n\t}", "public void push(T value) {\n \tstack.add(value);\n }", "void push(T t);", "public StackPushSingle()\n {\n super(\"PushStackSingle\");\n }", "@Override\r\n\tpublic void push() {\n\t\tSystem.out.println(\"Push logic for Dynamic Stack\");\r\n\t}", "public void push(T o) {\r\n\t\tadd(o);\t\r\n\t}", "void push(T x);", "public final void push(final Object object)\n {\n synchronized (this.stack)\n {\n try\n {\n this.stack[this.pointer++] = object;\n }\n catch (ArrayIndexOutOfBoundsException arrayIndexOutOfBoundsException)\n {\n ArrayList<Object> list = new ArrayList<Object>(Arrays.asList(this.stack));\n list.add(null);\n this.stack = list.toArray();\n this.pointer--;\n this.push(object);\n }\n }\n }", "@Override\n\tpublic void push(T element) {\n\t\tif(top == stack.length) \n\t\t\texpandCapacity();\n\t\t\n\t\tstack[top] = element;\n\t\ttop++;\n\n\t}", "public void push(Item item){\n this.stack.add(item);\n\n }", "public Object push(Object o) {\n\t\tadd(o);\n\t\treturn o;\n\t}", "public abstract void push(SDGNode call);", "public void push(T item);", "void push(RtfCompoundObject state) {\r\n _top = new RtfCompoundObjectStackCell(_top, state);\r\n }", "public void push(Object anElement);", "@Override\r\n\tpublic void push(E e) {\n\t\t\r\n\t}", "public synchronized void push(T object) throws PoolException {\n trace(\"push: \");\n if ((getMaxSize() != INFINITE && getStack().size() >= getMaxSize()) || !isValid(object)) {\n doDestroy(object);\n } else if (getStack().contains(object)) {\n throw new PoolException(\"can't check in object more than once: \" + object);\n } else {\n getStack().add(object);\n inUse--;\n }\n }", "@Override\r\n\tpublic void push(AnyType data) throws StackException {\n\t\ttop = new Node<AnyType>(data,top);\r\n\t}", "public void push(T data);", "public void push(T data);", "@SubL(source = \"cycl/stacks.lisp\", position = 2898) \n public static final SubLObject stack_push(SubLObject item, SubLObject stack) {\n checkType(stack, $sym1$STACK_P);\n _csetf_stack_struc_elements(stack, cons(item, stack_struc_elements(stack)));\n _csetf_stack_struc_num(stack, Numbers.add(stack_struc_num(stack), ONE_INTEGER));\n return stack;\n }", "public void pushStack(int newStack){\n // creates a new object\n GenericStack temp = new GenericStack(newStack);\n temp.next = top;\n top = temp;\n }", "public void\npush(SoState state)\n{\n\tsuper.push(state);\n SoLazyElement prevElt = (SoLazyElement)getNextInStack();\n this.coinstate.copyFrom( prevElt.coinstate);\n}", "public void push(E e) throws Exception;", "public void push(T elem);", "@Override\n\tpublic void push(E item) {\n\t\t\n\t}", "void push(E e);", "void push(E e);", "public void push(E item);", "public void push(T aValue);", "@Override\n public void push(T element){\n arrayAsList.add(element);\n stackPointer++;\n }", "static void perform_push(String passed){\n\t\tint type = type_of_push(passed);\n\t\tswitch(type){\n\t\tcase 1:\n\t\t\tpush_to_stack(passed);\n\t\t\tbreak;\n\t\t}\n\t}", "public void push(E data);", "public void push(ILocation item)\n {\n stack.add(top, item);\n top++;\n }", "void push(Location loc) {\n // -\n top = new LocationStackNode(loc, top);\n }", "@Override\r\n\tpublic void push(E e) {\r\n\t\tif (size() == stack.length)\r\n\t\t\texpandArray();\r\n\t\tstack[++t] = e; // increment t before storing new item\r\n\t}", "@Test\n public void push() {\n SimpleStack stack = new DefaultSimpleStack();\n Item item = new Item();\n\n // When the item is pushed in the stack\n stack.push(item);\n\n // Then…\n assertFalse(\"The stack must be not empty\", stack.isEmpty());\n assertEquals(\"The stack constains 1 item\", 1, stack.getSize());\n assertSame(\"The pushed item is on top of the stack\", item, stack.peek());\n }", "public void push(E value);", "public Object push(Object arg)\n {\n dataList.add(arg);\n return arg;\n }", "public void push(T newItem);", "public void push(TYPE element);", "public void push(T element);", "public void push(T element);", "public void push(Object activity);", "public void push(T dato );", "public void push(E o) \r\n {\r\n list.add(o);\r\n }", "@Override\n public void push(T data) {\n if (data != null) {\n if (size == backing.length) {\n T[] newBacking = (T[]) new Object[backing.length * 2];\n for (int i = 0; i < size; i++) {\n newBacking[i] = backing[i];\n }\n newBacking[size++] = data;\n backing = newBacking;\n } else {\n backing[size] = data;\n size++;\n }\n } else {\n throw new IllegalArgumentException(\"Can't push null onto stack\");\n }\n }", "public E push(E item) {\n try {\n stackImpl.push(item);\n } catch (ArrayIndexOutOfBoundsException e) {\n System.out.println(\"Array is full. Switching to unbound implementation\");\n StackImplementationIF<E> stackImplTemp = new ListStack<E>();\n for (Enumeration en = new ImplIterator<E>(this); en.hasMoreElements();) {\n E c = (E) en.nextElement();\n stackImplTemp.push(c);\n }\n stackImpl = stackImplTemp;\n stackImpl.push(item);\n }\n return item;\n }", "public MyStack() {\n objects = new LinkedList<>();\n helper = new LinkedList<>();\n }", "public void push(E inValue)\n {\n stack.insertFirst(inValue);\n }", "public void\npush(SoState state)\n//\n////////////////////////////////////////////////////////////////////////\n{\n SoTextureOverrideElement elt =\n (SoTextureOverrideElement )getNextInStack();\n\n flags = elt.flags;\n elt.capture(state); // Capture previous element\n}", "MyStack(){\r\n\t\tsuper();\r\n\t}", "@Override\n\tpublic void push(Object x) {\n\t\tlist.addFirst(x);\n\t}", "public void push (T element)\r\n {\r\n if (size() == stack.length) \r\n expandCapacity();\r\n\r\n stack[top] = element;\r\n top++;\r\n }", "public void push(Object item)\r\n {\n this.top = new Node(item, this.top);\r\n }", "public void push(E o) {\n list.add(o);\n }", "public void push(T entry)\n { \n first = push(entry, first);\n }", "public void push(T data) {\n top = new StackNode(data, top);\n }", "@Override\n public void push(E z){\n if(isFull()){\n expand();\n System.out.println(\"Stack expanded by \"+ expand+ \" cells\");\n }\n stackArray[count] = z;\n count++;\n }", "void push(int x);", "public void push(T item)\r\n\t{\r\n\t\t if (size == Stack.length) \r\n\t\t {\r\n\t\t\t doubleSize();\r\n\t }\r\n\t\tStack[size++] = item;\r\n\t}", "@Test\n public void testPushCallTop(){\n ms = new MyStack();\n ms.push(1);\n ms.top();\n assertFalse(ms.IsEmpty());\n }", "static void stackPush(Stack<Integer> stack)\r\n\t{\r\n\t\tfor(int i=0;i<5;i++)\r\n\t\t{\r\n\t\t\tstack.push(i*5);\r\n\t\t}\r\n\t\tSystem.out.println(\"Printing the stack value which is push:\");\r\n\t\tSystem.out.println(\"Push :\"+stack +\"\\nsize of stack: \"+ stack.size());\r\n\t}", "public void push(E element);", "@Override\r\n\tpublic boolean push(T e) {\r\n\t\tif(!isFull()) {\r\n\t\t\tstack[topIndex + 1] = e;\r\n\t\t\ttopIndex++;\r\n\t\t\treturn true;\r\n\t\t}else {\r\n\t\t\treturn false;\r\n\t\t}\r\n\t}", "@Test\n public void testPush(){\n ms=new MyStack();\n ms.push(1);\n assertFalse(ms.IsEmpty());\n }", "void pushEvaluationStack(RTObject obj) {\n\t\tListValue listValue = null;\r\n\t\tif (obj instanceof ListValue)\r\n\t\t\tlistValue = (ListValue) obj;\r\n\r\n\t\tif (listValue != null) {\r\n\t\t\t// Update origin when list is has something to indicate the list\r\n\t\t\t// origin\r\n\t\t\tInkList rawList = listValue.getValue();\r\n\t\t\tList<String> names = rawList.getOriginNames();\r\n\t\t\tif (names != null) {\r\n\t\t\t\tArrayList<ListDefinition> origins = new ArrayList<ListDefinition>();\r\n\t\t\t\tfor (String n : names) {\r\n\t\t\t\t\tListDefinition def = story.getListDefinitions().getDefinition(n);\r\n\t\t\t\t\tif (!origins.contains(def))\r\n\t\t\t\t\t\torigins.add(def);\r\n\t\t\t\t}\r\n\t\t\t\trawList.origins = origins;\r\n\t\t\t}\r\n\t\t}\r\n\r\n\t\tevaluationStack.add(obj);\r\n\t}", "public void push(E e) {\n\t\ttop = new SNode<E>(e, top);\n\t}", "public void push(E item) {\n if (!isFull()) {\n this.stack[top] = item;\n top++;\n } else {\n Class<?> classType = this.queue.getClass().getComponentType();\n E[] newArray = (E[]) Array.newInstance(classType, this.stack.length*2);\n System.arraycopy(stack, 0, newArray, 0, this.stack.length);\n this.stack = newArray;\n\n this.stack[top] = item;\n top++;\n }\n }", "@Test\n public void testPushTop(){\n ms = new MyStack();\n ms.push(2);\n assertEquals(2,ms.top());\n }", "public interface Stack {\n//\tpublic static final Object[] contents = new Object[100]; \n\tpublic void push(Object anElement);\n\tpublic Object pop();\n\n}", "public void push(T element) {\n if(isFull()) {\n throw new IndexOutOfBoundsException();\n }\n this.stackArray[++top] = element;\n }", "public void push(Object value) {\n\t\tthis.add(value);\n\t}", "public void push(int x) {\r\n inStack.push(x);\r\n }", "public ObjectStack() {\n\t\tcollection = new ArrayBackedIndexedCollection();\n\t}", "@Override\n\tpublic void push(Object x) {\n\t\tthis.vector.add(x);\n\t}", "public void push (E element);", "private void pushStackStackForward( ThroughNode aNode ) {\n List<ThroughNode> curStack = nodeStackStack.peek();\n List<ThroughNode> newStack = new ArrayList<>(curStack.size()+1);\n newStack.add(aNode);\n newStack.addAll(curStack);\n nodeStackStack.push(newStack);\n }", "public void pushToStack(Directory dir) {\n directoryStack.push(dir);\n }", "public void testPush() {\n assertEquals(this.stack.size(), 10, 0.01);\n this.stack.push(10);\n assertEquals(this.stack.size(), 11, 0.01);\n assertEquals(this.stack.peek(), 10, 0.01);\n }", "void push(int i);", "public void push() throws EvaluationException {\n\t\tsetTimeout(Integer.MAX_VALUE);\n\t\tprintln(\"(push 1)\");\n\t\tcheckSuccess();\n\t\tsymbolsByStackPos.addLast(new HashSet<>());\n\t}", "public void push(int x, int y) throws FieldIsPushedException, FieldIsMineException;" ]
[ "0.7592853", "0.74938166", "0.7482892", "0.74578947", "0.7313055", "0.721291", "0.70531684", "0.70214844", "0.70057636", "0.6972316", "0.6878947", "0.68164295", "0.67619264", "0.6748093", "0.6731325", "0.6659194", "0.6656918", "0.66498977", "0.6639308", "0.66307247", "0.662383", "0.6617253", "0.6610701", "0.6573255", "0.6514071", "0.6510566", "0.650498", "0.6461768", "0.6456234", "0.6435551", "0.64150023", "0.6401403", "0.63995194", "0.6384128", "0.63832986", "0.63832986", "0.63754916", "0.6371001", "0.63486004", "0.6341162", "0.6339113", "0.631056", "0.6308923", "0.6308923", "0.6298045", "0.6288341", "0.62830544", "0.6275187", "0.62532264", "0.6249803", "0.62094957", "0.6203286", "0.6195213", "0.6192386", "0.61852497", "0.6171144", "0.6170231", "0.6167158", "0.6167158", "0.6161899", "0.61539537", "0.6153021", "0.61480314", "0.6146054", "0.61450344", "0.6135218", "0.6107306", "0.60992134", "0.6086266", "0.6078548", "0.6074739", "0.60624623", "0.60529566", "0.6046141", "0.60362923", "0.6033489", "0.60171694", "0.6007086", "0.59959334", "0.59952635", "0.59914243", "0.5981136", "0.5974373", "0.59626937", "0.59329915", "0.59298795", "0.59203243", "0.5908692", "0.5905913", "0.59025455", "0.5894525", "0.58912563", "0.5886798", "0.58856267", "0.5863991", "0.5857357", "0.5856549", "0.5855964", "0.5847656" ]
0.64452606
30
get the last element, but not pop it
T peek();
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public Object lastElement();", "public Object last() {\r\n\t\treturn elements.get(size() - 1);\r\n\t}", "@Override\r\n\tpublic Object last(){\r\n\t\tcheck();\r\n\t\treturn tail.value;\r\n\t}", "E last() throws NoSuchElementException;", "public E last() { // returns (but does not remove) the last element\n // TODO\n\n if ( isEmpty()) return null ;\n return tail.getElement();\n }", "public U getLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls get\r\n\t \treturn get(numElems-1);\r\n\t }", "public E last() {\n if (this.isEmpty()) return null;\r\n return this.tail.getElement();\r\n }", "@Override\n public E getLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n return dequeue[tail];\n }", "public TypeHere getLast() {\n return items[size - 1];\n }", "public T last() throws EmptyCollectionException{\n if (rear == null){\n throw new EmptyCollectionException(\"list\");\n }\n return rear.getElement();\n }", "public Item getLast() {\n return items[size - 1];\n }", "public T last() throws EmptyCollectionException;", "public E pollLast() {\r\n\t\tif (isEmpty()) {\r\n\t\t\treturn null;\r\n\t\t}\r\n\t\tE ret = (E) data.get(data.size() - 1);\r\n\t\tdata.remove(data.size() - 1);\r\n\t\treturn ret;\r\n\t}", "public Object last()throws ListExeption;", "public E getLast() {\r\n\r\n\t\treturn (E) data.get(data.size() - 1);\r\n\t}", "public E last() {\n\r\n if(tail == null) {\r\n return null;\r\n } else {\r\n return tail.getItem();\r\n\r\n }\r\n }", "public T getLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> last = endMarker.prev;\r\n\t\ttry{\r\n\t\t\t//last elem\r\n\t\t\treturn last.getLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "public E pop(){\n E o = list.get(list.size() - 1);\n list.remove(list.size() - 1);\n return o;\n }", "public Object peek() {return collection.get(collection.size() - 1);}", "public E peekLast();", "public T pop() {\r\n T o = get(size() - 1);\r\n remove(size() - 1);\r\n return o;\r\n\t}", "public E pollLast() {\n\t\tif (mSize == 0)\n\t\t\treturn null;\n\t\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public node getLast() {\n\t\tif(head == null) {\n\t\t\treturn null;\n\t\t}\n\t\tnode tmp = head;\n\t\twhile(tmp.next !=null) {\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp;\n\n\t\t//OR\n\t\t//getAt(size()-1);\n\t}", "@Override\r\n\tpublic E removeLast() {\n\t\treturn pollLast();\r\n\t}", "public E getLast() {\r\n\t\tif (tail == null) {\r\n\t\t\tthrow new NoSuchElementException();\r\n\t\t} else {\r\n\t\t\treturn indices.get(size - 1).data;\t\r\n\t\t}\r\n\t}", "public Object pop() {\n\t\tObject lastElement = peek();\n\t\t\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tcollection.remove(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public Item getLast() {\n Node nextToLast = findNode(size-1);\n Node removed = nextToLast.next;\n nextToLast.next = head;\n removed.next = null;\n size--;\n return removed.item;\n }", "public O last()\r\n {\r\n if (isEmpty()) return null;\r\n return last.getObject();\r\n }", "public TypeHere removeLast() {\n TypeHere x = getLast();\n items[size - 1] = null;\n size -= 1; \n return x;\n }", "public E getLast(){\n return tail.getPrevious().getElement();\n }", "public E last() {\n if(isEmpty()){\n return null;\n }else{\n return trailer.getPrev().getElement();\n }\n }", "public T pop() {\n return this.list[this.size-1];\n }", "public Object getLast() {\r\n if (size == 0)\r\n throw new NoSuchElementException();\r\n\r\n return header.previous.element;\r\n }", "T butLast();", "private Element popElement() {\r\n return ((Element)this.elements.remove(this.elements.size() - 1));\r\n }", "private Object last(Element element) {\n\t\tList<Node> nodes = element.childNodes();\n\t\treturn nodes.get(nodes.size()-1);\n\t}", "public E removeLast();", "public Node getLast() {\r\n\t\treturn getNode(this.size());\r\n\t}", "public Object getLast() throws ListException {\r\n\t\tif (size() >= 1) {\r\n\t\t\tDoublyNode lastNode = head.getPrev();\r\n\t\t\treturn lastNode.getItem();\r\n\t\t} else {\r\n\t\t\tthrow new ListException(\"getLast on an empty list\");\r\n\t\t}\r\n\t}", "public Object peek() {\n\t\tcheckIfStackIsEmpty();\n\t\tint indexOfLastElement = collection.size() - 1;\n\t\tObject lastElement = collection.get(indexOfLastElement);\n\t\t\n\t\treturn lastElement;\n\t}", "public E removeLast(){\r\n return null;\r\n }", "public Object pop() {\r\n\t\treturn al.removeElementAt(al.listSize - 1);\r\n\t}", "public Item getLast();", "public T removeLast(){\n\tT ret = _end.getCargo();\n\t_end = _end.getNext();\n\t_end.setPrev(null);\n\t_size--;\n\treturn ret;\n }", "@Override\r\n\tpublic E removeLast() {\n\t\treturn null;\r\n\t}", "public T peek() {\r\n return get(size() - 1);\r\n\t}", "public E getLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public E removeLast() {\n\t\t// Bitte fertig ausprogrammieren:\n\t\treturn null;\n\t}", "public T removeLast() {\n if (_size == 0)\n throw new NoSuchElementException();//If nothing to remove, you cant remove\n T ret = _end.getCargo();\n _end = _end.getBefore();//set end to the thing before end\n _size--;\n return ret;\n }", "public T getLast()\n\t//POST: FCTVAL == last element of the list\n\t{\n\t\tNode<T> tmp = start;\n\t\twhile(tmp.next != start) //traverse the list to end\n\t\t{\n\t\t\ttmp = tmp.next;\n\t\t}\n\t\treturn tmp.value;\t//return end element\n\t}", "@Override\n\tpublic Object pop() {\n\t\tif (elementCount == 0) {\n\t\t\treturn null;\n\t\t}\n\n\t\telementCount--;\n\t\treturn elementData[elementCount];\n\t}", "public T removeLast( ){\r\n\t\tif (isEmpty())\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t//last node\r\n\t\tArrayNode<T> node = endMarker.prev;\r\n\t\ttry{\r\n\t \tmodCount++;\r\n\t \tnumAdded--;\r\n\t \t//calls nested method\r\n\t\t\treturn node.removeLast();\r\n\t\t}catch( IndexOutOfBoundsException e){\t//empty node\r\n\t\t\tthrow new NoSuchElementException(\"ChainedArrays are empty\");\r\n\t\t}\r\n\t}", "@Override\r\n\tpublic E peekLast() {\n\t\treturn null;\r\n\t}", "@Override\r\n\tpublic T last() {\n\t\treturn tail.content;\r\n\t}", "public Item removeLast(){\r\n\t\tif (isEmpty()) throw new NoSuchElementException(\"Queue underflow\");\r\n\t\tItem tmp = list[last--];\r\n\t\tn--;\r\n\t\tlatter=last+1;\r\n\t\tif(last==-1){last=list.length-1;}\r\n\t\tif (n > 0 && n == list.length/4) resize(list.length/2); \r\n\t\treturn tmp;}", "public Object getLastObject()\n {\n\tcurrentObject = lastObject;\n\n if (lastObject == null)\n \treturn null;\n else\n \treturn AL.get(AL.size()-1);\n }", "public E pop() \r\n {\r\n E o = list.get(getSize() - 1);\r\n list.remove(getSize() - 1);\r\n return o;\r\n }", "T last();", "public Object peek() {\r\n\t\treturn al.getElementAt(al.listSize - 1);\r\n\t}", "public T getLast() {\n if (this.getSize() > 0) {\n return buffer[index];\n }\n return null;\n }", "public RTWElementRef lastAsElement();", "@Override\n public E removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"No elements in dequeue\");\n }\n E value = dequeue[tail];\n dequeue[tail] = null;\n tail--;\n if (tail == -1) {\n tail = dequeue.length - 1;\n }\n size--;\n if (size < dequeue.length / 2) {\n reduce();\n }\n return value;\n }", "@Override\n public Item removeLast() {\n nextLast = moveBack(nextLast, 1);\n Item output = items[nextLast];\n items[nextLast] = null;\n size -= 1;\n return output;\n }", "public T removeLast();", "public Item removeLast() {\n if (isEmpty()) {\n throw new NoSuchElementException(\"queue is empty\");\n }\n Item a;\n a = last.item;\n if (size() == 1) {\n first = null;\n last = null;\n }\n else {\n last = last.prev;\n last.next = null;\n\n }\n size--;\n return a;\n\n\n }", "public O popBack()\r\n {\r\n if (!isEmpty())\r\n {\r\n VectorItem<O> l = last;\r\n last = last.getPrevious();\r\n\r\n count--;\r\n if (isEmpty()) first = null;\r\n else last.setNext(null);\r\n return l.getObject();\r\n } else\r\n return null;\r\n \r\n }", "public process get_last() {\n\t\treturn queue.getLast();\n\t}", "@Override\r\n\tpublic E getLast() {\n\t\treturn null;\r\n\t}", "public E removeLast() {\n\t\tif (this.maxCapacity == 0) {\n\t\t\tSystem.out.println(\"incorrect Operation \");\n\t\t\tSystem.out.println(\"bottom less Stack\");\n\t\t\treturn null;\n\t\t} \n\t\t\n\t\tif (this.size > 0) {\n\t\t\tNode<E> nextNode = head.getNext();\n\t\t\tNode<E> prevNode = null;\n\t\t\twhile (nextNode != null) {\n\t\t\t\tif (nextNode.getNext() == null) {\n\t\t\t\t\tNode<E> lastNode = nextNode;\n\t\t\t\t\tthis.tail = prevNode;\n\t\t\t\t\tthis.tail.setNext(null);\n\t\t\t\t\tthis.size--;\n\t\t\t\t\treturn lastNode.getElement();\n\t\t\t\t}\n\t\t\t\tprevNode = nextNode;\n\t\t\t\tnextNode = nextNode.getNext();\n\t\t\t}\n\t\t} \n\t\t\t\n\t\treturn null;\n\t}", "public T pop()\n {\n if (ll.getSize()==0){\n return null;\n }else {\n T temp = ll.getData(ll.getSize() - 1);\n ll.remove(ll.getSize() - 1);\n\n return temp;\n }\n }", "public Node<T> getLast() \r\n {\r\n if (isEmpty()) return sentinel;\r\n return sentinel.prev;\r\n }", "public T getLast();", "public T getLast();", "public T removeLast() {\n if (size == 0) {\n return null;\n }\n if (size == 1) {\n size--;\n return array[rear];\n }\n this.checkReSizeDown();\n size--;\n rear--;\n this.updatePointer();\n return array[Math.floorMod(rear + 1, array.length)];\n }", "public E getBack() throws IllegalArgumentException {\r\n\t\tE result = null;\r\n\t\tresult = get(size - 1);\r\n\t\treturn result;\r\n\t}", "public int lastElement() {\r\n\r\n\t\treturn (usedSize - 1);\r\n\r\n\t}", "@Override\n public Item getBack() {\n int lastActualItemIndex = size - 1;\n return items[lastActualItemIndex];\n }", "public Place tail(){\n return places.get(places.size()-1);\n }", "public Object pop() {\n\t\tObject o = get(getSize() - 1);\n\t\tremove(getSize() - 1);\n\t\treturn o;\n\t}", "public E peek() \r\n {\r\n return list.get(getSize() - 1);\r\n }", "private Element peekElement() {\r\n return ((Element)this.elements.get(this.elements.size() - 1));\r\n }", "public Item removeLast() {\n if (!isEmpty()) {\n Item item = last.item;\n last = last.front;\n size--;\n if (size != 0)\n last.back = null;\n return item;\n } else throw new NoSuchElementException(\"?\");\n\n }", "public U removeLast(){\r\n\t \tif (getArraySize()==0)\r\n\t \t\tthrow new IndexOutOfBoundsException();\r\n\t \t//calls remove on last\r\n\t \treturn remove(numElems-1);\r\n\t }", "public E removeLast() {\n\t\t// low-level methods should be efficient - don't call other rmv()\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tE retVal = remove(getNode(size() - 1));\n\n\t\tmSize--;\n\t\tmodCount++;\n\n\t\treturn retVal;\n\t}", "public E peekLast() {\n\t\tif (mSize == 0)\n\t\t\tthrow new NoSuchElementException();\n\n\t\tNode p = mHead.next;\n\t\twhile (p.next != mTail) {\n\t\t\tp = p.next;\n\t\t}\n\n\t\treturn p.data;\n\t}", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public T getLast()\n\t{\n\t\treturn getLastNode().getData();\n\t}", "public T getLast() {\n return this.getHelper(this.indexCorrespondingToTheLatestElement).data;\n }", "E pop();", "E pop();", "E pop();", "@Override\r\n\tpublic String pop() {\n\t\tString last = vector.get(vector.size()-1);\r\n\t\tvector.remove(vector.size()-1);\r\n\t\treturn last;\r\n\t}", "@Override\n public T removeLast() {\n if (size == 0) {\n return null;\n }\n\n int position = minusOne(nextLast);\n T itemToReturn = array[position];\n array[position] = null;\n nextLast = position;\n size -= 1;\n\n if ((double)size / array.length < 0.25 && array.length >= 16) {\n resize(array.length / 2);\n }\n return itemToReturn;\n }", "public E pop(){\r\n\t\tObject temp = peek();\r\n\t\t/**top points to the penultimate element*/\r\n\t\ttop--;\r\n\t\treturn (E)temp;\r\n\t}", "public T pop() { //pop = remove the last element added to the array, in a stack last in, first out (in a queue pop and push from different ends)\n try {\n T getOut = (T) myCustomStack[numElements - 1]; //variable for element to remove (pop off) = last element (if you have 7 elements, the index # is 6)\n myCustomStack[numElements] = null; //remove element by making it null\n numElements--; //remove last element, decrease the numElements\n return getOut; //return popped number\n\n } catch (Exception exc) {\n System.out.println(\"Can't pop from empty stack!\");\n return null;\n }\n }", "public synchronized DoubleLinkedListNodeInt getLast() {\n\t\tif(isEmpty())\n\t\t\treturn null;\n\t\treturn tail.getPrev();\n\t}", "public T removeLast() {\n return remove(sentinel.prev);\n }", "public E poll() {\n if (index == 0) {\n throw new EmptyStackException();\n }\n\n E result = (E)list.getLast();\n list.removeLast();\n index--;\n\n return result;\n }", "protected int removeLast() {\n if (size > 0) {\n return heap[size--];\n }\n return null;\n }", "Object pop();", "public Object removeLast() {\r\n Object last = header.previous.element;\r\n remove(header.previous);\r\n return last;\r\n }" ]
[ "0.8315247", "0.8298321", "0.8089548", "0.8028232", "0.8026378", "0.8004993", "0.798372", "0.79734874", "0.78779536", "0.7867514", "0.7826291", "0.78184855", "0.78101313", "0.78064114", "0.7784294", "0.77712375", "0.7764162", "0.77575177", "0.7742399", "0.7725875", "0.76845914", "0.7683264", "0.76607066", "0.76542604", "0.76493037", "0.7646854", "0.76451254", "0.7631218", "0.7627179", "0.75977623", "0.7585602", "0.75609773", "0.7558167", "0.75536966", "0.75489044", "0.7542153", "0.7536358", "0.7534946", "0.7532972", "0.751212", "0.7511466", "0.7502527", "0.7490431", "0.7468026", "0.745567", "0.7450349", "0.7446743", "0.741202", "0.74103975", "0.7406122", "0.7398893", "0.73970646", "0.73892885", "0.73823947", "0.7378318", "0.73337334", "0.7333217", "0.732857", "0.7325946", "0.73184454", "0.73183197", "0.730361", "0.7298053", "0.7279313", "0.727375", "0.7273001", "0.72661304", "0.72624815", "0.72461253", "0.7244481", "0.7242834", "0.72373194", "0.72373194", "0.7234877", "0.72194", "0.721792", "0.7209397", "0.7208877", "0.71984726", "0.7188563", "0.7182988", "0.71536696", "0.713029", "0.71278584", "0.712608", "0.71136695", "0.71136695", "0.7106775", "0.71003866", "0.71003866", "0.71003866", "0.70965844", "0.70790625", "0.70781785", "0.7076507", "0.7073964", "0.70717376", "0.7060846", "0.70529866", "0.7052748", "0.7049168" ]
0.0
-1
lab_2_2_1_and_2_2_2(); lab_2_2_extra(); lab_2_2_3(); lab_2_2_4();
public static void demo() { lab_2_2_5(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n\tpublic void lab() {\n\t\t\n\t}", "public static void main(String[] args) {\n demo2();\n demo3();\n demo4();\n demo5();\n }", "public static void doExercise3() {\n // TODO: Complete Exercise 3 Below\n\n }", "public static void doExercise4() {\n // TODO: Complete Exercise 4 Below\n\n }", "public static void doExercise1() {\n // TODO: Complete Exercise 1 Below\n\n }", "public static void main(String[] args) {\n\t\ttest4();\n//\t\ttest7();\n//\t\ttest8();\n//\t\ttest9();\n//\t\ttest10();\n//\t\ttest11();\n//\t\t test13() ;\n\t}", "public static void main(String[] args)\r\n\t{\n\t\tExample11();\r\n//\t\tExample12();\r\n//\t\tExample13();\r\n\t}", "public static void doExercise2() {\n // TODO: Complete Exercise 2 Below\n\n }", "public static void main(String[] args) {\n\t\tfunc4();\r\n\t\t\r\n//\t\tfuncExtra1(); \r\n//\t\tfunExtra2();\r\n\t}", "public static void doExercise5() {\n // TODO: Complete Exercise 5 Below\n\n }", "Lab apply();", "public static void main(String [] args){\n \n \tpart1();\n \n \tpart2();\n \n\t}", "void pramitiTechTutorials() {\n\t\n}", "void test02(){\n\t}", "private void method_2684(ahb var1, int var2, int var3, int var4) {\r\n String[] var10000 = class_752.method_4253();\r\n int var6 = var1.method_33(var2, var3, var4);\r\n int var7 = method_2686(var6);\r\n String[] var5 = var10000;\r\n int var9 = var7;\r\n if(var5 != null) {\r\n if(var7 == 7) {\r\n return;\r\n }\r\n\r\n var9 = this.method_2685(var1, var2, var3, var4, var7);\r\n }\r\n\r\n int var8 = var9;\r\n var9 = var8;\r\n if(var5 != null) {\r\n label45: {\r\n if(var8 != 0) {\r\n var9 = method_2687(var6);\r\n if(var5 == null) {\r\n break label45;\r\n }\r\n\r\n if(var9 == 0) {\r\n ahb var10 = var1;\r\n int var10001 = var2;\r\n int var10002 = var3;\r\n int var10003 = var4;\r\n if(var5 != null) {\r\n if(!method_2690(var1, var2, var3, var4, var7)) {\r\n return;\r\n }\r\n\r\n var10 = var1;\r\n var10001 = var2;\r\n var10002 = var3;\r\n var10003 = var4;\r\n }\r\n\r\n var10.method_2193(var10001, var10002, var10003, this, 0, var7);\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n var9 = var8;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 != 0) {\r\n return;\r\n }\r\n\r\n var9 = method_2687(var6);\r\n }\r\n\r\n if(var5 != null) {\r\n if(var9 == 0) {\r\n return;\r\n }\r\n\r\n var1.method_2055(var2, var3, var4, var7, 2);\r\n }\r\n\r\n var1.method_2193(var2, var3, var4, this, 1, var7);\r\n }", "public static void main(String[] args) {\n ex1();\n ex2();\n ex3();\n ex4();\n\n }", "public static void main(String[] args) {\n func1();\n System.out.println(\"---------\");\n func2();\n System.out.println(\"---------\");\n func3();\n System.out.println(\"---------\");\n func4();\n System.out.println(\"---------\");\n func5();\n System.out.println(\"---------\");\n System.out.println(func6(5));\n System.out.println(\"---------\");\n func7(100);\n System.out.println(\"---------\");\n System.out.println(func8(100));\n System.out.println(\"---------\");\n func9();\n System.out.println(\"---------\");\n func10();\n }", "public void method_2486(ahl var1, int var2, int var3, int var4) {\r\n String[] var10000 = class_752.method_4253();\r\n int var6 = var1.method_33(var2, var3, var4);\r\n String[] var5 = var10000;\r\n if(method_2687(var6)) {\r\n label47: {\r\n label46: {\r\n label45: {\r\n label44: {\r\n label43: {\r\n label42: {\r\n float var7 = 0.25F;\r\n if(var5 != null) {\r\n switch(method_2686(var6)) {\r\n case 0:\r\n this.method_2443(0.0F, 0.25F, 0.0F, 1.0F, 1.0F, 1.0F);\r\n break;\r\n case 1:\r\n break label42;\r\n case 2:\r\n break label43;\r\n case 3:\r\n break label44;\r\n case 4:\r\n break label45;\r\n case 5:\r\n break label46;\r\n default:\r\n break label47;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 1.0F, 0.75F, 1.0F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.25F, 1.0F, 1.0F, 1.0F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 0.75F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.25F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\r\n if(var5 != null) {\r\n break label47;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 0.75F, 1.0F, 1.0F);\r\n }\r\n\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n\r\n this.method_2443(0.0F, 0.0F, 0.0F, 1.0F, 1.0F, 1.0F);\r\n }", "public static void main(String[] args) {\n\t\tfunction_1();\r\n\t\tfunction_2();\r\n\t\tfunction_3();\r\n\t}", "public static void exercise10() {\n }", "public static void listing5_14() {\n }", "static void SampleItinerary()\n {\n System.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\n bg.AdultRowToMolokai();\n bg.ChildRideToMolokai();\n bg.AdultRideToMolokai();\n bg.ChildRideToMolokai();\n }", "private static void demo1() {\n m1();\n m2();\n }", "public static void main(String[] args) {\n Lab_2 lab=new Lab_2();\n lab.displaydetails();\n lab.displayhomeaddress();\n lab.displayworkaddress();\n lab.displaylocaladdress(); \n }", "public static void main(String[] args) {\n\n\n for (int i = 0; i < 3; i++) {\n System.out.println(\"\\n********* TEST \" + (i+1) + \" *********\");\n experimentOne(false);\n experimentOne(true);\n\n experimentTwo(false);\n experimentTwo(true);\n\n experimentThree(false);\n experimentThree(true);\n }\n }", "public static void main(String[] args) {\n\t\tLab3 test = new Lab3();\n\t\t\n\t\tSystem.out.println(\"\\nTest Case (0, 7, 4) to (2, 7, 2):\");\n\t\ttest.pouring(0, 7, 4, 2, 7, 2);\n\t\ttest.backTrack(0, 7, 4, 2, 7, 2);\n\t\ttest = new Lab3();\n\t\t\n\t\tSystem.out.println(\"\\nTest Case (10, 0, 4) to (2, 7, 2):\");\n\t\ttest.pouring(10, 0, 4, 2, 7, 2);\n\t\ttest.backTrack(10, 0, 4, 2, 7, 2);\n\t\ttest = new Lab3();\n\t\t\n\t\tSystem.out.println(\"\\nTest Case (8, 6, 3) to (7, 6, 4):\");\n\t\ttest.pouring(8, 6, 3, 7, 6, 4);\n\t\ttest.backTrack(8, 6, 3, 7, 6, 4);\n\t\ttest = new Lab3();\n\t\t\n\t\tSystem.out.println(\"\\nTest Case (1, 7, 4) to (3, 6, 2):\");\n\t\ttest.pouring(1, 7, 4, 3, 6, 2);\n\t\ttest.backTrack(1, 7, 4, 3, 6, 2);\n\t\ttest = new Lab3();\n\t\t\n\t\tSystem.out.println(\"\\nTest Case (2, 7, 4) to (3, 6, 2):\");\n\t\ttest.pouring(2, 7, 4, 3, 6, 2);\n\t\ttest.backTrack(2, 7, 4, 3, 6, 2);\n\t\ttest = new Lab3();\n\t\t\n\t\tSystem.out.println(\"\\nTest Case (6, 3, 3) to (3, 6, 3):\");\n\t\ttest.pouring(6, 3, 3, 3, 6, 3);\n\t\ttest.backTrack(6, 3, 3, 3, 6, 3);\n\t}", "void mo28306a();", "public static void main(String[] args) {\n one_two_four();\n /* result:\n world\n hello\n */\n\n }", "void mo22249a();", "void mo3311a();", "public void mo33394d() {\n mo33393c();\n mo33395e();\n }", "private void level7() {\n }", "static void SampleItinerary() {\n\t\tSystem.out.println(\"\\n ***Everyone piles on the boat and goes to Molokai***\");\n\t\tbg.AdultRowToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t\tbg.AdultRideToMolokai();\n\t\tbg.ChildRideToMolokai();\n\t}", "public void mo3370l() {\n }", "public static void main(String[] args){\n verseOne();\n verseTwo();\n verseThree();\n verseFour();\n verseFive();\n verseSix();\n verseSeven(); \n }", "void mo21076g();", "public void printt() {\n for (int i=0 ; i<number ; i++) {\n System.out.println(\"LAB\" + (i+1) + \" ON \" + labs[i].getDay() + \" TEACHING BY: \" + labs[i].getTeacher());\n for (int j=0 ; j<labs[i].getCurrentSize() ; j++) {\n System.out.println(labs[i].getStudents()[j].getFirstName() + \" \" + labs[i].getStudents()[j].getLastName() + \" \" + labs[i].getStudents()[j].getId() + \" \" +labs[i].getStudents()[j].getGrade());\n }\n System.out.println(\"THE CAPACITY OF THE LAB IS: \" + labs[i].getCapacity());\n System.out.println(\"THE AVERAGE IS : \" + labs[i].getAvg());\n System.out.println();\n }\n }", "void mo37810a();", "public static void main(String[] args) {demo6();\r\n\t\t\r\n\t}", "void mo2311a();", "void mo119581a();", "@Override\n\tpublic void iniciarLabores() {\n\t\t\n\t}", "@Override\n\tpublic void iniciarLabores() {\n\t\t\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "@Override\r\n\tpublic void func02() {\n\t\t\r\n\t}", "void mo67924c();", "void mo310e();", "void mo1943l();", "public static void main(String[] args) {\r\n\r\n // create new Lab3 objects\r\n Lab3 lab = new Lab3();\r\n\r\n Lab3 lab2 = new Lab3(24);\r\n\r\n Lab3 lab3 = new Lab3(\"James\");\r\n\r\n\r\n // Display lab 3 objects\r\n System.out.println(lab);\r\n\r\n System.out.println(lab2);\r\n\r\n System.out.println(lab3);\r\n }", "public void mo21787L() {\n }", "public static void main(String[] args) {\n\r\n\t\tsample3 obj1=new sample3();\r\n\t\tobj1.display1();\r\n\t\tobj1.display2();\r\n\t}", "@Override\r\n\tprotected void func03() {\n\t\t\r\n\t}", "public static void main (String args[]) {\n\t\tteste01();\n\t\tteste02();\n\t\tteste03();\n\t\t//teste04();\n\t}", "public static void main(String[] args) {\n\t\tString[] sA1 = {\"old\", \"cold\", \"new\", \"cool\", \"scary\", \"scared\", \"worrisome\", \"very big\", \"small\", \"powerful\", \"imaginative\", \"hungry\", \"sleepy\", \"tired\", \"aggresive\", \"handsome\", \"ambitious\", \"brave\", \"calm\", \"eager\", \"clean\", \"chubby\", \"colossal\", \"gigantic\", \"little\", \"gentle\", \"religious\", \"grumpy\", \"embarrassed\", \"bewildered\"};\n\t\tString[] sA2 = {\"catarpillar\", \"basketball player\", \"police man\", \"doctor\", \"waiter\", \"ducky\", \"puppy\", \"psychic\", \"kitty cat\", \"badger\", \"otter\", \"basilisk\", \"platypus\", \"martian\", \"italian man\", \"chef\", \"veterinarian\", \"student\", \"qa tester\", \"sysadmin\", \"project manager\", \"soccer player\", \"vegitarian\", \"eel\", \"fish\", \"baby\", \"water chestnut\", \"apple tree\", \"president\", \"mechanic\", \"salesman\", \"twitch streamer\", \"quarterback\", \"halfback\", \"coach\", \"jealous\"};\n\t\tString[] sA3 = {\"favorite\", \"epic\", \"awesome\", \"amazing\", \"gorgeous\", \"worst\", \"unique\", \"weird\", \"funny\", \"magic\", \"itchy\", \"silly\", \"wonderful\", \"magnificent\", \"nice\", \"jolly\", \"unsightly\", \"miniature\", \"microscopic\", \"massive\", \"best\", \"loltyler1.com discount code alpha\"};\n\t\tString[] sA4 = {\"bodyguard\", \"plates\", \"game\", \"stuffed animal\", \"stopwatch\", \"pillow\", \"victory royale\", \"xbox controller\", \"wallet\", \"chair\", \"racecar bed\", \"rocket\", \"water bed\", \"closet\", \"water bottle\", \"jetski\", \"headset\", \"printer\", \"hard drive\", \"cologne\", \"deoderant\", \"robe\", \"diamond pickaxe\", \"iron sword\", \"stone shovel\", \"usb flash drive\"};\n\t\tArrayList<Book> bookArr = new ArrayList<Book>();\n\t\tRandom r = new Random();\n\t\tBookTableGateway btg = new BookTableGateway();\n\t\tPublisherTableGateway ptg = new PublisherTableGateway();\n\t\tAuditTableGateway atg = new AuditTableGateway();\n\t\tbtg.setPTGate(ptg);\n\t\tbtg.setATGate(atg);\n\t\tString isbn;\n\t\tint isbnInt = 501242;\n\t\tfor(int i = 0; i < 100;i++) {\n\t\t\tbookArr.clear();\n\t\tfor(int j = 0; j < 1100;j++) {\n\t\t\tString name = \"The \" + sA1[r.nextInt(sA1.length)] + \" \" + sA2[r.nextInt(sA2.length)] + \" and his \" + sA3[r.nextInt(sA3.length)] + \" \" + sA4[r.nextInt(sA4.length)];\n\t\t\tint yearPublished = r.nextInt(1900) + 117;\n\t\t\tString summary = \"A book that exists\";\n\t\t\tint pSwitch = r.nextInt(7);\n\t\t\tint publisherID;\n\t\t\tswitch(pSwitch) {\n\t\t\tcase 0:\n\t\t\t\tpublisherID = 123;\n\t\t\t\tbreak;\n\t\t\tcase 1:\n\t\t\t\tpublisherID = 124;\n\t\t\t\tbreak;\n\t\t\tcase 2:\n\t\t\t\tpublisherID = 125;\n\t\t\t\tbreak;\n\t\t\tcase 3:\n\t\t\t\tpublisherID = 126;\n\t\t\t\tbreak;\n\t\t\tcase 4:\n\t\t\t\tpublisherID = 128;\n\t\t\t\tbreak;\n\t\t\tcase 5:\n\t\t\t\tpublisherID = 129;\n\t\t\t\tbreak;\n\t\t\tcase 6:\n\t\t\t\tpublisherID = 127;\n\t\t\t\tbreak;\n\t\t\t\tdefault:\n\t\t\t\tpublisherID = 123;\n\t\t\t\tbreak;\n\t\t\t}\n\t\t\tisbn = String.valueOf(isbnInt);\n\t\t\tisbnInt++;\n\t\t\tbookArr.add(new Book(0, yearPublished, name, summary, isbn, null, null, new Publisher(publisherID, null)));\n\t\t\tlogger.info(\"generated \" + name);\n\t\t}\n\t\tbtg.insertBookArray(bookArr);\n\t\t}\n\t\t\n\t}", "void mo10148a();", "void mo17013d();", "private void level4() {\n }", "void mo98969a();", "protected void method_4160() {\r\n String[] var10000 = class_752.method_4253();\r\n ++this.field_3416;\r\n String[] var1 = var10000;\r\n int var7 = this.field_3416;\r\n if(var1 != null) {\r\n label96: {\r\n if(this.field_3416 >= 180) {\r\n var7 = this.field_3416;\r\n if(var1 == null) {\r\n break label96;\r\n }\r\n\r\n if(this.field_3416 <= 200) {\r\n float var2 = (this.field_3028.nextFloat() - 0.5F) * 8.0F;\r\n float var3 = (this.field_3028.nextFloat() - 0.5F) * 4.0F;\r\n float var4 = (this.field_3028.nextFloat() - 0.5F) * 8.0F;\r\n String[] var10001 = field_3418;\r\n this.field_2990.method_2087(\"hugeexplosion\", this.field_2994 + (double)var2, this.field_2995 + 2.0D + (double)var3, this.field_2996 + (double)var4, 0.0D, 0.0D, 0.0D);\r\n }\r\n }\r\n\r\n var7 = this.field_2990.field_1832;\r\n }\r\n }\r\n\r\n int var5;\r\n int var6;\r\n class_715 var9;\r\n ahb var10;\r\n label101: {\r\n short var8;\r\n label102: {\r\n if(var1 != null) {\r\n label85: {\r\n if(var7 == 0) {\r\n var7 = this.field_3416;\r\n var8 = 150;\r\n if(var1 != null) {\r\n label80: {\r\n if(this.field_3416 > 150) {\r\n var7 = this.field_3416 % 5;\r\n if(var1 == null) {\r\n break label80;\r\n }\r\n\r\n if(var7 == 0) {\r\n var5 = 1000;\r\n\r\n while(var5 > 0) {\r\n var6 = class_715.method_4090(var5);\r\n var5 -= var6;\r\n var10 = this.field_2990;\r\n var9 = new class_715;\r\n var9.method_4087(this.field_2990, this.field_2994, this.field_2995, this.field_2996, var6);\r\n var10.method_2089(var9);\r\n if(var1 == null) {\r\n break label85;\r\n }\r\n\r\n if(var1 == null) {\r\n break;\r\n }\r\n }\r\n }\r\n }\r\n\r\n var7 = this.field_3416;\r\n }\r\n\r\n var8 = 1;\r\n }\r\n\r\n if(var1 == null) {\r\n break label102;\r\n }\r\n\r\n if(var7 == var8) {\r\n this.field_2990.method_2209(1018, (int)this.field_2994, (int)this.field_2995, (int)this.field_2996, 0);\r\n }\r\n }\r\n\r\n this.method_3864(0.0D, 0.10000000149011612D, 0.0D);\r\n this.field_3330 = this.field_3000 += 20.0F;\r\n }\r\n\r\n var7 = this.field_3416;\r\n }\r\n\r\n if(var1 == null) {\r\n break label101;\r\n }\r\n\r\n var8 = 200;\r\n }\r\n\r\n if(var7 != var8) {\r\n return;\r\n }\r\n\r\n var7 = this.field_2990.field_1832;\r\n }\r\n\r\n if(var1 != null) {\r\n if(var7 != 0) {\r\n return;\r\n }\r\n\r\n var7 = 2000;\r\n }\r\n\r\n var5 = var7;\r\n\r\n while(true) {\r\n if(var5 > 0) {\r\n var6 = class_715.method_4090(var5);\r\n var5 -= var6;\r\n var10 = this.field_2990;\r\n var9 = new class_715;\r\n var9.method_4087(this.field_2990, this.field_2994, this.field_2995, this.field_2996, var6);\r\n var10.method_2089(var9);\r\n if(var1 == null) {\r\n break;\r\n }\r\n\r\n if(var1 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n this.method_4325(class_1715.method_9561(this.field_2994), class_1715.method_9561(this.field_2996));\r\n break;\r\n }\r\n\r\n this.method_3851();\r\n }", "@Override\r\n\tvoid func04() {\n\t\t\r\n\t}", "static void feladat10() {\n\t}", "void mo4833b();", "public void intro ()\n {\n\tprintSlow (\"\\n\\nWelcome back to Hogwarts, the wonderful school of Witchcraft and Wizardry!\");\n\tprintSlow (\"As you may know already, Harry my boy, this is your third year at the school, and much is expected of you.\");\n\tprintSlow (\"... It seems that the school year has begun, go down to the main hall to hear what Professor Dumbledore \\nhas to say about the upcoming year!\\n\");\n\tprintSlow (\"~You start to walk through the halls, unsure of what to expect. Not much has changed, except for the new year of students approaching in boats.\\nEventually, you make it to the great hall, just in time for Dumbledore's speech.~\");\n\tprintSlow (\"\\nHello Students of Hogwarts. I am Professor Dumbledore, your headmaster here at Hogwarts.\");\n\tprintSlow (\"As some of you may know, it is a very dark time here at Hogwarts, and there are many dark forces among us.\");\n\tprintSlow (\"Should any students detect any such malicious sources, it would be in your best interest to \\ninform me, or any of my fellow teachers, and we will do our best to uphold the saftey we pride ourselves with here at Hogwarts.\\n\\n\");\n\n }", "void programming() {\n\t\tSystem.out.println(\"Programming is amazing\");\n\t}", "void mo7350a();", "void mo28194a();", "@Test\n public void test() {\n\n testBookExample();\n // testK5();\n // testK3_3();\n }", "public void test5() {\n\t\t\n\t}", "private void courseEffects() {\n\t\t\n\t}", "void mo5017a();", "void mo84655a();", "void mo41083a();", "void mo38026a();", "void mo12143a();", "void mo1507n();", "void mo1493c();", "public void printHelp(String funcname) {\n\t\tSystem.out.println(funcname);\n\t\tSystem.out.println();\n\t\tswitch(funcname){\n\t\tcase \"ASave\":\n\t\t\tSystem.out.println(\"Description: Outputs the program to the specified file with array syntax.When filename is not specified, saves as \\\"original_filename-ASave.ab\\\".\");\n\t\t\tSystem.out.println(\"Usage: ASave(Program prog, String filename)\");\n\t\t\tbreak;\n\t\tcase \"ASaveSystem\":\n\t\t\tSystem.out.println(\"Description: Outputs the result of AShow to the specified file.When filename is not specified, saves as \\\"original_filename-ASave.ab\\\".\");\n\t\t\tSystem.out.println(\"Usage: ASaveSystem(Program prog, String system, String filename)\");\n\t\t\tbreak;\n\t\tcase \"AShow\":\n\t\t\tSystem.out.println(\"Description: Prints out the program using array notation.Prints out the entire program when target system is unspecified.\");\n\t\t\tSystem.out.println(\"Usage: AShow(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"Save\":\n\t\t\tSystem.out.println(\"Description: Saves the output of show to the specified file.When output filename is unspecified, saves to \\\"original_filename-Show.ab\\\".\");\n\t\t\tSystem.out.println(\"Usage: Save(Program prog, String filename)\");\n\t\t\tbreak;\n\t\tcase \"SaveSystem\":\n\t\t\tSystem.out.println(\"Description: Saves the output of show to the specified file.When output filename is unspecified, saves to \\\"original_filename-Show.ab\\\".\");\n\t\t\tSystem.out.println(\"Usage: SaveSystem(Program prog, String system, String filename)\");\n\t\t\tbreak;\n\t\tcase \"Show\":\n\t\t\tSystem.out.println(\"Description: Pretty prints the program using alpha-purist syntax.Prints out the entire program when target system is unspecified.\");\n\t\t\tSystem.out.println(\"Usage: Show(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"Normalize\":\n\t\t\tSystem.out.println(\"Description: Normalizes the program. Normalization rules are described in more detail at: url{http://www.cs.colostate.edu/AlphaZ/wiki/doku.php?id=normalize}.\");\n\t\t\tSystem.out.println(\"Usage: Normalize(Program prog)\");\n\t\t\tbreak;\n\t\tcase \"PrintAST\":\n\t\t\tSystem.out.println(\"Description: Prints out the AST of the program.Prints out the entire program when target system is unspecified.\");\n\t\t\tSystem.out.println(\"Usage: PrintAST(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"ReadAlphabets\":\n\t\t\tSystem.out.println(\"Description: Parses the given alphabets program and returns a Program object.\");\n\t\t\tSystem.out.println(\"Usage: ReadAlphabets(String file)\");\n\t\t\tbreak;\n\t\tcase \"RenameSystem\":\n\t\t\tSystem.out.println(\"Description: Renames an AffineSystem.\");\n\t\t\tSystem.out.println(\"Usage: RenameSystem(Program prog, String system, String newSystemName)\");\n\t\t\tbreak;\n\t\tcase \"RenameVariable\":\n\t\t\tSystem.out.println(\"Description: Renames a variable.\");\n\t\t\tSystem.out.println(\"Usage: RenameVariable(Program prog, String system, String varName, String newVarName)\");\n\t\t\tbreak;\n\t\tcase \"RemoveUnusedVariables\":\n\t\t\tSystem.out.println(\"Description: Removes unused variables and equations. Unused variables are variables that is not used by the definition of output.\");\n\t\t\tSystem.out.println(\"Usage: RemoveUnusedVariables(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"PermutationCaseReduce\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: PermutationCaseReduce()\");\n\t\t\tbreak;\n\t\tcase \"ReductionDecomposition\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: ReductionDecomposition()\");\n\t\t\tbreak;\n\t\tcase \"SimplifyingReduction\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: SimplifyingReduction()\");\n\t\t\tbreak;\n\t\tcase \"NormalizeReduction\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: NormalizeReduction()\");\n\t\t\tbreak;\n\t\tcase \"FactorOutFromReduction\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: FactorOutFromReduction()\");\n\t\t\tbreak;\n\t\tcase \"SplitReductionBody\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: SplitReductionBody()\");\n\t\t\tbreak;\n\t\tcase \"TransformReductionBody\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: TransformReductionBody()\");\n\t\t\tbreak;\n\t\tcase \"SerializeReduction\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: SerializeReduction()\");\n\t\t\tbreak;\n\t\tcase \"MergeReductions\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: MergeReductions()\");\n\t\t\tbreak;\n\t\tcase \"ReductionComposition\":\n\t\t\tSystem.out.println(\"Description: Transformations involving reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: ReductionComposition()\");\n\t\t\tbreak;\n\t\tcase \"monoparametricTiling_noOutlining\":\n\t\t\tSystem.out.println(\"Description: Commands which parametrize the monoparametric tiling transformation, plus the transformation itself\");\n\t\t\tSystem.out.println(\"Usage: monoparametricTiling_noOutlining()\");\n\t\t\tbreak;\n\t\tcase \"monoparametricTiling_Outlining_noSubsystem\":\n\t\t\tSystem.out.println(\"Description: Commands which parametrize the monoparametric tiling transformation, plus the transformation itself\");\n\t\t\tSystem.out.println(\"Usage: monoparametricTiling_Outlining_noSubsystem()\");\n\t\t\tbreak;\n\t\tcase \"monoparametricTiling_Outlining\":\n\t\t\tSystem.out.println(\"Description: Commands which parametrize the monoparametric tiling transformation, plus the transformation itself\");\n\t\t\tSystem.out.println(\"Usage: monoparametricTiling_Outlining()\");\n\t\t\tbreak;\n\t\tcase \"setRatio\":\n\t\t\tSystem.out.println(\"Description: Commands which parametrize the monoparametric tiling transformation, plus the transformation itself\");\n\t\t\tSystem.out.println(\"Usage: setRatio()\");\n\t\t\tbreak;\n\t\tcase \"setMinParamValues\":\n\t\t\tSystem.out.println(\"Description: Commands which parametrize the monoparametric tiling transformation, plus the transformation itself\");\n\t\t\tSystem.out.println(\"Usage: setMinParamValues()\");\n\t\t\tbreak;\n\t\tcase \"setTileGroup\":\n\t\t\tSystem.out.println(\"Description: Commands which parametrize the monoparametric tiling transformation, plus the transformation itself\");\n\t\t\tSystem.out.println(\"Usage: setTileGroup()\");\n\t\t\tbreak;\n\t\tcase \"setCoBPreprocess\":\n\t\t\tSystem.out.println(\"Description: Commands which parametrize the monoparametric tiling transformation, plus the transformation itself\");\n\t\t\tSystem.out.println(\"Usage: setCoBPreprocess()\");\n\t\t\tbreak;\n\t\tcase \"CoB\":\n\t\t\tSystem.out.println(\"Description: Change of Basis transforms the domain of a variable to the image by the given function, while adding necessary dependence expressions to maintain the original semantics of the program. Details can be found at url{http://www.cs.colostate.edu/AlphaZ/wiki/doku.php?id=change_of_basis}.\");\n\t\t\tSystem.out.println(\"Usage: CoB(Program prog, String systemName, String varName, AffineFunction function)\");\n\t\t\tbreak;\n\t\tcase \"ForceCoB\":\n\t\t\tSystem.out.println(\"Description: Force the change of basis even if the CoB is for input/output of a system.\");\n\t\t\tSystem.out.println(\"Usage: ForceCoB(Program prog, String systemName, String targetName, AffineFunction function)\");\n\t\t\tbreak;\n\t\tcase \"Split\":\n\t\t\tSystem.out.println(\"Description: Splits a variable into two, where the domain of two variables are disjoint and union of them is equivalent to the original domain of the variable.If newName is not given, it creates a variable with prefix \\\"_split\\\" appended to the original name.\");\n\t\t\tSystem.out.println(\"Usage: Split(Program prog, String systemName, String varName, String newName, String sepDomain)\");\n\t\t\tbreak;\n\t\tcase \"Merge\":\n\t\t\tSystem.out.println(\"Description: Merge two variables (of name var1Name and var2Name) into a single one.These variables must both be locals and must have disjoint domains. The name of the merge of these two variables is \\\"newName\\\".\");\n\t\t\tSystem.out.println(\"Usage: Merge(Program prog, String systemName, String var1Name, String var2Name, String newName)\");\n\t\t\tbreak;\n\t\tcase \"Inline\":\n\t\t\tSystem.out.println(\"Description: Inlines the nth(number) reference to inlineEq in the definition of targetEq once. If the number is not specified, all references to inlineEq are inlined.\");\n\t\t\tSystem.out.println(\"Usage: Inline(Program prog, String systemName, String targetEq, String inlineEq, int number)\");\n\t\t\tbreak;\n\t\tcase \"Simplify\":\n\t\t\tSystem.out.println(\"Description: Simplifies the program in multiple ways. The domains are simplified by simplifyInContext (a.k.a. gist). When the domain of a reduction body is a single point, reduction is removed.\");\n\t\t\tSystem.out.println(\"Usage: Simplify(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"createFreeScheduler\":\n\t\t\tSystem.out.println(\"Description: Takes an alphabetes program and converts it to a program that computes the fastest possible schedule (free shcedule).This transformation DOES NOT preserve the original semantics, but instead creates a new Program object.Implemented by Alex Klein as a class project in cs560@spring11\");\n\t\t\tSystem.out.println(\"Usage: createFreeScheduler(Program prog, String newProgPrefix)\");\n\t\t\tbreak;\n\t\tcase \"SplitUnion\":\n\t\t\tSystem.out.println(\"Description: Replace an expression that has unions of polyhedra as its context domain with a case expression that splits the union into multiple disjiont polyhedra.\");\n\t\t\tSystem.out.println(\"Usage: SplitUnion(Program prog, String nodeID)\");\n\t\t\tbreak;\n\t\tcase \"ApplySTMap\":\n\t\t\tSystem.out.println(\"Description: Applies sequence of CoBs using STMap given for each variable.This is identical to the pre-processing step of ScheduledC code generator, where all variables are mapped to a common space so that ordering of iterations can be defined.Assumes correct schedule [TODO:run verifier before applying the transformation once the verifier is fixed]All STMaps and MemoryMaps given for the system will also be transformed appropriately.\");\n\t\t\tSystem.out.println(\"Usage: ApplySTMap(Program prog, String systemName)\");\n\t\t\tbreak;\n\t\tcase \"UniformizeInContext\":\n\t\t\tSystem.out.println(\"Description: Attempts to uniformize all dependencies when possible.\");\n\t\t\tSystem.out.println(\"Usage: UniformizeInContext(Program prog, String system, int excludeInputs)\");\n\t\t\tbreak;\n\t\tcase \"InlineForce\":\n\t\t\tSystem.out.println(\"Description: Force the inline action even if there is a self loop dependence\");\n\t\t\tSystem.out.println(\"Usage: InlineForce(Program prog, String systemName, String targetEq, String inlineEq, int number)\");\n\t\t\tbreak;\n\t\tcase \"InlineAll\":\n\t\t\tSystem.out.println(\"Description: Inline all the possible equation in a system when there is no self loop dependence\");\n\t\t\tSystem.out.println(\"Usage: InlineAll(Program prog, String systemName, String inlineEq)\");\n\t\t\tbreak;\n\t\tcase \"InlineAllForce\":\n\t\t\tSystem.out.println(\"Description: Inline all the possible equations in a system even with self loop dependence once\");\n\t\t\tSystem.out.println(\"Usage: InlineAllForce(Program prog, String systemName, String inlineEq)\");\n\t\t\tbreak;\n\t\tcase \"InlineSubSystem\":\n\t\t\tSystem.out.println(\"Description: Inline the subsystem used by the UseEquation specified by nodeID\");\n\t\t\tSystem.out.println(\"Usage: InlineSubSystem(Program prog, String systemName, String label)\");\n\t\t\tbreak;\n\t\tcase \"OutlineSubSystem\":\n\t\t\tSystem.out.println(\"Description: Outline a list of equations of a given system. These equation are defined through a list of variable (\\\"listEquations\\\") that corresponds to the variable of a StandardEquation or to the output of a UseEquation.[V1] The created use equation will have no extension domain, and only variable expressions as inputs.\");\n\t\t\tSystem.out.println(\"Usage: OutlineSubSystem(Program prog, String system, String listEquations)\");\n\t\t\tbreak;\n\t\tcase \"AddLocal\":\n\t\t\tSystem.out.println(\"Description: Adds a local variable (of name specified by \\\"nameLocal\\\") for the expression \\\"expr\\\" and replace each occurrence of this expression in the considered system.\\\"expr\\\" can be specified through a expression of the system (located in \\\"nodeID\\\"), or through an external expression \\\"expr\\\" whose list of indexes is \\\"lInds\\\".\");\n\t\t\tSystem.out.println(\"Usage: AddLocal(Program prog, String system, String nameLocal, String nodeID)\");\n\t\t\tbreak;\n\t\tcase \"AddLocalUnique\":\n\t\t\tSystem.out.println(\"Description: Replace only the expression (specified by the location \\\"nodeID\\\") by a new local variable (of name \\\"nameLocal\\\").\");\n\t\t\tSystem.out.println(\"Usage: AddLocalUnique(Program prog, String system, String nameLocal, String nodeID)\");\n\t\t\tbreak;\n\t\tcase \"DetectReductions\":\n\t\t\tSystem.out.println(\"Description: Detects simple reductions in the program and exposes as reduce expressions.\");\n\t\t\tSystem.out.println(\"Usage: DetectReductions(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"reduceDimVariable\":\n\t\t\tSystem.out.println(\"Description: Use the equalities of the domain of the specified variable in order to reduce its number of dimension.Perform the corresponding change of basis and return the affine function used in this CoB.\");\n\t\t\tSystem.out.println(\"Usage: reduceDimVariable(Program prog, String syst, String varName)\");\n\t\t\tbreak;\n\t\tcase \"alignDimVariable\":\n\t\t\tSystem.out.println(\"Description: Align the bounding box of the domain of a variable with the point vec{0}, by using a translation.Note: might not work if the lower bound is not an affine functionReturn the affine function used to perform the translation.\");\n\t\t\tSystem.out.println(\"Usage: alignDimVariable(Program prog, String syst, String varName)\");\n\t\t\tbreak;\n\t\tcase \"generateScheduledCode\":\n\t\t\tSystem.out.println(\"Description: Generates scheduledC code for a system using the TargetMapping specified for the system.Detailed options can be given through optional argument.\");\n\t\t\tSystem.out.println(\"Usage: generateScheduledCode(Program prog, String system, CodeGenOptions options, String outDir, Boolean genVerifier)\");\n\t\t\tbreak;\n\t\tcase \"generateWriteC\":\n\t\t\tSystem.out.println(\"Description: Generates WriteC code for a system.TargetMapping is ignored except for MemoryMapping given for output variables.Detailed options can be given through optional argument.\");\n\t\t\tSystem.out.println(\"Usage: generateWriteC(Program prog, String system, CodeGenOptions options, String outDir)\");\n\t\t\tbreak;\n\t\tcase \"generateWrapper\":\n\t\t\tSystem.out.println(\"Description: Generates a wrapper code for the given sytem using the specified TargetMapping.\");\n\t\t\tSystem.out.println(\"Usage: generateWrapper(Program prog, String system, CodeGenOptions options, String outDir)\");\n\t\t\tbreak;\n\t\tcase \"generateVerificationCode\":\n\t\t\tSystem.out.println(\"Description: Generates code for verifying generated program. The code is generated using demand-driven code generator (WriteC).\");\n\t\t\tSystem.out.println(\"Usage: generateVerificationCode(Program prog, String system, String outDir)\");\n\t\t\tbreak;\n\t\tcase \"generateMakefile\":\n\t\t\tSystem.out.println(\"Description: Generates Makefile to compile generated code + wrapper.\");\n\t\t\tSystem.out.println(\"Usage: generateMakefile(Program prog, String system, CodeGenOptions CodeGenOptions, String outDir)\");\n\t\t\tbreak;\n\t\tcase \"createCGOptionForWriteC\":\n\t\t\tSystem.out.println(\"Description: Creates instance of CodeGenOptions for WriteC using default values.\");\n\t\t\tSystem.out.println(\"Usage: createCGOptionForWriteC()\");\n\t\t\tbreak;\n\t\tcase \"createCGOptionForScheduledC\":\n\t\t\tSystem.out.println(\"Description: Creates instance of CodeGenOptions for ScheduledC using default values.\");\n\t\t\tSystem.out.println(\"Usage: createCGOptionForScheduledC()\");\n\t\t\tbreak;\n\t\tcase \"createCGOptionForHybridScheduledCGPU\":\n\t\t\tSystem.out.println(\"Description: Creates instance of CodeGenOptions for Hybrid ScheduledC for GPU using dimToInsertChecks to insert checks.\");\n\t\t\tSystem.out.println(\"Usage: createCGOptionForHybridScheduledCGPU(int dimToInsertChecks)\");\n\t\t\tbreak;\n\t\tcase \"createCGOptionForHybridScheduledC\":\n\t\t\tSystem.out.println(\"Description: Creates instance of CodeGenOptions for Hybrid ScheduledC using dimToInsertChecks to insert checks.\");\n\t\t\tSystem.out.println(\"Usage: createCGOptionForHybridScheduledC(int dimToInsertChecks)\");\n\t\t\tbreak;\n\t\tcase \"setCGOptionFlattenArrays\":\n\t\t\tSystem.out.println(\"Description: Specifies true/false (1/0) values for if the multi-dimensional arrays allocated should be flattened to 1D or not.\");\n\t\t\tSystem.out.println(\"Usage: setCGOptionFlattenArrays(CodeGenOptions CGoptions, int flatten)\");\n\t\t\tbreak;\n\t\tcase \"setCGOptionDisableNormalize_depreciated\":\n\t\t\tSystem.out.println(\"Description: Options to skip Normalize before generating code with the ScheduleC code generator.This is an option added as an workaround to scalability problems with Normalize, and will be removed in the future.Not normalizing may lead to significantly inefficient code.\");\n\t\t\tSystem.out.println(\"Usage: setCGOptionDisableNormalize_depreciated(CodeGenOptions options)\");\n\t\t\tbreak;\n\t\tcase \"createTiledCGOptionForScheduledC\":\n\t\t\tSystem.out.println(\"Description: Creates instance of CodeGenOptions for ScheduledC using default values for tiling.\");\n\t\t\tSystem.out.println(\"Usage: createTiledCGOptionForScheduledC()\");\n\t\t\tbreak;\n\t\tcase \"createCGOptionsForPCOT\":\n\t\t\tSystem.out.println(\"Description: Creates instance of CodeGenOptions for PCOTC using default values for tiling.\");\n\t\t\tSystem.out.println(\"Usage: createCGOptionsForPCOT()\");\n\t\t\tbreak;\n\t\tcase \"setTiledCGOptionOptimize\":\n\t\t\tSystem.out.println(\"Description: Applies optimizations to the tiled code generated using full-tile splitting of a selected statement group.Statement group is selected with heuristics that may not be accurate.\");\n\t\t\tSystem.out.println(\"Usage: setTiledCGOptionOptimize(TiledCodeGenOptions options, int optimize)\");\n\t\t\tbreak;\n\t\tcase \"generateScanC\":\n\t\t\tSystem.out.println(\"Description: code generator for a scan subsystem ( a subsystem that contains only scan computations)\");\n\t\t\tSystem.out.println(\"Usage: generateScanC(Program prog, String systemName, CodeGenOptions options, String outDir)\");\n\t\t\tbreak;\n\t\tcase \"generatePCOTCode\":\n\t\t\tSystem.out.println(\"Description: CPU code generator for Polyhedral Cache Oblivious Tiling\");\n\t\t\tSystem.out.println(\"Usage: generatePCOTCode(Program prog, String system, TiledCodeGenOptions options, String outDir, Boolean genVerifier)\");\n\t\t\tbreak;\n\t\tcase \"generateFMPPCode\":\n\t\t\tSystem.out.println(\"Description: generate code using the flattened multi-pass tiling and parallelization strategy\");\n\t\t\tSystem.out.println(\"Usage: generateFMPPCode(Program prog, String systemName, String TilingType, TiledCodeGenOptions CodeGenOptions, String outDir)\");\n\t\t\tbreak;\n\t\tcase \"setVecOptionForTiledC\":\n\t\t\tSystem.out.println(\"Description: Turn on the vectorization option for TiledC. Right now it is only open for DTiler -- Where only 1 level of tiling is applied and all dimensions are tiled.Four types of vectorization strategy is supported: naive, opt nobuff -- optimized vectorization strategy without temporary buffering, all aligned -- optimized vectorization strategy with temporary buffering and all vectors aligned, mostly aligned -- optimized vectorization strategy with temporary buffering and mostly aligned strategy. The default strategy is set to be \\\"opt nobuff\\\".Register block size only corresponds to the data dimensions of stencil computations, the default register block size is set to unroll the innermost vectorized dimension 4 times. \");\n\t\t\tSystem.out.println(\"Usage: setVecOptionForTiledC(TiledCodeGenOptions options, String vecSet, String vecStrategy, String registerBlockSize)\");\n\t\t\tbreak;\n\t\tcase \"setVecVarsForTiledC\":\n\t\t\tSystem.out.println(\"Description: Set the variables for vectorization. All the variable statement must occur under the same innermost loop nest. \");\n\t\t\tSystem.out.println(\"Usage: setVecVarsForTiledC(Program prog, String systemName, TiledCodeGenOptions options, String vars)\");\n\t\t\tbreak;\n\t\tcase \"setVecVarForTiledC\":\n\t\t\tSystem.out.println(\"Usage: setVecVarForTiledC(Program prog, String systemName, TiledCodeGenOptions options, String var, String domain)\");\n\t\t\tbreak;\n\t\tcase \"addRecursionDepthForPCOT\":\n\t\t\tSystem.out.println(\"Description: Generates code with recursion depth as an input parameter.\");\n\t\t\tSystem.out.println(\"Usage: addRecursionDepthForPCOT(TiledCodeGenOptions options)\");\n\t\t\tbreak;\n\t\tcase \"readDomain\":\n\t\t\tSystem.out.println(\"Description: Reads domain in String and returns a Domain object.\");\n\t\t\tSystem.out.println(\"Usage: readDomain(Domain paramDomain, String domain)\");\n\t\t\tbreak;\n\t\tcase \"readFunction\":\n\t\t\tSystem.out.println(\"Description: Reads affine function in String and returns an AffineFunction object.\");\n\t\t\tSystem.out.println(\"Usage: readFunction(Domain paramDomain, String function)\");\n\t\t\tbreak;\n\t\tcase \"inverse\":\n\t\t\tSystem.out.println(\"Description: Compute the inverse of the give affine function.\");\n\t\t\tSystem.out.println(\"Usage: inverse(AffineFunction function)\");\n\t\t\tbreak;\n\t\tcase \"inverseInContext\":\n\t\t\tSystem.out.println(\"Description: Computes inverse of the given affine function, in the context of the given domain.\");\n\t\t\tSystem.out.println(\"Usage: inverseInContext(Domain domain, AffineFunction function)\");\n\t\t\tbreak;\n\t\tcase \"compose\":\n\t\t\tSystem.out.println(\"Description: Returns a function, that computes function2@function1.\");\n\t\t\tSystem.out.println(\"Usage: compose(AffineFunction function1, AffineFunction function2)\");\n\t\t\tbreak;\n\t\tcase \"intersection\":\n\t\t\tSystem.out.println(\"Description: Returns the intersection of two domains given.\");\n\t\t\tSystem.out.println(\"Usage: intersection(Domain domain1, Domain domain2)\");\n\t\t\tbreak;\n\t\tcase \"union\":\n\t\t\tSystem.out.println(\"Description: Returns the union of two domains given.\");\n\t\t\tSystem.out.println(\"Usage: union(Domain domain1, Domain domain2)\");\n\t\t\tbreak;\n\t\tcase \"join\":\n\t\t\tSystem.out.println(\"Description: Returns a function that computes function1@function2.\");\n\t\t\tSystem.out.println(\"Usage: join(AffineFunction function1, AffineFunction function2)\");\n\t\t\tbreak;\n\t\tcase \"isEmpty\":\n\t\t\tSystem.out.println(\"Description: Returns true if the domain is empty.\");\n\t\t\tSystem.out.println(\"Usage: isEmpty(Domain domain)\");\n\t\t\tbreak;\n\t\tcase \"isEquivalent\":\n\t\t\tSystem.out.println(\"Description: Returns true if the two domains/functions given are equivalent.\");\n\t\t\tSystem.out.println(\"Usage: isEquivalent(Domain domainA, Domain domainB)\");\n\t\t\tbreak;\n\t\tcase \"image\":\n\t\t\tSystem.out.println(\"Description: Compute the image of the given domain by the given function.\");\n\t\t\tSystem.out.println(\"Usage: image(AffineFunction function, Domain domain)\");\n\t\t\tbreak;\n\t\tcase \"preImage\":\n\t\t\tSystem.out.println(\"Description: Compute the pre-image of the given domain by the given function.\");\n\t\t\tSystem.out.println(\"Usage: preImage(AffineFunction function, Domain domain)\");\n\t\t\tbreak;\n\t\tcase \"difference\":\n\t\t\tSystem.out.println(\"Description: Returns domainA / domainB.\");\n\t\t\tSystem.out.println(\"Usage: difference(Domain domainA, Domain domainB)\");\n\t\t\tbreak;\n\t\tcase \"simplifyInContext\":\n\t\t\tSystem.out.println(\"Description: Takes domain and context domain, and returns the domain with constraints that are redundant with the context removed.\");\n\t\t\tSystem.out.println(\"Usage: simplifyInContext(Domain domain, Domain context)\");\n\t\t\tbreak;\n\t\tcase \"BuildPRDG\":\n\t\t\tSystem.out.println(\"Description: Constructs a PRDG for the specified AffineSystem. Input variables are excluded from the PRDG default. To override this option, set the optional argument noInput to 0.\");\n\t\t\tSystem.out.println(\"Usage: BuildPRDG(Program prog, String systemName, int noInputs)\");\n\t\t\tbreak;\n\t\tcase \"ExportPRDG\":\n\t\t\tSystem.out.println(\"Description: Exports the given PRDG as a dot file.\");\n\t\t\tSystem.out.println(\"Usage: ExportPRDG(PRDG prdg, String filename)\");\n\t\t\tbreak;\n\t\tcase \"CheckProgram\":\n\t\t\tSystem.out.println(\"Description: Performs uniqueness and completeness check of the program.The program is a valid alphabets program, if it passes this check.Details of the check can be found at url{http://www.cs.colostate.edu/AlphaZ/wiki/doku.php?id=check_program}.\");\n\t\t\tSystem.out.println(\"Usage: CheckProgram(Program prog)\");\n\t\t\tbreak;\n\t\tcase \"VerifyTargetMapping\":\n\t\t\tSystem.out.println(\"Description: Verifies the target mapping given to a system. The third input takes \\\"NONE\\\", \\\"MIN\\\", \\\"MAX\\\" to control the verbosity.\");\n\t\t\tSystem.out.println(\"Usage: VerifyTargetMapping(Program prog, String system, String verbose)\");\n\t\t\tbreak;\n\t\tcase \"CheckSystem\":\n\t\t\tSystem.out.println(\"Description: CheckSystem is CheckProgram applied to the specified system.\");\n\t\t\tSystem.out.println(\"Usage: CheckSystem(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"Farkas1DScheduler\":\n\t\t\tSystem.out.println(\"Description: Farkas mono-dimensional scheduler.\");\n\t\t\tSystem.out.println(\"Usage: Farkas1DScheduler(PRDG prdg)\");\n\t\t\tbreak;\n\t\tcase \"FarkasMDScheduler\":\n\t\t\tSystem.out.println(\"Description: Farkas multi-dimensional scheduler. Uses ISL implementation.\");\n\t\t\tSystem.out.println(\"Usage: FarkasMDScheduler(PRDG prdg)\");\n\t\t\tbreak;\n\t\tcase \"PlutoScheduler\":\n\t\t\tSystem.out.println(\"Description: Pluto scheduler. Uses implementation in ISL.\");\n\t\t\tSystem.out.println(\"Usage: PlutoScheduler(PRDG prdg)\");\n\t\t\tbreak;\n\t\tcase \"setSpaceTimeMap\":\n\t\t\tSystem.out.println(\"Description: Specifies a space time mapping of a variable at a certain level. By default (when there is no value for level), the space-time map is set up for the first level of targetMapping.\");\n\t\t\tSystem.out.println(\"Usage: setSpaceTimeMap(Program prog, String system, int level, String varList, AffineFunction stMap)\");\n\t\t\tbreak;\n\t\tcase \"setMemoryMap\":\n\t\t\tSystem.out.println(\"Description: Specifies a memory map for a variable. Some variables may share the same meory map and memory space, then they can be set up using one command by providing a list of variables. \");\n\t\t\tSystem.out.println(\"Usage: setMemoryMap(Program prog, String system, String varList, String memorySpace, AffineFunction memoryMap, String modFactors)\");\n\t\t\tbreak;\n\t\tcase \"setMemorySpace\":\n\t\t\tSystem.out.println(\"Description: Specifies the memory space for a variable. Normally, each variable has a separate memory space. However, some variables may share the same memory space, and this can be set up once by providing a list of variable.\");\n\t\t\tSystem.out.println(\"Usage: setMemorySpace(Program prog, String system, String space, String varList)\");\n\t\t\tbreak;\n\t\tcase \"setStatementOrdering\":\n\t\t\tSystem.out.println(\"Description: Specifies the ordering of the statements (alphabets variables) in the generated code. This is similar to adding an additional ordering dimensions to the last dimension of space-time mapping, and providing ordering information.AlphaZ provides an alternative to such specification by allowing the user to specify partial orderings between statements.A total order is deduced at the time of code generation.\");\n\t\t\tSystem.out.println(\"Usage: setStatementOrdering(Program prog, String system, String predecessor, String successor)\");\n\t\t\tbreak;\n\t\tcase \"listSpaceTimeMaps\":\n\t\t\tSystem.out.println(\"Description: Lists all SpaceTime maps that have been specified for a system.\");\n\t\t\tSystem.out.println(\"Usage: listSpaceTimeMaps(Program prog, String system, int level)\");\n\t\t\tbreak;\n\t\tcase \"listMemoryMaps\":\n\t\t\tSystem.out.println(\"Description: Lists all memory mappings specified for a system.\");\n\t\t\tSystem.out.println(\"Usage: listMemoryMaps(Program prog, String system)\");\n\t\t\tbreak;\n\t\tcase \"setSchedule\":\n\t\t\tSystem.out.println(\"Description: Applies schedules found by a scheduler (such as Farkas scheduler) to target mapping.\");\n\t\t\tSystem.out.println(\"Usage: setSchedule(Program prog, String system, List<ScheduledStatement> schedules)\");\n\t\t\tbreak;\n\t\tcase \"setParallel\":\n\t\t\tSystem.out.println(\"Description: Specify the parallel dimensions for a system. The nth dimension (specified by parallelDims, start with zero) with the specified ordering prefix to be parallel.\");\n\t\t\tSystem.out.println(\"Usage: setParallel(Program prog, String system, int level, String orderingPrefix, String parallelDims)\");\n\t\t\tbreak;\n\t\tcase \"CreateSpaceTimeLevel\":\n\t\t\tSystem.out.println(\"Description: Create a spacetimelevel data stucture for level (level)\");\n\t\t\tSystem.out.println(\"Usage: CreateSpaceTimeLevel(Program prog, String system, int level)\");\n\t\t\tbreak;\n\t\tcase \"setOrderingDimensions\":\n\t\t\tSystem.out.println(\"Description: specify which dimension is the ordering dimension for each level of the targetMapping. Dimension starts with zero. If no value is specified for the targetMapping level, it is the first level by default. \");\n\t\t\tSystem.out.println(\"Usage: setOrderingDimensions(Program prog, String system, int level, String dims)\");\n\t\t\tbreak;\n\t\tcase \"setSpaceTimeMapForMemoryAllocation\":\n\t\t\tSystem.out.println(\"Description: set space time map for the memory allocation statement for the input/output of the use equation.isInput -- 0: for nTh input of the use equaitonisInput -- 1: for nTh output of the use equation\");\n\t\t\tSystem.out.println(\"Usage: setSpaceTimeMapForMemoryAllocation(Program prog, String system, String label, int isInput, int num, AffineFunction stMap)\");\n\t\t\tbreak;\n\t\tcase \"setSpaceTimeMapForValueCopy\":\n\t\t\tSystem.out.println(\"Description: set the space time map for the value copy statement for input/output of a use equation\");\n\t\t\tSystem.out.println(\"Usage: setSpaceTimeMapForValueCopy(Program prog, String system, String label, int isInput, int num, AffineFunction stMap)\");\n\t\t\tbreak;\n\t\tcase \"setSpaceTimeMapForMemoryFree\":\n\t\t\tSystem.out.println(\"Description: set the space time map for the memory free statement for the input/ouput of a useEquation.isInput -- 0, for the input of the useEquationisInput -- 1, for the output of the useEquation\");\n\t\t\tSystem.out.println(\"Usage: setSpaceTimeMapForMemoryFree(Program prog, String system, String label, int isInput, int num, AffineFunction stMap)\");\n\t\t\tbreak;\n\t\tcase \"setSpaceTimeMapForUseEquationOptimization\":\n\t\t\tSystem.out.println(\"Description: set the space time map for the memory allocation, value copy, memory allocation statement for the input/output of the useEuqation.isInput -- 0: for the input of the useEquationisInput -- 1: for the output of the useEquation\");\n\t\t\tSystem.out.println(\"Usage: setSpaceTimeMapForUseEquationOptimization(Program prog, String system, String label, int isInput, int num, AffineFunction stMapForMemoryAllocation, AffineFunction stMapForValueCopy, AffineFunction stMapForMemoryFree)\");\n\t\t\tbreak;\n\t\tcase \"setMemorySpaceForUseEquationOptimization\":\n\t\t\tSystem.out.println(\"Description: set memory space for the input/ouput of the useEquation\");\n\t\t\tSystem.out.println(\"Usage: setMemorySpaceForUseEquationOptimization(Program prog, String system, String label, int isInput, int num, String spaceName)\");\n\t\t\tbreak;\n\t\tcase \"setBandForTiling\":\n\t\t\tSystem.out.println(\"Description: configure a band of continuous dimensions for tiling.\");\n\t\t\tSystem.out.println(\"Usage: setBandForTiling(Program prog, String system, String bandName, int levels, String orderingPrefix, int startDim, int endDim)\");\n\t\t\tbreak;\n\t\tcase \"setSubTilingWithinBand\":\n\t\t\tSystem.out.println(\"Description: Configure the subtiling specification for a band. The band is identified by the name. There are two types of tiling type: sequential and openmp wavefront. Represented with \\\"sequential\\\" and \\\"wavefront\\\" separately.\");\n\t\t\tSystem.out.println(\"Usage: setSubTilingWithinBand(Program prog, String system, String bandName, int level, int startDim, int endDim, String tilingType)\");\n\t\t\tbreak;\n\t\tcase \"setDefaultDTilerConfiguration\":\n\t\t\tSystem.out.println(\"Description: Set up the default configuration for dtiler: apply parametric one level tiling to all the dimensions from [start to end].\");\n\t\t\tSystem.out.println(\"Usage: setDefaultDTilerConfiguration(Program prog, String system, int startDim, int endDim, String tilingType)\");\n\t\t\tbreak;\n\t\tcase \"history\":\n\t\t\tSystem.out.println(\"Description: Print out command history so far.\");\n\t\t\tSystem.out.println(\"Usage: history()\");\n\t\t\tSystem.out.println(\"Usage: history(int n)\");\n\t\t\tbreak;\n\t\tcase \"searchHistory\":\n\t\t\tSystem.out.println(\"Description: Search History for a particular pattern - can be a regex.\");\n\t\t\tSystem.out.println(\"Usage: searchHistory(String pattern)\");\n\t\t\tbreak;\n\t\tcase \"undo\":\n\t\t\tSystem.out.println(\"Descrgiption: Undo n times, default 1.\");\n\t\t\tSystem.out.println(\"Usage: undo()\");\n\t\t\tSystem.out.println(\"Usage: undo(int n)\");\n\t\t\tbreak;\n\t\tcase \"redo\":\n\t\t\tSystem.out.println(\"Descrgiption: Redo n times, default 1.\");\n\t\t\tSystem.out.println(\"Usage: redo()\");\n\t\t\tSystem.out.println(\"Usage: redo(int n)\");\n\t\t\tbreak;\n\t\tcase \"printTransform\":\n\t\t\tSystem.out.println(\"Description: Print the effective transformation carried out on the program so far, after a long sequence of actions.\");\n\t\t\tSystem.out.println(\"Usage: printTransform()\");\n\t\t\tbreak;\n\t\tcase \"delVar\":\n\t\t\tSystem.out.println(\"Description: Removes variable from context. If you ask to remove program from context, it's undo/redo history will also be erased.\");\n\t\t\tSystem.out.println(\"Usage: delVar(String varName)\");\n\t\t\tbreak;\n\t\tcase \"clear\":\n\t\t\tSystem.out.println(\"Description: Clears the symbol table, program, and undo/redo history\");\n\t\t\tSystem.out.println(\"Usage: clear()\");\n\t\t\tbreak;\n\t\tcase \"help\":\n\t\t\tSystem.out.println(\"Description: Prints help messages for commands.\");\n\t\t\tSystem.out.println(\"Usage: help(String funcName)\");\n\t\t\tbreak;\n\t\tdefault:\n\t\t\tSystem.out.println(\"No relevant documentation found\");\n\t\t}\n\t}", "public void method_123(ahb var1, Random var2, int var3, int var4, int var5) {\r\n String[] var10000 = class_752.method_4253();\r\n int var7 = 0;\r\n String[] var6 = var10000;\r\n\r\n while(var7 < 128) {\r\n int var8 = var3;\r\n int var9 = var4 + 1;\r\n int var10 = var5;\r\n int var11 = 0;\r\n\r\n label74: {\r\n label73: {\r\n aji var16;\r\n while(true) {\r\n if(var11 < var7 / 16) {\r\n var8 += var2.nextInt(3) - 1;\r\n var9 += (var2.nextInt(3) - 1) * var2.nextInt(3) / 2;\r\n var10 += var2.nextInt(3) - 1;\r\n if(var6 == null) {\r\n break label74;\r\n }\r\n\r\n var16 = var1.getBlock(var8, var9 - 1, var10);\r\n if(var6 == null) {\r\n break;\r\n }\r\n\r\n if(var16 != class_1192.field_6027 || var1.getBlock(var8, var9, var10).method_2433() && var6 != null) {\r\n break label73;\r\n }\r\n\r\n ++var11;\r\n if(var6 != null) {\r\n continue;\r\n }\r\n }\r\n\r\n var16 = var1.getBlock(var8, var9, var10);\r\n break;\r\n }\r\n\r\n if(var16.field_2007 == awt.field_4170) {\r\n label83: {\r\n int var17;\r\n label84: {\r\n var17 = var2.nextInt(8);\r\n if(var6 != null) {\r\n if(var17 == 0) {\r\n break label84;\r\n }\r\n\r\n var17 = class_1192.field_6058.method_2505(var1, var8, var9, var10);\r\n }\r\n\r\n if(var6 != null) {\r\n if(var17 == 0) {\r\n break label83;\r\n }\r\n\r\n var1.method_2054(var8, var9, var10, class_1192.field_6058, 1, 3);\r\n }\r\n\r\n if(var6 != null) {\r\n break label83;\r\n }\r\n }\r\n\r\n String var15 = var1.method_35(var8, var10).method_5698(var2, var8, var9, var10);\r\n Logger var18 = field_2128;\r\n StringBuilder var10001 = new StringBuilder();\r\n String[] var14 = field_2132;\r\n var18.debug(var10001.append(\"Flower in \").append(var1.method_35(var8, var10).field_5031).append(\": \").append(var15).toString());\r\n class_447 var12 = class_447.method_2774(var15);\r\n if(var6 == null) {\r\n break label74;\r\n }\r\n\r\n if(var12 != null) {\r\n label40: {\r\n var17 = var12.method_2505(var1, var8, var9, var10);\r\n if(var6 != null) {\r\n if(var17 == 0) {\r\n break label40;\r\n }\r\n\r\n var17 = class_447.method_2775(var15);\r\n }\r\n\r\n int var13 = var17;\r\n var1.method_2054(var8, var9, var10, var12, var13, 3);\r\n }\r\n }\r\n }\r\n }\r\n }\r\n\r\n ++var7;\r\n }\r\n\r\n if(var6 == null) {\r\n break;\r\n }\r\n }\r\n\r\n }", "void mo119582b();", "private void kk12() {\n\n\t}", "void mo21073d();", "void mo21074e();", "void mo67920a();", "void m21();", "static void q7(){\n\t}", "public void method_2461(ahb var1, int var2, int var3, int var4) {\r\n String[] var5 = class_752.method_4253();\r\n boolean var10000 = var1.field_1832;\r\n if(var5 != null) {\r\n if(var1.field_1832) {\r\n return;\r\n }\r\n\r\n var10000 = this.field_2120;\r\n }\r\n\r\n if(var5 != null) {\r\n label38: {\r\n if(var10000) {\r\n var10000 = var1.method_2172(var2, var3, var4);\r\n if(var5 == null) {\r\n break label38;\r\n }\r\n\r\n if(!var10000) {\r\n var1.method_2110(var2, var3, var4, this, 4);\r\n if(var5 != null) {\r\n return;\r\n }\r\n }\r\n }\r\n\r\n var10000 = this.field_2120;\r\n }\r\n }\r\n\r\n if(var5 != null) {\r\n if(var10000) {\r\n return;\r\n }\r\n\r\n var10000 = var1.method_2172(var2, var3, var4);\r\n }\r\n\r\n if(var5 != null && var10000) {\r\n var1.method_2054(var2, var3, var4, class_1192.field_6148, 0, 2);\r\n }\r\n\r\n }", "void mo54435d();", "@Override\r\n\t\t\tpublic void func02() {\n\t\t\t\t\r\n\t\t\t}", "void mo57278c();", "void mo67923b();", "public static void main(String[] args) {\n System.out.println(display1());\n System.out.println(display2());\n System.out.println(display3());\n System.out.println(display4());\n \n //Calling Method Way 2\n System.out.println(\"=============Way 2\");\n int m1 = display1();\n System.out.println(\"M1: \"+m1);\n int m2 = display2();\n System.out.println(\"M2: \"+m2);\n int m3 = display3();\n System.out.println(\"M3: \"+m3);\n int m4 = display4();\n System.out.println(\"M4: \"+m4);\n \n //Calling Method Way 3\n System.out.println(\"=============Way 3\");\n //Make a Object of Class MethodEx2:\n MethodEx2 m = new MethodEx2();\n System.out.println(\"Method1: \"+m.display1());\n System.out.println(\"Method1: \"+m.display2());\n System.out.println(\"Method1: \"+m.display3());\n System.out.println(\"Method1: \"+m.display4());\n \n }", "private void raceFormat()\n {\n topLine();\n secondLine();\n thirdLine();\n fourthLine();\n }", "void mo9693a();", "void mo1637a();", "public static void main(String[] args) {\n\t\ttest1();\r\n\t\ttest2();\r\n\t\t\r\n\t}", "public static void main(String[] args) {\n System.out.println(\"Start of code\");\r\n\t\t\r\n\t\tmyAdd();\r\n\t\tmyAdd();\r\n\t\tmyAdd();\r\n\t\tmyMultiple(15,23);\r\n\t\tmyMultiple(15,22);\r\n\t\t\r\n\t\tint a= myDivision(100,5);\r\n\t\tSystem.out.println(\"Value of s is \"+a);\r\n\t\t\r\n\t\tint b= myDivision(100,15);\r\n\t\tSystem.out.println(\"Value of s is \"+b);\r\n \r\n\t\tSystem.out.println(\"End of code\");\r\n\t}", "void mo57277b();", "private void level6() {\n }", "public static void main(String[] args) {\n Part2_2 part2_2 = new Part2_2();\n part2_2.testHowMany();\n Part2_3 part_23 = new Part2_3();\n part_23.testHowManyGenes();\n Part3_1 part3_1 = new Part3_1();\n part3_1.testCgRatio();\n }", "void mo17012c();" ]
[ "0.6403578", "0.59849566", "0.59798616", "0.5956061", "0.5951288", "0.5895583", "0.58178043", "0.5816467", "0.58143467", "0.58024484", "0.5788157", "0.5766468", "0.5730775", "0.57051617", "0.5703032", "0.56861204", "0.56753016", "0.56117123", "0.5583844", "0.55562216", "0.55164415", "0.550161", "0.547589", "0.5474426", "0.5471285", "0.5465954", "0.5462208", "0.5461153", "0.54507", "0.5450637", "0.5424001", "0.5408862", "0.5405523", "0.5395551", "0.53911215", "0.53665495", "0.5364077", "0.5363738", "0.53621316", "0.53618807", "0.5355739", "0.5352405", "0.5352405", "0.53257376", "0.53257376", "0.5324701", "0.5320668", "0.5320272", "0.5317885", "0.5316001", "0.52994823", "0.52957875", "0.52954143", "0.5294176", "0.52866733", "0.5280563", "0.5278493", "0.5270842", "0.52708244", "0.52661353", "0.5260105", "0.52549255", "0.5252166", "0.52507555", "0.5250319", "0.5250171", "0.5249507", "0.52486885", "0.5247325", "0.52460706", "0.52377033", "0.5234678", "0.5223922", "0.52238333", "0.5220081", "0.52194035", "0.52138233", "0.5207176", "0.52062464", "0.52058095", "0.5203951", "0.5202304", "0.5197489", "0.5195881", "0.5194774", "0.5190819", "0.51822615", "0.5181578", "0.51791966", "0.51788145", "0.5178742", "0.51753205", "0.5174704", "0.51712406", "0.5170155", "0.51698947", "0.5166585", "0.51654834", "0.51649237", "0.5160209" ]
0.662386
0
String url = " Git.clone(url , false, "derby", baseFolderPath, "10.9");
public static void main(String[] args) throws FileNotFoundException, IOException, InterruptedException { ArrayList<Metric> metrics = new ArrayList<Metric>(); metrics.add(new ELOC()); metrics.add(new NOPA()); metrics.add(new NMNOPARAM()); MyClassifier c1 = new MyClassifier("Logistic Regression"); c1.setClassifier(new Logistic()); String type = "CodeSmellDetection"; String smell = "Large Class"; Model model = new Model("antModel1", "ant", "https://github.com/apache/ant.git", metrics, c1, "", type, smell); Process process = new Process(); String periodLength = "All"; String version = "rel/1.8.3"; String projectName = model.getProjName(); process.initGitRepositoryFromFile(scatteringFolderPath + "/" + projectName + "/gitRepository.data"); try { DeveloperTreeManager.calculateDeveloperTrees(process.getGitRepository() .getCommits(), periodLength); DeveloperFITreeManager.calculateDeveloperTrees(process.getGitRepository() .getCommits(), periodLength); } catch (Exception ex) { Logger.getLogger(TestFile.class.getName()).log(Level.SEVERE, null, ex); } List<Commit> commits = process.getGitRepository().getCommits(); PeriodManager.calculatePeriods(commits, periodLength); List<Period> periods = PeriodManager.getList(); String dirPath = Config.baseDir + projectName + "/models/" + model.getName(); Files.createDirectories(Paths.get(dirPath)); for (Period p : periods) { File periodData = new File(dirPath + "/predictors.csv"); PrintWriter pw1 = new PrintWriter(periodData); String message1 = "nome,"; for(Metric m : metrics) { message1 += m.getNome() + ","; } message1 += "isSmell\n"; pw1.write(message1); //String baseSmellPatch = "C:/ProgettoTirocinio/dataset/apache-ant-data/apache_1.8.3/Validated"; CalculateSmellFiles cs = new CalculateSmellFiles(model.getProjName(), "Large Class", "1.8.1"); List<FileBean> smellClasses = cs.getSmellClasses(); String projectPath = baseFolderPath + projectName; Git.gitReset(new File(projectPath)); Git.clean(new File(projectPath)); List<FileBean> repoFiles = Git.gitList(new File(projectPath), version); System.out.println("Repo size: "+repoFiles.size()); for (FileBean file : repoFiles) { if (file.getPath().contains(".java")) { File workTreeFile = new File(projectPath + "/" + file.getPath()); ClassBean classBean = null; if (workTreeFile.exists()) { ArrayList<ClassBean> code = new ArrayList<>(); ArrayList<ClassBean> classes = ReadSourceCode.readSourceCode(workTreeFile, code); String body = file.getPath() + ","; if (classes.size() > 0) { classBean = classes.get(0); } for(Metric m : metrics) { try{ body += m.getValue(classBean, classes, null, null, null, null) + ","; } catch(NullPointerException e) { body += "0.0,"; } } //isSmell boolean isSmell = false; for(FileBean sm : smellClasses) { if(file.getPath().contains(sm.getPath())) { System.out.println("ok"); isSmell = true; break; } } body = body + isSmell + "\n"; pw1.write(body); } } } Git.gitReset(new File(projectPath)); pw1.flush(); } WekaEvaluator we1 = new WekaEvaluator(baseFolderPath, projectName, new Logistic(), "Logistic Regression", model.getName()); ArrayList<Model> models = new ArrayList<Model>(); models.add(model); System.out.println(models); //create a project Project p1 = new Project("https://github.com/apache/ant.git"); p1.setModels(models); p1.setName("ant"); p1.setVersion(version); ArrayList<Project> projects; //projects.add(p1); //create a file // try { // File f = new File(Config.baseDir + "projects.txt"); // FileOutputStream fileOut; // if(f.exists()){ // projects = ProjectHandler.getAllProjects(); // Files.delete(Paths.get(Config.baseDir + "projects.txt")); // //fileOut = new FileOutputStream(f, true); // } else { // projects = new ArrayList<Project>(); // Files.createFile(Paths.get(Config.baseDir + "projects.txt")); // } // fileOut = new FileOutputStream(f); // projects.add(p1); // ObjectOutputStream out = new ObjectOutputStream(fileOut); // out.writeObject(projects); // out.close(); // fileOut.close(); // // } catch (FileNotFoundException e) { // e.printStackTrace(); // } catch (IOException e) { // e.printStackTrace(); // } // ProjectHandler.setCurrentProject(p1); // Project curr = ProjectHandler.getCurrentProject(); // System.out.println(curr.getGitURL()+" --- "+curr.getModels()); // ArrayList<Project> projectest = ProjectHandler.getAllProjects(); // for(Project testp : projectest){ // System.out.println(testp.getModels()); // } }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "String repoUrl();", "Git getGit();", "public String getRepoUrl() {\n return \"ssh://git@\" + host() + \":\" + port() + REPO_DIR;\n }", "public static void repoClone() throws IOException, InvalidRemoteException, TransportException, GitAPIException {\n\t\tFile localPath = new File(\"testRuby\");\n\t\tboolean directoryExist = localPath.exists();\n\t\tlocalPath.delete();\n\t\t// then clone\n\t\tSystem.out.println(\"Cloning from \" + REMOTE_URL + \" to \" + localPath);\n\t\tFileRepositoryBuilder builder = new FileRepositoryBuilder();\n\t\tRepository repository = builder.setWorkTree(localPath).readEnvironment().build();\n\t\tGit git = new Git(repository);\n\t\tif (!directoryExist) {\n\t\t\ttry (Git result = git.cloneRepository().setURI(REMOTE_URL).setDirectory(localPath).call()) {\n\t\t\t\t// Note: the call() returns an opened repository already which\n\t\t\t\t// needs to be closed to avoid file handle leaks!\n\t\t\t\tSystem.out.println(\"Having repository: \" + result.getRepository().getDirectory());\n\t\t\t}\n\t\t} else {\n\t\t\tPullResult pullresult=git.pull().call();\n\t\t\t// Note: the call() returns an opened repository already which needs\n\t\t\t// to be closed to avoid file handle leaks!\n\t\t\tSystem.out.println(\"pulled repository: \" + pullresult.isSuccessful());\n\n\t\t}\n\t}", "public String getCloneUrl( )\n {\n return _strCloneUrl;\n }", "void clone(RemoteConfig source) throws GitException, InterruptedException;", "String getSourceRepoUrl();", "VcsRepositoryUrl getCloneRepositoryUrl(String projectKey, String repositorySlug);", "String getRemoteUrl(String name, String GIT_DIR) throws GitException, InterruptedException;", "public static String getCloneURL(@NotNull JSONObject jsonObject) {\n return jsonObject.getJSONObject(\"repository\").get(\"clone_url\").toString();\n }", "public void setCloneUrl( String _strCloneUrl )\n {\n this._strCloneUrl = _strCloneUrl;\n }", "private String getCodeRepo() throws Exception {\n\t\tObject[] options = { \"Local Git Repository\", \"Github URI\" };\n\n\t\tJFrame frame = new JFrame();\n\t\tint selection = JOptionPane.showOptionDialog(frame,\n\t\t\t\t\"Please select your type of codebase\", \"GalacticTBA\",\n\t\t\t\tJOptionPane.YES_NO_OPTION, JOptionPane.QUESTION_MESSAGE, null,\n\t\t\t\toptions, options[0]);\n\n\t\tif (selection == 1) {\n\t\t\tfolderName = \"cpsc410_\" + new Date().getTime();\n\t\t\tString baseDir = getCodeRoot(true);\n\n\t\t\tString githubURI = (String) JOptionPane.showInputDialog(frame,\n\t\t\t\t\t\"Galactic TBA:\\n\" + \"Please enter Github URI\",\n\t\t\t\t\t\"Galactic TBA\", JOptionPane.PLAIN_MESSAGE, null, null,\n\t\t\t\t\tnull);\n\n\t\t\tString dir = System.getProperty(\"user.dir\");\n\t\t\tProcess p;\n\t\t\tif (isOSWindows) {\n\t\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\t\"cmd /C \" + dir + \"\\\\scripts\\\\gitclone.sh \" + githubURI\n\t\t\t\t\t\t\t\t+ \" \" + baseDir + \"\\\\\" + folderName);\n\t\t\t} else {\n\t\t\t\tp = Runtime.getRuntime().exec(\n\t\t\t\t\t\tdir + \"/scripts/gitclone.sh \" + folderName + \"/\"\n\t\t\t\t\t\t\t\t+ baseDir);\n\t\t\t}\n\t\t\tBufferedReader in = new BufferedReader(new InputStreamReader(\n\t\t\t\t\tp.getInputStream()));\n\n\t\t\twhile (in.readLine() != null) {\n\t\t\t\tThread.sleep(1000);\n\t\t\t}\n\t\t\tin.close();\n\t\t\treturn baseDir + \"\\\\\" + folderName;\n\t\t} else if (selection != 0) {\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\treturn getCodeRoot(false);\n\t}", "String getSubmoduleUrl(String name) throws GitException, InterruptedException;", "VcsRepositoryUrl copyRepository(String sourceProjectKey, String sourceRepositoryName, String targetProjectKey, String targetRepositoryName) throws VersionControlException;", "GitRemote(String aName) { _name = aName; }", "public void gitThis(){\n\t}", "public static void main(String[] args) {\nSystem.out.println(\"day one example how to use git\");\r\n\t}", "void fetch() throws GitException, InterruptedException;", "private HelloGitUtil(){\n\t}", "public GitDir(WebFile aGitDir) { _gdir = aGitDir; }", "public RepositoryConfig copyWithUrl(String url) {\n RepositoryConfig newConfig = GsonUtil.cloneGsonObject(this);\n newConfig.url = url;\n return newConfig;\n }", "public GitRemote getRemote() { return getRemote(\"origin\"); }", "GitBlob(RevBlob aRB, String aPath) { _rev = aRB; _path = aPath; }", "BrainTreeCloneTransactionResult cloneTransaction(BrainTreeCloneTransactionRequest request);", "public CompletableFuture<CloneResponse> clone(CloneRequest request) throws IOException {\n\t\treturn this.transport.performRequestAsync(request, CloneRequest.ENDPOINT, this.requestOptions);\n\t}", "public GitBranch(String aName) { _name = aName; }", "void fetch(String repository, String refspec) throws GitException, InterruptedException;", "@FXML\n private void git(MouseEvent event) throws URISyntaxException, IOException {\n Desktop desktop = Desktop.getDesktop();\n desktop.browse(new URI(\"https://github.com/ashMohseni\"));\n }", "public String getRepoURL() {\n return repoURL;\n }", "WithCreate withRepoUrl(String repoUrl);", "void setRemoteUrl(String name, String url, String GIT_DIR) throws GitException, InterruptedException;", "GitTree(RevTree aRT, String aPath) { _rev = aRT; _path = aPath; }", "public static void main(String[] args) {\n\t\tString myUrl = \"http://github.com/abhi20aug\";\n\t\ttry {\n\t\t\tURL newUrl = new URL(myUrl);\n\t\t\tSystem.out.println(\"simple url\"+newUrl.toString());\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n\t\t\n\t\t\n\t}", "String getRepositoryPath(String name);", "public GitRemote getRemote(String aName) { return new GitRemote(aName); }", "String getRepositorySlugFromUrl(URL repositoryUrl) throws VersionControlException;", "public GitFileSite(GitCommit aGC) { _cmt = aGC; setURL(createURL()); }", "public Object clone()\n {\n try {\n Object newObj = super.clone();\n ((LDAPUrl)newObj).url = (com.github.terefang.jldap.ldap.LDAPUrl)this.url.clone();\n return newObj;\n } catch( CloneNotSupportedException ce) {\n throw new RuntimeException(\"Internal error, cannot create clone\");\n }\n }", "public RepositoryConfig copyWithBranch(String branch) {\n RepositoryConfig newConfig = GsonUtil.cloneGsonObject(this);\n newConfig.branch = branch;\n return newConfig;\n }", "GitCommit(RevCommit anRC) { _rev = anRC; }", "public Path getRemoteRepositoryBaseDir();", "public void fetch(TaskMonitor aTM) throws Exception\n{\n // Do fetch\n Git git = getGit();\n FetchCommand fetch = git.fetch();\n if(getCD()!=null) fetch.setCredentialsProvider(getCD());\n if(aTM!=null) fetch.setProgressMonitor(getProgressMonitor(aTM));\n fetch.call();\n \n // Refresh files\n //getRootDir().refresh();\n}", "String getRepositoryPath();", "private void checkout(){\n Scanner input = new Scanner(System.in);\n System.out.println(\"checkout commit : \");\n System.out.println(\"masukan nama commit : \"); // nama commit bukan kode hash\n String value = input.nextLine();\n \n // overwrite file commit ke file-untuk-git\n overWriteFile(\"file-untuk-git\", value + \".txt\", false);\n \n \n }", "Response head(String repoName, String repoPath, UriInfo baseURI);", "void setSubmoduleUrl(String name, String url) throws GitException, InterruptedException;", "public GitRef getHead() { return getRef(Constants.HEAD); }", "public Git cloneJobRepository(File tempDirPath, CredentialsProvider credentialsProvider) throws GitAPIException {\n File jobsRepository = new File(tempDirPath, REPOSITORY);\n return Git.cloneRepository()\n .setURI(gitDataJobsUrl)\n .setBranch(gitDataJobsBranch)\n .setRemote(gitDataJobsRemote)\n .setDirectory(jobsRepository)\n .setCredentialsProvider(credentialsProvider)\n .call();\n }", "public URL createBitbucketProjUrl (String repoRootURL, String bitBucketProjName) {\n \ttry {\n\t\t\turl = new URL(repoRootURL+\"/rest/api/1.0/projects/\"+bitBucketProjName+\"/repos\");\n\t\t} catch (MalformedURLException e) {\n\t\t\t// TODO Auto-generated catch block\n\t\t\te.printStackTrace();\n\t\t}\n \treturn url;\n\t}", "String getRepositoryName(URL repositoryUrl);", "public static void main(String[] args) {\nSystem.out.println(\"This is for git\");\n\t}", "public String getBaseRepositoryUrl() {\n\t\treturn baseRepositoryUrl;\n\t}", "public void push(TaskMonitor aTM) throws Exception\n{\n // Get repository and git\n Git git = getGit();\n \n // Get push\n PushCommand push = git.push();\n push.setProgressMonitor(getProgressMonitor(aTM));\n if(getCD()!=null) push.setCredentialsProvider(getCD());\n for(PushResult pr : push.call())\n System.out.println(\"Pushed: \" + pr);\n}", "Object clone();", "Object clone();", "public void getGitUrlWithAutoInit(@Nonnull final ProjectDescriptor project, final AsyncCallback<String> callback) {\n if (!GitRepositoryInitializer.isGitRepository(project)) {\n initGitRepository(project, new AsyncCallback<Void>() {\n @Override\n public void onSuccess(Void result) {\n Notification notification = new Notification(gitLocale.initSuccess(), Notification.Type.INFO);\n notificationManager.showNotification(notification);\n getGitUrlWithAutoInit(appContext.getCurrentProject().getRootProject(), callback);\n }\n\n @Override\n public void onFailure(Throwable throwable) {\n callback.onFailure(throwable);\n }\n });\n\n return;\n }\n\n gitService.getGitReadOnlyUrl(project,\n new AsyncRequestCallback<String>(new StringUnmarshaller()) {\n @Override\n protected void onSuccess(String result) {\n callback.onSuccess(result);\n }\n\n @Override\n protected void onFailure(Throwable exception) {\n callback.onFailure(exception);\n }\n });\n }", "public static GitInfo readURL(BufferedReader url){\n\t\treturn (new Gson()).fromJson(url, GitInfo.class);\n\n\t}", "Component deepClone();", "@Override\n public String doPackageDownloadUrlFor(PackageURL purl) {\n StringBuffer sb = new StringBuffer(this.repoBaseUrl);\n sb.append(\"source/\");\n sb.append(purl.getName().substring(0, 1)).append(\"/\");\n sb.append(purl.getName()).append(\"/\");\n sb.append(purl.getName()).append(\"-\");\n sb.append(purl.getVersion()).append(\".tar.gz\");\n\n return sb.toString();\n }", "public void createURL(){\n urlDB = ( PREFACE + server + \"/\" + database + options);\n }", "public Object clone()\n/* */ {\n/* 835 */ return super.clone();\n/* */ }", "String getWorkfileRevisionString();", "public BinaryContent createClone(BinaryContent t)\r\n\t{\n\t\treturn null;\r\n\t}", "@Test\n public void testProjectNameWithGitExtension()\n throws AuthorCommitsFailedException, IOException{\n EasyMock.expect(mockManager.openRepository(new Project.NameKey(\"trial\")))\n .andReturn(\n RepositoryCache.open(FileKey.lenient(new File(\n \"../../review_site/git\", \"trial.git\"), FS.DETECTED)));\n EasyMock.expect(mockUser.getCapabilities()).andReturn(mockCapability);\n EasyMock.expect(mockCapability.canListAuthorCommits()).andReturn(true);\n replay(mockUser, mockCapability, mockManager);\n List<CommitInfo> expected = new LinkedList<CommitInfo>();\n CommitInfo ex = new CommitInfo();\n ex.setId(\"ede945e22cba9203ce8a0aae1409e50d36b3db72\");\n ex.setAuth(\"Keerath Jaggi <keerath.jaggi@gmail.com> 1401771779 +0530\");\n ex.setMsg(\"init commit\\n\");\n ex.setDate(\"Tue Jun 03 10:32:59 IST 2014\");\n expected.add(ex);\n cmd_test.setCommits(new Project.NameKey(\"trial.git\"), \"kee\");\n assertEquals(expected, cmd_test.getCommits());\n }", "public abstract Object clone() ;", "public static void main(String[] args) {\nSystem.out.println(\"this is git learing \");\n\t}", "static BvcrVersionManager getRepository(BvcrProject bp,File srcdir)\n{\n if (srcdir == null) return null;\n\n File f1 = new File(srcdir,\"CVS\");\n if (f1.exists() && f1.isDirectory()) {\n System.err.println(\"BVCR: HANDLE CVS REPOSITORY \" + srcdir);\n return new BvcrVersionCVS(bp);\n }\n\n return null;\n}", "public Gitlet getMyGit(){\n\t\treturn myGit;\n\t}", "@FXML\n private void copyUrl() {\n final Clipboard clipboard = Clipboard.getSystemClipboard();\n final ClipboardContent url = new ClipboardContent();\n url.putString(HELP_URL);\n clipboard.setContent(url);\n }", "String backup(String request) throws RemoteException;", "public static String gitRemoteURL(String repoDir, String remoteName) throws Exception {\n String s = exec(\"git remote get-url \" + remoteName, repoDir).trim();\n if (s.isEmpty()) {\n throw new Exception(\"no such remote\");\n }\n return s;\n }", "public static void main(String[] args) throws Exception {\n\t\t\n\t\tGitHub github = GitHub.connectUsingPassword(\"shashankmjain\", \"welcome1\");\n\t\t\n\t\tGHRepository repo=github.getRepository(\"twitter/algebird\");\n\t\t\n\t\tMap branches=repo.getBranches();\n\t\t\n\t\t\n\t\t\n\t\tSystem.out.println(branches);\n\t\t\n\n\t}", "private void pull(FederationModel registration) throws Exception {\n\t\tMap<String, RepositoryModel> repositories = FederationUtils.getRepositories(registration,\n\t\t\t\ttrue);\n\t\tString registrationFolder = registration.folder.toLowerCase().trim();\n\t\t// confirm valid characters in server alias\n\t\tCharacter c = StringUtils.findInvalidCharacter(registrationFolder);\n\t\tif (c != null) {\n\t\t\tlogger.error(MessageFormat\n\t\t\t\t\t.format(\"Illegal character ''{0}'' in folder name ''{1}'' of federation registration {2}!\",\n\t\t\t\t\t\t\tc, registrationFolder, registration.name));\n\t\t\treturn;\n\t\t}\n\t\tFile repositoriesFolder = gitblit.getRepositoriesFolder();\n\t\tFile registrationFolderFile = new File(repositoriesFolder, registrationFolder);\n\t\tregistrationFolderFile.mkdirs();\n\n\t\t// Clone/Pull the repository\n\t\tfor (Map.Entry<String, RepositoryModel> entry : repositories.entrySet()) {\n\t\t\tString cloneUrl = entry.getKey();\n\t\t\tRepositoryModel repository = entry.getValue();\n\t\t\tif (!repository.hasCommits) {\n\t\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\t\"Skipping federated repository {0} from {1} @ {2}. Repository is EMPTY.\",\n\t\t\t\t\t\trepository.name, registration.name, registration.url));\n\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.SKIPPED);\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\t// Determine local repository name\n\t\t\tString repositoryName;\n\t\t\tif (StringUtils.isEmpty(registrationFolder)) {\n\t\t\t\trepositoryName = repository.name;\n\t\t\t} else {\n\t\t\t\trepositoryName = registrationFolder + \"/\" + repository.name;\n\t\t\t}\n\n\t\t\tif (registration.bare) {\n\t\t\t\t// bare repository, ensure .git suffix\n\t\t\t\tif (!repositoryName.toLowerCase().endsWith(DOT_GIT_EXT)) {\n\t\t\t\t\trepositoryName += DOT_GIT_EXT;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\t// normal repository, strip .git suffix\n\t\t\t\tif (repositoryName.toLowerCase().endsWith(DOT_GIT_EXT)) {\n\t\t\t\t\trepositoryName = repositoryName.substring(0,\n\t\t\t\t\t\t\trepositoryName.indexOf(DOT_GIT_EXT));\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// confirm that the origin of any pre-existing repository matches\n\t\t\t// the clone url\n\t\t\tString fetchHead = null;\n\t\t\tRepository existingRepository = gitblit.getRepository(repositoryName);\n\n\t\t\tif (existingRepository == null && gitblit.isCollectingGarbage(repositoryName)) {\n\t\t\t\tlogger.warn(MessageFormat.format(\"Skipping local repository {0}, busy collecting garbage\", repositoryName));\n\t\t\t\tcontinue;\n\t\t\t}\n\n\t\t\tif (existingRepository != null) {\n\t\t\t\tStoredConfig config = existingRepository.getConfig();\n\t\t\t\tconfig.load();\n\t\t\t\tString origin = config.getString(\"remote\", \"origin\", \"url\");\n\t\t\t\tRevCommit commit = JGitUtils.getCommit(existingRepository,\n\t\t\t\t\t\torg.eclipse.jgit.lib.Constants.FETCH_HEAD);\n\t\t\t\tif (commit != null) {\n\t\t\t\t\tfetchHead = commit.getName();\n\t\t\t\t}\n\t\t\t\texistingRepository.close();\n\t\t\t\tif (!origin.startsWith(registration.url)) {\n\t\t\t\t\tlogger.warn(MessageFormat\n\t\t\t\t\t\t\t.format(\"Skipping federated repository {0} from {1} @ {2}. Origin does not match, consider EXCLUDING.\",\n\t\t\t\t\t\t\t\t\trepository.name, registration.name, registration.url));\n\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.SKIPPED);\n\t\t\t\t\tcontinue;\n\t\t\t\t}\n\t\t\t}\n\n\t\t\t// clone/pull this repository\n\t\t\tCredentialsProvider credentials = new UsernamePasswordCredentialsProvider(\n\t\t\t\t\tConstants.FEDERATION_USER, registration.token);\n\t\t\tlogger.info(MessageFormat.format(\"Pulling federated repository {0} from {1} @ {2}\",\n\t\t\t\t\trepository.name, registration.name, registration.url));\n\n\t\t\tCloneResult result = JGitUtils.cloneRepository(registrationFolderFile, repository.name,\n\t\t\t\t\tcloneUrl, registration.bare, credentials);\n\t\t\tRepository r = gitblit.getRepository(repositoryName);\n\t\t\tRepositoryModel rm = gitblit.getRepositoryModel(repositoryName);\n\t\t\trepository.isFrozen = registration.mirror;\n\t\t\tif (result.createdRepository) {\n\t\t\t\t// default local settings\n\t\t\t\trepository.federationStrategy = FederationStrategy.EXCLUDE;\n\t\t\t\trepository.isFrozen = registration.mirror;\n\t\t\t\trepository.showRemoteBranches = !registration.mirror;\n\t\t\t\tlogger.info(MessageFormat.format(\" cloning {0}\", repository.name));\n\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.MIRRORED);\n\t\t\t} else {\n\t\t\t\t// fetch and update\n\t\t\t\tboolean fetched = false;\n\t\t\t\tRevCommit commit = JGitUtils.getCommit(r, org.eclipse.jgit.lib.Constants.FETCH_HEAD);\n\t\t\t\tString newFetchHead = commit.getName();\n\t\t\t\tfetched = fetchHead == null || !fetchHead.equals(newFetchHead);\n\n\t\t\t\tif (registration.mirror) {\n\t\t\t\t\t// mirror\n\t\t\t\t\tif (fetched) {\n\t\t\t\t\t\t// update local branches to match the remote tracking branches\n\t\t\t\t\t\tfor (RefModel ref : JGitUtils.getRemoteBranches(r, false, -1)) {\n\t\t\t\t\t\t\tif (ref.displayName.startsWith(\"origin/\")) {\n\t\t\t\t\t\t\t\tString branch = org.eclipse.jgit.lib.Constants.R_HEADS\n\t\t\t\t\t\t\t\t\t\t+ ref.displayName.substring(ref.displayName.indexOf('/') + 1);\n\t\t\t\t\t\t\t\tString hash = ref.getReferencedObjectId().getName();\n\n\t\t\t\t\t\t\t\tJGitUtils.setBranchRef(r, branch, hash);\n\t\t\t\t\t\t\t\tlogger.info(MessageFormat.format(\" resetting {0} of {1} to {2}\", branch,\n\t\t\t\t\t\t\t\t\t\trepository.name, hash));\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tString newHead;\n\t\t\t\t\t\tif (StringUtils.isEmpty(repository.HEAD)) {\n\t\t\t\t\t\t\tnewHead = newFetchHead;\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tnewHead = repository.HEAD;\n\t\t\t\t\t\t}\n\t\t\t\t\t\tJGitUtils.setHEADtoRef(r, newHead);\n\t\t\t\t\t\tlogger.info(MessageFormat.format(\" resetting HEAD of {0} to {1}\",\n\t\t\t\t\t\t\t\trepository.name, newHead));\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.MIRRORED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// indicate no commits pulled\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.NOCHANGE);\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\t// non-mirror\n\t\t\t\t\tif (fetched) {\n\t\t\t\t\t\t// indicate commits pulled to origin/master\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.PULLED);\n\t\t\t\t\t} else {\n\t\t\t\t\t\t// indicate no commits pulled\n\t\t\t\t\t\tregistration.updateStatus(repository, FederationPullStatus.NOCHANGE);\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t\t// preserve local settings\n\t\t\t\trepository.isFrozen = rm.isFrozen;\n\t\t\t\trepository.federationStrategy = rm.federationStrategy;\n\n\t\t\t\t// merge federation sets\n\t\t\t\tSet<String> federationSets = new HashSet<String>();\n\t\t\t\tif (rm.federationSets != null) {\n\t\t\t\t\tfederationSets.addAll(rm.federationSets);\n\t\t\t\t}\n\t\t\t\tif (repository.federationSets != null) {\n\t\t\t\t\tfederationSets.addAll(repository.federationSets);\n\t\t\t\t}\n\t\t\t\trepository.federationSets = new ArrayList<String>(federationSets);\n\n\t\t\t\t// merge indexed branches\n\t\t\t\tSet<String> indexedBranches = new HashSet<String>();\n\t\t\t\tif (rm.indexedBranches != null) {\n\t\t\t\t\tindexedBranches.addAll(rm.indexedBranches);\n\t\t\t\t}\n\t\t\t\tif (repository.indexedBranches != null) {\n\t\t\t\t\tindexedBranches.addAll(repository.indexedBranches);\n\t\t\t\t}\n\t\t\t\trepository.indexedBranches = new ArrayList<String>(indexedBranches);\n\n\t\t\t}\n\t\t\t// only repositories that are actually _cloned_ from the origin\n\t\t\t// Gitblit repository are marked as federated. If the origin\n\t\t\t// is from somewhere else, these repositories are not considered\n\t\t\t// \"federated\" repositories.\n\t\t\trepository.isFederated = cloneUrl.startsWith(registration.url);\n\n\t\t\tgitblit.updateConfiguration(r, repository);\n\t\t\tr.close();\n\t\t}\n\n\t\tIUserService userService = null;\n\n\t\ttry {\n\t\t\t// Pull USERS\n\t\t\t// TeamModels are automatically pulled because they are contained\n\t\t\t// within the UserModel. The UserService creates unknown teams\n\t\t\t// and updates existing teams.\n\t\t\tCollection<UserModel> users = FederationUtils.getUsers(registration);\n\t\t\tif (users != null && users.size() > 0) {\n\t\t\t\tFile realmFile = new File(registrationFolderFile, registration.name + \"_users.conf\");\n\t\t\t\trealmFile.delete();\n\t\t\t\tuserService = new ConfigUserService(realmFile);\n\t\t\t\tfor (UserModel user : users) {\n\t\t\t\t\tuserService.updateUserModel(user.username, user);\n\n\t\t\t\t\t// merge the origin permissions and origin accounts into\n\t\t\t\t\t// the user accounts of this Gitblit instance\n\t\t\t\t\tif (registration.mergeAccounts) {\n\t\t\t\t\t\t// reparent all repository permissions if the local\n\t\t\t\t\t\t// repositories are stored within subfolders\n\t\t\t\t\t\tif (!StringUtils.isEmpty(registrationFolder)) {\n\t\t\t\t\t\t\tif (user.permissions != null) {\n\t\t\t\t\t\t\t\t// pulling from >= 1.2 version\n\t\t\t\t\t\t\t\tMap<String, AccessPermission> copy = new HashMap<String, AccessPermission>(user.permissions);\n\t\t\t\t\t\t\t\tuser.permissions.clear();\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : copy.entrySet()) {\n\t\t\t\t\t\t\t\t\tuser.setRepositoryPermission(registrationFolder + \"/\" + entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// pulling from <= 1.1 version\n\t\t\t\t\t\t\t\tList<String> permissions = new ArrayList<String>(user.repositories);\n\t\t\t\t\t\t\t\tuser.repositories.clear();\n\t\t\t\t\t\t\t\tfor (String permission : permissions) {\n\t\t\t\t\t\t\t\t\tuser.addRepositoryPermission(registrationFolder + \"/\" + permission);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\t// insert new user or update local user\n\t\t\t\t\t\tUserModel localUser = gitblit.getUserModel(user.username);\n\t\t\t\t\t\tif (localUser == null) {\n\t\t\t\t\t\t\t// create new local user\n\t\t\t\t\t\t\tgitblit.addUser(user);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t// update repository permissions of local user\n\t\t\t\t\t\t\tif (user.permissions != null) {\n\t\t\t\t\t\t\t\t// pulling from >= 1.2 version\n\t\t\t\t\t\t\t\tMap<String, AccessPermission> copy = new HashMap<String, AccessPermission>(user.permissions);\n\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : copy.entrySet()) {\n\t\t\t\t\t\t\t\t\tlocalUser.setRepositoryPermission(entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\t\t// pulling from <= 1.1 version\n\t\t\t\t\t\t\t\tfor (String repository : user.repositories) {\n\t\t\t\t\t\t\t\t\tlocalUser.addRepositoryPermission(repository);\n\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\tlocalUser.password = user.password;\n\t\t\t\t\t\t\tlocalUser.canAdmin = user.canAdmin;\n\t\t\t\t\t\t\tgitblit.reviseUser(localUser.username, localUser);\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tfor (String teamname : gitblit.getAllTeamNames()) {\n\t\t\t\t\t\t\tTeamModel team = gitblit.getTeamModel(teamname);\n\t\t\t\t\t\t\tif (user.isTeamMember(teamname) && !team.hasUser(user.username)) {\n\t\t\t\t\t\t\t\t// new team member\n\t\t\t\t\t\t\t\tteam.addUser(user.username);\n\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t} else if (!user.isTeamMember(teamname) && team.hasUser(user.username)) {\n\t\t\t\t\t\t\t\t// remove team member\n\t\t\t\t\t\t\t\tteam.removeUser(user.username);\n\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t}\n\n\t\t\t\t\t\t\t// update team repositories\n\t\t\t\t\t\t\tTeamModel remoteTeam = user.getTeam(teamname);\n\t\t\t\t\t\t\tif (remoteTeam != null) {\n\t\t\t\t\t\t\t\tif (remoteTeam.permissions != null) {\n\t\t\t\t\t\t\t\t\t// pulling from >= 1.2\n\t\t\t\t\t\t\t\t\tfor (Map.Entry<String, AccessPermission> entry : remoteTeam.permissions.entrySet()){\n\t\t\t\t\t\t\t\t\t\tteam.setRepositoryPermission(entry.getKey(), entry.getValue());\n\t\t\t\t\t\t\t\t\t}\n\t\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\n\t\t\t\t\t\t\t\t} else if (!ArrayUtils.isEmpty(remoteTeam.repositories)) {\n\t\t\t\t\t\t\t\t\t// pulling from <= 1.1\n\t\t\t\t\t\t\t\t\tteam.addRepositoryPermissions(remoteTeam.repositories);\n\t\t\t\t\t\t\t\t\tgitblit.updateTeamModel(teamname, team);\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} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve USERS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull TEAMS\n\t\t\t// We explicitly pull these even though they are embedded in\n\t\t\t// UserModels because it is possible to use teams to specify\n\t\t\t// mailing lists or push scripts without specifying users.\n\t\t\tif (userService != null) {\n\t\t\t\tCollection<TeamModel> teams = FederationUtils.getTeams(registration);\n\t\t\t\tif (teams != null && teams.size() > 0) {\n\t\t\t\t\tfor (TeamModel team : teams) {\n\t\t\t\t\t\tuserService.updateTeamModel(team);\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve TEAMS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull SETTINGS\n\t\t\tMap<String, String> settings = FederationUtils.getSettings(registration);\n\t\t\tif (settings != null && settings.size() > 0) {\n\t\t\t\tProperties properties = new Properties();\n\t\t\t\tproperties.putAll(settings);\n\t\t\t\tFileOutputStream os = new FileOutputStream(new File(registrationFolderFile,\n\t\t\t\t\t\tregistration.name + \"_\" + Constants.PROPERTIES_FILE));\n\t\t\t\tproperties.store(os, null);\n\t\t\t\tos.close();\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve SETTINGS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\n\t\ttry {\n\t\t\t// Pull SCRIPTS\n\t\t\tMap<String, String> scripts = FederationUtils.getScripts(registration);\n\t\t\tif (scripts != null && scripts.size() > 0) {\n\t\t\t\tfor (Map.Entry<String, String> script : scripts.entrySet()) {\n\t\t\t\t\tString scriptName = script.getKey();\n\t\t\t\t\tif (scriptName.endsWith(\".groovy\")) {\n\t\t\t\t\t\tscriptName = scriptName.substring(0, scriptName.indexOf(\".groovy\"));\n\t\t\t\t\t}\n\t\t\t\t\tFile file = new File(registrationFolderFile, registration.name + \"_\"\n\t\t\t\t\t\t\t+ scriptName + \".groovy\");\n\t\t\t\t\tFileUtils.writeContent(file, script.getValue());\n\t\t\t\t}\n\t\t\t}\n\t\t} catch (ForbiddenException e) {\n\t\t\t// ignore forbidden exceptions\n\t\t} catch (IOException e) {\n\t\t\tlogger.warn(MessageFormat.format(\n\t\t\t\t\t\"Failed to retrieve SCRIPTS from federated gitblit ({0} @ {1})\",\n\t\t\t\t\tregistration.name, registration.url), e);\n\t\t}\n\t}", "public Object clone() {\n/* */ try {\n/* 111 */ return super.clone();\n/* */ }\n/* 113 */ catch (CloneNotSupportedException cloneNotSupportedException) {\n/* 114 */ throw new InternalError(cloneNotSupportedException.toString(), cloneNotSupportedException);\n/* */ } \n/* */ }", "public abstract void execute(GitTool opts) throws Exception;", "public CellEditorProyectGit(){}", "@Step(\"<url> sayfasına git\")\n public void geturl(String url) {\n Driver.webDriver.get(url + \"/\");\n }", "@Test\n public void testCanReadGitRevision() throws Exception {\n MatcherAssert.assertThat(\n new TestJenkins().jobs().findByName(\n \"test-parametrised-job\"\n ).next().builds().findByNumber(\"#4\").next().details().gitRevision(),\n new IsEqual<>(\"3d21ea7072da134395eedbc7a07bf0f00cfabf97\")\n );\n }", "public Function clone();", "public static void main(String\n\t\t\t[] args) {\n\t\tShallowClone shallowClone = new ShallowClone(2);\n\t\tshallowClone.numbers[0]=100;\n\t\ttry {\n\t\t\tShallowClone shallowClone2 = (ShallowClone) shallowClone.clone();\n\t\t\tSystem.out.println(\"Cloed succesfully\");\n\t\t\tSystem.out.println(shallowClone);\n\t\t\tSystem.out.println(shallowClone2);\n\t\t\tshallowClone2.nameString=\"John\";\n\t\t\tSystem.out.println(shallowClone);\n\t\t\tSystem.out.println(shallowClone2);\n\t\t\t\n\t\t}catch(CloneNotSupportedException E)\n\t\t{\n\t\t\tSystem.out.println(E);\n\t\t}\n\t}", "public interface GetPath {\n //path是svn中的地址,realpath是class的路径\n public void copyFileAndFloder(String[] paths, String realPath);\n}", "public GitBranch getBranch(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); if (ref==null) return null; }\n catch(Exception e) { throw new RuntimeException(e); }\n String name = ref.getTarget().getName();\n GitBranch b = _branches.get(name);\n if (b==null) _branches.put(name, b=new GitBranch(name));\n return b;\n}", "public Clone() {}", "@Override\n\tprotected HttpRequest createHttpRequest() {\n HttpGet httpGet = new HttpGet(getHost() + \"/repos/\" + owner + \"/\" + repo + \"/pulls?state=\" + state);\n httpGet.setHeader(\"Accept\", GITHUB_ACCEPT_HEADER);\n if (username != null && password != null) {\n \thttpGet.setHeader(\"Authentication\", AuthenticationUtils.getBasicAuthentication(username, password));\n }\n return httpGet;\n }", "public final CompletableFuture<CloneResponse> clone(Function<CloneRequest.Builder, ObjectBuilder<CloneRequest>> fn)\n\t\t\tthrows IOException {\n\t\treturn clone(fn.apply(new CloneRequest.Builder()).build());\n\t}", "public Object clone()\n {\n Object o = null;\n try\n {\n o = super.clone();\n }\n catch (CloneNotSupportedException e)\n {\n e.printStackTrace();\n }\n return o;\n}", "public GitRef getRef(String aName)\n{\n Ref ref;\n System.out.println(\"GitDir.getRef: Used to be getRef() but that is gone now. Don't know if this is okay\");\n try { ref = getRepo().exactRef(aName); }\n catch(Exception e) { throw new RuntimeException(e); }\n return ref!=null ? new GitRef(ref) : null;\n}", "@Test\n public void shouldBeAbleToCloneFile() {\n graph.useWorkspace(\"otherWorkspace\");\n graph.create(\"/testFile\").with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.FILE).orReplace().and();\n graph.create(\"/testFile/jcr:content\")\n .with(JcrLexicon.PRIMARY_TYPE, JcrNtLexicon.RESOURCE)\n .and(JcrLexicon.DATA, TEST_CONTENT.getBytes())\n .orReplace()\n .and();\n\n File newFile = new File(otherWorkspaceRoot, \"testFile\");\n assertContents(newFile, TEST_CONTENT);\n\n graph.useWorkspace(\"test\");\n graph.clone(\"/testFile\").fromWorkspace(\"otherWorkspace\").as(\"clonedFile\").into(\"/\").failingIfAnyUuidsMatch();\n File copiedFile = new File(testWorkspaceRoot, \"clonedFile\");\n assertContents(copiedFile, TEST_CONTENT);\n }", "URL getRepositoryWebUrl(ProgrammingExerciseParticipation participation);", "public static String getBuildRevision(String... varargs) {\n\t\t// setting the default value when argument's value is omitted\n\t\tString pmaCoreURL = varargs.length > 0 ? varargs[0] : pmaCoreLiteURL;\n\t\tString url = PMA.join(pmaCoreURL, \"api/json/GetBuildRevision\");\n\t\tString version = null;\n\t\tif (PMA.debug) {\n\t\t\tSystem.out.println(url);\n\t\t}\n\t\ttry {\n\t\t\tURL urlResource = new URL(url);\n\t\t\tHttpURLConnection con;\n\t\t\tif (url.startsWith(\"https\")) {\n\t\t\t\tcon = (HttpsURLConnection) urlResource.openConnection();\n\t\t\t} else {\n\t\t\t\tcon = (HttpURLConnection) urlResource.openConnection();\n\t\t\t}\n\t\t\tcon.setRequestMethod(\"GET\");\n\t\t\tString jsonString = PMA.getJSONAsStringBuffer(con).toString();\n\t\t\tif (PMA.isJSONObject(jsonString)) {\n\t\t\t\tJSONObject jsonResponse = PMA.getJSONObjectResponse(jsonString);\n\t\t\t\tif (jsonResponse.has(\"Code\")) {\n\t\t\t\t\tif (PMA.logger != null) {\n\t\t\t\t\t\tPMA.logger.severe(\"getBuildRevision failed : \" + jsonResponse.get(\"Message\"));\n\t\t\t\t\t}\n\t\t\t\t\tthrow new Exception(\"getBuildRevision failed : \" + jsonResponse.get(\"Message\"));\n\t\t\t\t} else if (jsonResponse.has(\"d\")) {\n\t\t\t\t\tversion = jsonResponse.getString(\"d\");\n\t\t\t\t} else {\n\t\t\t\t\treturn null;\n\t\t\t\t}\n\t\t\t} else {\n\t\t\t\tversion = jsonString.replaceAll(\"\\\"$|^\\\"\", \"\");\n\t\t\t}\n\t\t\treturn version;\n\t\t} catch (Exception e) {\n\t\t\te.printStackTrace();\n\t\t\tif (PMA.logger != null) {\n\t\t\t\tStringWriter sw = new StringWriter();\n\t\t\t\te.printStackTrace(new PrintWriter(sw));\n\t\t\t\tPMA.logger.severe(sw.toString());\n\t\t\t}\n\t\t\treturn null;\n\t\t}\n\t}", "private String getCodeRoot(boolean cloningRepo) {\n\t\tString rootDir;\n\t\tJFrame frame = new JFrame();\n\t\tJFileChooser chooser = new JFileChooser();\n\t\t// Set proper options for root selector\n\t\tchooser.setCurrentDirectory(new File(\"..\"));\n\n\t\tif (cloningRepo) {\n\t\t\tchooser.setDialogTitle(\"Please Select Directory to Create Temporary Git Repo\");\n\t\t} else {\n\t\t\tchooser.setDialogTitle(\"Please Select Codebase Root Directory\");\n\t\t}\n\n\t\tchooser.setFileSelectionMode(JFileChooser.DIRECTORIES_ONLY);\n\t\tchooser.setAcceptAllFileFilterUsed(false);\n\t\t// If they hit cancel shutdown system\n\t\tif (chooser.showOpenDialog(frame) == JFileChooser.CANCEL_OPTION) {\n\t\t\tSystem.exit(0);\n\t\t}\n\n\t\t// If this happens we have other issues, but to be safe :)\n\t\tif (chooser.getSelectedFile() == null)\n\t\t\treturn null;\n\n\t\trootDir = chooser.getSelectedFile().getAbsolutePath();\n\t\tframe.dispose();\n\t\treturn rootDir;\n\t}", "private String getRepoName(String remoteUrl) {\n // Pattern to match all words in the text\n final Matcher matcher = Pattern.compile(\"([^/]*).git$\").matcher(remoteUrl);\n if (matcher.find()) {\n return matcher.group(1);\n }\n throw new AppsmithException(AppsmithError.INVALID_GIT_CONFIGURATION, \"Remote URL is incorrect! Can you \" +\n \"please provide as per standard format => git@github.com:username/reponame.git\");\n }", "@Test\n public void test_long_input_for_fetcher_process() throws IOException, VcsException {\n System.setProperty(\"teamcity.git.fetch.separate.process\", \"true\");\n GitVcsSupport support = getSupport();\n VcsRootImpl root = (VcsRootImpl) getRoot(\"version-test\");\n root.addProperty(\"param\",\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\" +\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\" +\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\" +\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\" +\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\" +\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\" +\n \"bbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbbb\" +\n \"bbbbbbbbbbbbbbbbbbbbb\");//with such long param size of input for fetcher process is greater than 512 bytes\n String version = support.getCurrentVersion(root);\n assertEquals(VERSION_TEST_HEAD, version);\n }", "public void createRepository() throws VcsException {\n final FossilSimpleCommand fossilCommand = new FossilSimpleCommand(myProject, myRepoPath.getParentFile(), FCommandName.new_);\n fossilCommand.addParameters(myRepoPath.getPath());\n String result = fossilCommand.run();\n result = result.replace(\"\\r\", \"\");\n final String[] split = result.split(\"\\n\");\n final List<String> lines = new ArrayList<String>(3);\n for (String line : split) {\n if (! StringUtil.isEmptyOrSpaces(line)) {\n lines.add(line.trim());\n }\n }\n\n if (lines.size() != 3) {\n throw new FossilException(\"Can not parse 'new' output: '\" + result + \"'\");\n }\n final String[] expectedHeaders = {\"project-id:\", \"server-id:\", \"admin-user:\"};\n for (int i = 0; i < lines.size(); i++) {\n final String line = lines.get(i);\n if (! line.startsWith(expectedHeaders[i])) {\n throw new FossilException(\"Can not parse 'new' output, line #\" + (i + 1) + \": '\" + result + \"'\");\n }\n }\n myProjectId = new String(lines.get(0).substring(expectedHeaders[0].length() + 1));\n myServerId = new String(lines.get(1).substring(expectedHeaders[1].length()) + 1);\n final String userPswd = lines.get(2).substring(expectedHeaders[2].length()).trim();\n final int idxSpace = userPswd.indexOf(' ');\n if (idxSpace == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myUserName = new String(userPswd.substring(0, idxSpace));\n final int quot1 = userPswd.indexOf('\"', idxSpace + 1);\n int quot2 = -1;\n if (quot1 >= 0) {\n quot2 = userPswd.indexOf('\"', quot1 + 1);\n }\n if (quot1 == -1 || quot2 == -1) {\n throw new FossilException(\"Can not parse 'new' output, user-password area: '\" + result + \"'\");\n }\n myPassword = userPswd.substring(quot1 + 1 , quot2);\n }", "static RepositoryConnection getRepositoryConnection(Repository rep)\n {\n RepositoryConnection connection = null;\n \n try\n {\n connection = rep.getConnection();\n }\n catch (RepositoryException e)\n {\n System.err.println(\"Could not obtain repository connection!\");\n System.exit(1);\n }\n \n return connection;\n }", "public void getBranchCommand() {\n\n }", "@Test\n public void testCommitsApi() throws Exception\n {\n \n \n RequestBuilder builder = new RequestBuilder(\"GET\");\n Request request = builder.setUrl(\n UriTemplate.fromTemplate(BASE)\n .append(PATH_EXPRESSION)\n .set(\"user\", \"damnhandy\")\n .set(\"repo\", \"Handy-URI-Templates\")\n .set(\"function\",\"commits\")\n .expand()).build();\n Assert.assertEquals(\"https://api.github.com/repos/damnhandy/Handy-URI-Templates/commits\", request.getUrl());\n executeRequest(createClient(), request);\n }", "boolean isBareRepository(String GIT_DIR) throws GitException, InterruptedException;", "String wget(String url);", "public static void main(String[] args) {\n\t\tSystem.out.println(\"trying git\"); \r\n\t\tSystem.out.println(\"Getting there\");\r\n\t\t//Faisel\r\n\t}", "public static void main(String[] args) {\n\t\t\tSystem.out.println(\"git_test!\");\n\t}" ]
[ "0.6628642", "0.661024", "0.6511622", "0.6312761", "0.6284726", "0.62474036", "0.60834414", "0.6062364", "0.6035982", "0.5988572", "0.5968911", "0.5945722", "0.5911884", "0.57823026", "0.5703374", "0.56264585", "0.5496964", "0.5490937", "0.54387474", "0.53805906", "0.5350759", "0.53234476", "0.5260632", "0.5251944", "0.52479386", "0.52404606", "0.5238581", "0.5231003", "0.5227638", "0.5221866", "0.5221122", "0.51718193", "0.51588976", "0.5108126", "0.5098819", "0.5081563", "0.5077284", "0.50701183", "0.5064461", "0.5064338", "0.50601554", "0.50436455", "0.5042801", "0.50339067", "0.5004358", "0.49965352", "0.4988562", "0.49862516", "0.4978162", "0.49779385", "0.49664485", "0.49422133", "0.49201012", "0.49193063", "0.49193063", "0.49150312", "0.48721144", "0.48685062", "0.4861124", "0.48427445", "0.48284805", "0.48282582", "0.48017716", "0.47953296", "0.47785845", "0.47743818", "0.4765691", "0.47641355", "0.47597033", "0.4758621", "0.4745346", "0.47379553", "0.47310877", "0.47250935", "0.47237498", "0.47228268", "0.4720752", "0.47131923", "0.4711907", "0.47115746", "0.47067082", "0.47020897", "0.46976063", "0.46973866", "0.4696842", "0.4696293", "0.46910885", "0.46854138", "0.46819523", "0.4681871", "0.46792245", "0.46781722", "0.46759233", "0.4674347", "0.4653991", "0.46478227", "0.4643337", "0.4641628", "0.46391496", "0.463141", "0.46299756" ]
0.0
-1
User: AUDUPA Date: 2/10/15 Time: 10:44 PM
@Path("/travel") public interface TravelResource { @POST @Produces({ MediaType.APPLICATION_JSON + ";charset=utf-8"}) public Travel postTravelDetails(Travel travel) throws Exception; @GET @Path("/{id}") @Produces({ MediaType.APPLICATION_JSON + ";charset=utf-8"}) public Travel getTravelDetails(@PathParam("id") Long id) throws Exception; }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "public String parseUser(String userLine) {\n final int START_OF_USER_NAME = 6;\n \t\tString userName = userLine.substring(\n START_OF_USER_NAME, userLine.indexOf(\"Date: \") - 1).trim();\n \n \t\treturn userName;\n \t}", "public static String getUserPassDate() {\n return getUserPassDate(user);\n }", "public int getUserTime() {\n\t\treturn this.userTime;\n\t}", "public String getUserDateString() {\n\t\tString[] tmpArr = this.getUserDate();\n\t\tString year = tmpArr[0];\n\t\tString month = tmpArr[1];\n\t\tString day = tmpArr[2];\n\t\tString out = year + \"/\" + month + \"/\" + day;\n\t\treturn out;\n\t}", "public void setEntryUserTime( Date entryUserTime ) {\n this.entryUserTime = entryUserTime;\n }", "public Date getUserCreateTime() {\r\n return userCreateTime;\r\n }", "public static String formatTime(String userTime, String date) {\r\n\r\n\t\t\tint n = Integer.parseInt(userTime.substring(0, 2)) + 5;\r\n\r\n\t\t\tswitch (n) {\r\n\r\n\t\t\tcase 24:\r\n\t\t\t\tn = 0;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 25:\r\n\t\t\t\tn = 1;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 26:\r\n\t\t\t\tn = 2;\r\n\t\t\t\tbreak;\r\n\r\n\t\t\tcase 27:\r\n\t\t\t\tn = 3;\r\n\t\t\t\tbreak;\r\n\t\t\tdefault:\r\n\t\t\t\tbreak;\r\n\r\n\t\t\t}\r\n\r\n\t\t\t// extracting hour\r\n\t\t\tString hourChange = String.valueOf(n);\r\n\r\n\t\t\tStringBuilder time = new StringBuilder(userTime);\r\n\r\n\t\t\tif (hourChange.length() == 1) {\r\n\r\n\t\t\t\ttime.replace(0, 2, \"0\" + hourChange);\r\n\r\n\t\t\t} else {\r\n\r\n\t\t\t\ttime.replace(0, 2, hourChange);\r\n\r\n\t\t\t}\r\n\r\n\t\t\tString formattedString = date + \" \" + time + \":00\";\r\n\r\n\t\t\treturn formattedString;\r\n\r\n\t\t}", "java.lang.String getUser();", "@Override\n public String toString() {\n SimpleDateFormat formatter = new SimpleDateFormat(\"yyyy-MM-dd'@'HH:mm:ss\");\n String userInformation = new String();\n Date date = new Date();\n userInformation = \"[\" + username + \" - \" +\n socket.getInetAddress().getHostAddress() +\n \":\" + socket.getPort() + \" - \" + formatter.format(date)\n + \"]: \";\n return userInformation;\n }", "private void userReport() {\n reportText.appendText(\"Report of appointments per User\\n\\n\");\n for (User user: Data.getUsers()) {\n reportText.appendText(\"\\n\\nUser: \" + user.getUsername() + \"\\n\");\n for (Appointment appointment: Data.getAppointments()) {\n if (appointment.getUser() == user.getId()) {\n reportText.appendText(\"Appointment ID: \" + appointment.getId() +\n \" \\tTitle: \" + appointment.getTitle() +\n \"\\tType: \" + appointment.getType() +\n \"\\tDescription: \" + appointment.getDescription() +\n \"\\tStart: \" + appointment.getStart() +\n \"\\tEnd: \" + appointment.getEnd() +\n \"\\tCustomer: \" + appointment.getCustomer() + \"\\n\");\n }\n System.out.println(\"\\n\\n\");\n }\n }\n\n }", "Long getUserCreated();", "public GETINFO(int time, String userName) {\n\t\tsuper(Operation.GETINFO);\n\t\tusername = userName;\n\t\tthis.time = time;\n\t\t //this.operation = Operation.GETINFO;\n\t}", "public static String getUserPassDate(String username) {\n if (username.equals(\"\")) return \"\";\n String s = dateMap.get(username);\n return (s != null) ? s : \"\";\n }", "String getUser();", "String getUser();", "@Override\r\n\tpublic String gettime() {\n\t\treturn user.gettime();\r\n\t}", "public void printUserInfo(){\n System.out.print(\"Username: \"+ getName() + \"\\n\" + \"Birthday: \"+getBirthday()+ \"\\n\"+ \"Hometown: \"+getHome()+ \"\\n\"+ \"About: \" +getAbout()+ \" \\n\"+ \"Subscribers: \" + getSubscriptions());\n\t}", "private static String getTime() {\n\t\tDate getDate = new Date();\n\t\tString timeFormat = \"M/d/yy hh:mma\";\n\t\tSimpleDateFormat sdf = new SimpleDateFormat(timeFormat);\n\t\treturn \"[\" + sdf.format(getDate) + \"]\\t\";\n\t}", "public String[] getUserDate() {\n\t\treturn this.userDate;\n\t}", "public String getUserReport(String username)\r\n\t{\r\n\t\tArrayBasedList<LogEntry> subList = new ArrayBasedList<LogEntry>();\r\n\t\tfor (int i = 0; i < list.size(); i++) {\r\n\t \tLogEntry log = list.get(i);\r\n\t \tif (log.getName().equals(username)) {\r\n\t \t\tsubList.add(log);\r\n\t \t}\r\n\t }\r\n\t\tStringBuilder sb = new StringBuilder();\r\n\t sb.append(\"Activity Report for \");\r\n\t sb.append(username);\r\n\t if (subList.size() == 0) {\t\r\n\t\t sb.append(\"[\\n\");\r\n\t \tsb.append(\" No activity was recorded.\\n]\");\r\n\t\t return sb.toString();\r\n\t }\r\n\t SimpleDateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy hh:mm:ssaa\", Locale.US);\r\n\t subList.sort();\r\n\t sb.append(\"[\\r\\n\");\r\n\t for (int i = 0; i < subList.size(); i++) {\r\n\t \tsb.append(\" \");\r\n\t \tsb.append(dateFormat.format(subList.get(i).getTime()));\r\n\t \tsb.append(\" - \");\r\n\t \tsb.append(subList.get(i).getActivity());\r\n\t \tsb.append(\"\\r\\n\");\r\n\t }\r\n\t sb.append(\"]\");\r\n\t return sb.toString();\r\n\t}", "public double getUserTimeSec() {\n\treturn getUserTime() / Math.pow(10, 9);\n}", "private void getUserInfo() {\n\t}", "User getUserInformation(Long user_id);", "public java.lang.String getUserCreated() {\n\t\treturn _tempNoTiceShipMessage.getUserCreated();\n\t}", "public static void main(String[] args) throws Exception {\n Calendar cal = Calendar.getInstance();\n SimpleDateFormat simpleformat = new SimpleDateFormat(\"E, dd MMM yyyy HH:mm:ss Z\");\n System.out.println(\"Today's date and time = \"+simpleformat.format(cal.getTime()));\n // displaying date\n simpleformat = new SimpleDateFormat(\"dd/MMMM/yyyy\");\n String str = simpleformat.format(new Date());\n System.out.println(\"Current Date = \"+str);\n // current time\n simpleformat = new SimpleDateFormat(\"HH:mm:ss\");\n String strTime = simpleformat.format(new Date());\n System.out.println(\"Current Time = \"+strTime);\n // displaying hour in HH format\n simpleformat = new SimpleDateFormat(\"HH\");\n String strHour = simpleformat.format(new Date());\n System.out.println(\"Hour in HH format = \"+strHour);\n\n\n\n //formato ideal\n simpleformat = new SimpleDateFormat(\"dd/MM/yyyy - HH:mm:ss\");\n String strTimeDay = simpleformat.format(new Date());\n System.out.println(\"Dia e Hora = \" + strTimeDay);\n\n }", "void appendUserInformation(String line);", "@Override\n public String toString() {\n String output = \"User Info for: \" + getId();\n output += \"\\n\\tName: \" + getFirstName() + \" \" + getLastName();\n output += \"\\n\\tCreated on: \" + DF.format(getEnrolDate());\n output += \"\\n\\tLast access: \" + DF.format(getLastAccess());\n \n return output;\n }", "static String utc(String column, String user_id) {\n return \"SELECT \" + column + \" FROM \" + TableList.TABLE_UTC + \" WHERE \" + Constants.USER_ID + \"=\" + user_id;\n }", "UserInfo getUserInfo();", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "public java.lang.String getUser(){\r\n return localUser;\r\n }", "@Override\n public String toString(){\n return String.format(\"ApplicationUser ehrId: '%s', shimmerId: '%s', shimKey: '%s', is logged in: '%s'\", applicationUserId.getEhrId(), shimmerId, getApplicationUserId().getShimKey());\n }", "int getSignOnTime();", "public void setUserCreateTime(Date userCreateTime) {\r\n this.userCreateTime = userCreateTime;\r\n }", "@Override\r\n public String toString() {\r\n return timeStamp + username + \": \" + message;\r\n }", "public static String formatDateTwoLine(Date date, String userId)\n\t{\n\t\tLocale userLocale = getPreferredLocale(userId);\n\t\tTimeZone userZone = getPreferredTimeZone(userId);\n\n\t\tDateFormat dateFormat = new SimpleDateFormat(\"MMM dd, yyyy\", userLocale);\n\t\tdateFormat.setTimeZone(userZone);\n\n\t\tDateFormat timeFormat = new SimpleDateFormat(\"hh:mm a\", userLocale);\n\t\ttimeFormat.setTimeZone(userZone);\n\n\t\tString rv = \"<span style=\\\"white-space: nowrap;\\\">\" + dateFormat.format(date) + \"</span><br /><span style=\\\"white-space: nowrap;\\\">\"\n\t\t\t\t+ timeFormat.format(date) + \"</span>\";\n\n\t\treturn rv;\n\t}", "public String getEventInfo()\n {\n return \"Event ID: \" + this.hashCode() + \" | Recorded User\\n\" + String.format(\"\\tName %s \\n\\tDate of Birth %s \\n\\tEmail %s \\n\\tContact Number %s \\n\\tAge %d \\nDate %s \\nTime %s \\nParty Size %d \\nEstablishment \\n\\tName: %s \\n\\tAddress: %s\",\n user.getName(), user.getDateOfBirthAsString(), user.getEmail(), user.getPhoneNumber(), \n user.getAge(), getEventDateAsString(), getEventTimeAsString(), partyNumber, establishment.getName(), establishment.getAddress());\n }", "Date getAccessTime();", "private static UserInfo getUserInfoStandardSession(int idUser)\n {\n User user = null;\n Squad squad = null;\n int countPost = 0;\n int invitationsAvailable = 0;\n try\n {\n user = DAOFactory.getInstance().getUserDAO().getFetched(idUser);\n if (user == null)\n {\n return new UserInfo();\n }\n //squad = DAOFactory.getInstance().getSquadDAO().getFirstByIdUser(idUser);\n squad = user.getFirstSquad();\n countPost = DAOFactory.getInstance().getMatchCommentDAO().countByIdUser(idUser);\n invitationsAvailable = user.getMaxInvitations() - DAOFactory.getInstance().getUserInvitationDAO().getCountUsed(idUser);\n if (invitationsAvailable < 0)\n {\n invitationsAvailable = 0;\n }\n }\n catch (Exception ex)\n {\n logger.error(\"Error retrieving user info: \" + ex.getMessage());\n }\n boolean squadMarketEnabled = false;\n if (squad != null)\n {\n squadMarketEnabled = squad.getMarketEnabled() && !squad.getHiddenEnabled();\n }\n else\n {\n logger.error(String.format(\"Error on data about iduser %s: User must have almost one squad!!\", idUser));\n }\n // Set values\n Language language = ActionContext.getContext() != null ? UserContext.getInstance().getLanguage() : LanguageManager.chooseUserLanguage(user);\n Cobrand currentCobrand = ActionContext.getContext() != null ? UserContext.getInstance().getCurrentCobrand() : getCobrandByCode(user.getCobrandCode());\n UserInfo userInfo = new UserInfo();\n userInfo.setId(user.getId());\n userInfo.setName(user.getFirstName());\n userInfo.setAnonymousEnabled(user.getAnonymousEnabled());\n\n if (userInfo.isAnonymousEnabled())\n {\n userInfo.setSurname(StringUtils.left(user.getLastName(), 1) + '.');\n }\n else\n {\n userInfo.setSurname(user.getLastName());\n }\n\n userInfo.setCompleteSurname(user.getLastName());\n\n userInfo.setEmail(user.getEmail());\n userInfo.setRecordedMatches(user.getRecordedMatches());\n userInfo.setRecordedChallenges(user.getRecordedChallenges());\n userInfo.setPlayedMatches(user.getPlayedMatches());\n userInfo.setPlayedChallenges(user.getPlayedChallenges());\n userInfo.setCity(user.getCity().getName());\n userInfo.setProvince(user.getProvince().getName());\n userInfo.setCountry(user.getCountry().getName());\n userInfo.setIdCountry(user.getCountry().getId());\n userInfo.setIdProvince(user.getProvince() != null ? user.getProvince().getId() : 0);\n userInfo.setIdCity(user.getCity() != null ? user.getCity().getId() : 0);\n if (user.getNationalityCountry() != null)\n {\n userInfo.setIdNatCountry(user.getNationalityCountry().getId());\n userInfo.setNatCountry(user.getNationalityCountry().getName());\n }\n userInfo.setCreated(user.getCreated());\n userInfo.setBirthdayCity((user.getBirthdayCity() != null) ? user.getBirthdayCity().getName() : EMPTY_FIELD);\n userInfo.setBirthdayProvince((user.getBirthdayProvince() != null) ? user.getBirthdayProvince().getName() : EMPTY_FIELD);\n userInfo.setBirthdayCountry((user.getBirthdayCountry() != null) ? user.getBirthdayCountry().getName() : EMPTY_FIELD);\n userInfo.setPlayerFoot((user.getPlayerFoot() == null) ? EMPTY_FIELD : TranslationProvider.getTranslation(user.getPlayerFoot().getKeyName(), language, currentCobrand).getKeyValue());\n userInfo.setPlayerFootKeyName((user.getPlayerFoot() == null) ? EMPTY_FIELD : user.getPlayerFoot().getKeyName());\n userInfo.setPlayerShirtNumber((user.getPlayerShirtNumber() != null) ? (String.valueOf(user.getPlayerShirtNumber())) : EMPTY_FIELD);\n userInfo.setPlayerRole(user.getPlayerRole() == null ? EMPTY_FIELD : TranslationProvider.getTranslation(user.getPlayerRole().getKeyName(), language, currentCobrand).getKeyValue());\n userInfo.setIdPlayerRole(user.getPlayerRole().getId());\n userInfo.setPlayerRoleKey(user.getPlayerRole().getKeyName());\n userInfo.setPlayerMainFeature(user.getPlayerMainFeature() == null ? EMPTY_FIELD : user.getPlayerMainFeature());\n userInfo.setPlayerShirtNumber((user.getPlayerShirtNumber() != null) ? (String.valueOf(user.getPlayerShirtNumber())) : EMPTY_FIELD);\n userInfo.setAge((user.getBirthDay() != null) ? Utils.getAgefromDate(user.getBirthDay()) : EMPTY_FIELD);\n userInfo.setPlayerHeight((user.getPlayerHeight() != null) ? String.valueOf(user.getPlayerHeight()) : EMPTY_FIELD);\n userInfo.setPlayerWeight((user.getPlayerWeight() != null) ? String.valueOf(user.getPlayerWeight()) : EMPTY_FIELD);\n userInfo.setFootballTeam((user.getFootballTeam() != null) ? user.getFootballTeam().getName() : EMPTY_FIELD);\n userInfo.setPhysicalConditionKey((user.getPhysicalCondition() != null) ? user.getPhysicalCondition().getKeyName() : \"label.condizioneFisica.nonPervenuta\");\n userInfo.setIdPhysicalCondition((user.getPhysicalCondition() != null) ? String.valueOf(user.getPhysicalCondition().getId()) : EMPTY_FIELD);\n userInfo.setInfoFavouritePlayer((user.getInfoFavouritePlayer() != null) ? user.getInfoFavouritePlayer() : EMPTY_FIELD);\n userInfo.setInfoDream((user.getInfoDream() != null) ? user.getInfoDream() : EMPTY_FIELD);\n userInfo.setInfoHobby((user.getInfoHobby() != null) ? user.getInfoHobby() : EMPTY_FIELD);\n userInfo.setInfoAnnounce((user.getInfoAnnounce() != null) ? user.getInfoAnnounce() : EMPTY_FIELD);\n userInfo.setInfoDream((user.getInfoDream() != null) ? user.getInfoDream() : EMPTY_FIELD);\n userInfo.setPlayerTitle((user.getPlayerTitle() != null) ? user.getPlayerTitle() : EMPTY_FIELD);\n //userInfo.setPlayedMatches(user.getRecordedMatches() + user.getRecordedChallenges());//SBAGLIATO TODO,sono le organizzate\n userInfo.setCountryFlagName(String.format(\"%1$s%2$s\", Constants.COUNTRY_FLAG_IMAGE_PREFIX, user.getCountry().getId()));\n userInfo.setBirthday(user.getBirthDay());\n userInfo.setMarketEnabled(user.getMarketEnabled());\n userInfo.setSquadMarketEnabled(squadMarketEnabled);\n userInfo.setStatus(user.getEnumUserStatus());\n userInfo.setAlertOnMatchRegistrationOpen(user.getAlertOnRegistrationStart());\n //userInfo.setPlayedMatches(StatisticManager.getPlayed(userInfo.getId()));//Att è una query in piu'\n\n userInfo.setPostCount(countPost);\n userInfo.setInvitationsAvailable(invitationsAvailable);\n\n //Facebook\n userInfo.setFacebookIdUser(user.getFacebookIdUser());\n userInfo.setFacebookAccessToken(user.getFacebookAccessToken());\n userInfo.setFacebookPostOnMatchCreation(user.isFacebookPostOnMatchCreation());\n userInfo.setFacebookPostOnMatchRecorded(user.isFacebookPostOnMatchRecorded());\n userInfo.setFacebookPostOnMatchRegistration(user.isFacebookPostOnMatchRegistration());\n\n try\n {\n PictureCard pictureCard = null;\n if (user.getEnumUserStatus().equals(EnumUserStatus.Pending))\n {\n pictureCard = DAOFactory.getInstance().getPictureCardDAO().getByStatus(idUser, EnumPictureCardStatus.Pending);\n if (pictureCard != null)\n {\n userInfo.loadPictureCard(pictureCard);\n }\n }\n else\n {\n for (PictureCard pic : user.getPictureCards())\n {\n if (pic.getEnumPictureCardStatus().equals(EnumPictureCardStatus.Current))\n {\n userInfo.loadPictureCard(pic);\n break;\n }\n }\n }\n }\n catch (Exception ex)\n {\n logger.error(\"Error retrieving current picture card in getUserInfo()\", ex);\n }\n return userInfo;\n\n }", "public static void main(String[] args) {\n DateFormat df=new SimpleDateFormat(\"MM/dd/yyyy HH:mm:ss a\");\n \n //Get the date today using calender object.\n Date today=Calendar.getInstance().getTime();\n //using DateFormat format method we can create a string\n //representation of a date with the defined format.\n String reportDate=df.format(today);\n //print what date is today!\n System.out.println(\"Current Date: \"+reportDate);\n }", "private void formatTime() {\r\n\t\tDate date = new Date();\r\n\t\tSimpleDateFormat ft = new SimpleDateFormat(\"yyyy/MM/dd HH:mm:ss\");\r\n\t\tm_timeSent = ft.format(date).toString();\r\n\t}", "public String DateFormatted(){\n\t\tSimpleDateFormat simDate = new SimpleDateFormat(\"E, dd/MM/yy hh:mm:ss a\");\n\t\treturn simDate.format(date.getTime());\n\t}", "private String getDate() {\n\t\tSimpleDateFormat parseFormat = new SimpleDateFormat(\"hh:mm a\");\n\t\tDate date = new Date();\n\t\tString s = parseFormat.format(date);\n\t\treturn s;\n\t}", "public final String mo69547a() {\n return \"user\";\n }", "public static String formatDate(Date date, String userId)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", getPreferredLocale(userId));\n\t\tformat.setTimeZone(getPreferredTimeZone(userId));\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "public void log(String user, String action, String actionName){\r\n\t\t\r\n\t\tString formattedDate;\r\n\t\tCalendar c = Calendar.getInstance(); \r\n\t\t SimpleDateFormat df = new SimpleDateFormat(\"E yyyy-MM-dd 'at' hh:mm:ss a \");\r\n\t\t formattedDate = df.format(c.getTime());\r\n\t\t \r\n\t\t try {\r\n\t\t \tString filename = user + \".txt\";\r\n\t\t \tString absoluteFilePath = \"\";\r\n\t\t \t//Gets the root directory\r\n\t\t \t\r\n\t\t \t//When ran in eclipse this saves files in the eclipse programs folder, if ran outside of eclipse it will save file to the current directory\t\r\n\t\t\t\tString workingDirectory = System.getProperty(\"user.dir\");\r\n\t\t\t\t\r\n\t\t\t\tabsoluteFilePath = workingDirectory + File.separator + filename;\r\n\t\t\t\t\r\n\t\t\t\tSystem.out.println(\"Final filepath : \" + absoluteFilePath);\r\n\r\n\t\t\t\t\r\n\r\n\t\t\t\tFile file = new File(absoluteFilePath);\r\n\r\n\t\t\t\t// if file doesn't exists, then create it\r\n\t\t\t\tif (!file.exists())\r\n\t\t\t\t{\r\n\t\t\t\t\tfile.createNewFile();\r\n\t\t\t\t}\r\n\r\n\t\t\t\tFileWriter fw = new FileWriter(file.getAbsoluteFile(), true);\r\n\t\t\t\tBufferedWriter bw = new BufferedWriter(fw);\r\n\t\t\t\tbw.newLine();\r\n\t\t\t\tbw.write(\"'\"+ action+\"':'\"+ actionName+\"' at :\"+formattedDate+\"\" );\r\n\t\t\t\tbw.close();\r\n\r\n\t\t\t\t\r\n\r\n\t\t\t} catch (IOException e) {\r\n\t\t\t\te.printStackTrace();\r\n\t\t\t}\r\n\r\n\t}", "public void addAccountInfo(StringBuilder sb) {\n sb.append(\"\\n\\nUser:\");\n sb.append(getUser());\n sb.append('\\n');\n sb.append(\"Phone:\");\n sb.append(getPhoneNumber());\n int overpaidDays = DonationManager.instance().getOverpaidDays();\n if (overpaidDays > 0) {\n sb.append(\"\\nOverpaid:\");\n sb.append(overpaidDays);\n }\n }", "long getLoginAt();", "private void getDateForAnalysisReport() {\n \tArrayList<Object> answer = new ArrayList<>();\n\t\tanswer.add(\"performingAnActivityTracking\");\n\t\tanswer.add(\"/getActivityData\");\n\t\tString star = reportStartDate.getValue().toString();\n\t\tString end = reportEndDate.getValue().toString();\n\t\tanswer.add(star);\n\t\tanswer.add(end);\n\t\t\n\t\tchs.client.handleMessageFromClientUI(answer);\n\t}", "public String getFromUser(){\r\n\t\treturn fromUser;\r\n\t}", "public String getUser(){\n \treturn user;\n }", "private String getCurrentTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "@Override \n public String toString() \n { \n return \"user\" + \n \"\\n\\t RecordNo: \" + this.recordNo + \n \"\\n\\t EmployeeName: \" + this.name + \n \"\\n\\t Age: \" + this.age + \n \"\\n\\t Sex: \" + this.sex + \n \"\\n\\t Date of Birth: \" + this.dob + \n \"\\n\\t Remark: \" + this.remark; \n }", "public Recordvo geUser() {\n\t\treturn new Recordvo(year, month, day, behavior) ;\n\t}", "public void setUserLogs() {\n ResultSet rs = Business.getInstance().getData().getCaseLog();\n try{\n while (rs.next()) {\n userLog.add(new UserLog(rs.getInt(\"userID\"),\n rs.getInt(2),\n rs.getString(\"date\"),\n rs.getString(\"time\")));\n }\n } catch (Exception e) {\n e.printStackTrace();\n }\n }", "public long getCurrentUserTime() {\n return getUserTime() - startUserTimeNano;\n }", "UserInfo getUserInfo(String username);", "public Date getUserUpdateTime() {\r\n return userUpdateTime;\r\n }", "HumanProfile getUserProfile();", "void setUserCreated(final Long userCreated);", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "@Override\n public String toString() {\n return getUserName() + \" on \" + getDate() + \"\\n\" + message + \"\\nType: \" + getType();\n }", "public void user_details()\n {\n\t boolean userdetpresent =userdetails.size()>0;\n\t if(userdetpresent)\n\t {\n\t\t //System.out.println(\"User details report is PRESENT\");\n\t }\n\t else\n\t {\n\t\t System.out.println(\"User details report is not present\");\n\t }\n }", "private static String getStamp() {\n\t\t\t return new SimpleDateFormat(\"yyyyMMddHHmmss\").format(new Date());\r\n\t\t}", "public void displayUserInformations() {\n println(\"getLocation(): \"+user.getLocation());\n println(\"getFriendsCount(): \"+user.getFriendsCount());\n println(\"getFollowersCount(): \"+user.getFollowersCount());\n println(\"getDescription(): \"+user.getDescription());\n println(\"getCreatedAt() : \"+user.getCreatedAt() );\n println(\"getDescriptionURLEntities(): \"+user.getDescriptionURLEntities());\n println(\"getFavouritesCount() : \"+user.getFavouritesCount() );\n }", "public static void main(String[] args) throws Exception{\n\t\t\t Date currentTime = new Date(95,7,6);\n\t\t\t SimpleDateFormat formatter = new SimpleDateFormat(\"dd/MMM/YYYY\");\n\t\t\t String dateString = formatter.format(currentTime);\n\t\t\t System.out.println(dateString);\n\t\t\t \n\t\t}", "public static String formatDateForName(Date date, String userId)\n\t{\n\t\tDateFormat format = new SimpleDateFormat(\"MMM dd, yyyy hh:mm a\", getPreferredLocale(userId));\n\t\tformat.setTimeZone(getPreferredTimeZone(userId));\n\n\t\tString rv = format.format(date);\n\t\treturn rv;\n\t}", "public long getCreatedByUser();", "java.lang.String getUserID();", "java.lang.String getUserID();", "java.lang.String getUserID();", "public static String toStringCurrentUser() {\n return new StringBuilder()\n .append(CURRENT_USER.getName())\n .append(\" - \")\n .append(CURRENT_USER.getEmployee().getName())\n .toString();\n }", "@AutoEscape\n\tpublic String getCreatedByUser();", "public String getUser() {\n\treturn strUser;\n }", "public Date getGmtLogin() {\n return gmtLogin;\n }", "String getUserInfoFromServer(String userID);", "public static String timestamp(){\n\t\tDate date = new Date();\n\t\tDateFormat hourdateFormat = new SimpleDateFormat(\"dd/MM/yyyy HH:mm:ss \");\n\t\treturn hourdateFormat.format(date);\n\t}", "private String getDateTime() {\n DateFormat dateFormat = new SimpleDateFormat(\"MM/dd/yyyy HH:mm\");\n Date date = new Date();\n return dateFormat.format(date);\n }", "private String getUserData() { \n\t\t \n\t\tString userName;\n\t\tObject principial = SecurityContextHolder.getContext().getAuthentication().getPrincipal();\t\n\t\tif(principial instanceof UserDetails) {\n\t\t\tuserName = ((UserDetails) principial).getUsername();\n\t\t} else {\n\t\t\tuserName = principial.toString(); \n\t\t}\n\t\treturn userName; \n\t}", "public String getUser()\n {\n return _user;\n }", "private void logUser() {\n }", "List<TimeLog> findTimelog(String username);", "private String getDateTime() {\n SimpleDateFormat sdf = new SimpleDateFormat(\"[yyyy/MM/dd - HH:mm:ss]\");\n return sdf.format(new Date());\n }", "public void checkInTime() {\n Date recentDate = new Date();\n PreparedStatement stmt;\n\n SimpleDateFormat dateStamp = new SimpleDateFormat(\"dd/MM/yyyy\");\n SimpleDateFormat timeStamp = new SimpleDateFormat(\"h:mm:ss a\");\n String dateuser = dateStamp.format(recentDate);\n String timeuser = timeStamp.format(recentDate);\n\n String id = txtUsername.getText();\n\n try {\n String querysql = \"update employee set time_in='\" + timeuser + \"',date='\" + dateuser + \"'\" + \", parking_spot = '\" + parking + \"' where id_no='\" + id + \"' \";\n stmt = conn.prepareStatement(querysql);\n stmt.execute();\n\n conn.close();\n\n } catch (SQLException e) {\n\n System.out.println(\"Failed to update\");\n\n }\n\n }", "String getUserID();", "public String getUsername()\r\n/* 11: */ {\r\n/* 12:30 */ return this.username;\r\n/* 13: */ }", "public UserIntentionRecord(Integer sysuserId, String intention, Timestamp createTime, Timestamp updateTime) {\n super(UserIntention.USER_INTENTION);\n\n set(0, sysuserId);\n set(1, intention);\n set(2, createTime);\n set(3, updateTime);\n }", "@AutoEscape\n\tpublic String getUser_name();", "public String userProcessorTime() {\n return this.userProcessorTime;\n }", "public String showUser(){\n String dataUser = \"\";\n for(int i = 0; i<MAX_USER; i++){\n if(user[i] != null){\n dataUser += user[i].showDataUser();\n }\n }\n return dataUser;\n }", "@Override\n\tpublic void Recive(User user, Date logDate) throws ServiceException {\n\n\t}", "public Timestamp getDateAcct();", "public Timestamp getDateAcct();", "public void updateUserDate(User user){\n ContentValues values = new ContentValues();\n values.put(COLUMN_USER_AGE, user.getNume());\n // updating row\n db.update(TABLE_USER, values, COLUMN_USER_EMAIL + \" = ?\",\n new String[]{String.valueOf(user.getEmail())});\n db.close();\n }", "Long getUserUpdated();", "public String getUserinfo() {\n return m_userinfo;\n }", "Date getLastLogin();", "private String timeConversion() {\n Calendar local = Calendar.getInstance();\n Calendar GMT = Calendar.getInstance(TimeZone.getTimeZone(\"GMT\"));\n\n //Time from the PINPoint\n int hours, minutes, seconds, day, month, year;\n hours = (record[10] & 0xF8) >> 3;\n minutes = ((record[10] & 0x07) << 3) + ((record[11] & 0xE0) >> 5);\n seconds = ((record[11] & 0x1F) << 1) + ((record[12] & 0x80) >> 7);\n seconds += (record[12] & 0x7F) / 100;\n day = (record[13] & 0xF8) >> 3;\n month = ((record[13] & 0x07) << 1) + ((record[14] & 0x80) >> 7);\n year = (record[14] & 0x7F) + 2000;\n \n month--; //Months in java are 0-11, PINPoint = 1-12;\n\n //Set GMTs time to be the time from the PINPoint\n GMT.set(Calendar.DAY_OF_MONTH, day);\n GMT.set(Calendar.MONTH, month);\n GMT.set(Calendar.YEAR, year);\n GMT.set(Calendar.HOUR_OF_DAY, hours);\n GMT.set(Calendar.MINUTE, minutes);\n GMT.set(Calendar.SECOND, seconds);\n\n //Local is set to GMTs time but with the correct timezone\n local.setTimeInMillis(GMT.getTimeInMillis());\n\n //Set Local time to be the time converted from GMT\n int lHours, lMinutes, lSeconds, lDay, lMonth, lYear;\n lHours = local.get(Calendar.HOUR_OF_DAY);\n lMinutes = local.get(Calendar.MINUTE);\n lSeconds = local.get(Calendar.SECOND);\n lDay = local.get(Calendar.DAY_OF_MONTH);\n lMonth = local.get(Calendar.MONTH);\n\n lMonth++; //Months in java are 0-11, humans read 1-12\n\n lYear = local.get(Calendar.YEAR);\n\n return hR(lMonth) + \"/\" + hR(lDay) + \"/\" + lYear + \" \" + hR(lHours) + \":\" + hR(lMinutes) + \":\" + hR(lSeconds);\n }", "public User details(String user);" ]
[ "0.6582035", "0.60159385", "0.60101", "0.5979165", "0.5964001", "0.58421355", "0.5797951", "0.5782654", "0.5782563", "0.57574123", "0.574562", "0.57021344", "0.56605697", "0.5606399", "0.5606399", "0.55882436", "0.55650884", "0.55568326", "0.55522716", "0.5550974", "0.55398256", "0.5538978", "0.5535739", "0.5520262", "0.5514821", "0.55129", "0.5511621", "0.5492961", "0.54924774", "0.54774284", "0.54774284", "0.54774284", "0.5448328", "0.5446075", "0.544408", "0.54290813", "0.5412685", "0.54120904", "0.54017335", "0.5399469", "0.5395559", "0.537082", "0.53699243", "0.5353827", "0.53528714", "0.53419524", "0.5322735", "0.53173363", "0.5316643", "0.5315021", "0.5310802", "0.5308776", "0.53060293", "0.52925754", "0.529194", "0.5283892", "0.5283358", "0.52620745", "0.5245511", "0.5239679", "0.52387494", "0.5238407", "0.5238407", "0.5224965", "0.5215983", "0.52159774", "0.52144253", "0.5210872", "0.52101904", "0.5204409", "0.5201292", "0.5201292", "0.5201292", "0.5200939", "0.5200548", "0.5200405", "0.5198928", "0.5196519", "0.51930404", "0.51860577", "0.5184724", "0.5183071", "0.51803786", "0.5176338", "0.51618224", "0.51572245", "0.5155789", "0.5152778", "0.5152555", "0.51488554", "0.5147491", "0.51438266", "0.5143815", "0.51426566", "0.51426566", "0.5141547", "0.5135265", "0.5125225", "0.5122162", "0.51200175", "0.5116559" ]
0.0
-1
Complete the gridlandMetro function below.
static long gridlandMetro(long n, int m, int k, int[][] track) { Map<Integer, Stack<int[]>> map = new HashMap<>(); for (int i = 0; i < k; i++) { int r = track[i][0]; int c1 = track[i][1]; int c2 = track[i][2]; Stack<int[]> stack = map.get(r); if (stack == null) { stack = new Stack<>(); stack.push(new int[] { c1, c2 }); map.put(r, stack); } else { int[] c = stack.peek(); if (c[1] >= c1) c[1] = Math.max(c[1], c2); else stack.push(new int[] { c1, c2 }); } } return (long) n * m - map.values().stream().flatMap(Collection::stream).mapToLong(c -> c[1] - c[0] + 1).sum(); }
{ "objective": { "self": [], "paired": [], "triplet": [ [ "query", "document", "negatives" ] ] } }
[ "@Override\n public void displayMapTiles(MapTile[][] grid)\n {\n Platform.runLater(() -> {\n MapView mapArea = gui.getMapArea();\n mapArea.displayMapGrid(grid, -3, -3);\n });\n }", "private void clearGrid() {\n\n }", "public static void main(String[] args) {\n Scanner s = new Scanner(System.in);\n GridlandMetro ts = new GridlandMetro();\n long rows = s.nextLong();\n long cols = s.nextLong();\n long numTracks = s.nextLong();\n HashMap<Long, List<Pair>> map_t = new HashMap();\n long numLampposts = 0L;\n\n\n for(long j=0; j<numTracks; j+=1L){\n\n long current_row = s.nextLong();\n long c1 = s.nextLong();\n long c2 = s.nextLong();\n if(!map_t.containsKey(current_row))\n map_t.put(current_row, new ArrayList<Pair>());\n map_t.get(current_row).add(ts.new Pair(c1,c2));\n\n }\n\n for(long i=(map_t.keySet().size()+1); i<=rows; i++)\n numLampposts += cols;\n\n for(Long current_key:map_t.keySet()){\n Collections.sort(map_t.get(current_key));\n long current_max = 1L;\n for(int i=0; i<map_t.get(current_key).size(); i++){\n if(current_max < map_t.get(current_key).get(i).start)\n numLampposts += map_t.get(current_key).get(i).start - current_max;\n if(current_max <= map_t.get(current_key).get(i).end)\n current_max = map_t.get(current_key).get(i).end + 1L;\n }\n numLampposts += cols-current_max+1;\n }\n\n\n\n\n System.out.println(numLampposts);\n }", "public void tiles()\n{\n if(m.getActiveManager() != 0)\n {\n m.hideButtonsOfManager(1);\n m.hideButtonsOfManager(2);\n m.showButtonsOfManager(0);\n m.activateManager(0);\n m.getTileManager().getActiveTile().setShowHover(true);\n }\n}", "public void display() {\n updateTileButtons();\n gridView.setAdapter(new CustomAdapter(tileButtons, columnWidth, columnHeight));\n }", "public void update()\n {\n // get the GridSquare object from the world\n Terrain terrain = game.getTerrain(row, column);\n boolean squareVisible = game.isVisible(row, column);\n boolean squareExplored = game.isExplored(row, column);\n \n \n Color color;\n ImageIcon image;\n \n switch ( terrain )\n {\n case SAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sand.jpg\")); break;\n case FOREST : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\")); break;\n case WETLAND : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/forest.jpg\")); break;\n case SCRUB : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\")); break;\n case WATER : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\")); break;\n case BRICK : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick.jpg\")); break;\n default : image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/gray.jpg\")); break; \n }\n \n if ( squareExplored || squareVisible )\n {\n // Set the text of the JLabel according to the occupant\n lblText.setText(game.getOccupantStringRepresentation(row,column));\n lblText.setHorizontalTextPosition((int) CENTER_ALIGNMENT);\n lblText.setVerticalTextPosition((int) CENTER_ALIGNMENT);\n \n setVisible(true);\n \n //Kiwifruit\n if( row == 6 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brick2.jpg\"));\n }\n \n if( row == 0 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n \n if( row == 7 && column == 0 || row == 7 && column == 7 || row == 6 && column == 6 || row == 8 && column == 3 || row == 9 && column == 3 || row == 9 && column == 4 || row == 9 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassk.jpg\"));\n }\n \n if( row == 2 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubk.jpg\"));\n }\n //Trap\n if(\"T\".equals(game.getOccupantStringRepresentation(row, column))){\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/trap.jpg\"));\n lblText.setIcon(image);\n }\n //Food\n //if(game.getOccupantStringRepresentation(row, column) == \"apple\" ) {\n //image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n //}\n if( row == 6 && column == 7) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scruba.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 5 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassm.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 2 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubs.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 8 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grasso.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n //Predator\n if( row == 2 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrub.jpg\"));\n }\n }\n \n if( row == 9 && column == 7 ||row == 5 && column == 2 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassp.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 3 && column == 4 || row == 6 && column == 4 ) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassr.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass.jpg\"));\n }\n }\n \n if( row == 4 && column == 1) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/waters.jpg\"));\n if(game.getOccupantStringRepresentation(row, column) == \"\") {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/water.jpg\"));\n }\n }\n //Mystical Creature\n if( row == 7 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/brickf.jpg\"));\n }\n \n if( row == 4 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandph.jpg\"));\n }\n \n if( row == 0 && column == 3) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/sandm.jpg\"));\n }\n \n if( row == 4 && column == 6 || row == 6 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/scrubp.jpg\"));\n }\n \n if( row == 8 && column == 8) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grassd.jpg\"));\n }\n \n \n //Hazard\n if( squareExplored && row == 2 && column == 2) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n\n \n if( squareExplored && row == 3 && column == 5 || squareExplored && row == 7 && column == 4 || squareExplored && row == 6 && column == 5 || squareExplored && row == 7 && column == 6) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 1 && column == 4) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if( squareExplored && row == 5 && column == 0) {\n image = new ImageIcon(getClass().getResource(\"/nz/ac/aut/ense701/image/grass2.jpg\"));\n lblText.setHorizontalAlignment((int) CENTER_ALIGNMENT);\n lblText.setVerticalAlignment((int) CENTER_ALIGNMENT);\n setVisible(true);\n }\n \n if ( squareVisible && !squareExplored ) \n {\n\n }\n lblText.setIcon(image);\n \n // set border colour according to \n // whether the player is in the grid square or not\n setBorder(game.hasPlayer(row,column) ? activeBorder : normalBorder);\n }\n else\n {\n lblText.setText(\"\");\n lblText.setIcon(null);\n setBorder(normalBorder);\n }\n }", "@Override\n public void run() {\n ((ImageView)findViewById(R.id.home_oa)).getLocationInWindow(move);\n scrollView.scrollTo(0, move[1]-Utils.getStatusBarHeight(HomeActivity.this));\n }", "private void setGridOnCollectibleSelected() {\n showCardInfo(getNameFromID(selectedCollectibleID));\n setGridColor(Color.GOLD);\n for (int row = 0; row < Map.NUMBER_OF_ROWS; row++) {\n for (int column = 0; column < Map.NUMBER_OF_COLUMNS; column++) {\n ImageView interactor = getInteractor(row, column);\n int finalRow = row, finalColumn = column;\n interactor.setOnMouseClicked(e -> handleUseCollectible(finalRow, finalColumn, false));\n\n }\n }\n }", "public void updateGridX();", "public void returnDefualt() {\r\n this.x = (float)getWidth()/2;\r\n this.y = (float)getHeight()/2;\r\n notifyObservers(normelizeAilron(this.x), normelizeElevator(this.y));\r\n }", "private void conformCorridors() {\n for (int rowView = 0; rowView < rowViewMax; rowView++) {\r\n for (int colView = 0; colView < colViewMax; colView++) {\r\n if (getCell(rowView, colView) != Cell.wall)\r\n setCell(rowView, colView, Cell.corridor);\r\n }\r\n }\r\n }", "@FXML\n public void initialize(){\n ArrayList<Launcher> planes = this.launcherFacade.getAll(\"plane\");\n\n for(int i = 0; i < planes.size(); i++) {\n gridPlanes.addRow(0);\n\n Label l1 = new Label(planes.get(i).getRegistrationLauncher());\n gridPlanes.add(l1,0, i + 1);\n GridPane.setHalignment(l1, javafx.geometry.HPos.CENTER);\n\n Label l2 = new Label(planes.get(i).getMaxLaunchWeight()+\"\");\n gridPlanes.add(l2,1, i + 1);\n GridPane.setHalignment(l2, javafx.geometry.HPos.CENTER);\n\n Label l3 = new Label(planes.get(i).getRenewalDate().toString());\n gridPlanes.add(l3,2, i + 1);\n GridPane.setHalignment(l3, javafx.geometry.HPos.CENTER);\n\n Label l4 = new Label(((Plane)planes.get(i)).getSpan()+\"\");\n gridPlanes.add(l4,3, i + 1);\n GridPane.setHalignment(l4, javafx.geometry.HPos.CENTER);\n\n Button b2 = new Button(\"Update\");\n int finalI = i;\n\n b2.setOnAction(event -> {\n updatePlane(planes.get(finalI).getRegistrationLauncher());\n });\n\n\n gridPlanes.add(b2,6,i + 1);\n GridPane.setHalignment(b2, javafx.geometry.HPos.CENTER);\n\n Button b1 = new Button(\"X\");\n\n b1.setOnAction(event -> {\n deletePlane(planes.get(finalI).getRegistrationLauncher());\n });\n\n gridPlanes.add(b1,7,i + 1);\n GridPane.setHalignment(b1, javafx.geometry.HPos.CENTER);\n }\n }", "private void updateGrid() {\n\t\tfor (Neighbor neighbor : upsetNeighbors) {\n\t\t\tClear vacated_cell = new Clear(neighbor.getCoordsX(), neighbor.getCoordsY());\n\t\t\tgrid.setGridIndex(vacated_cell, vacated_cell.getCoordsX(), vacated_cell.getCoordsY());\n\t\t\tCell new_location = availableSpaces.get((int) (Math.random() * (availableSpaces.size() - 1)));\n\t\t\tint new_x = new_location.getCoordsX();\n\t\t\tint new_y = new_location.getCoordsY();\n\t\t\tif (neighbor.getClass().equals(Group1.class))\n\t\t\t\tgrid.setGridIndex(new Group1(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\telse\n\t\t\t\tgrid.setGridIndex(new Group2(new_x, new_y, percentSimilar), new_x, new_y);\n\t\t\tavailableSpaces.remove(new_location);\n\t\t\tavailableSpaces.add(vacated_cell);\n\t\t}\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tint mapIndex = getFloorIndexByName(mMyLocationFloor);\n\t\t\tif (mapIndex > -1) {\n\t\t\t\tsetCheckAt(mapIndex);\n\t\t\t}\n\t\t}", "@Override\r\n\tpublic void setup() {\r\n\t\tthis.gridCells = this.world.getCells();\r\n\t\tthis.markerDrawOrders = new HashMap<Cell, Integer>();\r\n\t\tsetMarkerDrawOrders(this.gridCells);\r\n\t\t//Number of hexagons in columns and rows\r\n\t\tthis.numHexRow = this.gridCells.length;\r\n\t\tthis.numHexCol = this.gridCells[0].length;\r\n\t\t//Calculate the total width and height in pixels the hexagons take up\r\n\t\tthis.totalHexWidth = (this.numHexCol * HEX_WIDTH) + HEX_WIDTH / 2;\r\n\t\tthis.totalHexHeight = \r\n\t\t\t\t(HEX_ANGLE_HEIGHT + HEX_VERT_HEIGHT) \r\n\t\t\t\t* this.numHexRow + HEX_ANGLE_HEIGHT;\r\n\t\t\r\n\t\t//Work out which dimension take up the most space\r\n\t\tif (this.totalHexWidth > this.totalHexHeight) {\r\n\t\t\tthis.largestDimension = Dimensions.HORIZONTAL;\r\n\t\t} else {\r\n\t\t\tthis.largestDimension = Dimensions.VERTICAL;\r\n\t\t}\r\n\t\tsize(PIXEL_WIDTH, PIXEL_HEIGHT);\r\n\t\t\r\n\t\t//Gives the garbage clearer time to free up memory before the \r\n\t\t//background buffer is recalculated\r\n\t\tthis.backgroundBuffer = null; \r\n\t\t//Of screen buffer to where the background tiles of the ant world a are\r\n\t\t//drawn. This means that each time the buffer is drawn to the screen,\r\n\t\t//rather than all the tiles which makes it much faster!\r\n\t\tthis.backgroundBuffer = createGraphics(this.totalHexWidth,\r\n\t\t\t\tthis.totalHexHeight, P2D);\r\n\t\t\r\n\t\tsmooth(); //Turn on anti aliasing\r\n\t\tframeRate(10); //Turn down the frame rate for less processing power\r\n\t\t//Text variables\r\n\t\ttextFont(this.courierFont, 30);\r\n\t\tfill(255); //Fill colour (white) for the text\r\n\t\tthis.zoomer = new ZoomPan(this); // Initialise the zoomer\r\n\t\tthis.zoomer.allowZoomButton(false); \r\n\t\tsetInitialPanAndZoom(); //Set the initial zoom and pan\r\n\t\tupdateImageScale(); //Update the image scales because zoom scale has\r\n\t\t\t\t\t\t\t//been changed\r\n\t\tbufferWorld(); //Buffer the background tiles\r\n\t}", "void setupGrid() {\n\n // create a Switch for the spheres, allow switch changes\n gridSwitch = new Switch(Switch.CHILD_NONE);\n gridSwitch.setCapability(Switch.ALLOW_SWITCH_WRITE);\n\n // Set up an appearance to make the square3s with red ambient,\n // black emmissive, red diffuse and black specular coloring\n Material material = new Material(red, black, red, black, 64);\n Appearance appearance = new Appearance();\n appearance.setMaterial(material);\n\n // create a grid of quads\n int gridSize = 20; // grid is gridSize quads along each side\n int numQuads = gridSize * gridSize;\n int numVerts = numQuads * 4; // 4 verts per quad\n // there will be 3 floats per coord and 4 coords per quad\n float[] coords = new float[3 * numVerts];\n // All the quads will use the same normal at each vertex, so\n // allocate an array to hold references to the same normal\n Vector3f[] normals = new Vector3f[numVerts];\n Vector3f vertNormal = new Vector3f(0.0f, 0.0f, 1.0f);\n float edgeLength = 5.0f; // length of each edge of the grid\n float gridGap = 0.03f; // the gap between each quad\n // length of each quad is (total length - sum of the gaps) / gridSize\n float quadLength = (edgeLength - gridGap * (gridSize - 1)) / gridSize;\n\n // create a grid of quads in the z=0 plane\n // each has a TransformGroup to position the sphere which contains\n // a link to the shared group for the sphere\n float curX, curY;\n for (int y = 0; y < gridSize; y++) {\n curY = y * (quadLength + gridGap); // offset to lower left corner\n curY -= edgeLength / 2; // center on 0,0\n for (int x = 0; x < gridSize; x++) {\n // this is the offset into the vertex array for the first\n // vertex of the quad\n int vertexOffset = (y * gridSize + x) * 4;\n // this is the offset into the coord array for the first\n // vertex of the quad, where there are 3 floats per vertex\n int coordOffset = vertexOffset * 3;\n curX = x * (quadLength + gridGap); // offset to ll corner\n curX -= edgeLength / 2; // center on 0,0\n // lower left corner\n coords[coordOffset + 0] = curX;\n coords[coordOffset + 1] = curY;\n coords[coordOffset + 2] = 0.0f; // z\n // lower right corner\n coords[coordOffset + 3] = curX + quadLength;\n coords[coordOffset + 4] = curY;\n coords[coordOffset + 5] = 0.0f; // z\n // upper right corner\n coords[coordOffset + 6] = curX + quadLength;\n coords[coordOffset + 7] = curY + quadLength;\n coords[coordOffset + 8] = 0.0f; // z\n // upper left corner\n coords[coordOffset + 9] = curX;\n coords[coordOffset + 10] = curY + quadLength;\n coords[coordOffset + 11] = 0.0f; // z\n for (int i = 0; i < 4; i++) {\n normals[vertexOffset + i] = vertNormal;\n }\n }\n }\n // now that we have the data, create the QuadArray\n QuadArray quads = new QuadArray(numVerts, QuadArray.COORDINATES\n | QuadArray.NORMALS);\n quads.setCoordinates(0, coords);\n quads.setNormals(0, normals);\n\n // create the shape\n Shape3D shape = new Shape3D(quads, appearance);\n\n // add it to the switch\n gridSwitch.addChild(shape);\n }", "void method0() {\nprivate double edgeCrossesIndicator = 0;\n/** counter for additions to the edgeCrossesIndicator\n\t\t */\nprivate int additions = 0;\n/** the vertical level where the cell wrapper is inserted\n\t\t */\nint level = 0;\n/** current position in the grid\n\t\t */\nint gridPosition = 0;\n/** priority for movements to the barycenter\n\t\t */\nint priority = 0;\n/** reference to the wrapped cell\n\t\t */\nVertexView vertexView = null;\n}", "private void interFace(){\n\n\n setSize(900,300);\n setLocationRelativeTo(null);\n setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\n setLayout(new GridLayout(0,3));\n\n hanoi1 = new Hanoi();\n hanoi2 = new Hanoi();\n hanoi3 = new Hanoi();\n\n add(hanoi1);\n add(hanoi2);\n add(hanoi3);\n setVisible(true);\n\n\n }", "public GridMapCompassMoves() {\n super();\n }", "public GridMapPanel() {\n super();\n initialize();\n }", "@Override\n\tpublic void show () {\n overWorld = new Sprite(new TextureRegion(new Texture(Gdx.files.internal(\"Screens/overworldscreen.png\"))));\n overWorld.setPosition(0, 0);\n batch = new SpriteBatch();\n batch.getProjectionMatrix().setToOrtho2D(0, 0, 320, 340);\n\n // Creates the indicator and sets it to the position of the first grid item.\n indicator = new MapIndicator(screen.miscAtlases.get(2));\n // Creates the icon of Daur that indicates his position.\n icon = new DaurIcon(screen.miscAtlases.get(2));\n // Sets the mask position to zero, as this screen does not lie on the coordinate plane of any tiled map.\n screen.mask.setPosition(0, 0);\n screen.mask.setSize(320, 340);\n Gdx.input.setInputProcessor(inputProcessor);\n\n // Creates all relevant text.\n createText();\n // Sets numX and numY to the position of Daur on the map.\n numX = storage.cellX;\n numY = storage.cellY;\n indicator.setPosition(numX * 20, numY * 20 + 19);\n // Sets the icon to the center of this cell.\n icon.setPosition(numX * 20 + 10 - icon.getWidth() / 2, numY * 20 + 29 - icon.getHeight() / 2);\n // Creates all the gray squares necessary.\n createGraySquares();\n }", "private void InitializeApp() {\n\n for (int y = 0; y < 11; y++) {\n for (int x = 0; x < 11; x++) {\n defendingGrid[x][y] = new GameCell();\n attackingGrid[x][y] = new GameCell();\n }\n }\n\n// attackingGrid[5][5].setMiss(true);\n// attackingGrid[5][6].setHit(true);\n// attackingGrid[5][7].setWaiting(true);\n// attackingGrid[5][7].setHasShip(true);\n\n }", "private void buildPanelEast() {\n\r\n }", "public void fillTable() {\n\t\tif (scroll.getWidth() == 0) {\n\t\t\treturn;\n\t\t}\n\t\tboolean showedNew = false;\n\t\tArrayList<Placeable> currentView = new ArrayList<Placeable>();\n\t\tif (viewing == ViewingMode.MATERIAL) {\n\t\t\tif (loadedMats == null)\n\t\t\t\tloadedMats = repo.getAllMats();\n\t\t\tfor (NamedMaterial m: loadedMats) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t}\n\t\telse if (viewing == ViewingMode.PIECE){\n\t\t\tif (loadedPieces == null)\n\t\t\t\tloadedPieces = repo.getAllPieces();\n\t\t\tfor (Piece m: loadedPieces) {\n\t\t\t\tcurrentView.add(m);\n\t\t\t}\n\t\t\tshowedNew = true;\n\t\t}\n\t\t\n\t\ttiles.clearChildren();\n\t\tfloat cellWidth = 64.0f;\n\t\tint numAcross = (int)(scroll.getWidth() / cellWidth);\n\t\tif (numAcross <= 0) {\n\t\t\tnumAcross = 1;\n\t\t}\n\t\tint count = 0;\n\t\tActor tile;\n\t\twhile (count < currentView.size()) {\n\t\t\tfor (int y = 0; y < numAcross; y++) {\n\t\t\t\tif (!showedNew) {\n\t\t\t\t\ttile = new Label(\"New\", TextureOrganizer.getSkin());\n\t\t\t\t\t((Label)tile).setAlignment(Align.center);\n\t\t\t\t\ttile.addListener(new ClickListener() {\n\t\t\t\t\t\t@Override\n\t\t\t\t\t public void clicked(InputEvent event, float x, float y) {\n\t\t\t\t\t\t\tmakeNew();\n\t\t\t\t\t\t}\n\t\t\t\t\t});\n\t\t\t\t\tshowedNew = true;\n\t\t\t\t}\n\t\t\t\telse if (count >= currentView.size()) {\n\t\t\t\t\tbreak;\n\t\t\t\t}\n\t\t\t\telse {\n\t\t\t\t\ttile = new ColoredRectActor(currentView.get(count++));\n\t\t\t\t\ttile.addListener(new TileListener((ColoredRectActor)tile));\n\t\t\t\t}\n\t\t\t\ttiles.add(tile).width(cellWidth).height(cellWidth).fill();\n\t\t\t}\n\t\t\tif (count < currentView.size())\n\t\t\t\ttiles.row();\n\t\t}\n\t}", "private void m7632a() {\n Exception e;\n if (!this.f6418o) {\n this.f6406c.removeAnnotations();\n this.f6417n = true;\n Icon fromDrawable = IconFactory.getInstance(this).fromDrawable(getResources().getDrawable(C1373R.drawable.ic_grid_oval_icon));\n for (GridDTO latLng1 : this.f6414k) {\n this.f6415l.add((MarkerOptions) ((MarkerOptions) new MarkerOptions().icon(fromDrawable)).position(latLng1.getLatLng1()));\n }\n try {\n C2568n.a(this.f6406c, this.f6415l);\n } catch (ExecutionException e2) {\n e = e2;\n e.printStackTrace();\n } catch (InterruptedException e3) {\n e = e3;\n e.printStackTrace();\n }\n }\n }", "@Override\n public void revealAllMines() {\n for (Tile[] tiles : grid) {\n for (Tile t : tiles) {\n if (t.getType() == Tile.MINE) {\n t.setState(Tile.REVEALED);\n }\n }\n }\n }", "public Gridder()\n\t{\n grid = new Cell[MapConstant.MAP_X][MapConstant.MAP_Y];\n for (int row = 0; row < grid.length; row++) {\n for (int col = 0; col < grid[0].length; col++) {\n grid[row][col] = new Cell(row, col);\n\n // Set the virtual walls of the arena\n if (row == 0 || col == 0 || row == MapConstant.MAP_X - 1 || col == MapConstant.MAP_Y - 1) {\n grid[row][col].setVirtualWall(true);\n }\n }\n }\n\t}", "public BuildGrid()\n {\n System.out.print(\"Creating a new grid: \");\n\n m_grid = new double[1][5];\n setDimX(1);\n setDimY(5);\n\n this.fillWith(0);\n System.out.println(\"Done\");\n }", "private boolean checkM(){\n if(currentLocation.x == previousLocation.x && currentLocation.y == previousLocation.y) {\n return false;\n }\n // Is outside the border\n if(currentLocation.x < size || currentLocation.y < size || currentLocation.x > map.numRows - size || currentLocation.y > map.numCols - size) {\n return false;\n }\n // Is on the land\n double angle2 = 0;\n while (angle2 < 6.3) {\n if (map.getTerrainGrid()[currentLocation.x + (int) (size/2 * cos(angle2))][currentLocation.y + (int) (size/2 * sin(angle2))] == Colors.OCEAN) {\n return false;\n }\n angle2 += 0.3;\n }\n return true;\n }", "@Override\n protected Void call() {\n ((HBox) root.getTop()).getChildren().get(2).setDisable(true);\n ((HBox) root.getTop()).getChildren().get(3).setDisable(true);\n\n // The array of rectangle heights is sorted and a list of animations for the rectangles\n // on the screen is created as the sorting executes\n List<List<List<double[]>>> animations = new ArrayList<List<List<double[]>>>();\n runMergeSort(heights, numOfThreads, animations);\n runAnimations(recs, animations);\n\n return null;\n }", "private void makeEntranceAndExit() {\n int rowView = calcRowViewAndWalk(rowEntry, Direction.up);\r\n int colView = calcColViewAndWalk(colEntry, Direction.up);\r\n setCell(rowView, colView, Cell.corridor);\r\n \r\n rowView = calcRowViewAndWalk(rowExit, Direction.down);\r\n colView = calcColViewAndWalk(colExit, Direction.down);\r\n setCell(rowView, colView, Cell.corridor);\r\n }", "public void majAffichage() {\n this.grid.getChildren().clear(); // vide tout le gridpane\n for (int i = 0; i < this.matrice.getNbLigne(); i++) {\n for (int j = 0; j < this.matrice.getNbColonne(); j++) {\n Node n = this.matrice.getCell(i, j); // recupère les imgViews de la matrice\n this.grid.setHalignment(n, HPos.CENTER); // place les labels au centre des cases\n this.grid.add(this.matrice.getCell(i, j), j, i);\n }\n }\n }", "@Override\n protected void generateTiles() {\n }", "public RegularGrid() {\r\n }", "public void landPiece() {\n\t\t// current rotation of piece\n\t\tint rot = currentPiece.getPieceRotation();\n\t\t\n\t\t// x coordinate of current piece's northwest corner\n\t\tint row = currentPieceGridPosition[0];\n\t\t\n\t\t// y coordinate of current piece's northwest corner\n\t\tint col = currentPieceGridPosition[1];\t\n\n\t\t// adds currentPiece's landing positions to be true in blockMatrix\n\t\tfor(int i = 0; i < 4; i++) { \n\t\t\tfor(int j = 0; j < 4; j++) { \n\t\t\t\tif(currentPiece.isFilled(rot, i, j)) {\n\t\t\t\t\tblockMatrix[i + row][j + col] = true; \n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t\n\t\t//add up scores\n\t\tnumLines += numberOfFormedLines(); \n\t\tif(numberOfFormedLines() >= 4) {\n\t\t\tnumTetrises++; \n\t\t}\n\t\t\n\t\t//clear out full lines\n\t\tfor(int i = 0; i < blockMatrix.length; i++) { \n\t\t\tif(fullLine(i)) { \n\t\t\t\tremoveLine(i);\n\t\t\t\t//find rows with blocks filled above cleared line to drop those down\n\t\t\t\tfor(int m = i-1; m >= 0; m--) { \n\t\t\t\t\tfor(int n = 0; n < NUM_COLS; n++) {\n\t\t\t\t\t\t// fill in space below, clear out current row \n\t\t\t\t\t\tif(hasBlock(m, n)) { \n\t\t\t\t\t\t\tblockMatrix[m][n] = false;\n\t\t\t\t\t\t\tblockMatrix[m+1][n] = true;\n\t\t\t\t\t\t}\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t}\n\t\t\n\t\t// ready for next piece\n\t\taddNewPiece();\n\t}", "private void northRegion() {\r\n\t\tthis.addComponent(BorderLayout.NORTH, sv);\r\n\t\t\r\n\t\tToolbar toolBar = new Toolbar();\r\n\t\tsetToolbar(toolBar);\r\n\t\ttoolBar.setTitle(\"ThePath Game\");\r\n\t\t\r\n\t\tCheckBox soundCheckBox = new CheckBox(\"Side Menu Item Check\");\r\n\t\tsoundCheckBox.getAllStyles().setBgTransparency(255);\r\n\t\tsoundCheckBox.getAllStyles().setBgColor(ColorUtil.LTGRAY);\r\n\t\t\r\n\t\tSoundCommand soundCommand = new SoundCommand(gw);\r\n\t\tsoundCheckBox.setCommand(soundCommand);\r\n\t\ttoolBar.addComponentToSideMenu(soundCheckBox);\r\n\t\t\r\n\t\tAccelerateCommand accelerateCommand = new AccelerateCommand(gw);\r\n\t\ttoolBar.addCommandToLeftSideMenu(accelerateCommand);\r\n\t\t\r\n\t\tAboutCommand aboutCommand = new AboutCommand(gw);\r\n\t\ttoolBar.addCommandToLeftSideMenu(aboutCommand);\r\n\t\t\r\n\t\tHelpCommand helpCommand = new HelpCommand(gw);\r\n\t\ttoolBar.addCommandToRightBar(helpCommand);\r\n\t\t\r\n\t\tExitCommand exitCommand = new ExitCommand();\r\n\t\ttoolBar.addCommandToLeftSideMenu(exitCommand);\r\n\t}", "public lv3()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n //super(950, 600, 1); \n //prepare();\n prepare();\n stopped();\n started();\n }", "void ompleBlocsHoritzontals() {\r\n\r\n for (int i = 0; i < N; i = i + SRN) // for diagonal box, start coordinates->i==j \r\n {\r\n ompleBloc(i, i);\r\n }\r\n }", "private void addPieces() {\n gridPane.getChildren().clear();\n Map<Piece, Position> pieces = controller.getAllActivePiecesPositions();\n /* Add the tiles */\n for (int row = 0; row < 8; row++) {\n for (int col = 0; col < 8; col++) {\n Tile tile = new TileView(new Position(row, col));\n gridPane.add(tile.getRootNode(),\n 1 + tile.getPosition().getCol(),\n 1 + tile.getPosition().getRow());\n GridPane.setHgrow(tile.getRootNode(), Priority.ALWAYS);\n GridPane.setVgrow(tile.getRootNode(), Priority.ALWAYS);\n getTiles()[row][col] = tile;\n tile.getRootNode().setOnMouseClicked(\n tileListener(tile));\n tile.clear();\n tile.setSymbol(\"\");\n }\n }\n /* Add the pieces */\n for (Piece p : pieces.keySet()) {\n Position placeAt = pieces.get(p);\n getTileAt(placeAt).setSymbol(p.getType().getSymbol(p.getSide()));\n }\n /* Add the coordinates around the perimeter */\n for (int i = 1; i <= 8; i++) {\n Text coord1 = new Text((char) (64 + i) + \"\");\n coord1.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord1.setFill(Color.WHITE);\n GridPane.setHalignment(coord1, HPos.CENTER);\n gridPane.add(coord1, i, 0);\n\n Text coord2 = new Text((char) (64 + i) + \"\");\n coord2.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord2.setFill(Color.WHITE);\n GridPane.setHalignment(coord2, HPos.CENTER);\n gridPane.add(coord2, i, 9);\n\n Text coord3 = new Text(\" \" + (9 - i) + \" \");\n coord3.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord3.setFill(Color.WHITE);\n GridPane.setHalignment(coord3, HPos.CENTER);\n gridPane.add(coord3, 0, i);\n\n Text coord4 = new Text(\" \" + (9 - i) + \" \");\n coord4.setFont(Font.font(null, FontWeight.BOLD, 14));\n coord4.setFill(Color.WHITE);\n GridPane.setHalignment(coord4, HPos.CENTER);\n gridPane.add(coord4, 9, i);\n }\n }", "boolean hasGrid();", "@Override\n protected void execute() {\n SmartDashboard.putData(Robot.driveBase);\n SmartDashboard.putData(Robot.pneumaticsBase);\n SmartDashboard.putData(Robot.cargoIntake);\n SmartDashboard.putData(Robot.hatchPanelIntake);\n SmartDashboard.putData(Robot.climber);\n SmartDashboard.putNumber(\"x Joystick\", Robot.oi.getDriveX());\n SmartDashboard.putNumber(\"y Joystick\", Robot.oi.getDriveY());\n SmartDashboard.putNumber(\"z Joystick\", Robot.oi.getDriveZ());\n if (Robot.network.getContourInfo(DataType.area, 0) < Robot.network.getContourInfo(DataType.area, 1)) {\n SmartDashboard.putNumber(\"ratio\",\n Robot.network.getContourInfo(DataType.area, 0) / Robot.network.getContourInfo(DataType.area, 1));\n } else {\n SmartDashboard.putNumber(\"ratio\",\n Robot.network.getContourInfo(DataType.area, 1) / Robot.network.getContourInfo(DataType.area, 0));\n }\n }", "public void step() {\n\t\tcellSizes.clear();\n\t\tupsetNeighbors = new ArrayList<Neighbor>();\n\t\tavailableSpaces = new ArrayList<Cell>();\n\t\tfor (int r = 0; r < grid.getRows(); r++) {\n\t\t\tfor (int c = 0; c < grid.getColumns(); c++) {\n\t\t\t\tupdateStatus(r, c);\n\t\t\t}\n\t\t}\n\t\tupdateGrid();\n\t}", "public WeatherGridSlice() {\n super();\n }", "public void onClearGridButtonClick()\n {\n // CODE MISSING !\n // Should call ensureEmpty for every location in the grid.\n\n // Create a warning dialog box (JOptionPane).\n JOptionPane.showMessageDialog(null,\n \"The method for clearing the grid \" +\n \"has not been fully implemented yet.\",\n \"Under Development\",\n JOptionPane.WARNING_MESSAGE);\n\n // Display the grid after it has been completely cleared.\n display.showGrid();\n }", "private void createGrid() {\n Platform.runLater(() -> {\n\n // Update UI here\n //createGrid(numRows); // E.g. let's create a 20 x 20 grid\n createGrid(20);\n });\n }", "private void initProcess(){\n this.getScPanelFriends().getViewport().setOpaque(false);\n this.getScPanelTopics().getViewport().setOpaque(false);\n this.getCenterPanel().setSize(0,0);\n this.getEastPanel().setSize(1700,800);\n //Administrador inhabilitado por defecto hasta implementación\n this.getBtnAdmin().setEnabled(false);\n this.getMenuOption().setLocationRelativeTo(this);\n }", "public void updateDisplay()\n {\n //Step 3\n\t Color color = null;\n //Hint - use a nested for loop\n\t for(int row = 0; row < grid.length; row++)\n\t {\n\t\t for(int col = 0; col < grid[0].length; col++)\n\t\t {\n\t\t\t if(grid[row][col] == EMPTY)\n\t\t\t {\n\t\t\t\t color = Color.BLACK;\n\t\t\t }\n\t\t\t else if(grid[row][col] == METAL)\n\t\t\t {\n\t\t\t\t color = Color.GRAY;\n\t\t\t }\n\t\t\t else if(grid[row][col] == SAND)\n\t\t\t {\n\t\t\t\t color = new Color(204, 186, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == WATER)\n\t\t\t {\n\t\t\t\t color = new Color(7, 125, 116);\n\t\t\t }\n\t\t\t else if(grid[row][col] == HELIUM)\n\t\t\t {\n\t\t\t\t color = Color.WHITE;\n\t\t\t }\n\t\t\t else if(grid[row][col] == BOUNCE)\n\t\t\t {\n\t\t\t\t color = new Color(255, 0, 200);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VIRUS)\n\t\t\t {\n\t\t\t\t color = new Color(153, 51, 204);\n\t\t\t }\n\t\t\t else if(grid[row][col] == FIRE)\n\t\t\t {\n\t\t\t\t color = new Color(229, 64, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == VINE)\n\t\t\t {\n\t\t\t\t color = new Color(45, 102, 25);\n\t\t\t }\n\t\t\t else if(grid[row][col] == TELEPORT)\n\t\t\t {\n\t\t\t\t color = new Color(255, 255, 0);\n\t\t\t }\n\t\t\t else if(grid[row][col] == LASER)\n\t\t\t {\n\t\t\t\t color = new Color(245, 50, 41);\n\t\t\t }\n\t\t\t display.setColor(row, col, color);\n\t\t }\n\t }\n\t \n }", "@Override\n\tpublic void draw(RoomBlocks grid) {\n\t\trenderer.setProjectionMatrix(CameraHolder.instance().getOrtho().combined);\n//\t\tCont tot = new Cont();\n\t\tColor color = new Color();\n\n\t\t\n\t\tDimensions dim = grid.getDimensions().toRoomWorldDimmensions();\n\t\tgrid.forEach(bl -> {\n//\t\t\t\n\t\t\tint x = (GeneratorConstants.ROOM_BLOCK_SIZE * bl.getX()) + GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\n\t\t\tx = (dim.getW() - x) + dim.getX();\n\t\t\t\n\t\t\tint pseudWorldRoomY = grid.getDimensions().getY() * Configuration.getLevelGridElementContentSize();\n\t\t\tint y = (bl.getY() + pseudWorldRoomY) * (GeneratorConstants.ROOM_BLOCK_SIZE);\n\t\t\t\n\t\t\tShapeType shType = ShapeType.Filled;\n\t\t\tboolean render = false;\n\t\t\t\n\t\t\tif(bl.isDoor()) {\n\t\t\t\trender = true;\n\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t} else if(bl.isWall()) {\n//\t\t\t\trender = true;\n//\t\t\t\tcolor.set(1, 1, 1, 1);\n//\t\t\t\tshType = ShapeType.Line;\n\t\t\t} else if(bl.getMetaInfo() != null) {//TODO\n\t\t\t\t\n\t\t\t\tif(bl.getMetaInfo().getType().equals(\".\")) {\n\t\t\t\t\trender = true;\n\t\t\t\t\tcolor.set(0, 0, 0, 1);\n\t\t\t\t} else if(!bl.getMetaInfo().getType().equals(\"x\")) {\n\t\t\t\t\t\n\t\t\t\t\tBrush brush = Configuration.brushesPerTile.get(bl.getMetaInfo().getType().charAt(0));\n\t\t\t\t\tif(brush != null) {// && bl.getOwner() != null\n\t\t\t\t\t\t\n//\t\t\t\t\t\tif(bl.getOwner() != null) {\n//\t\t\t\t\t\t\tSystem.out.println(\"owner: \" + brush.tile);\n//\t\t\t\t\t\t}\t\t\t\t\t\t\n//\t\t\t\t\t\t\n\t\t\t\t\t\trender = true;\n\t\t\t\t\t\tcolor.set(brush.color[0], brush.color[1], brush.color[2], 1);\t\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t}\n\t\t\t\n\t\t\tif(render) {\n\t\t\t\t\n\t\t\t\tint size = GeneratorConstants.ROOM_BLOCK_SIZE;\n\t\t\t\t\n\t\t\t\trenderer.begin(shType);\n\t\t\t\trenderer.setColor(color);\n\t\t\t\trenderer.rect(x, y, size, size);\n\t\t\t\trenderer.end();\n\t\t\t}\n\t\t\t\n//\t\t\tif(bl.getOwner() != null ) {\n//\t\t\t\tfinal int fx = x;\n//\t\t\t\tfinal int fy = y;\n//\t\t\t\t\n//\t\t\t\tbl.getOwner().forEachItems(itm -> {//desenhando os items\n//\t\t\t\t\trenderer.begin(ShapeType.Filled);\n//\t\t\t\t\trenderer.setColor(itm.color[0], itm.color[1], itm.color[2], 1);\n//\t\t\t\t\trenderer.rect(fx + itm.dx, fy + itm.dy, itm.width, itm.height);\n//\t\t\t\t\trenderer.end();\t\t\t\t\t\t\n//\t\t\t\t});\n//\t\t\t}\t\t\t\n\t\t});\n\t}", "public static void spelen() {\n\t\tfor(int x=0;x<10;x++){\n\t\t\tfor(int y=0;y<10;y++){\n\t\t\t\tspelerGridArray[x][y] = 0;\n\t\t\t}\n\t\t}\n\t\tmainPanel.grid1.buttonListener();\n\t\tmainPanel.grid1.enabledGrid(true);\n\t\tmainPanel.grid2.enabledGrid(false);\n\t}", "protected void zoomToPresent(){\n if(xpCursor1 >=0){\n ixDataCursor1 = ixDataShown[xpCursor1];\n }\n if(xpCursor2 >=0){\n ixDataCursor2 = ixDataShown[xpCursor2];\n }\n xpCursor1New = xpCursor2New = cmdSetCursor; \n if(widgg.timeorg.timeSpread > 100) { widgg.timeorg.timeSpread /=2; }\n else { widgg.timeorg.timeSpread = 100; }\n bPaintAllCmd = true;\n widgg.redraw(100, 200);\n }", "@Override\n\tprotected void generateTiles() {\n\t}", "@Override\n public void postPopulate(MetropolisGenerator generator, Chunk chunk) {\n SchematicConfig.RoadCutout[] cuts = clipboard.getSettings().getCutouts();\n \n Cartesian base = new Cartesian(this.chunkX << 4, Constants.BUILD_HEIGHT - 1, this.chunkZ << 4);\n \n for (SchematicConfig.RoadCutout cut : cuts) {\n Cartesian offset, size;\n ContextType roadCheck;\n Parcel parcel;\n \n switch (direction) {\n case NORTH:\n offset = new Cartesian(clipboard.getSizeX(direction) - cut.startPoint, 0, -1);\n size = new Cartesian(-cut.length, cutoutHeight, -cutoutDepth);\n parcel = grid.getParcel(chunkX, chunkZ - 1);\n roadCheck = parcel.getContextType();\n if (roadCheck.equals(ContextType.STREET) || roadCheck.equals(ContextType.HIGHWAY)) {\n cutoutBlocks(generator, base.add(offset), size, Material.STONE);\n }\n break;\n case EAST:\n offset = new Cartesian(clipboard.getSizeX(direction), 0, clipboard.getSizeZ(direction) - cut.startPoint);\n size = new Cartesian(cutoutDepth, cutoutHeight, -cut.length);\n parcel = grid.getParcel(chunkX + (clipboard.getSizeX(direction) >> 4), chunkZ);\n roadCheck = parcel.getContextType();\n if (roadCheck.equals(ContextType.STREET) || roadCheck.equals(ContextType.HIGHWAY)) {\n cutoutBlocks(generator, base.add(offset), size, Material.STONE);\n }\n break;\n case SOUTH:\n offset = new Cartesian(cut.startPoint + 1, 0, clipboard.getSizeZ(direction));\n size = new Cartesian(cut.length, cutoutHeight, cutoutDepth);\n roadCheck = grid.getParcel(chunkX, chunkZ + (clipboard.getSizeZ(direction) >> 4)).getContextType();\n if (roadCheck.equals(ContextType.STREET) || roadCheck.equals(ContextType.HIGHWAY)) {\n cutoutBlocks(generator, base.add(offset), size, Material.STONE);\n }\n break;\n case WEST:\n offset = new Cartesian(-1, 0, cut.startPoint + 1);\n size = new Cartesian(-cutoutDepth, cutoutHeight, cut.length);\n parcel = grid.getParcel(chunkX - 1, chunkZ);\n roadCheck = parcel.getContextType();\n if (roadCheck.equals(ContextType.STREET) || roadCheck.equals(ContextType.HIGHWAY)) {\n cutoutBlocks(generator, base.add(offset), size, Material.STONE);\n }\n break;\n }\n }\n }", "private void setup() {\n // Set the shell layout to a Grid layout.\n shell.setLayout(new GridLayout(1, false));\n \n // Read lockedColorMaps.tbl to get the list of locked color maps\n lockedCmaps = ColorMapUtil.readLockedColorMapFile();\n \n availColorMaps = new ArrayList<String>();\n availColorMapCats = ColorMapUtil.getColorMapCategories();\n \n if( seldCmapCat == null ) {\n \tseldCmapCat = availColorMapCats[0];\n }\n \n// for( String cat : availColorMapCats ) {\n for( String cmap : ColorMapUtil.listColorMaps(seldCmapCat) ) {\n \tif( seldCmapName == null ) {\n \t\tseldCmapName = cmap;\n \t\tif( !initColorMap() ) {\n \t\tseldCmapName = null;\n \t\t\tcontinue; // don't add to the list\n \t\t}\n \t}\n \tavailColorMaps.add(cmap);\n }\n// }\n \t\n createSliderData();\n\n // Initialize the components.\n initComponents(); \n \n // Pack the components.\n shell.pack();\n }", "public void draw() {\n PImage grid = loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/tile.png\");\n for(int i = 0 ; i < 10 ; i++){\n for(int j = 0 ; j < 6 ; j++){\n image(grid, i*grid.width, j*grid.height);\n if(gridPlane.get(List.of(i, j)).getOwner() != null){\n if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Red\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/red3.png\"), i*grid.width, j*grid.height);\n }\n }else if(gridPlane.get(List.of(i, j)).getOwner().getColor().equals(\"Green\")){\n if(gridPlane.get(List.of(i, j)).getAtomCount() == 1){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green1.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 2){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green2.png\"), i*grid.width, j*grid.height);\n }else if(gridPlane.get(List.of(i, j)).getAtomCount() == 3){\n image(loadImage(\"C:/Users/NM/Desktop/UNI_ACAD/INFO1113/Assignment2/Atomination/assets/green3.png\"), i*grid.width, j*grid.height);\n }\n }\n }\n }\n }\n if(this.finish == true){\n System.exit(0);\n }\n }", "@Override\n\tprotected void trazOutroATona() {\n\t\t\n\t}", "@Override\n public void onStyleLoaded(@NonNull Style style) {\n\n\n marcador(style);\n rutaOptimizadaLinea(style);\n\n\n\n CameraPosition position = new CameraPosition.Builder()\n .target(new LatLng(origin.latitude(), origin.longitude()))\n .zoom(10)\n .tilt(13)\n .build();\n mapboxMap.animateCamera(CameraUpdateFactory.newCameraPosition(position));\n\n\n\n //Toast.makeText(Mapboxnavigation.this, R.string.click_instructions, Toast.LENGTH_SHORT).show();\n //mapboxMap.addOnMapClickListener(Mapboxnavigation.this);\n //mapboxMap.addOnMapLongClickListener(Mapboxnavigation.this);\n localizacion(style);\n double a=-3.00;\n // Toast.makeText(getApplicationContext(), \"\"+a, Toast.LENGTH_SHORT).show();\n for(int i=0;i<lista.size();i++){\n generarLugares(lista.get(i));\n }\n\n\n /*p(destino);\n p(intermedi3);\n p(cinco);\n p(intermedi4);*/\n\n\n }", "private void firstSight()\n\t{\n\t\tSwingUtilities.invokeLater(new Runnable() {\n\t\t public void run() { \n\t\t \tfor(int a = 0; a < GRIDSIZE; a++)\n\t\t\t {\n\t\t\t \tfor(int b = 0; b < GRIDSIZE; b++)\n\t\t\t\t {\n\t\t\t \t\tbotones[a][b].toggleOnOff();\n\t\t\t \t\tbotones[a][b].setEnabled(true);\n\t\t\t\t }\n\t\t\t }\n\t\t\t\ttimerStart.stop();\n\t\t }\n\t\t });\n\t}", "@Override\n public void buildGrid(){\n for(int column=0; column<columns; column++){\n for(int row=0; row<rows; row++){\n grid[column][row] = \"[ ]\";\n }\n }\n }", "private void updateGrid() {\n if (intersection != null) {\n colorizeGrid();\n for (int x = 0; x < field.length; x++) {\n for (int y = 0; y < field[0].length; y++) {\n field[x][y].setText(intersection.getLetterCode(x, y));\n }\n }\n }\n }", "public void renderTileManager()\n {\n background(background);\n tiles[activeTile].drawGrid();\n tiles[activeTile].drawCellHover();\n createPreview(tiles[activeTile]);\n drawPreviewHover();\n drawPreviews();\n }", "public Grid() { //Constructs a new grid and fills it with Blank game objects.\r\n\t\tthis.grid = new GameObject[10][10];\r\n\t\tthis.aliveShips = new Ships[4];\r\n\t\tfor (int i = 0; i < this.grid.length; i++) {\r\n\t\t\tfor (int j = 0; j < this.grid[i].length; j++) {\r\n\t\t\t\tthis.grid[i][j] = new Blank(i,j);\r\n\t\t\t}\r\n\t\t}\r\n\t}", "@Override\n\t\tpublic void run() {\n\t\t\tTreePath pathForLocation = tree.getPathForRow(lastRow);\n\t\t\tif (pathForLocation == null)\n\t\t\t\treturn;\n\t\t\tObject lastPathComponent = pathForLocation.getLastPathComponent();\n\t\t\tif (lastPathComponent instanceof DefaultMutableTreeNode) {\n\t\t\t\tDefaultMutableTreeNode node = (DefaultMutableTreeNode) lastPathComponent;\n\t\t\t\tIMNodeData nodeData = (IMNodeData) node.getUserObject();\n\t\t\t\tIMEventService eventHub = view.getContext().getSerivce(\n\t\t\t\t\t\tIMService.Type.EVENT);\n\t\t\t\tif (mEvnet.getID() == MouseEvent.MOUSE_ENTERED) {\n\t\t\t\t\tif (nodeData.getEntity() != null) {\n\t\t\t\t\t\tbounds.setLocation(bounds.x, bounds.y - scrollValue);\n\t\t\t\t\t\tIMEvent event = new IMEvent(\n\t\t\t\t\t\t\t\tIMEventType.SHOW_HOVER_INFOCARD_WINDOW);\n\t\t\t\t\t\tevent.setTarget(nodeData.getEntity());\n\t\t\t\t\t\tevent.putData(\"namedObject\", nodeData.getNamedObject());\n\t\t\t\t\t\tevent.putData(\"view\", view);\n\t\t\t\t\t\tevent.putData(\"nodeBounds\", bounds);\n\t\t\t\t\t\tevent.putData(\"comp\", MiddlePanel.this);\n\t\t\t\t\t\teventHub.broadcast(event);\n\n\t\t\t\t\t\tisShowing = true;\n\t\t\t\t\t}\n\t\t\t\t} else {\n\t\t\t\t\tif (isShowing) {\n\t\t\t\t\t\thideEvent();\n\t\t\t\t\t}\n\t\t\t\t}\n\n\t\t\t}\n\n\t\t\ttimerService.killTimer(this);\n\t\t}", "private void\nhammingScroll_Change() {\n\t\n\tfloat hammingscalemax = 10000f / ((systemDesign_.hammingmax - systemDesign_.hammingmin) / 2f);\n\tfloat hammingscalemin = 0.0001f / ((systemDesign_.hammingmax - systemDesign_.hammingmin) / 2f);\n\tfloat scalelogmin = (float)Math.log(hammingscalemin);\n\tfloat scalelogmax = (float)Math.log(hammingscalemax);\n\n\t// 'remotetrafficscalex = remotetrafficscalemin + (remotetrafficscalemax - remotetrafficscalemin) * (remotetrafficscroll.Value - remotetrafficscroll.min) / (remotetrafficscroll.max - remotetrafficscroll.min)\n\n\tfloat hammingscalelog = scalelogmin\n\t\t\t\t+ (scalelogmax - scalelogmin) \n\t\t\t\t * (systemDesign_.hamming - systemDesign_.hammingmin) \n\t\t\t\t / (systemDesign_.hammingmax - systemDesign_.hammingmin);\n\n\tif (hammingCheck) {\n\t\tsystemDesign_.hammingscale = RnR.Exp(hammingscalelog);\n\t\tsystemDesign_.hamming = hammingave * hammingscale;\n\t\t}\n\telse {\n\t\tsystemDesign_.hammingscale = 0;\n\t\tsystemDesign_.hamming = 0;\n\t\t}\n\n\n\tupdateStatelistScale(MetroParams.UPDATE_STATELIST_SCALE_HAMMING);\n\t}", "protected void warp() {\n\t\tRandom r = new Random();\n\t\t\n\t\t// Get random index from coordinates list\n\t\tint nextPos = r.nextInt(this.coords.length);\n\t\t\n\t\t// Set new position for monster\n\t\tthis.setBounds(this.coords[nextPos].width, this.coords[nextPos].height, mWidth, mHeight);\n\t\t\n\t\tthis.setVisible(true);\n\t}", "@Override\n public void teleopPeriodic() {\n \n boolean targetFound = false; \n int Xpos = -1; int Ypos = -1; int Height = -1; int Width = -1; Double objDist = -1.0; double []objAng = {-1.0,-1.0};\n\n //Getting the number of blocks found\n int blockCount = pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25);\n\t\tSystem.out.println(\"Found \" + blockCount + \" blocks!\"); // Reports number of blocks found\n\t\tif (blockCount <= 0) {\n System.err.println(\"No blocks found\");\n }\n ArrayList <Block> blocks = pixy.getCCC().getBlocks();\n Block largestBlock = null;\n\n //verifies the largest block and store it in largestBlock\n for (Block block:blocks){\n if (block.getSignature() == Pixy2CCC.CCC_SIG1) {\n\n\t\t\t\tif (largestBlock == null) {\n\t\t\t\t\tlargestBlock = block;\n\t\t\t\t} else if (block.getWidth() > largestBlock.getWidth()) {\n\t\t\t\t\tlargestBlock = block;\n }\n\t\t\t}\n }\n //loop\n while (pixy.getCCC().getBlocks(false, Pixy2CCC.CCC_SIG1, 25)>=0 && ButtonLB){\n\n if (largestBlock != null){\n targetFound = true; \n Xpos = largestBlock.getX();\n Ypos = largestBlock.getY();\n Height = largestBlock.getHeight();\n Width = largestBlock.getWidth();\n\n objDist = RobotMap.calculateDist((double)Height, (double)Width, (double)Xpos, (double)Ypos);\n objAng = RobotMap.calculateAngle(objDist, Xpos, Ypos);\n \n }\n //print out values to Dashboard\n SmartDashboard.putBoolean(\"Target found\", targetFound);\n SmartDashboard.putNumber (\"Object_X\", Xpos);\n SmartDashboard.putNumber (\"Object_Y\", Ypos);\n SmartDashboard.putNumber (\"Height\", Height);\n SmartDashboard.putNumber(\"Width\", Width);\n SmartDashboard.putNumber (\"Distance\", objDist);\n SmartDashboard.putNumber(\"X Angle\", objAng[0]);\n SmartDashboard.putNumber(\"Y Angle\", objAng[1]);\n }\n }", "void updateUI() {\n\n\t\tshowProgress(false, null);\n\t\tclearAll();\n\t\tmResults = floorList.get(mCheckedIndex).getRouteResult();\n\n\t\tif (mResults == null) {\n\t\t\t// Toast.makeText(this, \"本层没有导航信息\", Toast.LENGTH_LONG).show();\n\n\t\t\treturn;\n\t\t}\n\t\tArrayList<LocatorGeocodeResult> shelfList = floorList\n\t\t\t\t.get(mCheckedIndex).getShelfList();\n\t\t//MultiPoint bounds = new MultiPoint();\n\t\tfor (LocatorGeocodeResult result : shelfList) {\n\t\t\tString address = result.getAddress();\n\t\t\tArrayList<ParcelableGoods> goodsList = floorList.get(mCheckedIndex)\n\t\t\t\t\t.getGoodsMap().get(address);\n\t\t\tPoint p = (Point) GeometryEngine.project(result.getLocation(), wm,\n\t\t\t\t\tegs);\n\t\t\tif (goodsList != null && goodsList.size() > 0) {\n\t\t\t\tString names = \"\";\n\t\t\t\tfor (ParcelableGoods goods : goodsList) {\n\t\t\t\t\tif (\"\".equals(names)) {\n\t\t\t\t\t\tnames = \"【\" + goods.getName() + \"】\";\n\t\t\t\t\t} else {\n\t\t\t\t\t\tnames = names + \" 【\" + goods.getName() + \"】\";\n\t\t\t\t\t}\n\t\t\t\t}\n\t\t\t\tmMapViewHelper.addMarkerGraphic(p.getY(), p.getX(),\n\t\t\t\t\t\tgoodsList.size() + \"件商品\", names,\n\t\t\t\t\t\tR.drawable.icon_tip_goods,\n\t\t\t\t\t\tgetResources().getDrawable(R.drawable.icon_mark_goods),\n\t\t\t\t\t\tfalse, 1);\n\t\t\t\t//bounds.add(result.getLocation());\n\t\t\t}\n\t\t}\n\t\tcurRoute = mResults.getRoutes().get(0);\n\t\t// Symbols for the route and the destination (blue line, checker flag)\n\t\tSimpleLineSymbol routeSymbol = new SimpleLineSymbol(Color.BLUE, 5);\n\t\t// Drawable drawable = getResources().getDrawable(R.drawable.arrow);\n\n\t\tint count = ((Polyline) curRoute.getRouteGraphic().getGeometry())\n\t\t\t\t.getPointCount();\n\t\tif (count > 0) {\n\n\t\t\tGraphic routeGraphic = new Graphic(curRoute.getRouteGraphic()\n\t\t\t\t\t.getGeometry(), routeSymbol);\n\t\t\t// Add the full route graphics, start and destination graphic to the\n\t\t\t// routeLayer\n\n\t\t\trouteLayer.addGraphics(new Graphic[] { routeGraphic });\n\t\t\tPoint p = (Point) GeometryEngine.project(((Polyline) curRoute\n\t\t\t\t\t.getRouteGraphic().getGeometry()).getPoint(0), wm, egs);\n\t\t\t// map.centerAt(((Polyline)\n\t\t\t// curRoute.getRouteGraphic().getGeometry())\n\t\t\t// .getPoint(0), true);\n\t\t\t\n\t\t\t\n\t\t\tmMapViewHelper.addMarkerGraphic(p.getY(), p.getX(), \"起始点\",\n\t\t\t\t\tfloorList.get(mCheckedIndex).getStartPoint(),\n\t\t\t\t\tR.drawable.icon_tip_start,\n\t\t\t\t\tgetResources().getDrawable(R.drawable.icon_mark_start),\n\t\t\t\t\tfalse, 1);\n\t\t\t//bounds.add(((Polyline) curRoute\n\t\t\t//\t\t.getRouteGraphic().getGeometry()).getPoint(0));\n\t\t\tp = (Point) GeometryEngine.project(((Polyline) curRoute\n\t\t\t\t\t.getRouteGraphic().getGeometry()).getPoint(count - 1), wm,\n\t\t\t\t\tegs);\n\t\t\tSystem.out.println(\"终点x:\" + p.getX() + \" y:\" + p.getY());\n\t\t\tString endPoint = floorList.get(mCheckedIndex).getEndPoint();\n\t\t\tif (endPoint == null || \"\".equals(endPoint)) {\n\t\t\t\tendPoint = \"终点\";\n\t\t\t}\n\t\t\tmMapViewHelper.addMarkerGraphic(p.getY(), p.getX(), \"终点\", endPoint,\n\t\t\t\t\tR.drawable.icon_tip_end,\n\t\t\t\t\tgetResources().getDrawable(R.drawable.icon_mark_end),\n\t\t\t\t\tfalse, 1);\n\t\t\t//bounds.add(((Polyline) curRoute\n\t\t\t//\t\t.getRouteGraphic().getGeometry()).getPoint(count - 1));\n\t\t\tmap.setExtent(curRoute.getRouteGraphic().getGeometry(), 100, true);\n\t\t}\n\t}", "@Override\n\tpublic void placementcell() {\n\t\t\n\t}", "private void paintGrid() {\n\n g2d.setColor(_BOARDCOLOR); //Set the color to specific color of the board.\n\n for(int i = 0; i < grids.size(); i++) { //Iterating the 16 grids while drawing each on JComponent.\n\n g2d.draw(grids.get(i));\n }\n }", "@Override\r\n\t\t\tpublic void run() {\n\t\t\t\t\r\n\t\t\t\t\t\t\t\t\t\r\n\t\t\t\tif (Mascota.get_hambre() > 0 && Mascota.get_hambre() != 5) {\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n try {\r\n \t Mascota.set_alimentar();\r\n\t\t\t\t\t\tmostrar_hambre.setText(\"Nivel de hambre : \" + Mascota.get_hambre());\r\n\t\t\t\t\t\teti_actividad.setText(\"Ñam...ñam...Estoy comiendo\");\r\n\t\t\t\t\t\teti_actividad.setVisible(true);\r\n\t\t\t\t\t\tThread.sleep(6000);\r\n\t\t\t\t\t\teti_actividad.setVisible(false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (Exception e) {\r\n\t\t\t\t\t\t// TODO: handle exception\r\n\t\t\t\t }\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}else {\r\n\t\t\t\t\t\r\n\t\t\t\t\ttry {\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t\teti_actividad.setText(\"No tengo hambre\");\r\n\t\t\t\t\t\teti_actividad.setVisible(true);\r\n\t\t\t\t\t\tThread.sleep(6000);\r\n\t\t\t\t\t\teti_actividad.setVisible(false);\r\n\t\t\t\t\t\t\r\n\t\t\t\t\t} catch (InterruptedException e) {\r\n\t\t\t\t\t\t// TODO Auto-generated catch block\r\n\t\t\t\t\t\te.printStackTrace();\r\n\t\t\t\t\t}\r\n\t\t\t\t\t\r\n\t\t\t\t\t\r\n\t\t\t\t}\r\n\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\t\r\n\t\t\t}", "protected void execute() {\n\t\tRobotMap.leftMaster.set(ControlMode.PercentOutput, vision.blockCheck() * turnMultiplier(\"left\"));\n\t\tRobotMap.rightMaster.set(ControlMode.PercentOutput, vision.blockCheck() * turnMultiplier(\"right\"));\n\t}", "public void update()\n {\n if (sashButton != null) {\n Rectangle r = sashButton.getBounds();\n\n if (topGridSash.isVisible()) {\n topGridSash.resetBounds(r);\n }\n\n if (leftGridSash.isVisible()) {\n leftGridSash.resetBounds(r);\n }\n }\n }", "private void update()\n {\n // update the grid square panels\n Component[] components = pnlIsland.getComponents();\n for ( Component c : components )\n {\n // all components in the panel are GridSquarePanels,\n // so we can safely cast\n GridSquarePanel gsp = (GridSquarePanel) c;\n gsp.update();\n }\n \n // update player information\n int[] playerValues = game.getPlayerValues();\n txtPlayerName.setText(game.getPlayerName());\n progPlayerStamina.setMaximum(playerValues[Game.MAXSTAMINA_INDEX]);\n progPlayerStamina.setValue(playerValues[Game.STAMINA_INDEX]);\n progBackpackWeight.setMaximum(playerValues[Game.MAXWEIGHT_INDEX]);\n progBackpackWeight.setValue(playerValues[Game.WEIGHT_INDEX]);\n progBackpackSize.setMaximum(playerValues[Game.MAXSIZE_INDEX]);\n progBackpackSize.setValue(playerValues[Game.SIZE_INDEX]);\n \n //Update Kiwi and Predator information\n txtKiwisCounted.setText(Integer.toString(game.getKiwiCount()) );\n txtPredatorsLeft.setText(Integer.toString(game.getPredatorsRemaining()));\n \n // update inventory list\n listInventory.setListData(game.getPlayerInventory());\n listInventory.clearSelection();\n listInventory.setToolTipText(null);\n btnUse.setEnabled(false);\n btnDrop.setEnabled(false);\n \n // update list of visible objects\n listObjects.setListData(game.getOccupantsPlayerPosition());\n listObjects.clearSelection();\n listObjects.setToolTipText(null);\n btnCollect.setEnabled(false);\n btnCount.setEnabled(false);\n \n // update movement buttons\n btnMoveNorth.setEnabled(game.isPlayerMovePossible(MoveDirection.NORTH));\n btnMoveEast.setEnabled( game.isPlayerMovePossible(MoveDirection.EAST));\n btnMoveSouth.setEnabled(game.isPlayerMovePossible(MoveDirection.SOUTH));\n btnMoveWest.setEnabled( game.isPlayerMovePossible(MoveDirection.WEST));\n }", "@Override\n public void finish() {\n\n super.finish();\n //construction.updateConstructionZones();\n }", "public void lightBuild() {\n buildPawn.setStyle(\"-fx-background-color: YELLOW;\"\n + \"-fx-background-radius: 30;\"\n + \"-fx-border-radius: 30;\"\n + \"-fx-border-color: 363507;\");\n movePawn.setStyle(\"-fx-background-color: null\");\n stopPawn.setStyle(\"-fx-background-color: null\");\n }", "public void resizeGrid() {\n resizeGrid(getWidth(),getHeight());\n }", "@Override\r\n\tpublic void updateScreen() {\r\n\t\tsuper.updateScreen();\r\n\t\t_resolutionResolver = new ScaledResolution(Minecraft.getMinecraft(), Minecraft.getMinecraft().displayWidth, Minecraft.getMinecraft().displayHeight);\r\n\t\tthis.width = _resolutionResolver.getScaledWidth();\r\n\t\tthis.height = _resolutionResolver.getScaledHeight();\r\n\r\n\t\t// Handle when the player clicked on a cell\r\n\t\tif (_selectedCell != -1) {\r\n\t\t \r\n\t\t\t// make sure we have our player or otherwise we will\r\n\t\t // not be able to set the correct position for the player\r\n\t\t\tif (HubbyUtils.getServerPlayer() != null) {\r\n\t\t\t\tint cellIndex = _startCell + _selectedCell;\r\n\t\t\t\tif (cellIndex < UltraTeleportWaypoint.getWaypointCount()) {\r\n\t\t\t\t UltraTeleportWaypoint p = UltraTeleportWaypoint.getWaypoints().get(cellIndex);\r\n\t\t\t\t double posX = p.getPos().getX();\r\n\t\t\t\t double posY = p.getPos().getY();\r\n\t\t\t\t double posZ = p.getPos().getZ();\r\n\t\t\t\t float yaw = p.getRotationY();\r\n\t\t\t\t float pitch = p.getRotationX();\r\n\r\n\t\t\t\t // Get the client world to be able to find the proper block for teleporting\r\n\t\t\t\t World world = HubbyUtils.getClientWorld();\r\n\t\t\t\t if (world != null) {\r\n\t\t\t\t while (true) {\r\n\t\t\t\t \tBlockPos pos = new BlockPos(posX, posY, posZ);\r\n\t\t\t\t if (world.isAirBlock(pos)) {\r\n\t\t\t\t break;\r\n\t\t\t\t }\r\n\t\t\t\t posY += 1.0d;\r\n\t\t\t\t }\r\n\t\t\t\t }\r\n\r\n\t\t\t\t // Update the player's location on the server and then\r\n\t\t\t\t // that will pass down to the client player and update his\r\n\t\t\t\t // position as well\r\n\t\t\t\t HubbyUtils.getServerPlayer().playerNetServerHandler.setPlayerLocation(posX, posY, posZ, yaw, pitch);\r\n\t\t\t\t}\r\n\t\t\t}\r\n\r\n\t\t\t_selectedCell = -1;\r\n\t\t}\r\n\r\n\t\t// update selected list\r\n for (int i = 0; i < UltraTeleportWaypoint.getWaypointCount(); ++i) {\r\n if (i >= _selectedList.size()) {\r\n _selectedList.add(false);\r\n }\r\n }\r\n\r\n // Only show delete button when we have something selected\r\n if (getSelectedCount() > 0) {\r\n this.buttonList.add(_deleteButton);\r\n }\r\n else {\r\n this.buttonList.clear();\r\n }\r\n\t}", "@Override\r\n public void run() {\n \r\n if(mCenterPanelWrapper == null) {\r\n mCenterPanelWrapper = UiCompat.createPersonaBackgroundPanel();\r\n mCenterWrapper = new PluginCenterPanelWrapper() {\r\n \r\n @Override\r\n public PluginCenterPanel[] getCenterPanels() {\r\n return new PluginCenterPanel[] {new PluginCenterPanelImpl()};\r\n }\r\n \r\n @Override\r\n public void scrolledToChannel(Channel channel) {\r\n if(mListPanel != null) {\r\n mListPanel.showChannel(channel);\r\n }\r\n }\r\n \r\n @Override\r\n public void filterSelected(ProgramFilter filter) {\r\n if(mListPanel != null) {\r\n mListPanel.showForFilter(filter);\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToDate(Date date) {\r\n if(mListPanel != null) {\r\n mListPanel.showForDate(date, -1);\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToNow() {\r\n if(mListPanel != null) {\r\n mListPanel.showForNow();\r\n }\r\n }\r\n \r\n @Override\r\n public void scrolledToTime(int time) {\r\n if(mListPanel != null) {\r\n mListPanel.showForTimeButton(time);\r\n }\r\n }\r\n \r\n @Override\r\n public void timeEvent() {\r\n if(mListPanel != null) {\r\n mListPanel.refreshView();\r\n }\r\n }\r\n };\r\n \r\n new Thread() {\r\n public void run() {\r\n while(!mTvBrowserStarted) {\r\n try {\r\n sleep(200);\r\n } catch (InterruptedException e) {}\r\n }\r\n \r\n addPanel();\r\n }\r\n }.start();\r\n }\r\n }", "public void rebuild()\n {\n this.tilePropertyPanel.table.clearChildren();\n this.spritePropertyPanel.table.clearChildren();\n this.mapPropertyPanel.removeablePropertyPanel.table.clearChildren();\n if(map.selectedLayer != null)\n {\n this.layerPropertyPanel.setVisible(true);\n this.layerPropertyPanel.layerWidthProperty.value.setText(Integer.toString(map.selectedLayer.width));\n this.layerPropertyPanel.layerHeightProperty.value.setText(Integer.toString(map.selectedLayer.height));\n this.layerPropertyPanel.layerZProperty.value.setText(Float.toString(map.selectedLayer.z));\n }\n else\n this.layerPropertyPanel.setVisible(false);\n if(map.tileMenu.selectedTiles.size == 1)\n {\n if(map.tileMenu.selectedTiles.first().tool == TileMenuTools.TILE)\n {\n Array<PropertyField> tileProperties = map.tileMenu.selectedTiles.first().lockedProperties;\n for (int i = 0; i < tileProperties.size; i++)\n this.tilePropertyPanel.table.add(tileProperties.get(i)).padBottom(1).row();\n this.tilePropertyPanel.setVisible(true);\n }\n else if(map.tileMenu.selectedTiles.first().tool == TileMenuTools.SPRITE)\n {\n Array<PropertyField> spriteProperties = map.tileMenu.selectedTiles.first().lockedProperties;\n for (int i = 0; i < spriteProperties.size; i++)\n this.spritePropertyPanel.table.add(spriteProperties.get(i)).padBottom(1).row();\n this.spritePropertyPanel.setVisible(true);\n }\n }\n if(map.selectedSprites.size > 0)\n {\n Array<PropertyField> spriteProperties = map.selectedSprites.first().lockedProperties;\n for (int i = 0; i < spriteProperties.size; i++)\n this.spritePropertyPanel.table.add(spriteProperties.get(i)).padBottom(1).row();\n this.spritePropertyPanel.setVisible(true);\n }\n if(map.selectedSprites.size == 0 && map.tileMenu.selectedTiles.size == 0)\n {\n for(int i = 0; i < mapPropertyPanel.properties.size; i ++)\n {\n this.mapPropertyPanel.removeablePropertyPanel.table.add(mapPropertyPanel.properties.get(i)).padBottom(1).row();\n }\n this.mapPropertyPanel.removeablePropertyPanel.setVisible(true);\n }\n if(this.layerPropertyPanel.isVisible())\n this.layerPropertyPanel.setSize(getWidth(), toolHeight);\n else\n this.layerPropertyPanel.setSize(getWidth(), 0);\n if(this.tilePropertyPanel.isVisible())\n this.tilePropertyPanel.setSize(getWidth(), toolHeight);\n else\n this.tilePropertyPanel.setSize(getWidth(), 0);\n if(this.spritePropertyPanel.isVisible())\n this.spritePropertyPanel.setSize(getWidth(), toolHeight);\n else\n this.spritePropertyPanel.setSize(getWidth(), 0);\n if(this.mapPropertyPanel.removeablePropertyPanel.isVisible())\n this.mapPropertyPanel.removeablePropertyPanel.setSize(getWidth(), toolHeight);\n else\n this.mapPropertyPanel.removeablePropertyPanel.setSize(getWidth(), 0);\n\n this.propertyPanel.rebuild();\n this.propertyTable.invalidateHierarchy();\n\n setSize(getWidth(), getHeight()); // refits everything\n }", "private void setCellGrid(){\n count=0;\n status.setText(\"Player 1 Move\");\n field = new ArrayList<>();\n for (int i=0; i< TwoPlayersActivity.CELL_AMOUNT; i++) {\n field.add(new Cell(i));\n }\n }", "public void onTick() {\r\n if (this.worklist.size() > 0) {\r\n ArrayList<ACell> tempWorklist = new ArrayList<ACell>();\r\n for (ACell c : this.worklist) {\r\n tempWorklist.add(c);\r\n }\r\n this.worklist = new ArrayList<ACell>();\r\n this.collector(tempWorklist);\r\n }\r\n else if (this.allCellsFlooded()) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawWin();\r\n }\r\n else if (this.currTurn >= this.maxTurn) {\r\n if (this.worklist.size() > 0) {\r\n this.worklist = new ArrayList<ACell>();\r\n }\r\n this.drawLose();\r\n }\r\n }", "public void createGrid() {\n\t\tint[][] neighbours = getIo().getNeighbours();\n\t\tsetGrid(new GridAlg(neighbours, animals));\n\t\tgetGrid().setStep(getStep());\n\t}", "private void reCalcularWindows(){\n }", "private void setupWindowsAnimations() {\n }", "private static void setQui(){\n int mX, mY;\n for (Integer integer : qList) {\n mY = (int) (Math.floor(1.f * integer / Data.meshRNx));\n mX = integer - Data.meshRNx * mY;\n if (Data.densCells[mX][mY] > Data.gwCap[mX][mY] * .75) {\n for (int j = 0; j < Data.densCells[mX][mY]; j++) {\n Cell cell = (Cell) cells.get(Data.idCellsMesh[mX][mY][j]);\n cell.vState = true;\n cell.quiescent = Data.densCells[mX][mY] >= Data.gwCap[mX][mY];\n }\n }\n }\n }", "public void doLocalization() {\n\t\t\n\t\t/*\tinstruction this class\n\t\t * drive to location listed in tutorial\n\t\t * \tstart rotating and clock all 4 gridlines\n\t\t * \tdo trig to compute (0,0) and 0 degrees\n\t\t * when done travel to (0,0) and turn to 0 degrees\n\t\t */\n\t\tint button_select;\n\t\tint current=0;\n\t\tint last=0;\n\t\tint diff ;\n\t\t\n\t\t// Setting up method variables and objects.\n\t\tBasicNavigator navigation = new BasicNavigator(odo);\n\t\t\n\t\t//array pos has the size of 3, index of 0,1,2\n\t\tdouble[] pos = new double[3];\n\t\t\n\t\t//array gridlines has the size of 5, from index of 0,1,2,3,4\n\t\tdouble[] gridlines = new double[5];\n\t\t\n\t\t// set up very thing to zero.\n\t\todo.setPosition(new double [] {0, 0, 0}, new boolean [] {true, true, true});\n\t\t\n\t\t// geting theta from from the odometer class\n\t\todo.getPosition(pos);\n\t\tcount = 0;\n\t\t\n\t\t// turn the robot Counter-clockwise\n\t\tnavigation.setSpeeds(-250, 250);\n\t\t\n\t\tdiff = lightreading();\n\t\twhile(rotate){\n\t\t\tcurrent = lightreading();\n\t\t\t\n\t\t\tdiff = last-current;\n\t\t\tif(diff >10){\n\t\t\t\t//Meaning the a grid line is detected. the color value for the wood is 43, black line has a lower gridline value\n\t\t\t\t\n\t\t\t\todo.getPosition(pos);\n\t\t\t\t\n\t\t\t\t//in index 0 of gridline, record the angle on the odo.\n\t\t\t\tgridlines[count]=pos[2];\n\t\t\t\tSound.buzz();\n\t\t\t\tcount++;\n\t\t\t}\n\t\t\tif(count==4){\n\t\t\t\t//if on the last count, the robot rotates more than one circle. then set to false.\n\t\t\t\tnavigation.turnTo(0,true);\n\t\t\t\trotate=false;\n\t\t\t\t//navigation.setSpeeds(0,0);\n\t\t\t}\n\t\t\tlast=current;\n\t\t\ttry { Thread.sleep(25); } catch (InterruptedException e) {}\n\t\t}// End of While loop\n\t\t\n\t\t// calculation for angle and x coordinate and y coordinate\n\t\t// formulas were provided in tutorial\n\n\t\t/*\n\t\t\t\t^\n\t\t\t\t|y\n\t\tgridline[1]\t|gridline[0]\t\n\t\t\t\t|\n\t\t\t-------------------> x gridline[3]\n\t\t\t\t|\t\n\t\t\t\t|\n\t\t\t\t|gridline[2]\t\n\n\n\t\t*/\t\n\t\tangleX = gridlines[1] - gridlines[3];\n\t\tangleY = gridlines[0] - gridlines[2];\n\t\t\n\t\tlengthX = Math.abs(LS_TO_CENTER * Math.cos(Math.toRadians(angleY/2)));\n\t\tlengthY = Math.abs(LS_TO_CENTER * Math.cos(Math.toRadians(angleX/2)));\n\t\t\n\t\tdeltaTheta = (angleY/2) - gridlines[0] + 90 + 180;\n\t\t\n\t\t// set the new position in odometer\n\t\todo.setPosition(new double [] {-(lengthX), -(lengthY), deltaTheta-Axis_Correction}, new boolean [] {true, true, true});\n\t\t\n\t\t// in the end turn and travel to (0,0)\n\t\tnavigation.travelTo(0.0, 0.0);\n\t\tnavigation.turnTo(0.0,true);\t\n\t\t\n\t\t// set the angle to zero and axis to the o as well\n\t\t// This is commented out to test the localization v3.0\n\t\t//odo.setPosition(new double [] {0.0, 0.0, 0}, new boolean [] {true, true, true});\n\t}", "void printGrid() {\n GridHelper.printGrid(hiddenGrid);\n }", "void go(){\n\t\twindow.setSize(28, 80);\n\t\twindow.setDefaultCloseOperation(JFrame.EXIT_ON_CLOSE);\n\t\twindow.setVisible(true);\n\t\twindow.setResizable(false);\n\t\twindow.add(new PewGrid());\n\t\t// Adds a listener for mouse related events\n\t\twindow.addMouseListener(new mouseevent());\n\t\twindow.repaint();\n\t\t//move();\n\t}", "public void draw_grid() {\n for (int i = 0; i <= xNumTiles; i++) {\n stroke(100);\n line(i * tileSize, 0, i * tileSize, yNumTiles * tileSize);\n }\n\n for (int j = 0; j <= yNumTiles; j++) {\n stroke(100);\n line(0, j * tileSize, xNumTiles * tileSize, j * tileSize);\n }\n }", "@Override\n\t\tpublic void run() {\n\t\t\tshowProgress(false, null);\n\t\t\tboolean canRoute = false;\n\t\t\tfor (FloorInfo floorInfo : floorList) {\n\t\t\t\tArrayList<LocatorGeocodeResult> shelfList = floorInfo\n\t\t\t\t\t\t.getShelfList();\n\t\t\t\tif (shelfList.size() > 0) {\n\t\t\t\t\tStopGraphic points[] = new StopGraphic[shelfList.size()];\n\t\t\t\t\tint index = 1;\n\t\t\t\t\tfor (LocatorGeocodeResult result : shelfList) {\n\t\t\t\t\t\tString address = result.getAddress();\n\t\t\t\t\t\tif (index >= shelfList.size()\n\t\t\t\t\t\t\t\t&& !address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tbreak;\n\t\t\t\t\t\t}\n\n\t\t\t\t\t\tPoint p = (Point) GeometryEngine.project(\n\t\t\t\t\t\t\t\tresult.getLocation(), wm, egs);\n\t\t\t\t\t\tif (address.equals(floorInfo.getStartPoint())) {\n\t\t\t\t\t\t\tpoints[0] = new StopGraphic(p);\n\n\t\t\t\t\t\t\tSystem.out.println(\"起始点x:\" + p.getX() + \" y:\"\n\t\t\t\t\t\t\t\t\t+ p.getY());\n\n\t\t\t\t\t\t} else if (floorInfo.getEndPoint() != null\n\t\t\t\t\t\t\t\t&& address.equals(floorInfo.getEndPoint())) {\n\t\t\t\t\t\t\tpoints[shelfList.size() - 1] = new StopGraphic(p);\n\t\t\t\t\t\t} else {\n\t\t\t\t\t\t\tpoints[index++] = new StopGraphic(p);\n\n\t\t\t\t\t\t}\n\n\t\t\t\t\t}\n\t\t\t\t\tif (points[0] != null && points.length >= 2) {\n\t\t\t\t\t\tcanRoute = true;\n\t\t\t\t\t\trouteCount++;\n\t\t\t\t\t}\n\t\t\t\t\tfloorInfo.setPoints(points);\n\t\t\t\t}\n\n\t\t\t}\n\t\t\tclearAll();\n\t\t\tif (!canRoute) {\n\t\t\t\tToast.makeText(MapActivity.this, \"没有找到足够的点,无法导航\",\n\t\t\t\t\t\tToast.LENGTH_SHORT).show();\n\t\t\t} else {\n\t\t\t\tQueryDirections();\n\t\t\t}\n\t\t}", "public void processSnapToGrid() {\n dataManager.snapToGrid();\n }", "protected void execute() {\n \tthis.LiftVertAxis.manualOverride(-(this.oi.getBMGamepadAxis5() * .75));\n }", "private void initIslandGrid()\n {\n // Add the grid\n int rows = game.getNumRows();\n int columns = game.getNumColumns();\n // set up the layout manager for the island grid panel\n pnlIsland.setLayout(new GridLayout(rows, columns));\n // create all the grid square panels and add them to the panel\n // the layout manager of the panel takes care of assigning them to the\n // the right position\n for ( int row = 0 ; row < rows ; row++ )\n {\n for ( int col = 0 ; col < columns ; col++ )\n {\n pnlIsland.add(new GridSquarePanel(game, row, col));\n }\n }\n }", "private void initGrids() {\n grid0 = new Grid(100f, 50f, 100f, 0);\n grid1 = new Grid(100f, 150f, 100f, 1);\n grid2 = new Grid(100f, 250f, 100f, 2);\n grid3 = new Grid(100f, 350f, 100f, 3);\n grid4 = new Grid(100f, 50f, 200f, 4);\n grid5 = new Grid(100f, 150f, 200f, 5);\n grid6 = new Grid(100f, 250f, 200f, 6);\n grid7 = new Grid(100f, 350f, 200f, 7);\n grid8 = new Grid(100f, 50f, 300f, 8);\n grid9 = new Grid(100f, 150f, 300f, 9);\n grid10 = new Grid(100f, 250f, 300f, 10);\n grid11 = new Grid(100f, 350f, 300f, 11);\n grid12 = new Grid(100f, 50f, 400f, 12);\n grid13 = new Grid(100f, 150f, 400f, 13);\n grid14 = new Grid(100f, 250f, 400f, 14);\n grid15 = new Grid(100f, 350f, 400f, 15);\n\n /**\n * Adding grids from 0 to 15 to static ArayList of all grids\n */\n grids.clear();\n\n grids.add(grid0);\n grids.add(grid1);\n grids.add(grid2);\n grids.add(grid3);\n grids.add(grid4);\n grids.add(grid5);\n grids.add(grid6);\n grids.add(grid7);\n grids.add(grid8);\n grids.add(grid9);\n grids.add(grid10);\n grids.add(grid11);\n grids.add(grid12);\n grids.add(grid13);\n grids.add(grid14);\n grids.add(grid15);\n }", "public boolean onGrid(int xValue, int yValue);", "public void aggiornaMossa(Cell cella) {\n currentMove.setIdPawn(currentPawn);\n currentMove.setTargetX(cella.getX());\n currentMove.setTargetY(cella.getY());\n Platform.runLater(() -> {\n// jumpMove.setDisable(true);\n submitAction.setDisable(true);\n });\n\n }", "public WinScreen()\r\n { \r\n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\r\n super(1500, 500, 1); \r\n\r\n prepare();\r\n }", "public void displayGrid(){\n \tint max = currentOcean.getMaxGrid(); // modified by Ludo\n \tint line = max*2 +1; \t\t\t\t// modified by Ludo\n \tfor(int i=0; i<max+1;i++){\t\t\t// modified by Ludo\n \t int lineStart = 0 + line*i;\t\t// modified by Ludo\n \t int lineEnd = line + line*i;\t\t// modified by Ludo\n \t System.out.println(currentOcean.toString().substring(lineStart, lineEnd)); // modified by Ludo\n }\n }", "public void initOfficeHoursGridStyle() {\r\n // RIGHT SIDE - THE OFFICE HOURS GRID TIME HEADERS\r\n CSGWorkspace workspaceComponent = (CSGWorkspace)app.getWorkspaceComponent();\r\n workspaceComponent.getOfficeHoursGridPane().getStyleClass().add(CLASS_OFFICE_HOURS_GRID);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridTimeHeaderPanes(), CLASS_OFFICE_HOURS_GRID_TIME_COLUMN_HEADER_PANE);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridTimeHeaderLabels(), CLASS_OFFICE_HOURS_GRID_TIME_COLUMN_HEADER_LABEL);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridDayHeaderPanes(), CLASS_OFFICE_HOURS_GRID_DAY_COLUMN_HEADER_PANE);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridDayHeaderLabels(), CLASS_OFFICE_HOURS_GRID_DAY_COLUMN_HEADER_LABEL);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridTimeCellPanes(), CLASS_OFFICE_HOURS_GRID_TIME_CELL_PANE);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridTimeCellLabels(), CLASS_OFFICE_HOURS_GRID_TIME_CELL_LABEL);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridTACellPanes(), CLASS_OFFICE_HOURS_GRID_TA_CELL_PANE);\r\n setStyleClassOnAll(workspaceComponent.getOfficeHoursGridTACellLabels(), CLASS_OFFICE_HOURS_GRID_TA_CELL_LABEL);\r\n }", "public void fillGrid() {\r\n\t\ttimer.startAlgorithm(\"ChronalCharger.fillGrid()\");\r\n\t\t// From top to bottom...\r\n\t\tfor (int i=0; i<powerGrid.length; i++) {\r\n\t\t\t// ...and from left to right...\r\n\t\t\tfor (int j=0; j<powerGrid[0].length; j++) {\r\n\t\t\t\t// ...calculate each cell's power level.\r\n\t\t\t\tpowerGrid[i][j] = calculateCellPower(j, i);\r\n\t\t\t}\r\n\t\t}\r\n\t\ttimer.stopAlgorithm();\r\n\t}", "public GameWon()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(550, 600, 1); \n addObject(b1,275,250);\n addObject(b2,275,380);\n }", "public pr3s1()\n { \n // Create a new world with 600x400 cells with a cell size of 1x1 pixels.\n super(1280, 720, 1); \n prepare();\n }" ]
[ "0.59005445", "0.5808162", "0.55805284", "0.55342597", "0.55156404", "0.5487656", "0.54860425", "0.54488707", "0.54287994", "0.5423335", "0.539683", "0.5395065", "0.5393589", "0.5372302", "0.53360194", "0.5324221", "0.5321203", "0.5310981", "0.5310085", "0.53006345", "0.52996373", "0.52986974", "0.5296621", "0.52941644", "0.5284517", "0.52825034", "0.5282471", "0.5277024", "0.5274871", "0.5263593", "0.5259115", "0.5251042", "0.52465916", "0.52461153", "0.524371", "0.5236216", "0.5235502", "0.523404", "0.5230798", "0.5230378", "0.52122355", "0.5211961", "0.51979053", "0.51935714", "0.5190576", "0.5183795", "0.51809627", "0.51790696", "0.51773316", "0.5165813", "0.51583356", "0.5157346", "0.5154212", "0.5146528", "0.51426846", "0.5135318", "0.5134789", "0.51336855", "0.51286733", "0.51277125", "0.5123686", "0.51233244", "0.51220113", "0.5121118", "0.51189244", "0.51157975", "0.5115597", "0.51152754", "0.5110934", "0.51107675", "0.51101166", "0.510745", "0.5105757", "0.5100705", "0.5096502", "0.5095402", "0.5094962", "0.5092529", "0.5091177", "0.5089261", "0.5082685", "0.5077215", "0.5076577", "0.50722593", "0.50641733", "0.50602376", "0.5059028", "0.50557226", "0.50551146", "0.5053255", "0.504814", "0.50472945", "0.5043154", "0.504149", "0.5039629", "0.5038135", "0.5037392", "0.5035747", "0.50351876", "0.5032653", "0.5028005" ]
0.0
-1